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: Implement API's specific to DFS component. 22 */ 23 24 #include <qdf_status.h> 25 #include <qdf_module.h> 26 #include <wmi_unified_api.h> 27 #include <wmi_unified_priv.h> 28 #include <wlan_dfs_utils_api.h> 29 #include <wmi_unified_dfs_api.h> 30 31 QDF_STATUS wmi_extract_dfs_cac_complete_event(void *wmi_hdl, 32 uint8_t *evt_buf, 33 uint32_t *vdev_id, 34 uint32_t len) 35 { 36 struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl; 37 38 if (wmi_handle && wmi_handle->ops->extract_dfs_cac_complete_event) 39 return wmi_handle->ops->extract_dfs_cac_complete_event( 40 wmi_handle, evt_buf, vdev_id, len); 41 42 return QDF_STATUS_E_FAILURE; 43 } 44 qdf_export_symbol(wmi_extract_dfs_cac_complete_event); 45 46 QDF_STATUS wmi_extract_dfs_radar_detection_event(void *wmi_hdl, 47 uint8_t *evt_buf, 48 struct radar_found_info *radar_found, 49 uint32_t len) 50 { 51 struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl; 52 53 if (wmi_handle && wmi_handle->ops->extract_dfs_radar_detection_event) 54 return wmi_handle->ops->extract_dfs_radar_detection_event( 55 wmi_handle, evt_buf, radar_found, len); 56 57 return QDF_STATUS_E_FAILURE; 58 } 59 60 #ifdef QCA_MCL_DFS_SUPPORT 61 QDF_STATUS wmi_extract_wlan_radar_event_info(void *wmi_hdl, 62 uint8_t *evt_buf, 63 struct radar_event_info *wlan_radar_event, 64 uint32_t len) 65 { 66 struct wmi_unified *wmi_handle = (struct wmi_unified *)wmi_hdl; 67 68 if (wmi_handle->ops->extract_wlan_radar_event_info) 69 return wmi_handle->ops->extract_wlan_radar_event_info( 70 wmi_handle, evt_buf, wlan_radar_event, len); 71 72 return QDF_STATUS_E_FAILURE; 73 } 74 qdf_export_symbol(wmi_extract_dfs_radar_detection_event); 75 #endif 76