xref: /wlan-driver/qca-wifi-host-cmn/wmi/inc/wmi_unified_dcs_api.h (revision 5113495b16420b49004c444715d2daae2066e7dc)
1*5113495bSYour Name /*
2*5113495bSYour Name  * Copyright (c) 2020-2021, The Linux Foundation. All rights reserved.
3*5113495bSYour Name  * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
4*5113495bSYour Name  *
5*5113495bSYour Name  * Permission to use, copy, modify, and/or distribute this software for any
6*5113495bSYour Name  * purpose with or without fee is hereby granted, provided that the above
7*5113495bSYour Name  * copyright notice and this permission notice appear in all copies.
8*5113495bSYour Name  *
9*5113495bSYour Name  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10*5113495bSYour Name  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11*5113495bSYour Name  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12*5113495bSYour Name  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13*5113495bSYour Name  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14*5113495bSYour Name  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15*5113495bSYour Name  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16*5113495bSYour Name  */
17*5113495bSYour Name 
18*5113495bSYour Name /**
19*5113495bSYour Name  * DOC: This file contains the API definitions for the Unified Wireless Module
20*5113495bSYour Name  * Interface (WMI) which are specific to DFS module.
21*5113495bSYour Name  */
22*5113495bSYour Name 
23*5113495bSYour Name #ifndef _WMI_UNIFIED_DCS_API_H_
24*5113495bSYour Name #define _WMI_UNIFIED_DCS_API_H_
25*5113495bSYour Name 
26*5113495bSYour Name #include <qdf_status.h>
27*5113495bSYour Name #include <wmi_unified_api.h>
28*5113495bSYour Name #include <wmi_unified_priv.h>
29*5113495bSYour Name #include <wlan_objmgr_vdev_obj.h>
30*5113495bSYour Name 
31*5113495bSYour Name /**
32*5113495bSYour Name  * wmi_extract_dcs_interference_type() - extract dcs interference type
33*5113495bSYour Name  * @wmi_hdl: wmi handle
34*5113495bSYour Name  * @evt_buf: pointer to event buffer
35*5113495bSYour Name  * @param: Pointer to hold dcs interference param
36*5113495bSYour Name  *
37*5113495bSYour Name  * This function gets called to extract dcs interference type from dcs FW event
38*5113495bSYour Name  *
39*5113495bSYour Name  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
40*5113495bSYour Name  */
41*5113495bSYour Name QDF_STATUS wmi_extract_dcs_interference_type(
42*5113495bSYour Name 	void *wmi_hdl,
43*5113495bSYour Name 	void *evt_buf,
44*5113495bSYour Name 	struct wlan_host_dcs_interference_param *param);
45*5113495bSYour Name 
46*5113495bSYour Name /**
47*5113495bSYour Name  * wmi_extract_dcs_im_tgt_stats() - extract dcs im target stats
48*5113495bSYour Name  * @wmi_hdl: wmi handle
49*5113495bSYour Name  * @evt_buf: pointer to event buffer
50*5113495bSYour Name  * @wlan_stat: Pointer to hold wlan stats
51*5113495bSYour Name  *
52*5113495bSYour Name  * This function gets called to extract dcs im target stats from event
53*5113495bSYour Name  *
54*5113495bSYour Name  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
55*5113495bSYour Name  */
56*5113495bSYour Name QDF_STATUS wmi_extract_dcs_im_tgt_stats(
57*5113495bSYour Name 	void *wmi_hdl,
58*5113495bSYour Name 	void *evt_buf,
59*5113495bSYour Name 	struct wlan_host_dcs_im_tgt_stats *wlan_stat);
60*5113495bSYour Name 
61*5113495bSYour Name /**
62*5113495bSYour Name  * wmi_extract_dcs_awgn_info() - extract DCS AWGN interference info from event
63*5113495bSYour Name  * @wmi_hdl: WMI handle
64*5113495bSYour Name  * @evt_buf: Pointer to event buffer
65*5113495bSYour Name  * @awgn_info: Pointer to hold AWGN interference info
66*5113495bSYour Name  *
67*5113495bSYour Name  * Return: QDF_STATUS_SUCCESS on success and QDF_STATUS_E_FAILURE for failure
68*5113495bSYour Name  */
69*5113495bSYour Name QDF_STATUS
70*5113495bSYour Name wmi_extract_dcs_awgn_info(wmi_unified_t wmi_hdl, void *evt_buf,
71*5113495bSYour Name 			  struct wlan_host_dcs_awgn_info *awgn_info);
72*5113495bSYour Name 
73*5113495bSYour Name /**
74*5113495bSYour Name  * wmi_send_dcs_pdev_param() - send dcs pdev param
75*5113495bSYour Name  * @wmi_handle: wmi handle
76*5113495bSYour Name  * @pdev_idx: pdev id
77*5113495bSYour Name  * @is_host_pdev_id: host pdev_id or not
78*5113495bSYour Name  * @dcs_enable: value of dcs enable
79*5113495bSYour Name  *
80*5113495bSYour Name  * This functions gets called to send dcs pdev param
81*5113495bSYour Name  *
82*5113495bSYour Name  * Return: QDF_STATUS
83*5113495bSYour Name  */
84*5113495bSYour Name QDF_STATUS wmi_send_dcs_pdev_param(wmi_unified_t wmi_handle,
85*5113495bSYour Name 				   uint32_t pdev_idx,
86*5113495bSYour Name 				   bool is_host_pdev_id,
87*5113495bSYour Name 				   uint32_t dcs_enable);
88*5113495bSYour Name #endif /* _WMI_UNIFIED_DCS_API_H_ */
89