1 /* 2 * Copyright (c) 2019-2021, The Linux Foundation. All rights reserved. 3 * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved. 4 * 5 * Permission to use, copy, modify, and/or distribute this software for any 6 * purpose with or without fee is hereby granted, provided that the above 7 * copyright notice and this permission notice appear in all copies. 8 * 9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 16 */ 17 18 #include "wmi_unified_priv.h" 19 #include "wmi_unified_cfr_api.h" 20 21 #ifdef WLAN_CFR_ENABLE 22 23 QDF_STATUS wmi_unified_send_peer_cfr_capture_cmd(wmi_unified_t wmi_handle, 24 struct peer_cfr_params *param) 25 { 26 if (wmi_handle->ops->send_peer_cfr_capture_cmd) 27 return wmi_handle->ops->send_peer_cfr_capture_cmd(wmi_handle, 28 param); 29 30 return QDF_STATUS_E_FAILURE; 31 } 32 33 QDF_STATUS 34 wmi_extract_cfr_peer_tx_event_param(wmi_unified_t wmi_handle, void *evt_buf, 35 wmi_cfr_peer_tx_event_param *peer_tx_event) 36 { 37 if (wmi_handle->ops->extract_cfr_peer_tx_event_param) 38 return wmi_handle->ops->extract_cfr_peer_tx_event_param( 39 wmi_handle, 40 evt_buf, 41 peer_tx_event); 42 return QDF_STATUS_E_FAILURE; 43 } 44 45 #ifdef WLAN_ENH_CFR_ENABLE 46 QDF_STATUS wmi_unified_send_cfr_rcc_cmd(wmi_unified_t wmi_handle, 47 struct cfr_rcc_param *cfg) 48 { 49 if (wmi_handle->ops->send_cfr_rcc_cmd) 50 return wmi_handle->ops->send_cfr_rcc_cmd(wmi_handle, cfg); 51 return QDF_STATUS_E_FAILURE; 52 } 53 54 QDF_STATUS 55 wmi_extract_cfr_pdev_phase_delta_event(wmi_unified_t wmi_handle, 56 void *evt_buf, 57 struct wmi_cfr_phase_delta_param *param) 58 { 59 if (wmi_handle->ops->extract_cfr_phase_param) 60 return wmi_handle->ops->extract_cfr_phase_param(wmi_handle, 61 evt_buf, 62 param); 63 return QDF_STATUS_E_FAILURE; 64 } 65 #endif /* WLAN_ENH_CFR_ENABLE */ 66 #endif /* WLAN_CFR_ENABLE */ 67