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