1 /* 2 * Copyright (c) 2017-2019 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(QCA_SUPPORT_AGILE_DFS) 64 /** 65 * target_send_ocac_abort_cmd() - Send off channel CAC abort to target for 66 * to cancel current offchannel CAC 67 * @pdev: Pointer to DFS pdev object. 68 * 69 * Return: QDF_STATUS 70 */ 71 QDF_STATUS target_send_ocac_abort_cmd(struct wlan_objmgr_pdev *pdev); 72 /** 73 * target_send_agile_ch_cfg_cmd() - Send agile channel parameters to target for 74 * off channel precac. 75 * @pdev: Pointer to DFS pdev object. 76 * @adfs_param: Agile-DFS CAC parameters. 77 * 78 * Return: QDF_STATUS 79 */ 80 QDF_STATUS 81 target_send_agile_ch_cfg_cmd(struct wlan_objmgr_pdev *pdev, 82 struct dfs_agile_cac_params *adfs_param); 83 #else 84 static inline QDF_STATUS 85 target_send_ocac_abort_cmd(struct wlan_objmgr_pdev *pdev) 86 { 87 return QDF_STATUS_SUCCESS; 88 } 89 90 static inline QDF_STATUS 91 target_send_agile_ch_cfg_cmd(struct wlan_objmgr_pdev *pdev, 92 struct dfs_agile_cac_params *adfs_param) 93 { 94 return QDF_STATUS_SUCCESS; 95 } 96 #endif 97 98 #if defined(WLAN_DFS_FULL_OFFLOAD) && defined(QCA_DFS_NOL_OFFLOAD) 99 /** 100 * target_send_usenol_pdev_param - send usenol pdev param to FW. 101 * @pdev: Pointer to pdev object. 102 * @usenol: Value of user configured usenol. 103 * 104 * Return: QDF_STATUS 105 */ 106 QDF_STATUS target_send_usenol_pdev_param(struct wlan_objmgr_pdev *pdev, 107 bool usenol); 108 109 /** 110 * target_send_subchan_marking_pdev_param - Send subchannel marking 111 * pdev param to FW. 112 * @pdev: Pointer to pdev object. 113 * @subchanmark: Value of user configured subchannel_marking. 114 * 115 * Return: QDF_STATUS 116 */ 117 QDF_STATUS 118 target_send_subchan_marking_pdev_param(struct wlan_objmgr_pdev *pdev, 119 bool subchanmark); 120 121 #else 122 static inline QDF_STATUS 123 target_send_usenol_pdev_param(struct wlan_objmgr_pdev *pdev, 124 bool usenol) 125 { 126 return QDF_STATUS_SUCCESS; 127 } 128 129 static inline QDF_STATUS 130 target_send_subchan_marking_pdev_param(struct wlan_objmgr_pdev *pdev, 131 bool subchanmark) 132 { 133 return QDF_STATUS_SUCCESS; 134 } 135 #endif 136 #endif /* _TARGET_IF_DFS_FULL_OFFLOAD_H_ */ 137 138