xref: /wlan-dirver/qca-wifi-host-cmn/wmi/inc/wmi_unified_dcs_api.h (revision 70a19e16789e308182f63b15c75decec7bf0b342)
1 /*
2  * Copyright (c) 2020-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 /**
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_DCS_API_H_
24 #define _WMI_UNIFIED_DCS_API_H_
25 
26 #include <qdf_status.h>
27 #include <wmi_unified_api.h>
28 #include <wmi_unified_priv.h>
29 #include <wlan_objmgr_vdev_obj.h>
30 
31 /**
32  * wmi_extract_dcs_interference_type() - extract dcs interference type
33  * @wmi_hdl: wmi handle
34  * @evt_buf: pointer to event buffer
35  * @param: Pointer to hold dcs interference param
36  *
37  * This function gets called to extract dcs interference type from dcs FW event
38  *
39  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
40  */
41 QDF_STATUS wmi_extract_dcs_interference_type(
42 	void *wmi_hdl,
43 	void *evt_buf,
44 	struct wlan_host_dcs_interference_param *param);
45 
46 /**
47  * wmi_extract_dcs_im_tgt_stats() - extract dcs im target stats
48  * @wmi_hdl: wmi handle
49  * @evt_buf: pointer to event buffer
50  * @wlan_stat: Pointer to hold wlan stats
51  *
52  * This function gets called to extract dcs im target stats from event
53  *
54  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
55  */
56 QDF_STATUS wmi_extract_dcs_im_tgt_stats(
57 	void *wmi_hdl,
58 	void *evt_buf,
59 	struct wlan_host_dcs_im_tgt_stats *wlan_stat);
60 
61 /**
62  * wmi_extract_dcs_awgn_info() - extract DCS AWGN interference info from event
63  * @wmi_hdl: WMI handle
64  * @evt_buf: Pointer to event buffer
65  * @awgn_info: Pointer to hold AWGN interference info
66  *
67  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
68  */
69 QDF_STATUS
70 wmi_extract_dcs_awgn_info(wmi_unified_t wmi_hdl, void *evt_buf,
71 			  struct wlan_host_dcs_awgn_info *awgn_info);
72 
73 /**
74  * wmi_send_dcs_pdev_param() - send dcs pdev param
75  * @wmi_handle: wmi handle
76  * @pdev_idx: pdev id
77  * @is_host_pdev_id: host pdev_id or not
78  * @dcs_enable: value of dcs enable
79  *
80  * This functions gets called to send dcs pdev param
81  *
82  * Return: QDF_STATUS
83  */
84 QDF_STATUS wmi_send_dcs_pdev_param(wmi_unified_t wmi_handle,
85 				   uint32_t pdev_idx,
86 				   bool is_host_pdev_id,
87 				   uint32_t dcs_enable);
88 #endif /* _WMI_UNIFIED_DCS_API_H_ */
89