1 /* 2 * Copyright (c) 2017-2018 The Linux Foundation. All rights reserved. 3 * 4 * 5 * Permission to use, copy, modify, and/or distribute this software for 6 * any purpose with or without fee is hereby granted, provided that the 7 * above copyright notice and this permission notice appear in all 8 * copies. 9 * 10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 11 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 12 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 13 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 14 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 15 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 16 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 17 * PERFORMANCE OF THIS SOFTWARE. 18 */ 19 20 /** 21 * DOC: target_if_dfs_full_offload.h 22 * This file contains dfs target interface for full-offload. 23 */ 24 25 #ifndef _TARGET_IF_DFS_FULL_OFFLOAD_H_ 26 #define _TARGET_IF_DFS_FULL_OFFLOAD_H_ 27 28 /** 29 * target_if_dfs_reg_offload_events() - registers dfs events for full offload. 30 * @psoc: Pointer to psoc object. 31 * 32 * Return: QDF_STATUS 33 */ 34 #if defined(WLAN_DFS_FULL_OFFLOAD) 35 QDF_STATUS target_if_dfs_reg_offload_events(struct wlan_objmgr_psoc *psoc); 36 #else 37 static QDF_STATUS 38 target_if_dfs_reg_offload_events(struct wlan_objmgr_psoc *psoc) 39 { 40 return QDF_STATUS_SUCCESS; 41 } 42 #endif 43 44 /** 45 * target_process_bang_radar_cmd() - fill unit test args and send bangradar 46 * command to firmware. 47 * @pdev: Pointer to DFS pdev object. 48 * @dfs_unit_test: Pointer to dfs_unit_test structure. 49 * 50 * Return: QDF_STATUS 51 */ 52 #if defined(WLAN_DFS_FULL_OFFLOAD) 53 QDF_STATUS target_process_bang_radar_cmd(struct wlan_objmgr_pdev *pdev, 54 struct dfs_emulate_bang_radar_test_cmd *dfs_unit_test); 55 #else 56 static QDF_STATUS target_process_bang_radar_cmd(struct wlan_objmgr_pdev *pdev, 57 struct dfs_emulate_bang_radar_test_cmd *dfs_unit_test) 58 { 59 return QDF_STATUS_SUCCESS; 60 } 61 #endif 62 63 #if defined(WLAN_DFS_FULL_OFFLOAD) && defined(QCA_DFS_NOL_OFFLOAD) 64 /** 65 * target_send_usenol_pdev_param - send usenol pdev param to FW. 66 * @pdev: Pointer to pdev object. 67 * @usenol: Value of user configured usenol. 68 * 69 * Return: QDF_STATUS 70 */ 71 QDF_STATUS target_send_usenol_pdev_param(struct wlan_objmgr_pdev *pdev, 72 bool usenol); 73 74 /** 75 * target_send_subchan_marking_pdev_param - Send subchannel marking 76 * pdev param to FW. 77 * @pdev: Pointer to pdev object. 78 * @subchanmark: Value of user configured subchannel_marking. 79 * 80 * Return: QDF_STATUS 81 */ 82 QDF_STATUS 83 target_send_subchan_marking_pdev_param(struct wlan_objmgr_pdev *pdev, 84 bool subchanmark); 85 86 #else 87 static inline QDF_STATUS 88 target_send_usenol_pdev_param(struct wlan_objmgr_pdev *pdev, 89 bool usenol) 90 { 91 return QDF_STATUS_SUCCESS; 92 } 93 94 static inline QDF_STATUS 95 target_send_subchan_marking_pdev_param(struct wlan_objmgr_pdev *pdev, 96 bool subchanmark) 97 { 98 return QDF_STATUS_SUCCESS; 99 } 100 #endif 101 #endif /* _TARGET_IF_DFS_FULL_OFFLOAD_H_ */ 102 103