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_partial_offload.h 22 * This file contains dfs target interface for partial offload. 23 */ 24 25 #ifndef _TARGET_IF_DFS_PARTIAL_OFFLOAD_H_ 26 #define _TARGET_IF_DFS_PARTIAL_OFFLOAD_H_ 27 28 /** 29 * target_if_dfs_reg_phyerr_events() - register phyerror events. 30 * @psoc: Pointer to psoc object. 31 * 32 * Return: QDF_STATUS 33 */ 34 #if defined(WLAN_DFS_PARTIAL_OFFLOAD) 35 QDF_STATUS target_if_dfs_reg_phyerr_events(struct wlan_objmgr_psoc *psoc); 36 #else 37 static QDF_STATUS 38 target_if_dfs_reg_phyerr_events(struct wlan_objmgr_psoc *psoc) 39 { 40 return QDF_STATUS_SUCCESS; 41 } 42 #endif 43 44 /** 45 * target_if_dfs_get_caps() - get dfs caps. 46 * @pdev: Pointer to DFS pdev object. 47 * @dfs_caps: Pointer to dfs_caps structure. 48 * 49 * Return: QDF_STATUS 50 */ 51 #if defined(WLAN_DFS_PARTIAL_OFFLOAD) 52 QDF_STATUS target_if_dfs_get_caps(struct wlan_objmgr_pdev *pdev, 53 struct wlan_dfs_caps *dfs_caps); 54 #else 55 static inline QDF_STATUS target_if_dfs_get_caps(struct wlan_objmgr_pdev *pdev, 56 struct wlan_dfs_caps *dfs_caps) 57 { 58 return QDF_STATUS_SUCCESS; 59 } 60 #endif 61 62 /** 63 * target_if_dfs_status_check_event_handler() - Host dfs confirmation event 64 * handler. 65 * @scn: Handle to HIF context 66 * @data: radar event buffer 67 * @datalen: radar event buffer length 68 * 69 * Return: 0 on success 70 */ 71 #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST) 72 int target_if_dfs_status_check_event_handler(ol_scn_t scn, 73 uint8_t *data, 74 uint32_t datalen); 75 #else 76 static inline 77 int target_if_dfs_status_check_event_handler(ol_scn_t scn, 78 uint8_t *data, 79 uint32_t datalen) 80 { 81 return 0; 82 } 83 #endif 84 85 /** 86 * target_if_dfs_send_avg_params_to_fw() - Send average parameters to FW. 87 * @pdev: pdev pointer 88 * @params: Pointer to dfs_radar_found_params structure. 89 * 90 * Return: QDF_STATUS 91 */ 92 #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST) 93 QDF_STATUS target_if_dfs_send_avg_params_to_fw( 94 struct wlan_objmgr_pdev *pdev, 95 struct dfs_radar_found_params *params); 96 #else 97 static inline 98 QDF_STATUS target_if_dfs_send_avg_params_to_fw( 99 struct wlan_objmgr_pdev *pdev, 100 struct dfs_radar_found_params *params) 101 { 102 return QDF_STATUS_SUCCESS; 103 } 104 #endif 105 #endif /* _TARGET_IF_DFS_PARTIAL_OFFLOAD_H_ */ 106