1 /* 2 * Copyright (c) 2017-2019 The Linux Foundation. All rights reserved. 3 * 4 * Permission to use, copy, modify, and/or distribute this software for 5 * any purpose with or without fee is hereby granted, provided that the 6 * above copyright notice and this permission notice appear in all 7 * copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL 10 * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED 11 * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE 12 * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL 13 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR 14 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 15 * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 16 * PERFORMANCE OF THIS SOFTWARE. 17 */ 18 /** 19 * DOC: This file contains the API definitions for the Unified Wireless Module 20 * Interface (WMI) which are specific to DFS module. 21 */ 22 23 #ifndef _WMI_UNIFIED_DFS_API_H_ 24 #define _WMI_UNIFIED_DFS_API_H_ 25 26 #include <wlan_objmgr_vdev_obj.h> 27 #include <wlan_dfs_utils_api.h> 28 29 /** 30 * wmi_extract_dfs_cac_complete_event() - function to handle cac complete event 31 * @handle: wma handle 32 * @event_buf: event buffer 33 * @vdev_id: vdev id 34 * @len: length of buffer 35 * 36 * Return: 0 for success or error code 37 */ 38 QDF_STATUS wmi_extract_dfs_cac_complete_event(void *wmi_hdl, 39 uint8_t *evt_buf, 40 uint32_t *vdev_id, 41 uint32_t len); 42 43 /** 44 * wmi_extract_dfs_radar_detection_event() - function to handle radar event 45 * @handle: wma handle 46 * @event_buf: event buffer 47 * @radar_found: radar found event info 48 * @vdev_id: vdev id 49 * @len: length of buffer 50 * 51 * Return: 0 for success or error code 52 */ 53 QDF_STATUS wmi_extract_dfs_radar_detection_event(void *wmi_hdl, 54 uint8_t *evt_buf, 55 struct radar_found_info *radar_found, 56 uint32_t len); 57 58 #ifdef QCA_MCL_DFS_SUPPORT 59 /** 60 * wmi_extract_wlan_radar_event_info() - function to handle radar pulse event. 61 * @wmi_hdl: wmi handle 62 * @evt_buf: event buffer 63 * @wlan_radar_event: pointer to radar event info structure 64 * @len: length of buffer 65 * 66 * Return: QDF_STATUS 67 */ 68 QDF_STATUS wmi_extract_wlan_radar_event_info(void *wmi_hdl, 69 uint8_t *evt_buf, 70 struct radar_event_info *wlan_radar_event, 71 uint32_t len); 72 #endif 73 74 #if defined(WLAN_DFS_FULL_OFFLOAD) && defined(QCA_DFS_NOL_OFFLOAD) 75 /** 76 * wmi_send_usenol_pdev_param() - function to send usenol pdev param. 77 * @wmi_hdl: wmi handle 78 * @usenol: value of usenol 79 * @pdev: pointer to objmgr_pdev structure 80 * 81 * Return: QDF_STATUS 82 */ 83 QDF_STATUS wmi_send_usenol_pdev_param(void *wmi_hdl, bool usenol, 84 struct wlan_objmgr_pdev *pdev); 85 86 /** 87 * wmi_send_subchan_marking_pdev_param() - Function to send subchannel 88 * marking pdev param. 89 * @wmi_hdl: WMI handle. 90 * @subchanmark: Value of use subchannel marking. 91 * @pdev: Pointer to objmgr_pdev structure. 92 * 93 * Return: QDF_STATUS 94 */ 95 QDF_STATUS 96 wmi_send_subchan_marking_pdev_param(void *wmi_hdl, 97 bool subchanmark, 98 struct wlan_objmgr_pdev *pdev); 99 #else 100 static inline QDF_STATUS 101 wmi_send_usenol_pdev_param(void *wmi_hdl, bool usenol, 102 struct wlan_objmgr_pdev *pdev) 103 { 104 return QDF_STATUS_SUCCESS; 105 } 106 107 static inline QDF_STATUS 108 wmi_send_subchan_marking_pdev_param(void *wmi_hdl, 109 bool subchanmark, 110 struct wlan_objmgr_pdev *pdev) 111 { 112 return QDF_STATUS_SUCCESS; 113 } 114 #endif 115 #endif /* _WMI_UNIFIED_DFS_API_H_ */ 116