xref: /wlan-driver/qca-wifi-host-cmn/wmi/inc/wmi_unified_cfr_api.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
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 #ifndef _WMI_UNIFIED_CFR_API_H_
19 #define _WMI_UNIFIED_CFR_API_H_
20 
21 #include "wmi_unified_param.h"
22 #include "wmi_unified_cfr_param.h"
23 
24 #ifdef WLAN_CFR_ENABLE
25 /**
26  * wmi_unified_send_peer_cfr_capture_cmd() - WMI function to start CFR capture
27  * for a peer
28  * @wmi_handle: WMI handle
29  * @param: configuration params for capture
30  *
31  * Return: QDF_STATUS_SUCCESS if success, else returns proper error code.
32  */
33 QDF_STATUS
34 wmi_unified_send_peer_cfr_capture_cmd(wmi_unified_t wmi_handle,
35 				      struct peer_cfr_params *param);
36 /**
37  * wmi_extract_cfr_peer_tx_event_param() - WMI function to extract cfr tx event
38  * for a peer
39  * @wmi_handle: WMI handle
40  * @evt_buf: Buffer holding event data
41  * @peer_tx_event: pointer to hold tx event data
42  *
43  * Return: QDF_STATUS_SUCCESS if success, else returns proper error code.
44  */
45 QDF_STATUS
46 wmi_extract_cfr_peer_tx_event_param(wmi_unified_t wmi_handle, void *evt_buf,
47 				    wmi_cfr_peer_tx_event_param *peer_tx_event);
48 
49 #ifdef WLAN_ENH_CFR_ENABLE
50 /**
51  * wmi_unified_send_cfr_rcc_cmd() - WMI function to send CFR RCC param
52  * @wmi_handle: WMI handle
53  * @cfg: pointer to RCC param
54  *
55  * Return: QDF_STATUS_SUCCESS if success, else returns proper error code.
56  */
57 QDF_STATUS wmi_unified_send_cfr_rcc_cmd(wmi_unified_t wmi_handle,
58 					struct cfr_rcc_param *cfg);
59 
60 /**
61  * wmi_extract_cfr_pdev_phase_delta_event() - WMI function to extract the
62  * phase delta information.
63  * @wmi_handle: WMI handle
64  * @evt_buf: Buffer holding the event data
65  * @param: phase delta params to be updated from event
66  *
67  * Return: QDF_STATUS_SUCCESS if success, else returns proper error code.
68  */
69 QDF_STATUS
70 wmi_extract_cfr_pdev_phase_delta_event(wmi_unified_t wmi_handle,
71 				       void *evt_buf,
72 				       struct wmi_cfr_phase_delta_param *param);
73 
74 #ifdef WLAN_RCC_ENHANCED_AOA_SUPPORT
75 QDF_STATUS
76 wmi_extract_cfr_pdev_enhanced_aoa_phasedelta_event_fixed_param
77 	(wmi_unified_t wmi_handle, void *evt_buf,
78 	 struct wmi_cfr_enh_phase_delta_param *param);
79 
80 QDF_STATUS
81 wmi_extract_cfr_pdev_enhanced_aoa_phasedelta_event_data
82 	(wmi_unified_t wmi_handle, void *evt_buf,
83 	 struct wmi_cfr_enh_phase_delta_param *param);
84 #endif /* WLAN_RCC_ENHANCED_AOA_SUPPORT */
85 #endif
86 #endif /* WLAN_CFR_ENABLE */
87 #endif /* _WMI_UNIFIED_CFR_API_H_ */
88