xref: /wlan-dirver/qca-wifi-host-cmn/wmi/inc/wmi_unified_param.h (revision d0c05845839e5f2ba5a8dcebe0cd3e4cd4e8dfcf)
1 /*
2  * Copyright (c) 2016-2021 The Linux Foundation. All rights reserved.
3  * Copyright (c) 2021-2022 Qualcomm Innovation Center, Inc. All rights reserved.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for
6  * any purpose with or without fee is hereby granted, provided that the
7  * above copyright notice and this permission notice appear in all
8  * copies.
9  *
10  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
11  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
12  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
13  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
15  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
16  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
17  * PERFORMANCE OF THIS SOFTWARE.
18  */
19 
20 /*
21  * This file contains the API definitions for the Unified Wireless Module
22  * Interface (WMI).
23  */
24 
25 #ifndef _WMI_UNIFIED_PARAM_H_
26 #define _WMI_UNIFIED_PARAM_H_
27 
28 #include <wlan_scan_public_structs.h>
29 #ifdef FEATURE_WLAN_TDLS
30 #include <wlan_tdls_public_structs.h>
31 #endif
32 #ifdef WLAN_CONV_SPECTRAL_ENABLE
33 #include <wlan_spectral_public_structs.h>
34 #endif /* WLAN_CONV_SPECTRAL_ENABLE */
35 
36 #include "wifi_pos_public_struct.h"
37 #include <wlan_vdev_mgr_tgt_if_tx_defs.h>
38 #include <wlan_vdev_mgr_tgt_if_rx_defs.h>
39 #include <reg_services_public_struct.h>
40 
41 #define MAC_MAX_KEY_LENGTH 32
42 #define MAC_PN_LENGTH 8
43 #define MAX_MAC_HEADER_LEN 32
44 #define MIN_MAC_HEADER_LEN 24
45 #define QOS_CONTROL_LEN 2
46 
47 #define WMI_MAC_MAX_SSID_LENGTH              32
48 #ifndef CONFIG_HL_SUPPORT
49 #define mgmt_tx_dl_frm_len 64
50 #else
51 #define mgmt_tx_dl_frm_len 1532
52 #endif
53 #define WMI_SMPS_MASK_LOWER_16BITS 0xFF
54 #define WMI_SMPS_MASK_UPPER_3BITS 0x7
55 #define WMI_SMPS_PARAM_VALUE_S 29
56 #define WMI_UNIT_TEST_MAX_NUM_ARGS 100
57 /* The size of the utc time in bytes. */
58 #define WMI_SIZE_UTC_TIME (10)
59 /* The size of the utc time error in bytes. */
60 #define WMI_SIZE_UTC_TIME_ERROR (5)
61 #ifdef WLAN_MCC_MIN_CHANNEL_QUOTA
62 #define WMI_MCC_MIN_CHANNEL_QUOTA             WLAN_MCC_MIN_CHANNEL_QUOTA
63 #define WMI_MCC_MAX_CHANNEL_QUOTA             (100 - WLAN_MCC_MIN_CHANNEL_QUOTA)
64 #else
65 #define WMI_MCC_MIN_CHANNEL_QUOTA             20
66 #define WMI_MCC_MAX_CHANNEL_QUOTA             80
67 #endif
68 #define WMI_MCC_MIN_NON_ZERO_CHANNEL_LATENCY  30
69 
70 #ifdef WMI_AP_SUPPORT
71 #define WMI_BEACON_TX_BUFFER_SIZE             (2500)
72 #else
73 #define WMI_BEACON_TX_BUFFER_SIZE             (512)
74 #endif
75 
76 #define WMI_WIFI_SCANNING_MAC_OUI_LENGTH      3
77 #define WMI_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS   64
78 #define WMI_RSSI_THOLD_DEFAULT   -300
79 #define WMI_NLO_FREQ_THRESH          1000
80 #define WMI_SEC_TO_MSEC(sec)         (sec * 1000)
81 #define WMI_MSEC_TO_USEC(msec)	     (msec * 1000)
82 #define WMI_ETH_LEN      64
83 #define WMI_QOS_NUM_TSPEC_MAX 2
84 #define WMI_IPV4_ADDR_LEN       4
85 #define WMI_KEEP_ALIVE_NULL_PKT              1
86 #define WMI_KEEP_ALIVE_UNSOLICIT_ARP_RSP     2
87 #define WMI_KEEP_ALIVE_MGMT_FRAME            5
88 #define WMI_MAC_MAX_KEY_LENGTH          32
89 #define WMI_KRK_KEY_LEN     16
90 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
91 #define WMI_BTK_KEY_LEN     32
92 #define WMI_ROAM_R0KH_ID_MAX_LEN    48
93 #define WMI_ROAM_SCAN_PSK_SIZE    48
94 #endif
95 #define WMI_NOISE_FLOOR_DBM_DEFAULT      (-96)
96 #define WMI_EXTSCAN_MAX_HOTLIST_SSIDS                    8
97 #define WMI_ROAM_MAX_CHANNELS                            80
98 #ifdef FEATURE_WLAN_EXTSCAN
99 #define WMI_MAX_EXTSCAN_MSG_SIZE        1536
100 #define WMI_EXTSCAN_REST_TIME           100
101 #define WMI_EXTSCAN_MAX_SCAN_TIME       50000
102 #define WMI_EXTSCAN_BURST_DURATION      150
103 #endif
104 #define WMI_SCAN_NPROBES_DEFAULT            (2)
105 #define WMI_SEC_TO_MSEC(sec)         (sec * 1000)  /* sec to msec */
106 #define WMI_MSEC_TO_USEC(msec)       (msec * 1000) /* msec to usec */
107 #define WMI_NLO_FREQ_THRESH          1000       /* in MHz */
108 
109 #define WMI_SVC_MSG_MAX_SIZE   1536
110 #define MAX_UTF_EVENT_LENGTH	2048
111 #define MAX_WMI_UTF_LEN	252
112 #define MAX_WMI_QVIT_LEN	252
113 #define THERMAL_LEVELS	4
114 #define WMI_HOST_BCN_FLT_MAX_SUPPORTED_IES	256
115 #define WMI_HOST_BCN_FLT_MAX_ELEMS_IE_LIST \
116 			(WMI_HOST_BCN_FLT_MAX_SUPPORTED_IES/32)
117 #define LTEU_MAX_BINS	10
118 #define ATF_ACTIVED_MAX_CLIENTS   50
119 #define ATF_ACTIVED_MAX_ATFGROUPS 16
120 #define CTL_5G_SIZE 1536
121 #define CTL_2G_SIZE 684
122 #define MAX_CTL_SIZE (CTL_5G_SIZE > CTL_2G_SIZE ? CTL_5G_SIZE : CTL_2G_SIZE)
123 #define IEEE80211_MICBUF_SIZE   (8+8)
124 #define IEEE80211_TID_SIZE	17
125 #define WME_NUM_AC	4
126 #define SMART_ANT_MODE_SERIAL   0
127 #define SMART_ANT_MODE_PARALLEL   1
128 #define IEEE80211_WEP_NKID	4   /* number of key ids */
129 #define WPI_IV_LEN	16
130 #define WMI_SCAN_MAX_NUM_BSSID	10
131 #define MAX_CHANS	1023
132 #define TARGET_OEM_CONFIGURE_LCI	0x0A
133 #define RTT_LCI_ALTITUDE_MASK	0x3FFFFFFF
134 #define TARGET_OEM_CONFIGURE_LCR	0x09
135 #define RTT_TIMEOUT_MS 180
136 #define MAX_SUPPORTED_RATES 128
137 #define WMI_HOST_MAX_BUFFER_SIZE	1712
138 #define WMI_HAL_MAX_SANTENNA 4
139 #define WMI_HOST_PDEV_VI_PRIORITY_BIT     (1<<2)
140 #define WMI_HOST_PDEV_BEACON_PRIORITY_BIT (1<<4)
141 #define WMI_HOST_PDEV_MGMT_PRIORITY_BIT   (1<<5)
142 #define WMI_MAX_CMDS 1024
143 
144 #define FIPS_ALIGN 4
145 #define FIPS_ALIGNTO(__addr, __to) \
146 		((((unsigned long int)(__addr)) + (__to) -  1) & ~((__to) - 1))
147 #define FIPS_IS_ALIGNED(__addr, __to) \
148 		(!(((unsigned long int)(__addr)) & ((__to)-1)))
149 
150 #define WMI_HOST_MAX_SERIAL_ANTENNA 2
151 #define WMI_SMART_ANT_MAX_RATE_SERIES 2
152 
153 #define WMI_HOST_F_MS(_v, _f)	\
154 	(((_v) & (_f)) >> (_f##_S))
155 
156 #define WMI_HOST_F_RMW(_var, _v, _f)	\
157 	do {	\
158 		(_var) &= ~(_f);	\
159 		(_var) |= (((_v) << (_f##_S)) & (_f));	\
160 	} while (0)
161 
162 /* vdev capabilities bit mask */
163 #define WMI_HOST_VDEV_BEACON_SUPPORT  0x1
164 #define WMI_HOST_VDEV_WDS_LRN_ENABLED 0x2
165 #define WMI_HOST_VDEV_VOW_ENABLED     0x4
166 #define WMI_HOST_VDEV_IS_BEACON_SUPPORTED(param) \
167 	((param) & WMI_HOST_VDEV_BEACON_SUPPORT)
168 #define WMI_HOST_VDEV_IS_WDS_LRN_ENABLED(param) \
169 	((param) & WMI_HOST_VDEV_WDS_LRN_ENABLED)
170 #define WMI_HOST_VDEV_IS_VOW_ENABLED(param) \
171 	((param) & WMI_HOST_VDEV_VOW_ENABLED)
172 
173 /* TXBF capabilities masks */
174 #define WMI_HOST_TXBF_CONF_SU_TX_BFEE_S 0
175 #define WMI_HOST_TXBF_CONF_SU_TX_BFEE_M 0x1
176 #define WMI_HOST_TXBF_CONF_SU_TX_BFEE \
177 	(WMI_HOST_TXBF_CONF_SU_TX_BFEE_M << WMI_HOST_TXBF_CONF_SU_TX_BFEE_S)
178 #define WMI_HOST_TXBF_CONF_SU_TX_BFEE_GET(x) \
179 	WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_SU_TX_BFEE)
180 #define WMI_HOST_TXBF_CONF_SU_TX_BFEE_SET(x, z) \
181 	WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_SU_TX_BFEE)
182 
183 #define WMI_HOST_TXBF_CONF_MU_TX_BFEE_S 1
184 #define WMI_HOST_TXBF_CONF_MU_TX_BFEE_M 0x1
185 #define WMI_HOST_TXBF_CONF_MU_TX_BFEE \
186 	(WMI_HOST_TXBF_CONF_MU_TX_BFEE_M << WMI_HOST_TXBF_CONF_MU_TX_BFEE_S)
187 #define WMI_HOST_TXBF_CONF_MU_TX_BFEE_GET(x) \
188 	WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_MU_TX_BFEE)
189 #define WMI_HOST_TXBF_CONF_MU_TX_BFEE_SET(x, z) \
190 	WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_MU_TX_BFEE)
191 
192 #define WMI_HOST_TXBF_CONF_SU_TX_BFER_S 2
193 #define WMI_HOST_TXBF_CONF_SU_TX_BFER_M 0x1
194 #define WMI_HOST_TXBF_CONF_SU_TX_BFER \
195 	(WMI_HOST_TXBF_CONF_SU_TX_BFER_M << WMI_HOST_TXBF_CONF_SU_TX_BFER_S)
196 #define WMI_HOST_TXBF_CONF_SU_TX_BFER_GET(x) \
197 	WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_SU_TX_BFER)
198 #define WMI_HOST_TXBF_CONF_SU_TX_BFER_SET(x, z) \
199 	WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_SU_TX_BFER)
200 
201 #define WMI_HOST_TXBF_CONF_MU_TX_BFER_S 3
202 #define WMI_HOST_TXBF_CONF_MU_TX_BFER_M 0x1
203 #define WMI_HOST_TXBF_CONF_MU_TX_BFER \
204 	(WMI_HOST_TXBF_CONF_MU_TX_BFER_M << WMI_HOST_TXBF_CONF_MU_TX_BFER_S)
205 #define WMI_HOST_TXBF_CONF_MU_TX_BFER_GET(x) \
206 	WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_MU_TX_BFER)
207 #define WMI_HOST_TXBF_CONF_MU_TX_BFER_SET(x, z) \
208 	WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_MU_TX_BFER)
209 
210 #define WMI_HOST_TXBF_CONF_STS_CAP_S 4
211 #define WMI_HOST_TXBF_CONF_STS_CAP_M 0x7
212 #define WMI_HOST_TXBF_CONF_STS_CAP \
213 	(WMI_HOST_TXBF_CONF_STS_CAP_M << WMI_HOST_TXBF_CONF_STS_CAP_S)
214 #define WMI_HOST_TXBF_CONF_STS_CAP_GET(x) \
215 	WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_STS_CAP);
216 #define WMI_HOST_TXBF_CONF_STS_CAP_SET(x, z) \
217 	WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_STS_CAP)
218 
219 #define WMI_HOST_TXBF_CONF_IMPLICIT_BF_S 7
220 #define WMI_HOST_TXBF_CONF_IMPLICIT_BF_M 0x1
221 #define WMI_HOST_TXBF_CONF_IMPLICIT_BF \
222 	(WMI_HOST_TXBF_CONF_IMPLICIT_BF_M << WMI_HOST_TXBF_CONF_IMPLICIT_BF_S)
223 #define WMI_HOST_TXBF_CONF_IMPLICIT_BF_GET(x) \
224 	WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_IMPLICIT_BF)
225 #define WMI_HOST_TXBF_CONF_IMPLICIT_BF_SET(x, z) \
226 	WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_IMPLICIT_BF)
227 
228 #define WMI_HOST_TXBF_CONF_BF_SND_DIM_S 8
229 #define WMI_HOST_TXBF_CONF_BF_SND_DIM_M 0x7
230 #define WMI_HOST_TXBF_CONF_BF_SND_DIM \
231 	(WMI_HOST_TXBF_CONF_BF_SND_DIM_M << WMI_HOST_TXBF_CONF_BF_SND_DIM_S)
232 #define WMI_HOST_TXBF_CONF_BF_SND_DIM_GET(x) \
233 	WMI_HOST_F_MS(x, WMI_HOST_TXBF_CONF_BF_SND_DIM)
234 #define WMI_HOST_TXBF_CONF_BF_SND_DIM_SET(x, z) \
235 	WMI_HOST_F_RMW(x, z, WMI_HOST_TXBF_CONF_BF_SND_DIM)
236 
237 /* The following WMI_HOST_HEOPS_BSSCOLOR_XXX macros correspond to the
238  *  WMI_HEOPS_COLOR_XXX macros in the FW wmi_unified.h */
239 #ifdef SUPPORT_11AX_D3
240 #define WMI_HOST_HEOPS_BSSCOLOR_S 24
241 #else
242 #define WMI_HOST_HEOPS_BSSCOLOR_S 0
243 #endif
244 
245 #define WMI_HOST_HEOPS_BSSCOLOR_M 0x3f
246 #define WMI_HOST_HEOPS_BSSCOLOR \
247 	(WMI_HOST_HEOPS_BSSCOLOR_M << WMI_HOST_HEOPS_BSSCOLOR_S)
248 #define WMI_HOST_HEOPS_BSSCOLOR_GET(x) \
249 	WMI_HOST_F_MS(x, WMI_HOST_HEOPS_BSSCOLOR)
250 #define WMI_HOST_HEOPS_BSSCOLOR_SET(x, z) \
251 	WMI_HOST_F_RMW(x, z, WMI_HOST_HEOPS_BSSCOLOR)
252 
253 /* The following WMI_HOST_HEOPS_BSSCOLOR_DISABLE_XXX macros correspond to the
254  *  WMI_HEOPS_BSSCOLORDISABLE_XXX macros in the FW wmi_unified.h */
255 #ifdef SUPPORT_11AX_D3
256 #define WMI_HOST_HEOPS_BSSCOLOR_DISABLE_S 31
257 #else
258 #define WMI_HOST_HEOPS_BSSCOLOR_DISABLE_S 30
259 #endif
260 
261 #define WMI_HOST_HEOPS_BSSCOLOR_DISABLE_M 0x1
262 #define WMI_HOST_HEOPS_BSSCOLOR_DISABLE \
263 	(WMI_HOST_HEOPS_BSSCOLOR_DISABLE_M << WMI_HOST_HEOPS_BSSCOLOR_DISABLE_S)
264 #define WMI_HOST_HEOPS_BSSCOLOR_DISABLE_GET(x) \
265 	WMI_HOST_F_MS(x, WMI_HOST_HEOPS_BSSCOLOR_DISABLE)
266 #define WMI_HOST_HEOPS_BSSCOLOR_DISABLE_SET(x, z) \
267 	WMI_HOST_F_RMW(x, z, WMI_HOST_HEOPS_BSSCOLOR_DISABLE)
268 
269 /* HE BF capabilities mask */
270 #define WMI_HOST_HE_BF_CONF_SU_BFEE_S 0
271 #define WMI_HOST_HE_BF_CONF_SU_BFEE_M 0x1
272 #define WMI_HOST_HE_BF_CONF_SU_BFEE \
273 	(WMI_HOST_HE_BF_CONF_SU_BFEE_M << WMI_HOST_HE_BF_CONF_SU_BFEE_S)
274 #define WMI_HOST_HE_BF_CONF_SU_BFEE_GET(x) \
275 	WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_SU_BFEE)
276 #define WMI_HOST_HE_BF_CONF_SU_BFEE_SET(x, z) \
277 	WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_SU_BFEE)
278 
279 #define WMI_HOST_HE_BF_CONF_SU_BFER_S 1
280 #define WMI_HOST_HE_BF_CONF_SU_BFER_M 0x1
281 #define WMI_HOST_HE_BF_CONF_SU_BFER \
282 	(WMI_HOST_HE_BF_CONF_SU_BFER_M << WMI_HOST_HE_BF_CONF_SU_BFER_S)
283 #define WMI_HOST_HE_BF_CONF_SU_BFER_GET(x) \
284 	WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_SU_BFER)
285 #define WMI_HOST_HE_BF_CONF_SU_BFER_SET(x, z) \
286 	WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_SU_BFER)
287 
288 #define WMI_HOST_HE_BF_CONF_MU_BFEE_S 2
289 #define WMI_HOST_HE_BF_CONF_MU_BFEE_M 0x1
290 #define WMI_HOST_HE_BF_CONF_MU_BFEE \
291 	(WMI_HOST_HE_BF_CONF_MU_BFEE_M << WMI_HOST_HE_BF_CONF_MU_BFEE_S)
292 #define WMI_HOST_HE_BF_CONF_MU_BFEE_GET(x) \
293 	WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_MU_BFEE)
294 #define WMI_HOST_HE_BF_CONF_MU_BFEE_SET(x, z) \
295 	WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_MU_BFEE)
296 
297 #define WMI_HOST_HE_BF_CONF_MU_BFER_S 3
298 #define WMI_HOST_HE_BF_CONF_MU_BFER_M 0x1
299 #define WMI_HOST_HE_BF_CONF_MU_BFER \
300 	(WMI_HOST_HE_BF_CONF_MU_BFER_M << WMI_HOST_HE_BF_CONF_MU_BFER_S)
301 #define WMI_HOST_HE_BF_CONF_MU_BFER_GET(x) \
302 	WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_MU_BFER)
303 #define WMI_HOST_HE_BF_CONF_MU_BFER_SET(x, z) \
304 	WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_MU_BFER)
305 
306 #define WMI_HOST_HE_BF_CONF_DL_OFDMA_S 4
307 #define WMI_HOST_HE_BF_CONF_DL_OFDMA_M 0x1
308 #define WMI_HOST_HE_BF_CONF_DL_OFDMA \
309 	(WMI_HOST_HE_BF_CONF_DL_OFDMA_M << WMI_HOST_HE_BF_CONF_DL_OFDMA_S)
310 #define WMI_HOST_HE_BF_CONF_DL_OFDMA_GET(x) \
311 	WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_DL_OFDMA)
312 #define WMI_HOST_HE_BF_CONF_DL_OFDMA_SET(x, z) \
313 	WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_DL_OFDMA)
314 
315 #define WMI_HOST_HE_BF_CONF_UL_OFDMA_S 5
316 #define WMI_HOST_HE_BF_CONF_UL_OFDMA_M 0x1
317 #define WMI_HOST_HE_BF_CONF_UL_OFDMA \
318 	(WMI_HOST_HE_BF_CONF_UL_OFDMA_M << WMI_HOST_HE_BF_CONF_UL_OFDMA_S)
319 #define WMI_HOST_HE_BF_CONF_UL_OFDMA_GET(x) \
320 	WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_UL_OFDMA)
321 #define WMI_HOST_HE_BF_CONF_UL_OFDMA_SET(x, z) \
322 	WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_UL_OFDMA)
323 
324 #define WMI_HOST_HE_BF_CONF_UL_MUMIMO_S 6
325 #define WMI_HOST_HE_BF_CONF_UL_MUMIMO_M 0x1
326 #define WMI_HOST_HE_BF_CONF_UL_MUMIMO \
327 	(WMI_HOST_HE_BF_CONF_UL_MUMIMO_M << WMI_HOST_HE_BF_CONF_UL_MUMIMO_S)
328 #define WMI_HOST_HE_BF_CONF_UL_MUMIMO_GET(x) \
329 	WMI_HOST_F_MS(x, WMI_HOST_HE_BF_CONF_UL_MUMIMO)
330 #define WMI_HOST_HE_BF_CONF_UL_MUMIMO_SET(x, z) \
331 	WMI_HOST_F_RMW(x, z, WMI_HOST_HE_BF_CONF_UL_MUMIMO)
332 
333 /* HE or VHT Sounding */
334 #define WMI_HOST_HE_VHT_SOUNDING_MODE_S 0
335 #define WMI_HOST_HE_VHT_SOUNDING_MODE_M 0x1
336 #define WMI_HOST_HE_VHT_SOUNDING_MODE \
337 	(WMI_HOST_HE_VHT_SOUNDING_MODE_M << WMI_HOST_HE_VHT_SOUNDING_MODE_S)
338 #define WMI_HOST_HE_VHT_SOUNDING_MODE_GET(x) \
339 	WMI_HOST_F_MS(x, WMI_HOST_HE_VHT_SOUNDING_MODE)
340 #define WMI_HOST_HE_VHT_SOUNDING_MODE_SET(x, z) \
341 	WMI_HOST_F_RMW(x, z, WMI_HOST_HE_VHT_SOUNDING_MODE)
342 
343 /* SU or MU Sounding */
344 #define WMI_HOST_SU_MU_SOUNDING_MODE_S 2
345 #define WMI_HOST_SU_MU_SOUNDING_MODE_M 0x1
346 #define WMI_HOST_SU_MU_SOUNDING_MODE \
347 	(WMI_HOST_SU_MU_SOUNDING_MODE_M << \
348 	 WMI_HOST_SU_MU_SOUNDING_MODE_S)
349 #define WMI_HOST_SU_MU_SOUNDING_MODE_GET(x) \
350 	WMI_HOST_F_MS(x, WMI_HOST_SU_MU_SOUNDING_MODE)
351 #define WMI_HOST_SU_MU_SOUNDING_MODE_SET(x, z) \
352 	WMI_HOST_F_RMW(x, z, WMI_HOST_SU_MU_SOUNDING_MODE)
353 
354 /* Trig or Non-Trig Sounding */
355 #define WMI_HOST_TRIG_NONTRIG_SOUNDING_MODE_S  3
356 #define WMI_HOST_TRIG_NONTRIG_SOUNDING_MODE_M 0x1
357 #define WMI_HOST_TRIG_NONTRIG_SOUNDING_MODE \
358 	(WMI_HOST_TRIG_NONTRIG_SOUNDING_MODE_M << \
359 	 WMI_HOST_TRIG_NONTRIG_SOUNDING_MODE_S)
360 #define WMI_HOST_TRIG_NONTRIG_SOUNDING_MODE_GET(x) \
361 	WMI_HOST_F_MS(x, WMI_HOST_TRIG_NONTRIG_SOUNDING_MODE)
362 #define WMI_HOST_HE_VHT_SU_MU_SOUNDING_MODE_SET(x, z) \
363 	WMI_HOST_F_RMW(x, z, WMI_HOST_TRIG_NONTRIG_SOUNDING_MODE)
364 
365 #ifdef WLAN_FEATURE_11BE
366 /* EHT BF capabilities mask */
367 #define WMI_HOST_EHT_CONF_SU_BFEE_S 0
368 #define WMI_HOST_EHT_CONF_SU_BFEE_M 0x1
369 #define WMI_HOST_EHT_CONF_SU_BFEE \
370 	(WMI_HOST_EHT_CONF_SU_BFEE_M << WMI_HOST_EHT_CONF_SU_BFEE_S)
371 #define WMI_HOST_EHT_CONF_SU_BFEE_GET(x) \
372 	WMI_HOST_F_MS(x, WMI_HOST_EHT_CONF_SU_BFEE)
373 #define WMI_HOST_EHT_CONF_SU_BFEE_SET(x, z) \
374 	WMI_HOST_F_RMW(x, z, WMI_HOST_EHT_CONF_SU_BFEE)
375 
376 #define WMI_HOST_EHT_CONF_SU_BFER_S 1
377 #define WMI_HOST_EHT_CONF_SU_BFER_M 0x1
378 #define WMI_HOST_EHT_CONF_SU_BFER \
379 	(WMI_HOST_EHT_CONF_SU_BFER_M << WMI_HOST_EHT_CONF_SU_BFER_S)
380 #define WMI_HOST_EHT_CONF_SU_BFER_GET(x) \
381 	WMI_HOST_F_MS(x, WMI_HOST_EHT_CONF_SU_BFER)
382 #define WMI_HOST_EHT_CONF_SU_BFER_SET(x, z) \
383 	WMI_HOST_F_RMW(x, z, WMI_HOST_EHT_CONF_SU_BFER)
384 
385 #define WMI_HOST_EHT_CONF_MU_BFEE_S 2
386 #define WMI_HOST_EHT_CONF_MU_BFEE_M 0x1
387 #define WMI_HOST_EHT_CONF_MU_BFEE \
388 	(WMI_HOST_EHT_CONF_MU_BFEE_M << WMI_HOST_EHT_CONF_MU_BFEE_S)
389 #define WMI_HOST_EHT_CONF_MU_BFEE_GET(x) \
390 	WMI_HOST_F_MS(x, WMI_HOST_EHT_CONF_MU_BFEE)
391 #define WMI_HOST_EHT_CONF_MU_BFEE_SET(x, z) \
392 	WMI_HOST_F_RMW(x, z, WMI_HOST_EHT_CONF_MU_BFEE)
393 
394 #define WMI_HOST_EHT_CONF_MU_BFER_S 3
395 #define WMI_HOST_EHT_CONF_MU_BFER_M 0x1
396 #define WMI_HOST_EHT_CONF_MU_BFER \
397 	(WMI_HOST_EHT_CONF_MU_BFER_M << WMI_HOST_EHT_CONF_MU_BFER_S)
398 #define WMI_HOST_EHT_CONF_MU_BFER_GET(x) \
399 	WMI_HOST_F_MS(x, WMI_HOST_EHT_CONF_MU_BFER)
400 #define WMI_HOST_EHT_CONF_MU_BFER_SET(x, z) \
401 	WMI_HOST_F_RMW(x, z, WMI_HOST_EHT_CONF_MU_BFER)
402 
403 #define WMI_HOST_EHT_CONF_DL_OFDMA_S 4
404 #define WMI_HOST_EHT_CONF_DL_OFDMA_M 0x1
405 #define WMI_HOST_EHT_CONF_DL_OFDMA \
406 	(WMI_HOST_EHT_CONF_DL_OFDMA_M << WMI_HOST_EHT_CONF_DL_OFDMA_S)
407 #define WMI_HOST_EHT_CONF_DL_OFDMA_GET(x) \
408 	WMI_HOST_F_MS(x, WMI_HOST_EHT_CONF_DL_OFDMA)
409 #define WMI_HOST_EHT_CONF_DL_OFDMA_SET(x, z) \
410 	WMI_HOST_F_RMW(x, z, WMI_HOST_EHT_CONF_DL_OFDMA)
411 
412 #define WMI_HOST_EHT_CONF_UL_OFDMA_S 5
413 #define WMI_HOST_EHT_CONF_UL_OFDMA_M 0x1
414 #define WMI_HOST_EHT_CONF_UL_OFDMA \
415 	(WMI_HOST_EHT_CONF_UL_OFDMA_M << WMI_HOST_EHT_CONF_UL_OFDMA_S)
416 #define WMI_HOST_EHT_CONF_UL_OFDMA_GET(x) \
417 	WMI_HOST_F_MS(x, WMI_HOST_EHT_CONF_UL_OFDMA)
418 #define WMI_HOST_EHT_CONF_UL_OFDMA_SET(x, z) \
419 	WMI_HOST_F_RMW(x, z, WMI_HOST_EHT_CONF_UL_OFDMA)
420 
421 #define WMI_HOST_EHT_CONF_UL_MUMIMO_S 6
422 #define WMI_HOST_EHT_CONF_UL_MUMIMO_M 0x1
423 #define WMI_HOST_EHT_CONF_UL_MUMIMO \
424 	(WMI_HOST_EHT_CONF_UL_MUMIMO_M << WMI_HOST_EHT_CONF_UL_MUMIMO_S)
425 #define WMI_HOST_EHT_CONF_UL_MUMIMO_GET(x) \
426 	WMI_HOST_F_MS(x, WMI_HOST_EHT_CONF_UL_MUMIMO)
427 #define WMI_HOST_EHT_CONF_UL_MUMIMO_SET(x, z) \
428 	WMI_HOST_F_RMW(x, z, WMI_HOST_EHT_CONF_UL_MUMIMO)
429 
430 #define WMI_HOST_EHT_CONF_DL_OFDMA_TXBF_S 7
431 #define WMI_HOST_EHT_CONF_DL_OFDMA_TXBF_M 0x1
432 #define WMI_HOST_EHT_CONF_DL_OFDMA_TXBF \
433 	(WMI_HOST_EHT_CONF_DL_OFDMA_TXBF_M << \
434 		WMI_HOST_EHT_CONF_DL_OFDMA_TXBF_S)
435 #define WMI_HOST_EHT_CONF_DL_OFDMA_TXBF_GET(x) \
436 	WMI_HOST_F_MS(x, WMI_HOST_EHT_CONF_DL_OFDMA_TXBF)
437 #define WMI_HOST_EHT_CONF_DL_OFDMA_TXBF_SET(x, z) \
438 	WMI_HOST_F_RMW(x, z, WMI_HOST_EHT_CONF_DL_OFDMA_TXBF)
439 
440 #define WMI_HOST_EHT_CONF_DL_OFDMA_MUMIMO_S 8
441 #define WMI_HOST_EHT_CONF_DL_OFDMA_MUMIMO_M 0x1
442 #define WMI_HOST_EHT_CONF_DL_OFDMA_MUMIMO \
443 	(WMI_HOST_EHT_CONF_DL_OFDMA_MUMIMO_M << \
444 		 WMI_HOST_EHT_CONF_DL_OFDMA_MUMIMO_S)
445 #define WMI_HOST_EHT_CONF_DL_OFDMA_MUMIMO_GET(x) \
446 	WMI_HOST_F_MS(x, WMI_HOST_EHT_CONF_DL_OFDMA_MUMIMO)
447 #define WMI_HOST_EHT_CONF_DL_OFDMA_MUMIMO_SET(x, z) \
448 	WMI_HOST_F_RMW(x, z, WMI_HOST_EHT_CONF_DL_OFDMA_MUMIMO)
449 
450 #define WMI_HOST_EHT_CONF_UL_OFDMA_MUMIMO_S 9
451 #define WMI_HOST_EHT_CONF_UL_OFDMA_MUMIMO_M 0x1
452 #define WMI_HOST_EHT_CONF_UL_OFDMA_MUMIMO \
453 	(WMI_HOST_EHT_CONF_UL_OFDMA_MUMIMO_M << \
454 		WMI_HOST_EHT_CONF_UL_OFDMA_MUMIMO_S)
455 #define WMI_HOST_EHT_CONF_UL_OFDMA_MUMIMO_GET(x) \
456 	WMI_HOST_F_MS(x, WMI_HOST_EHT_CONF_UL_OFDMA_MUMIMO)
457 #define WMI_HOST_EHT_CONF_UL_OFDMA_MUMIMO_SET(x, z) \
458 	WMI_HOST_F_RMW(x, z, WMI_HOST_EHT_CONF_UL_OFDMA_MUMIMO)
459 
460 /* Firmware uses most significant 4 bits to differentiate */
461 /* some of vdev params between HE and EHT */
462 #define WMI_HOST_VDEV_PARAM_EHT_MODE 0x10000000
463 #endif
464 
465 #define WMI_HOST_TPC_RATE_MAX	160
466 #define WMI_HOST_TPC_TX_NUM_CHAIN	4
467 #define WMI_HOST_RXG_CAL_CHAN_MAX	8
468 #define WMI_HOST_MAX_NUM_CHAINS	8
469 #define WMI_MAX_NUM_OF_RATE_THRESH   4
470 
471 #define WMI_HOST_PDEV_MAX_VDEVS         17
472 
473 /* for QC98XX only */
474 /*6 modes (A, HT20, HT40, VHT20, VHT40, VHT80) * 3 reg dommains
475  */
476 #define WMI_HOST_NUM_CTLS_5G                18
477 /*6 modes (B, G, HT20, HT40, VHT20, VHT40) * 3 reg domains */
478 #define WMI_HOST_NUM_CTLS_2G                18
479 #define WMI_HOST_NUM_BAND_EDGES_5G          8
480 #define WMI_HOST_NUM_BAND_EDGES_2G          4
481 
482 /*Beelinier 5G*/
483 #define WMI_HOST_NUM_CTLS_5G_11A            9
484 #define WMI_HOST_NUM_BAND_EDGES_5G_11A      25
485 #define WMI_HOST_NUM_CTLS_5G_HT20           24
486 #define WMI_HOST_NUM_BAND_EDGES_5G_HT20     25
487 #define WMI_HOST_NUM_CTLS_5G_HT40           18
488 #define WMI_HOST_NUM_BAND_EDGES_5G_HT40     12
489 #define WMI_HOST_NUM_CTLS_5G_HT80           18
490 #define WMI_HOST_NUM_BAND_EDGES_5G_HT80     6
491 #define WMI_HOST_NUM_CTLS_5G_HT160          9
492 #define WMI_HOST_NUM_BAND_EDGES_5G_HT160    2
493 
494 /* Beeliner 2G */
495 #define WMI_HOST_NUM_CTLS_2G_11B            6
496 #define WMI_HOST_NUM_BAND_EDGES_2G_11B      9
497 #define WMI_HOST_NUM_CTLS_2G_20MHZ          30
498 #define WMI_HOST_NUM_BAND_EDGES_2G_20MHZ    11
499 #define WMI_HOST_NUM_CTLS_2G_40MHZ          18
500 #define WMI_HOST_NUM_BAND_EDGES_2G_40MHZ    6
501 
502 /* for QC98XX only */
503 #define WMI_HOST_TX_NUM_CHAIN               0x3
504 #define WMI_HOST_TPC_REGINDEX_MAX           4
505 #define WMI_HOST_ARRAY_GAIN_NUM_STREAMS     2
506 
507 /* AST Index for flow override */
508 #define WMI_CONFIG_MSDU_AST_INDEX_0         0x0
509 #define WMI_CONFIG_MSDU_AST_INDEX_1         0x1
510 #define WMI_CONFIG_MSDU_AST_INDEX_2         0x2
511 #define WMI_CONFIG_MSDU_AST_INDEX_3         0x3
512 
513 #define WMI_MAX_AOA_PHASE_DELTA 31
514 #define WMI_MAX_CHAINS_PHASE 2
515 
516 #include "qdf_atomic.h"
517 
518 #ifdef BIG_ENDIAN_HOST
519 	/* This API is used in copying in elements to WMI message,
520 	since WMI message uses multilpes of 4 bytes, This API
521 	converts length into multiples of 4 bytes, and performs copy
522 	*/
523 #define WMI_HOST_IF_MSG_COPY_CHAR_ARRAY(destp, srcp, len)  do { \
524 	int j; \
525 	u_int32_t *src, *dest; \
526 	src = (u_int32_t *)srcp; \
527 	dest = (u_int32_t *)destp; \
528 	for (j = 0; j < roundup(len, sizeof(u_int32_t))/4; j++) { \
529 		*(dest+j) = qdf_le32_to_cpu(*(src+j)); \
530 	} \
531 } while (0)
532 #else
533 
534 #define WMI_HOST_IF_MSG_COPY_CHAR_ARRAY(destp, srcp, len) OS_MEMCPY(destp,\
535 		srcp, len)
536 
537 #endif
538 
539 /** macro to convert MAC address from WMI word format to char array */
540 #define WMI_HOST_MAC_ADDR_TO_CHAR_ARRAY(pwmi_mac_addr, c_macaddr) do {	\
541 	(c_macaddr)[0] =  ((pwmi_mac_addr)->mac_addr31to0) & 0xff; \
542 	(c_macaddr)[1] =  (((pwmi_mac_addr)->mac_addr31to0) >> 8) & 0xff; \
543 	(c_macaddr)[2] =  (((pwmi_mac_addr)->mac_addr31to0) >> 16) & 0xff; \
544 	(c_macaddr)[3] =  (((pwmi_mac_addr)->mac_addr31to0) >> 24) & 0xff;  \
545 	(c_macaddr)[4] =  ((pwmi_mac_addr)->mac_addr47to32) & 0xff; \
546 	(c_macaddr)[5] =  (((pwmi_mac_addr)->mac_addr47to32) >> 8) & 0xff; \
547 	} while (0)
548 
549 #define TARGET_INIT_STATUS_SUCCESS   0x0
550 #define TARGET_INIT_STATUS_GEN_FAILED   0x1
551 #define TARGET_GET_INIT_STATUS_REASON(status)	((status) & 0xffff)
552 #define TARGET_GET_INIT_STATUS_MODULE_ID(status) (((status) >> 16) & 0xffff)
553 
554 #define MAX_ASSOC_IE_LENGTH 1024
555 typedef uint32_t TARGET_INIT_STATUS;
556 
557 /**
558  * @brief Opaque handle of wmi structure
559  */
560 struct wmi_unified;
561 typedef struct wmi_unified *wmi_unified_t;
562 
563 typedef void *ol_scn_t;
564 /**
565  * @wmi_event_handler function prototype
566  */
567 typedef int (*wmi_unified_event_handler)(ol_scn_t scn_handle,
568 		 uint8_t *event_buf, uint32_t len);
569 
570 /**
571  * @WMI_HOST_WLAN_PHY_MODE: Host based enum ID for corresponding in
572  * WLAN_PHY_MODE. This should be consistent with WLAN_PHY_MODE always to avoid
573  * breaking the WMI
574  */
575 typedef enum {
576 	WMI_HOST_MODE_11A	= 0,   /* 11a Mode */
577 	WMI_HOST_MODE_11G	= 1,   /* 11b/g Mode */
578 	WMI_HOST_MODE_11B	= 2,   /* 11b Mode */
579 	WMI_HOST_MODE_11GONLY	= 3,   /* 11g only Mode */
580 	WMI_HOST_MODE_11NA_HT20   = 4,  /* 11a HT20 mode */
581 	WMI_HOST_MODE_11NG_HT20   = 5,  /* 11g HT20 mode */
582 	WMI_HOST_MODE_11NA_HT40   = 6,  /* 11a HT40 mode */
583 	WMI_HOST_MODE_11NG_HT40   = 7,  /* 11g HT40 mode */
584 	WMI_HOST_MODE_11AC_VHT20 = 8,
585 	WMI_HOST_MODE_11AC_VHT40 = 9,
586 	WMI_HOST_MODE_11AC_VHT80 = 10,
587 	WMI_HOST_MODE_11AC_VHT20_2G = 11,
588 	WMI_HOST_MODE_11AC_VHT40_2G = 12,
589 	WMI_HOST_MODE_11AC_VHT80_2G = 13,
590 	WMI_HOST_MODE_11AC_VHT80_80 = 14,
591 	WMI_HOST_MODE_11AC_VHT160 = 15,
592 	WMI_HOST_MODE_11AX_HE20 = 16,
593 	WMI_HOST_MODE_11AX_HE40 = 17,
594 	WMI_HOST_MODE_11AX_HE80 = 18,
595 	WMI_HOST_MODE_11AX_HE80_80 = 19,
596 	WMI_HOST_MODE_11AX_HE160 = 20,
597 	WMI_HOST_MODE_11AX_HE20_2G = 21,
598 	WMI_HOST_MODE_11AX_HE40_2G = 22,
599 	WMI_HOST_MODE_11AX_HE80_2G = 23,
600 #ifdef WLAN_FEATURE_11BE
601 	WMI_HOST_MODE_11BE_EHT20 = 24,
602 	WMI_HOST_MODE_11BE_EHT40 = 25,
603 	WMI_HOST_MODE_11BE_EHT80 = 26,
604 	WMI_HOST_MODE_11BE_EHT160 = 28,
605 	WMI_HOST_MODE_11BE_EHT320 = 30,
606 	WMI_HOST_MODE_11BE_EHT20_2G = 31,
607 	WMI_HOST_MODE_11BE_EHT40_2G = 32,
608 #endif
609 	WMI_HOST_MODE_UNKNOWN,
610 	WMI_HOST_MODE_MAX = WMI_HOST_MODE_UNKNOWN,
611 } WMI_HOST_WLAN_PHY_MODE;
612 
613 /*
614  * Needs to be removed and use channel_param based
615  * on how it is processed
616  */
617 typedef struct {
618 	/** primary 20 MHz channel frequency in mhz */
619 	uint32_t mhz;
620 	/** Center frequency 1 in MHz*/
621 	uint32_t band_center_freq1;
622 	/** Center frequency 2 in MHz - valid only for 11acvht 80plus80 mode*/
623 	uint32_t band_center_freq2;
624 	/** channel info described below */
625 	uint32_t info;
626 	/** contains min power, max power, reg power and reg class id.  */
627 	uint32_t reg_info_1;
628 	/** contains antennamax */
629 	uint32_t reg_info_2;
630 } wmi_host_channel;
631 
632 /**
633  * enum WMI_HOST_WLAN_BAND_CAPABILITY: Band capability (2.4 GHz, 5 GHz). Maps to
634  *               WLAN_BAND_CAPABILITY used in firmware header file(s).
635  * @WMI_HOST_WLAN_2G_CAPABILITY: 2.4 GHz capable
636  * @WMI_HOST_WLAN_5G_CAPABILITY: 5 GHz capable
637  */
638 typedef enum {
639 	WMI_HOST_WLAN_2G_CAPABILITY = 0x1,
640 	WMI_HOST_WLAN_5G_CAPABILITY = 0x2,
641 } WMI_HOST_WLAN_BAND_CAPABILITY;
642 
643 /**
644  * enum wmi_host_channel_width: Channel operating width. Maps to
645  *               wmi_channel_width used in firmware header file(s).
646  * @WMI_HOST_CHAN_WIDTH_20: 20 MHz channel operating width
647  * @WMI_HOST_CHAN_WIDTH_40: 40 MHz channel operating width
648  * @WMI_HOST_CHAN_WIDTH_80: 80 MHz channel operating width
649  * @WMI_HOST_CHAN_WIDTH_160: 160 MHz channel operating width
650  * @WMI_HOST_CHAN_WIDTH_80P80: 80+80 MHz channel operating width
651  * @WMI_HOST_CHAN_WIDTH_5: 5 MHz channel operating width
652  * @WMI_HOST_CHAN_WIDTH_10: 10 MHz channel operating width
653  * @WMI_HOST_CHAN_WIDTH_165: 165 MHz channel operating width
654  * @WMI_HOST_CHAN_WIDTH_160P160: 160 MHz + 160 MHz channel operating width
655  * @WMI_HOST_CHAN_WIDTH_320: 320 MHz channel operating width
656  */
657 typedef enum {
658 	WMI_HOST_CHAN_WIDTH_20    = 0,
659 	WMI_HOST_CHAN_WIDTH_40    = 1,
660 	WMI_HOST_CHAN_WIDTH_80    = 2,
661 	WMI_HOST_CHAN_WIDTH_160   = 3,
662 	WMI_HOST_CHAN_WIDTH_80P80 = 4,
663 	WMI_HOST_CHAN_WIDTH_5     = 5,
664 	WMI_HOST_CHAN_WIDTH_10    = 6,
665 	WMI_HOST_CHAN_WIDTH_165   = 7,
666 	WMI_HOST_CHAN_WIDTH_160P160 = 8,
667 	WMI_HOST_CHAN_WIDTH_320   = 9,
668 } wmi_host_channel_width;
669 
670 #define ATH_EXPONENT_TO_VALUE(v)	((1<<v)-1)
671 #define ATH_TXOP_TO_US(v)		   (v<<5)
672 /* WME stream classes */
673 #define WMI_HOST_AC_BE                          0    /* best effort */
674 #define WMI_HOST_AC_BK                          1    /* background */
675 #define WMI_HOST_AC_VI                          2    /* video */
676 #define WMI_HOST_AC_VO                          3    /* voice */
677 #define WMI_TID_TO_AC(_tid) (\
678 		(((_tid) == 0) || ((_tid) == 3)) ? WMI_HOST_AC_BE : \
679 		(((_tid) == 1) || ((_tid) == 2)) ? WMI_HOST_AC_BK : \
680 		(((_tid) == 4) || ((_tid) == 5)) ? WMI_HOST_AC_VI : \
681 		WMI_HOST_AC_VO)
682 
683 /**
684  * struct channel_param - Channel parameters with all
685  *			info required by target.
686  * @chan_id: channel id
687  * @pwr: channel power
688  * @mhz: channel frequency
689  * @half_rate: is half rate
690  * @quarter_rate: is quarter rate
691  * @dfs_set: is dfs channel
692  * @dfs_set_cfreq2: is secondary freq dfs channel
693  * @is_chan_passive: is this passive channel
694  * @allow_ht: HT allowed in chan
695  * @allow_vht: VHT allowed on chan
696  * @set_agile: is agile mode
697  * @allow_he: HE allowed on chan
698  * @psc_channel: 6 ghz preferred scan chan
699  * @nan_disabled: is NAN disabled on @mhz
700  * @allow_eht: EHT allowed on chan
701  * @phy_mode: phymode (vht80 or ht40 or ...)
702  * @cfreq1: centre frequency on primary
703  * @cfreq2: centre frequency on secondary
704  * @maxpower: max power for channel
705  * @minpower: min power for channel
706  * @maxreqpower: Max regulatory power
707  * @antennamac: Max antenna
708  * @reg_class_id: Regulatory class id.
709  * @max_bw_supported: max BW supported
710  */
711 
712 struct channel_param {
713 	uint8_t chan_id;
714 	uint8_t pwr;
715 	uint32_t mhz;
716 	uint32_t half_rate:1,
717 		quarter_rate:1,
718 		dfs_set:1,
719 		dfs_set_cfreq2:1,
720 		is_chan_passive:1,
721 		allow_ht:1,
722 		allow_vht:1,
723 		set_agile:1,
724 		allow_he:1,
725 		psc_channel:1,
726 		nan_disabled:1,
727 		allow_eht:1;
728 	uint32_t phy_mode;
729 	uint32_t cfreq1;
730 	uint32_t cfreq2;
731 	int8_t   maxpower;
732 	int8_t   minpower;
733 	int8_t   maxregpower;
734 	uint8_t  antennamax;
735 	uint8_t  reg_class_id;
736 	wmi_host_channel_width max_bw_supported;
737 };
738 
739 #ifdef FEATURE_OEM_DATA
740 /**
741  * struct oem_data - oem data to be sent to firmware
742  * @vdev_id: Unique identifier assigned to the vdev
743  * @data_len: len of data
744  * @pdev_id: pdev id to identify the pdev
745  * @pdev_vdev_flag: 0 when vdev is valid, 1 when pdev is valid
746  * @is_host_pdev_id: 1 for host pdev id, 0 otherwise
747  * @data: the pointer to the buffer containing data
748  */
749 struct oem_data {
750 	uint8_t vdev_id;
751 	size_t data_len;
752 	uint8_t pdev_id;
753 	bool pdev_vdev_flag;
754 	bool is_host_pdev_id;
755 	uint8_t *data;
756 };
757 #endif
758 
759 #ifdef MULTI_CLIENT_LL_SUPPORT
760 /**
761  * struct latency_level_data - latency data received in the event from the FW
762  * @vdev_id: The latency level for specified vdev_id
763  * @latency_level: latency level honoured by FW
764  */
765 struct latency_level_data {
766 	uint8_t vdev_id;
767 	uint32_t latency_level;
768 };
769 #endif
770 
771 /**
772  * enum nss_chains_band_info - Band info for dynamic nss, chains change feature
773  * @NSS_CHAINS_BAND_2GHZ: 2.4Ghz band
774  * @NSS_CHAINS_BAND_5GHZ: 5Ghz band
775  * @NSS_CHAINS_BAND_MAX: Max bands supported
776  */
777 enum nss_chains_band_info {
778 	NSS_CHAINS_BAND_2GHZ = 0,
779 	NSS_CHAINS_BAND_5GHZ,
780 	NSS_CHAINS_BAND_MAX,
781 };
782 
783 /**
784  * struct vdev_nss_chains -          vdev config of nss, and chains
785  * @num_tx_chains:                   tx chains of vdev config
786  * @num_rx_chains:                   rx chains of vdev config
787  * @tx_nss:                          tx nss of vdev config
788  * @rx_nss:                          rx nss of vdev config
789  * @num_tx_chains_11b:               number of tx chains in 11b mode
790  * @num_tx_chains_11g:               number of tx chains in 11g mode
791  * @num_tx_chains_11a:               number of tx chains in 11a mode
792  * @disable_rx_mrc:                  disable 2 rx chains, in rx nss 1 mode
793  * @disable_tx_mrc:                  disable 2 tx chains, in tx nss 1 mode
794  */
795 struct vdev_nss_chains {
796 	uint32_t num_tx_chains[NSS_CHAINS_BAND_MAX];
797 	uint32_t num_rx_chains[NSS_CHAINS_BAND_MAX];
798 	uint32_t tx_nss[NSS_CHAINS_BAND_MAX];
799 	uint32_t rx_nss[NSS_CHAINS_BAND_MAX];
800 	uint32_t num_tx_chains_11b;
801 	uint32_t num_tx_chains_11g;
802 	uint32_t num_tx_chains_11a;
803 	bool disable_rx_mrc[NSS_CHAINS_BAND_MAX];
804 	bool disable_tx_mrc[NSS_CHAINS_BAND_MAX];
805 };
806 
807 
808 /**
809  * struct peer_delete_params - peer delete cmd parameter
810  * @vdev_id: vdev id
811  */
812 struct peer_delete_params {
813 	uint8_t vdev_id;
814 };
815 
816 /**
817  * struct peer_set_params - peer set cmd parameter
818  * @param_id: parameter id
819  * @param_value: parameter value
820  * @vdev_id: vdev id
821  */
822 struct peer_set_params {
823 	uint32_t param_id;
824 	uint32_t param_value;
825 	uint32_t vdev_id;
826 };
827 
828 /**
829  * struct peer_create_params - peer create cmd parameter
830  * @peer_addr: peer mac addr
831  * @peer_type: peer type
832  * @vdev_id: vdev id
833  * @mlo_enable: Indicates MLO is enabled
834  */
835 struct peer_create_params {
836 	const uint8_t *peer_addr;
837 	uint32_t peer_type;
838 	uint32_t vdev_id;
839 #ifdef WLAN_FEATURE_11BE_MLO
840 	bool mlo_enabled;
841 #endif
842 };
843 
844 #ifdef WLAN_SUPPORT_PPEDS
845 /**
846  * struct peer_ppe_ds_param - Per peer PPE Direct Switch parameter
847  * @peer_macaddr: PPE mac address
848  * @ppe_routing_enabled: Master flag for PPE routing
849  * @use_ppe: Use PPE command for the peer entry
850  * @service_code: Service code
851  * @priority_valid: If PRI to TID conversion is enabled
852  * @src_info: Source info/PPE port of the interface
853  * @vdev_id: VAP ID
854  */
855 struct peer_ppe_ds_param {
856 	uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE];
857 	bool ppe_routing_enabled;
858 	bool use_ppe;
859 	uint16_t service_code;
860 	uint16_t src_info;
861 	uint8_t priority_valid;
862 	uint8_t vdev_id;
863 };
864 #endif
865 
866 /**
867  * struct peer_remove_params - peer remove cmd parameter
868  * @bssid: bss id
869  * @vdev_id: vdev id
870  * @roam_synch_in_progress: flag to indicate if roaming is in progress
871  */
872 struct peer_remove_params {
873 	uint8_t *bssid;
874 	uint8_t vdev_id;
875 	bool roam_synch_in_progress;
876 };
877 
878 /**
879  * Stats ID enums defined in host
880  */
881 typedef enum {
882 	WMI_HOST_REQUEST_PEER_STAT = 0x01,
883 	WMI_HOST_REQUEST_AP_STAT = 0x02,
884 	WMI_HOST_REQUEST_PDEV_STAT = 0x04,
885 	WMI_HOST_REQUEST_VDEV_STAT = 0x08,
886 	WMI_HOST_REQUEST_BCNFLT_STAT = 0x10,
887 	WMI_HOST_REQUEST_VDEV_RATE_STAT = 0x20,
888 	WMI_HOST_REQUEST_INST_STAT  = 0x40,
889 	WMI_HOST_REQUEST_PEER_EXTD_STAT =  0x80,
890 	WMI_HOST_REQUEST_VDEV_EXTD_STAT =  0x100,
891 	WMI_HOST_REQUEST_NAC_RSSI =  0x200,
892 	WMI_HOST_REQUEST_BCN_STAT =  0x800,
893 	WMI_HOST_REQUEST_BCN_STAT_RESET =  0x1000,
894 	WMI_HOST_REQUEST_PEER_RETRY_STAT = 0x2000,
895 	WMI_HOST_REQUEST_PEER_ADV_STATS = 0x4000,
896 	WMI_HOST_REQUEST_PMF_BCN_PROTECT_STAT = 0x8000,
897 	WMI_HOST_REQUEST_VDEV_PRB_FILS_STAT = 0x10000,
898 	WMI_HOST_REQUEST_PDEV_EXTD_STAT = 0x20000,
899 	WMI_HOST_REQUEST_PDEV_TELEMETRY_STAT = 0x40000,
900 } wmi_host_stats_id;
901 
902 typedef struct {
903 	uint16_t cfg_retry_count;
904 	uint16_t retry_count;
905 } wmi_host_inst_rssi_args;
906 
907 /**
908  * struct stats_request_params - stats_request cmd parameter
909  * @stats_id: Bit mask of all the STATS request are specified with values from wmi_host_stats_id
910  * @vdev_id: vdev id
911  * @pdev_id: pdev_id
912  * @wmi_host_inst_rssi_args: Instantaneous rssi stats args
913  * @is_qmi_send_support: support to send by qmi or not
914  */
915 struct stats_request_params {
916 	uint32_t stats_id;
917 	uint8_t vdev_id;
918 	uint8_t pdev_id;
919 	wmi_host_inst_rssi_args rssi_args;
920 	bool is_qmi_send_support;
921 };
922 
923 /**
924  * struct bss_chan_info_request_params - BSS chan info params
925  * @param: parameter value
926  */
927 struct bss_chan_info_request_params {
928 	uint32_t param;
929 };
930 
931 /**
932  * struct wow_cmd_params - wow cmd parameter
933  * @enable: wow enable or disable flag
934  * @can_suspend_link: flag to indicate if link can be suspended
935  * @pause_iface_config: interface config
936  */
937 struct wow_cmd_params {
938 	bool enable;
939 	bool can_suspend_link;
940 	uint8_t pause_iface_config;
941 	uint32_t flags;
942 };
943 
944 /**
945  * struct wow_add_wakeup_params - wow wakeup parameter
946  * @type: param type
947  */
948 struct wow_add_wakeup_params {
949 	uint32_t type;
950 };
951 
952 /**
953  * struct wow_add_wakeup_pattern_params - Add WoW pattern params
954  * @pattern_bytes: pointer to pattern bytes
955  * @mask_bytes: pointer to mask bytes
956  * @pattern_len: pattern length
957  * @pattern_id: pattern id
958  */
959 struct wow_add_wakeup_pattern_params {
960 	uint8_t *pattern_bytes;
961 	uint8_t *mask_bytes;
962 	uint32_t pattern_len;
963 	uint32_t pattern_id;
964 };
965 
966 /**
967  * struct wow_remove_wakeup_pattern params - WoW remove pattern param
968  * @pattern_bytes: pointer to pattern bytes
969  * @mask_bytes: Mask bytes
970  * @pattern_id: pattern identifier
971  */
972 struct wow_remove_wakeup_pattern_params {
973 	uint32_t *pattern_bytes;
974 	uint32_t *mask_bytes;
975 	uint32_t pattern_id;
976 };
977 
978 
979 /**
980  * struct packet_enable_params - packet enable cmd parameter
981  * @vdev_id: vdev id
982  * @enable: flag to indicate if parameter can be enabled or disabled
983  */
984 struct packet_enable_params {
985 	uint8_t vdev_id;
986 	bool enable;
987 };
988 
989 /**
990  * struct suspend_params - suspend cmd parameter
991  * @disable_target_intr: disable target interrupt
992  */
993 struct suspend_params {
994 	uint8_t disable_target_intr;
995 };
996 
997 /**
998  * struct pdev_params - pdev set cmd parameter
999  * @param_id: parameter id
1000  * @param_value: parameter value
1001  * @is_host_pdev_id: indicate whether pdev_id is host pdev_id or not
1002  */
1003 struct pdev_params {
1004 	uint32_t param_id;
1005 	uint32_t param_value;
1006 	bool is_host_pdev_id;
1007 };
1008 
1009 /**
1010  * struct bcn_prb_template_params - beacon probe template parameter
1011  * @vdev_id: vdev id
1012  * @buf_len: Template length
1013  * @caps: capabilities field
1014  * @erp: ERP field
1015  */
1016 struct bcn_prb_template_params {
1017 	uint8_t vdev_id;
1018 	int buf_len;
1019 	uint16_t caps;
1020 	uint8_t erp;
1021 };
1022 
1023 #define WMI_MAX_SUPPORTED_RATES 128
1024 /**
1025  * struct target_rate_set - Rate set bitmap
1026  * @num_rate: number of rates in rates bitmap
1027  * @rates: rates (each 8bit value) packed into a 32 bit word.
1028  *      the rates are filled from least significant byte to most
1029  *      significant byte.
1030  */
1031 typedef struct {
1032 	uint32_t num_rates;
1033 	uint32_t rates[(WMI_MAX_SUPPORTED_RATES / 4) + 1];
1034 } target_rate_set;
1035 
1036 
1037 #define WMI_HOST_MAX_NUM_SS		8
1038 #define WMI_HOST_MAX_HECAP_PHY_SIZE	3
1039 #define WMI_HOST_MAX_HECAP_MAC_SIZE	2
1040 #define WMI_HOST_HECAP_MAC_WORD1	0
1041 #define WMI_HOST_HECAP_MAC_WORD2	1
1042 #define WMI_HOST_MAX_HE_RATE_SET	3
1043 
1044 #define WMI_HOST_HE_INVALID_MCSNSSMAP (0xFFFF)
1045 #define WMI_HOST_HE_TXRX_MCS_NSS_IDX_80    0
1046 #define WMI_HOST_HE_TXRX_MCS_NSS_IDX_160   1
1047 #define WMI_HOST_HE_TXRX_MCS_NSS_IDX_80_80 2
1048 
1049 #ifdef WLAN_FEATURE_11BE
1050 #define WMI_HOST_MAX_EHTCAP_PHY_SIZE	3
1051 #define WMI_HOST_MAX_EHTCAP_MAC_SIZE	1
1052 #define WMI_HOST_EHTCAP_MAC_WORD1	0
1053 #define WMI_HOST_EHTCAP_MAC_WORD2	1
1054 #define WMI_HOST_MAX_EHT_RATE_SET	4
1055 
1056 #define WMI_HOST_EHT_INVALID_MCSNSSMAP (0xFFFF)
1057 #define WMI_HOST_EHT_TXRX_MCS_NSS_IDX_80    0
1058 #define WMI_HOST_EHT_TXRX_MCS_NSS_IDX_160   1
1059 #define WMI_HOST_EHT_TXRX_MCS_NSS_IDX_320   2
1060 #endif
1061 
1062 /**
1063  * struct wmi_host_ppe_threshold -PPE threshold
1064  * @numss_m1: NSS - 1
1065  * @ru_bit_mask: RU bit mask indicating the supported RU's
1066  * @ppet16_ppet8_ru3_ru0: ppet8 and ppet16 for max num ss
1067  */
1068 struct wmi_host_ppe_threshold {
1069 	uint32_t numss_m1;
1070 	uint32_t ru_bit_mask;
1071 	uint32_t ppet16_ppet8_ru3_ru0[WMI_HOST_MAX_NUM_SS];
1072 };
1073 
1074 /**
1075  * struct wmi_host_mac_addr - host mac addr 2 word representation of MAC addr
1076  * @mac_addr31to0: upper 4 bytes of  MAC address
1077  * @mac_addr47to32: lower 2 bytes of  MAC address
1078  */
1079 typedef struct {
1080 	uint32_t mac_addr31to0;
1081 	uint32_t mac_addr47to32;
1082 } wmi_host_mac_addr;
1083 
1084 #ifdef WLAN_FEATURE_11BE
1085 /**
1086  * struct wlan_host_t2lm_of_tids - TID-to-link mapping info
1087  * @direction:  0 - Downlink, 1 - uplink 2 - Both uplink and downlink
1088  * @default_link_mapping: value 1 indicates the default T2LM, where all the TIDs
1089  *                        are mapped to all the links.
1090  *                        value 0 indicates the preferred T2LM mapping
1091  * @t2lm_provisioned_links: Indicates TID to link mapping of all the TIDS.
1092  */
1093 struct wlan_host_t2lm_of_tids {
1094 	enum wlan_t2lm_direction direction;
1095 	bool default_link_mapping;
1096 	uint16_t t2lm_provisioned_links[T2LM_MAX_NUM_TIDS];
1097 };
1098 
1099 /**
1100  * struct wmi_host_tid_to_link_map_params - TID-to-link mapping params
1101  * @pdev_id: Pdev id
1102  * @peer_macaddr: link peer macaddr
1103  * @num_dir: number of directions for which T2LM info is available
1104  * @t2lm_info: TID-to-link mapping info for the given directions
1105  */
1106 struct wmi_host_tid_to_link_map_params {
1107 	uint8_t pdev_id;
1108 	uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE];
1109 	uint8_t num_dir;
1110 	struct wlan_host_t2lm_of_tids t2lm_info[WLAN_T2LM_MAX_DIRECTION];
1111 };
1112 #endif /* WLAN_FEATURE_11BE */
1113 
1114 #ifdef WLAN_FEATURE_11BE_MLO
1115 /**
1116  * struct peer_assoc_mlo_params - MLO assoc params
1117  * @mlo_enabled: indicate is MLO enabled
1118  * @mlo_assoc_link: indicate is the link used to initialize the association
1119  *                  of mlo connection
1120  * @mlo_primary_umac: indicate is the link on primary UMAC, WIN only flag
1121  * @mlo_logical_link_index_valid: indicate if the logial link index in is valid
1122  * @mlo_peer_id_valid: indicate if the mlo peer id is valid
1123  * @mlo_force_link_inactive: force the peer inactive
1124  * @emlsr_support: indicate if eMLSR supported
1125  * @emlmr_support: indicate if eMLMR supported
1126  * @mld_mac: MLD mac address
1127  * @logical_link_index: Unique index for links of the mlo. Starts with Zero
1128  * @ml_peer_id: ML peer id if generated by host. Otherwise invalid peer id
1129  * @ieee_link_id: peer link ID
1130  * @emlsr_pad_delay_us: eMLSR Padding Delay from peer in us
1131  * @emlsr_trans_delay_us: eMLSR Transition Delay from peer in us
1132  * @emlmr_delay_us: eMLMR Delay from peer in us
1133  * @trans_timeout_us: EML Transition Timeout in us
1134  */
1135 struct peer_assoc_mlo_params {
1136 	uint32_t mlo_enabled:1,
1137 		 mlo_assoc_link:1,
1138 		 mlo_primary_umac:1,
1139 		 mlo_logical_link_index_valid:1,
1140 		 mlo_peer_id_valid:1,
1141 		 mlo_force_link_inactive:1,
1142 		 emlsr_support:1,
1143 		 emlmr_support:1,
1144 		 unused:25;
1145 	uint8_t mld_mac[QDF_MAC_ADDR_SIZE];
1146 	uint32_t logical_link_index;
1147 	uint32_t ml_peer_id;
1148 	uint32_t ieee_link_id;
1149 	uint16_t emlsr_pad_delay_us;
1150 	uint16_t emlsr_trans_delay_us;
1151 	uint16_t emlmr_delay_us;
1152 	uint32_t trans_timeout_us;
1153 };
1154 
1155 /**
1156  * struct ml_partner_info - partner link info
1157  * @vdev_id: vdev id
1158  * @hw_mld_link_id: unique hw link id across SoCs
1159  */
1160 struct ml_partner_info {
1161 	uint32_t vdev_id;
1162 	uint32_t hw_mld_link_id;
1163 };
1164 
1165 /**
1166  * struct peer_assoc_ml_partner_links - ML partner links
1167  * @num_links: Number of links
1168  * @partner_info: Partner link info
1169  */
1170 struct peer_assoc_ml_partner_links {
1171 	uint8_t num_links;
1172 	struct ml_partner_info partner_info[WLAN_UMAC_MLO_MAX_VDEVS];
1173 };
1174 #endif
1175 /**
1176  * struct peer_assoc_params - peer assoc cmd parameter
1177  * @vdev_id: vdev id
1178  * @peer_new_assoc: peer association type
1179  * @peer_associd: peer association id
1180  * @peer_caps: peer capabalities
1181  * @peer_listen_intval: peer listen interval
1182  * @peer_ht_caps: HT capabalities
1183  * @peer_max_mpdu: 0 : 8k , 1 : 16k, 2 : 32k, 3 : 64k
1184  * @peer_mpdu_density: 3 : 0~7 : 2^(11nAMPDUdensity -4)
1185  * @peer_rate_caps: peer rate capabalities
1186  * @peer_nss: peer nss
1187  * @peer_phymode: peer phymode
1188  * @peer_ht_info: peer HT info
1189  * @peer_legacy_rates: peer legacy rates
1190  * @peer_ht_rates: peer ht rates
1191  * @rx_max_rate: max rx rates
1192  * @rx_mcs_set: rx mcs
1193  * @tx_max_rate: max tx rates
1194  * @tx_mcs_set: tx mcs
1195  * @vht_capable: VHT capabalities
1196  * @min_data_rate: Peer minimum rate
1197  * @tx_max_mcs_nss: max tx MCS and NSS
1198  * @peer_bw_rxnss_override: Peer BW RX NSS overridden or not.
1199  * @is_pmf_enabled: PMF enabled
1200  * @is_wme_set: WME enabled
1201  * @qos_flag: QoS Flags
1202  * @apsd_flag: APSD flags
1203  * @ht_flag: HT flags
1204  * @bw_40: 40 capabale
1205  * @bw_80: 80 capabale
1206  * @bw_160: 160 capabale
1207  * @bw_320: 320 capabale
1208  * @stbc_flag: STBC flag
1209  * @ldpc_flag: LDPC flag
1210  * @static_mimops_flag: statis MIMO PS flags
1211  * @dynamic_mimops_flag: Dynamic MIMO PS flags
1212  * @spatial_mux_flag: spatial MUX flags
1213  * @vht_flag: VHT flags
1214  * @vht_ng_flag: VHT on 11N/G flags
1215  * @need_ptk_4_way: Needs 4 way handshake
1216  * @need_gtk_2_way: Needs 2 way GTK
1217  * @auth_flag: Is peer authenticated
1218  * @safe_mode_enabled: Safe enabled for this peer
1219  * @amsdu_disable: AMSDU disble
1220  * @peer_mac: Peer mac address
1221  * @he_flag: HE flags
1222  * @eht_flag: EHT flags
1223  * @twt_requester: TWT Requester Support bit in Extended Capabilities element
1224  * @twt_responder: TWT Responder Support bit in Extended Capabilities element
1225  * @peer_he_cap_macinfo: Peer HE Cap MAC info
1226  * @peer_he_ops: Peer HE operation info
1227  * @peer_he_cap_phyinfo: Peer HE Cap PHY info
1228  * @peer_he_cap_info_internal: Peer HE internal PHY capability info
1229  * @peer_he_caps_6ghz: Peer HE 6GHz Band Capabilities info
1230  * @peer_he_mcs_count: Peer HE MCS TX/RX MAP count
1231  * @peer_he_rx_mcs_set: Peer HE RX MCS MAP
1232  * @peer_he_tx_mcs_set: Peer HE TX MCS MAP
1233  * @peer_eht_cap_macinfo: Peer EHT Cap MAC info
1234  * @peer_eht_ops: Peer EHT operation info
1235  * @peer_eht_cap_phyinfo: Peer EHT Cap PHY info
1236  * @peer_eht_mcs_count: Peer EHT MCS TX/RX MAP count
1237  * @peer_eht_rx_mcs_set: Peer EHT RX MCS MAP
1238  * @peer_eht_tx_mcs_set: Peer EHT TX MCS MAP
1239  * @peer_eht_ppet: Peer EHT PPET info
1240  * @puncture_bitmap: 11be static puncture bitmap
1241  * @peer_ppet: Peer HE PPET info
1242  * @peer_bss_max_idle_option: Peer BSS Max Idle option update
1243  * @akm: AKM info
1244  * @peer_assoc_mlo_params mlo_params: MLO assoc params
1245  * @peer_assoc_ml_partner_links: MLO partner links
1246  * @t2lm_params: TID-to-link mapping params
1247  */
1248 struct peer_assoc_params {
1249 	uint32_t vdev_id;
1250 	uint32_t peer_new_assoc;
1251 	uint32_t peer_associd;
1252 	uint32_t peer_caps;
1253 	uint32_t peer_listen_intval;
1254 	uint32_t peer_ht_caps;
1255 	uint32_t peer_max_mpdu;
1256 	uint32_t peer_mpdu_density;
1257 	uint32_t peer_rate_caps;
1258 	uint32_t peer_nss;
1259 	uint32_t peer_vht_caps;
1260 	uint32_t peer_phymode;
1261 	uint32_t peer_ht_info[2];
1262 	target_rate_set peer_legacy_rates;
1263 	target_rate_set peer_ht_rates;
1264 	uint32_t rx_max_rate;
1265 	uint32_t rx_mcs_set;
1266 	uint32_t tx_max_rate;
1267 	uint32_t tx_mcs_set;
1268 	uint8_t vht_capable;
1269 	uint8_t min_data_rate;
1270 	uint32_t peer_bw_rxnss_override;
1271 	uint32_t tx_max_mcs_nss;
1272 	uint32_t is_pmf_enabled:1,
1273 		 is_wme_set:1,
1274 		 qos_flag:1,
1275 		 apsd_flag:1,
1276 		 ht_flag:1,
1277 		 bw_40:1,
1278 		 bw_80:1,
1279 		 bw_160:1,
1280 #ifdef WLAN_FEATURE_11BE
1281 		 bw_320:1,
1282 #endif
1283 		 stbc_flag:1,
1284 		 ldpc_flag:1,
1285 		 static_mimops_flag:1,
1286 		 dynamic_mimops_flag:1,
1287 		 spatial_mux_flag:1,
1288 		 vht_flag:1,
1289 		 vht_ng_flag:1,
1290 		 need_ptk_4_way:1,
1291 		 need_gtk_2_way:1,
1292 		 auth_flag:1,
1293 		 safe_mode_enabled:1,
1294 		 amsdu_disable:1,
1295 		 p2p_capable_sta:1,
1296 		 inter_bss_peer:1;
1297 	/* Use common structure */
1298 	uint8_t peer_mac[QDF_MAC_ADDR_SIZE];
1299 	bool he_flag;
1300 #ifdef WLAN_FEATURE_11BE
1301 	bool eht_flag;
1302 #endif
1303 	bool twt_requester;
1304 	bool twt_responder;
1305 	uint32_t peer_he_cap_macinfo[WMI_HOST_MAX_HECAP_MAC_SIZE];
1306 	uint32_t peer_he_ops;
1307 	uint32_t peer_he_cap_phyinfo[WMI_HOST_MAX_HECAP_PHY_SIZE];
1308 	uint32_t peer_he_cap_info_internal;
1309 	uint32_t peer_he_caps_6ghz;
1310 	uint32_t peer_he_mcs_count;
1311 	uint32_t peer_he_rx_mcs_set[WMI_HOST_MAX_HE_RATE_SET];
1312 	uint32_t peer_he_tx_mcs_set[WMI_HOST_MAX_HE_RATE_SET];
1313 #ifdef WLAN_FEATURE_11BE
1314 	uint32_t peer_eht_cap_macinfo[WMI_HOST_MAX_EHTCAP_MAC_SIZE];
1315 	uint32_t peer_eht_ops;
1316 	uint32_t peer_eht_cap_phyinfo[WMI_HOST_MAX_EHTCAP_PHY_SIZE];
1317 	uint32_t peer_eht_mcs_count;
1318 	uint32_t peer_eht_rx_mcs_set[WMI_HOST_MAX_EHT_RATE_SET];
1319 	uint32_t peer_eht_tx_mcs_set[WMI_HOST_MAX_EHT_RATE_SET];
1320 	struct wmi_host_ppe_threshold peer_eht_ppet;
1321 	uint16_t puncture_bitmap;
1322 #endif
1323 	struct wmi_host_ppe_threshold peer_ppet;
1324 	u_int8_t peer_bsscolor_rept_info;
1325 	uint32_t peer_bss_max_idle_option;
1326 	uint16_t akm;
1327 #ifdef WLAN_FEATURE_11BE_MLO
1328 	struct peer_assoc_mlo_params mlo_params;
1329 	struct peer_assoc_ml_partner_links ml_links;
1330 #endif
1331 	uint8_t peer_dms_capable:1,
1332 		reserved:7;
1333 #ifdef WLAN_FEATURE_11BE
1334 	struct wmi_host_tid_to_link_map_params t2lm_params;
1335 #endif
1336 };
1337 
1338 /**
1339  * struct ap_ps_params - ap ps cmd parameter
1340  * @vdev_id: vdev id
1341  * @param: ap ps parameter
1342  * @value: ap ps parameter value
1343  */
1344 struct ap_ps_params {
1345 	uint32_t vdev_id;
1346 	uint32_t param;
1347 	uint32_t value;
1348 };
1349 
1350 #define WMI_HOST_SCAN_CHAN_FREQ_SHIFT	0
1351 #define WMI_HOST_SCAN_CHAN_FREQ_MASK	0xffff
1352 #define WMI_HOST_SCAN_CHAN_MODE_SHIFT	16
1353 #define WMI_HOST_SCAN_CHAN_MODE_MASK	0xff
1354 
1355 #define WMI_HOST_MAX_CHANS_PER_WMI_CMD  58
1356 
1357 /**
1358  * struct scan_chan_list_params  - scan channel list cmd parameter
1359  * @pdev_id: pdev_id
1360  * @num_chan: no of scan channels
1361  * @nallchans: nall chans
1362  * @append: append to existing chan list
1363  * @max_bw_support_present: max BW support present
1364  * @ch_param: pointer to channel_paramw
1365  */
1366 struct scan_chan_list_params {
1367 	uint32_t pdev_id;
1368 	uint16_t nallchans;
1369 	bool append;
1370 	bool max_bw_support_present;
1371 	struct channel_param ch_param[1];
1372 };
1373 
1374 #ifdef QCA_SUPPORT_AGILE_DFS
1375 /**
1376  * struct vdev_adfs_ch_cfg_params - Agile dfs channel set request params
1377  * @vdev_id: Vdev indentifier
1378  * @ocac_mode: Off Channel CAC mode
1379  * @min_duration_ms: Minimum Off channel CAC duration
1380  * @max_duration_ms: Maximum Off channel CAC duration
1381  * @chan_freq: channel number of precac channel
1382  * @chan_width: Precac Channel width
1383  * @center_freq1: Agile preCAC channel frequency in MHz for 20/40/80/160
1384  *                and left center frequency(5690MHz) for restricted 80p80.
1385  * @center_freq2: Second segment Agile frequency if applicable. 0 for
1386  *                20/40/80/160 and right center frequency(5775MHz) for
1387  *                restricted 80p80.
1388  */
1389 struct vdev_adfs_ch_cfg_params {
1390 	uint32_t vdev_id;
1391 	uint32_t ocac_mode;  /* WMI_ADFS_OCAC_MODE */
1392 	uint32_t min_duration_ms;
1393 	uint32_t max_duration_ms;
1394 	uint32_t chan_freq;
1395 	uint32_t chan_width;
1396 	uint32_t center_freq1; /* in MHz */
1397 	uint32_t center_freq2; /* in MHz */
1398 };
1399 
1400 /**
1401  * struct vdev_adfs_ch_cfg_params - Agile dfs ocac abort command to stop precac.
1402  * @vdev_id: Vdev indentifier
1403  */
1404 struct vdev_adfs_abort_params {
1405 	uint32_t vdev_id;
1406 };
1407 #endif
1408 /**
1409  * struct fw_hang_params - fw hang command parameters
1410  * @type: 0:unused 1: ASSERT, 2:not respond detect command, 3:simulate ep-full
1411  * @delay_time_ms: 0xffffffff means the simulate will delay for random time (0 ~0xffffffff ms)
1412  */
1413 struct fw_hang_params {
1414 	uint32_t type;
1415 	uint32_t delay_time_ms;
1416 };
1417 
1418 /**
1419  * struct pdev_utf_params - pdev utf command parameters
1420  * @utf_payload:
1421  * @len:
1422  * @is_ar900b: is it 900b target
1423  */
1424 struct pdev_utf_params {
1425 	uint8_t *utf_payload;
1426 	uint32_t len;
1427 	bool is_ar900b;
1428 };
1429 
1430 /*Adding this due to dependency on wmi_unified.h
1431  */
1432 typedef struct {
1433 	uint32_t len;
1434 	uint32_t msgref;
1435 	uint32_t segmentInfo;
1436 } QVIT_SEG_HDR_INFO_STRUCT;
1437 
1438 /**
1439  * struct crash_inject - crash inject command parameters
1440  * @type: crash inject type
1441  * @delay_time_ms: time in milliseconds for FW to delay the crash
1442  */
1443 struct crash_inject {
1444 	uint32_t type;
1445 	uint32_t delay_time_ms;
1446 };
1447 
1448 /**
1449  * struct dbglog_params - fw deboglog command parameters
1450  * @param: command parameter
1451  * @val: parameter value
1452  * @module_id_bitmap: fixed length module id bitmap
1453  * @bitmap_len: module id bitmap length
1454  * @cfgvalid: cfgvalid
1455  */
1456 struct dbglog_params {
1457 	uint32_t param;
1458 	uint32_t val;
1459 	uint32_t *module_id_bitmap;
1460 	uint32_t bitmap_len;
1461 	uint32_t cfgvalid[3];
1462 };
1463 
1464 /**
1465  * struct seg_hdr_info - header info
1466  * @len: length
1467  * @msgref: message reference
1468  * @segmentInfo: segment info
1469  * @pad: padding
1470  */
1471 struct seg_hdr_info {
1472 	uint32_t len;
1473 	uint32_t msgref;
1474 	uint32_t segmentInfo;
1475 	uint32_t pad;
1476 };
1477 
1478 /**
1479  * struct tx_send_params - TX parameters
1480  * @pwr: Tx frame transmission power
1481  * @mcs_mask: Modulation and coding index mask for transmission
1482  *	      bit  0 -> CCK 1 Mbps rate is allowed
1483  *	      bit  1 -> CCK 2 Mbps rate is allowed
1484  *	      bit  2 -> CCK 5.5 Mbps rate is allowed
1485  *	      bit  3 -> CCK 11 Mbps rate is allowed
1486  *	      bit  4 -> OFDM BPSK modulation, 1/2 coding rate is allowed
1487  *	      bit  5 -> OFDM BPSK modulation, 3/4 coding rate is allowed
1488  *	      bit  6 -> OFDM QPSK modulation, 1/2 coding rate is allowed
1489  *	      bit  7 -> OFDM QPSK modulation, 3/4 coding rate is allowed
1490  *	      bit  8 -> OFDM 16-QAM modulation, 1/2 coding rate is allowed
1491  *	      bit  9 -> OFDM 16-QAM modulation, 3/4 coding rate is allowed
1492  *	      bit 10 -> OFDM 64-QAM modulation, 2/3 coding rate is allowed
1493  *	      bit 11 -> OFDM 64-QAM modulation, 3/4 coding rate is allowed
1494  * @nss_mask: Spatial streams permitted
1495  *	      bit 0: if set, Nss = 1 (non-MIMO) is permitted
1496  *	      bit 1: if set, Nss = 2 (2x2 MIMO) is permitted
1497  *	      bit 2: if set, Nss = 3 (3x3 MIMO) is permitted
1498  *	      bit 3: if set, Nss = 4 (4x4 MIMO) is permitted
1499  *	      bit 4: if set, Nss = 5 (5x5 MIMO) is permitted
1500  *	      bit 5: if set, Nss = 6 (6x6 MIMO) is permitted
1501  *	      bit 6: if set, Nss = 7 (7x7 MIMO) is permitted
1502  *	      bit 7: if set, Nss = 8 (8x8 MIMO) is permitted
1503  *            If no bits are set, target will choose what NSS type to use
1504  * @retry_limit: Maximum number of retries before ACK
1505  * @chain_mask: Chains to be used for transmission
1506  * @bw_mask: Bandwidth to be used for transmission
1507  *	     bit  0 -> 5MHz
1508  *	     bit  1 -> 10MHz
1509  *	     bit  2 -> 20MHz
1510  *	     bit  3 -> 40MHz
1511  *	     bit  4 -> 80MHz
1512  *	     bit  5 -> 160MHz
1513  *	     bit  6 -> 80_80MHz
1514  * @preamble_type: Preamble types for transmission
1515  *	     bit 0: if set, OFDM
1516  *	     bit 1: if set, CCK
1517  *	     bit 2: if set, HT
1518  *	     bit 3: if set, VHT
1519  *	     bit 4: if set, HE
1520  * @frame_type: Data or Management frame
1521  *	        Data:1 Mgmt:0
1522  * @cfr_enable: flag to enable CFR capture
1523  *              0:disable 1:enable
1524  * @en_beamforming: flag to enable tx beamforming
1525  *              0:disable 1:enable
1526  * @retry_limit_ext: 3 bits of extended retry limit.
1527  *              Combined with 4 bits "retry_limit"
1528  *              to create 7 bits hw retry count.
1529  *              Maximum 127 retries for specific frames.
1530  */
1531 struct tx_send_params {
1532 	uint32_t pwr:8,
1533 		 mcs_mask:12,
1534 		 nss_mask:8,
1535 		 retry_limit:4;
1536 	uint32_t chain_mask:8,
1537 		 bw_mask:7,
1538 		 preamble_type:5,
1539 		 frame_type:1,
1540 		 cfr_enable:1,
1541 		 en_beamforming:1,
1542 		 retry_limit_ext:3,
1543 		 reserved:6;
1544 };
1545 
1546 /**
1547  * struct wmi_mgmt_params - wmi mgmt cmd parameters
1548  * @tx_frame: management tx frame
1549  * @frm_len: frame length
1550  * @vdev_id: vdev id
1551  * @tx_type: type of management frame (determines what callback to use)
1552  * @chanfreq: channel frequency
1553  * @desc_id: descriptor id relyaed back by target
1554  * @pdata: frame data
1555  * @macaddr: macaddr of peer
1556  * @qdf_ctx: qdf context for qdf_nbuf_map
1557  * @tx_param: TX send parameters
1558  * @tx_params_valid: Flag that indicates if TX params are valid
1559  * @use_6mbps: specify whether management frame to transmit should
1560  * @tx_flags: additional configuration flags for mgmt frames
1561  *  use 6 Mbps rather than 1 Mbps min rate(for 5GHz band or P2P)
1562  * @peer_rssi: peer RSSI value
1563  */
1564 struct wmi_mgmt_params {
1565 	void *tx_frame;
1566 	uint16_t frm_len;
1567 	uint8_t vdev_id;
1568 	uint8_t tx_type;
1569 	uint16_t chanfreq;
1570 	uint16_t desc_id;
1571 	void *pdata;
1572 	uint8_t *macaddr;
1573 	void *qdf_ctx;
1574 	struct tx_send_params tx_param;
1575 	bool tx_params_valid;
1576 	uint8_t use_6mbps;
1577 	uint32_t tx_flags;
1578 	int8_t peer_rssi;
1579 };
1580 
1581 /**
1582  * struct wmi_offchan_data_tx_params - wmi offchan data tx cmd parameters
1583  * @tx_frame: management tx frame
1584  * @frm_len: frame length
1585  * @vdev_id: vdev id
1586  * @tx_params_valid: Flag that indicates if TX params are valid
1587  * @chanfreq: channel frequency
1588  * @desc_id: descriptor id relyaed back by target
1589  * @pdata: frame data
1590  * @macaddr: macaddr of peer
1591  * @qdf_ctx: qdf context for qdf_nbuf_map
1592  * @tx_param: TX send parameters
1593  */
1594 struct wmi_offchan_data_tx_params {
1595 	void *tx_frame;
1596 	uint16_t frm_len;
1597 	uint8_t vdev_id;
1598 	bool tx_params_valid;
1599 	uint16_t chanfreq;
1600 	uint16_t desc_id;
1601 	void *pdata;
1602 	uint8_t *macaddr;
1603 	void *qdf_ctx;
1604 	struct tx_send_params tx_param;
1605 };
1606 
1607 /**
1608  * struct sta_uapsd_params - uapsd auto trig params
1609  * @wmm_ac: WMM access category from 0 to 3
1610  * @user_priority: User priority to use in trigger frames
1611  * @service_interval: service interval
1612  * @suspend_interval: suspend interval
1613  * @delay_interval: delay interval
1614  */
1615 struct sta_uapsd_params {
1616 	uint32_t wmm_ac;
1617 	uint32_t user_priority;
1618 	uint32_t service_interval;
1619 	uint32_t suspend_interval;
1620 	uint32_t delay_interval;
1621 };
1622 
1623 /**
1624  * struct ta_uapsd_trig_params - uapsd trigger parameter
1625  * @vdevid: vdev id
1626  * @peer_addr: peer address
1627  * @num_ac: no of access category
1628  * @auto_triggerparam: trigger parameters
1629  */
1630 struct sta_uapsd_trig_params {
1631 	uint32_t vdevid;
1632 	uint8_t peer_addr[QDF_MAC_ADDR_SIZE];
1633 	uint32_t num_ac;
1634 	struct sta_uapsd_params *auto_triggerparam;
1635 };
1636 
1637 #define WMI_NUM_AC                     (4)
1638 #define WMI_MAX_NUM_AC 4
1639 
1640 
1641 enum wmi_peer_rate_report_cond_phy_type {
1642 	WMI_PEER_RATE_REPORT_COND_11B = 0,
1643 	WMI_PEER_RATE_REPORT_COND_11A_G,
1644 	WMI_PEER_RATE_REPORT_COND_11N,
1645 	WMI_PEER_RATE_REPORT_COND_11AC,
1646 	WMI_PEER_RATE_REPORT_COND_MAX_NUM
1647 };
1648 
1649 /**
1650  * struct report_rate_delta - peer specific parameters
1651  * @percent: percentage
1652  * @delta_min: rate min delta
1653  */
1654 struct report_rate_delta {
1655 	uint32_t percent; /* in unit of 12.5% */
1656 	uint32_t delta_min;  /* in unit of Mbps */
1657 };
1658 
1659 /**
1660  * struct report_rate_per_phy - per phy report parameters
1661  * @cond_flags: condition flag val
1662  * @delta: rate delta
1663  * @report_rate_threshold: rate threshold
1664  */
1665 struct report_rate_per_phy {
1666 	/*
1667 	 * PEER_RATE_REPORT_COND_FLAG_DELTA,
1668 	 * PEER_RATE_REPORT_COND_FLAG_THRESHOLD
1669 	 * Any of these two conditions or both of
1670 	 * them can be set.
1671 	 */
1672 	uint32_t cond_flags;
1673 	struct report_rate_delta delta;
1674 	/*
1675 	 * In unit of Mbps. There are at most 4 thresholds
1676 	 * If the threshold count is less than 4, set zero to
1677 	 * the one following the last threshold
1678 	 */
1679 	uint32_t report_rate_threshold[WMI_MAX_NUM_OF_RATE_THRESH];
1680 };
1681 
1682 /**
1683  * struct peer_rate_report_params - peer rate report parameters
1684  * @rate_report_enable: enable rate report param
1685  * @backoff_time: backoff time
1686  * @timer_period: timer
1687  * @report_per_phy: report per phy type
1688  */
1689 struct wmi_peer_rate_report_params {
1690 	uint32_t rate_report_enable;
1691 	uint32_t backoff_time;            /* in unit of msecond */
1692 	uint32_t timer_period;            /* in unit of msecond */
1693 	/*
1694 	 *In the following field, the array index means the phy type,
1695 	 * please see enum wmi_peer_rate_report_cond_phy_type for detail
1696 	 */
1697 	struct report_rate_per_phy report_per_phy[
1698 				WMI_PEER_RATE_REPORT_COND_MAX_NUM];
1699 
1700 };
1701 
1702 /**
1703  * enum thermal_mgmt_action_code - thermal mgmt action code
1704  * @THERMAL_MGMT_ACTION_DEFAULT: target chooses what action to take, based
1705  *  on its default thermal management policy.
1706  * @THERMAL_MGMT_ACTION_HALT_TRAFFIC: If the temperature rises above
1707  *  configured upper thresh degreeC, the target will halt tx.
1708  * @THERMAL_MGMT_ACTION_NOTIFY_HOST: the target will notify the host
1709  *  if the temperature either rises above configured upper thresh degreeC or
1710  *  falls below lower thresh degreeC.
1711  * @THERMAL_MGMT_ACTION_CHAINSCALING: The target will switch tx chain
1712  *  mask from multi chains to single chain if the temperature rises
1713  *  above upper thresh degreeC.
1714  *  The target will switch tx chainmask back to multi chains if the
1715  *  temperature drops below upper_thresh_degreeC.
1716  */
1717 enum thermal_mgmt_action_code {
1718 	THERMAL_MGMT_ACTION_DEFAULT,
1719 	THERMAL_MGMT_ACTION_HALT_TRAFFIC,
1720 	THERMAL_MGMT_ACTION_NOTIFY_HOST,
1721 	THERMAL_MGMT_ACTION_CHAINSCALING,
1722 };
1723 
1724 /**
1725  * struct thermal_cmd_params - thermal command parameters
1726  * @min_temp: minimum temprature
1727  * @max_temp: maximum temprature
1728  * @thermal_enable: thermal enable
1729  * @thermal_action: thermal action code
1730  */
1731 struct thermal_cmd_params {
1732 	uint16_t min_temp;
1733 	uint16_t max_temp;
1734 	uint8_t thermal_enable;
1735 	enum thermal_mgmt_action_code thermal_action;
1736 };
1737 
1738 #define WMI_LRO_IPV4_SEED_ARR_SZ 5
1739 #define WMI_LRO_IPV6_SEED_ARR_SZ 11
1740 
1741 /**
1742  * struct wmi_lro_config_cmd_t - set LRO init parameters
1743  * @lro_enable: indicates whether lro is enabled
1744  * @tcp_flag: If the TCP flags from the packet do not match
1745  * the values in this field after masking with TCP flags mask
1746  * below, packet is not LRO eligible
1747  * @tcp_flag_mask: field for comparing the TCP values provided
1748  * above with the TCP flags field in the received packet
1749  * @toeplitz_hash_ipv4: contains seed needed to compute the flow id
1750  * 5-tuple toeplitz hash for ipv4 packets
1751  * @toeplitz_hash_ipv6: contains seed needed to compute the flow id
1752  * 5-tuple toeplitz hash for ipv6 packets
1753  * @pdev_id: radio on which lro hash is configured
1754  */
1755 struct wmi_lro_config_cmd_t {
1756 	uint32_t lro_enable;
1757 	uint32_t tcp_flag:9,
1758 		tcp_flag_mask:9;
1759 	uint32_t toeplitz_hash_ipv4[WMI_LRO_IPV4_SEED_ARR_SZ];
1760 	uint32_t toeplitz_hash_ipv6[WMI_LRO_IPV6_SEED_ARR_SZ];
1761 	uint32_t pdev_id;
1762 };
1763 
1764 /**
1765  * struct wmi_probe_resp_params - send probe response parameters
1766  * @prb_rsp_template_frm: pointer to template probe response template
1767  * @prb_rsp_template_len: length of probe response template
1768  */
1769 struct wmi_probe_resp_params {
1770 	uint8_t *prb_rsp_template_frm;
1771 	uint32_t prb_rsp_template_len;
1772 };
1773 
1774 /* struct set_key_params: structure containing
1775  *                        installation key parameters
1776  * @vdev_id: vdev id
1777  * @key_len: key length
1778  * @key_idx: key index
1779  * @group_key_idx: group key index for VLAN
1780  * @peer_mac: peer mac address
1781  * @key_flags: key flags, 0:pairwise key, 1:group key, 2:static key
1782  * @key_cipher: key cipher based on security mode
1783  * @key_txmic_len: tx mic length
1784  * @key_rxmic_len: rx mic length
1785  * @key_tsc_counter:  key tx sc counter
1786  * @key_rsc_counter:  key rx sc counter
1787  * @key_rsc_ctr:  key rx sc counter (stack variable, unnecessary heap alloc for
1788  *                key_rsc_counter should be cleaned up eventually)
1789  * @rx_iv: receive IV, applicable only in case of WAPI
1790  * @tx_iv: transmit IV, applicable only in case of WAPI
1791  * @key_data: key data
1792  */
1793 struct set_key_params {
1794 	uint8_t vdev_id;
1795 	uint16_t key_len;
1796 	uint32_t key_idx;
1797 	uint32_t group_key_idx;
1798 	uint8_t peer_mac[QDF_MAC_ADDR_SIZE];
1799 	uint32_t key_flags;
1800 	uint32_t key_cipher;
1801 	uint32_t key_txmic_len;
1802 	uint32_t key_rxmic_len;
1803 	uint64_t key_tsc_counter;
1804 	uint64_t *key_rsc_counter;
1805 	uint64_t key_rsc_ctr;
1806 #if defined(ATH_SUPPORT_WAPI) || defined(FEATURE_WLAN_WAPI)
1807 	uint8_t rx_iv[16];
1808 	uint8_t tx_iv[16];
1809 #endif
1810 	uint8_t key_data[WMI_MAC_MAX_KEY_LENGTH];
1811 };
1812 
1813 /**
1814  * struct scan_mac_oui - oui parameters
1815  * @oui: oui parameters
1816  * @vdev_id: interface id
1817  * @enb_probe_req_sno_randomization: control probe req sequence no randomization
1818  * @ie_allowlist: probe req IE allowlist attrs
1819  */
1820 struct scan_mac_oui {
1821 	uint8_t oui[WMI_WIFI_SCANNING_MAC_OUI_LENGTH];
1822 	uint32_t vdev_id;
1823 	bool enb_probe_req_sno_randomization;
1824 	struct probe_req_allowlist_attr ie_allowlist;
1825 };
1826 
1827 #define WMI_PASSPOINT_REALM_LEN 256
1828 #define WMI_PASSPOINT_ROAMING_CONSORTIUM_ID_NUM 16
1829 #define WMI_PASSPOINT_PLMN_LEN 3
1830 /**
1831  * struct wifi_passpoint_network_param - passpoint network block
1832  * @id: identifier of this network block
1833  * @realm: null terminated UTF8 encoded realm, 0 if unspecified
1834  * @plmn: mcc/mnc combination as per rules, 0s if unspecified
1835  * @roaming_consortium_ids: roaming consortium ids to match, 0s if unspecified
1836  */
1837 struct wifi_passpoint_network_param {
1838 	uint32_t id;
1839 	uint8_t  realm[WMI_PASSPOINT_REALM_LEN];
1840 	uint8_t  plmn[WMI_PASSPOINT_PLMN_LEN];
1841 	int64_t  roaming_consortium_ids[
1842 			WMI_PASSPOINT_ROAMING_CONSORTIUM_ID_NUM];
1843 };
1844 
1845 /**
1846  * struct wifi_passpoint_req_param - passpoint request
1847  * @request_id: request identifier
1848  * @vdev_id: vdev that is the target of the request
1849  * @num_networks: number of valid entries in @networks
1850  * @networks: passpoint networks
1851  */
1852 struct wifi_passpoint_req_param {
1853 	uint32_t request_id;
1854 	uint32_t vdev_id;
1855 	uint32_t num_networks;
1856 	struct wifi_passpoint_network_param networks[];
1857 };
1858 
1859 /* struct mobility_domain_info - structure containing
1860  *                               mobility domain info
1861  * @mdie_present: mobility domain present or not
1862  * @mobility_domain: mobility domain
1863  */
1864 struct mobility_domain_info {
1865 	uint8_t mdie_present;
1866 	uint16_t mobility_domain;
1867 };
1868 
1869 /**
1870  * struct wifi_epno_network - enhanced pno network block
1871  * @ssid: ssid
1872  * @rssi_threshold: threshold for considering this SSID as found, required
1873  *		    granularity for this threshold is 4dBm to 8dBm
1874  * @flags: WIFI_PNO_FLAG_XXX
1875  * @auth_bit_field: auth bit field for matching WPA IE
1876  */
1877 struct wifi_epno_network_params {
1878 	struct wlan_ssid  ssid;
1879 	int8_t       rssi_threshold;
1880 	uint8_t      flags;
1881 	uint8_t      auth_bit_field;
1882 };
1883 
1884 /**
1885  * struct wifi_enhanced_pno_params - enhanced pno network params
1886  * @request_id: request id number
1887  * @vdev_id: vdev id
1888  * @min_5ghz_rssi: minimum 5GHz RSSI for a BSSID to be considered
1889  * @min_24ghz_rssi: minimum 2.4GHz RSSI for a BSSID to be considered
1890  * @initial_score_max: maximum score that a network can have before bonuses
1891  * @current_connection_bonus: only report when there is a network's score this
1892  *    much higher than the current connection
1893  * @same_network_bonus: score bonus for all n/w with the same network flag
1894  * @secure_bonus: score bonus for networks that are not open
1895  * @band_5ghz_bonus: 5GHz RSSI score bonus (applied to all 5GHz networks)
1896  * @num_networks: number of ssids
1897  * @networks: EPNO networks
1898  */
1899 struct wifi_enhanced_pno_params {
1900 	uint32_t    request_id;
1901 	uint32_t    vdev_id;
1902 	uint32_t    min_5ghz_rssi;
1903 	uint32_t    min_24ghz_rssi;
1904 	uint32_t    initial_score_max;
1905 	uint32_t    current_connection_bonus;
1906 	uint32_t    same_network_bonus;
1907 	uint32_t    secure_bonus;
1908 	uint32_t    band_5ghz_bonus;
1909 	uint32_t    num_networks;
1910 	struct wifi_epno_network_params networks[];
1911 };
1912 
1913 enum {
1914 	WMI_AP_RX_DATA_OFFLOAD             = 0x00,
1915 	WMI_STA_RX_DATA_OFFLOAD            = 0x01,
1916 };
1917 
1918 /**
1919  * enum extscan_configuration_flags - extscan config flags
1920  * @WMI_EXTSCAN_LP_EXTENDED_BATCHING: extended batching
1921  */
1922 enum wmi_extscan_configuration_flags {
1923 	WMI_EXTSCAN_LP_EXTENDED_BATCHING = 0x00000001,
1924 };
1925 
1926 /**
1927  * enum extscan_report_events_type - extscan report events type
1928  * @EXTSCAN_REPORT_EVENTS_BUFFER_FULL: report only when scan history is % full
1929  * @EXTSCAN_REPORT_EVENTS_EACH_SCAN: report a scan completion event after scan
1930  * @EXTSCAN_REPORT_EVENTS_FULL_RESULTS: forward scan results
1931  *		(beacons/probe responses + IEs)
1932  *		in real time to HAL, in addition to completion events.
1933  *		Note: To keep backward compatibility,
1934  *		fire completion events regardless of REPORT_EVENTS_EACH_SCAN.
1935  * @EXTSCAN_REPORT_EVENTS_NO_BATCH: controls batching,
1936  *		0 => batching, 1 => no batching
1937  */
1938 enum wmi_extscan_report_events_type {
1939 	WMI_EXTSCAN_REPORT_EVENTS_BUFFER_FULL   = 0x00,
1940 	WMI_EXTSCAN_REPORT_EVENTS_EACH_SCAN     = 0x01,
1941 	WMI_EXTSCAN_REPORT_EVENTS_FULL_RESULTS  = 0x02,
1942 	WMI_EXTSCAN_REPORT_EVENTS_NO_BATCH      = 0x04,
1943 };
1944 
1945 /**
1946  * struct extscan_capabilities_params - ext scan capablities
1947  * @request_id: request_id
1948  * @vdev_id: vdev id
1949  */
1950 struct extscan_capabilities_params {
1951 	uint32_t request_id;
1952 	uint8_t vdev_id;
1953 };
1954 
1955 /**
1956  * struct extscan_capabilities_reset_params - ext scan capablities reset
1957  *                                            parameter
1958  * @request_id: request_id
1959  * @vdev_id: vdev id
1960  */
1961 struct extscan_capabilities_reset_params {
1962 	uint32_t request_id;
1963 	uint8_t vdev_id;
1964 };
1965 
1966 /**
1967  * struct extscan_bssid_hotlist_reset_params - ext scan hotlist reset parameter
1968  * @request_id: request_id
1969  * @vdev_id: vdev id
1970  */
1971 struct extscan_bssid_hotlist_reset_params {
1972 	uint32_t request_id;
1973 	uint8_t vdev_id;
1974 };
1975 
1976 /**
1977  * struct extscan_stop_req_params - ext scan stop parameter
1978  * @request_id: request_id
1979  * @vdev_id: vdev id
1980  */
1981 struct extscan_stop_req_params {
1982 	uint32_t request_id;
1983 	uint8_t vdev_id;
1984 };
1985 
1986 /**
1987  * struct ap_threshold_params - ap threshold parameter
1988  * @bssid: mac address
1989  * @low: low threshold
1990  * @high: high threshold
1991  */
1992 struct ap_threshold_params {
1993 	struct qdf_mac_addr bssid;
1994 	int32_t low;
1995 	int32_t high;
1996 };
1997 
1998 /**
1999  * struct extscan_set_sig_changereq_params - ext scan channel parameter
2000  * @request_id: request_id
2001  * @vdev_id: vdev id
2002  * @rssi_sample_size: Number of samples for averaging RSSI
2003  * @lostap_sample_size: Number of missed samples to confirm AP loss
2004  * @min_breaching: Number of APs breaching threshold required for firmware
2005  * @num_ap: no of scanned ap
2006  * @ap: ap threshold parameter
2007  */
2008 struct extscan_set_sig_changereq_params {
2009 	uint32_t request_id;
2010 	uint8_t vdev_id;
2011 	uint32_t rssi_sample_size;
2012 	uint32_t lostap_sample_size;
2013 	uint32_t min_breaching;
2014 	uint32_t num_ap;
2015 	struct ap_threshold_params ap[WMI_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS];
2016 };
2017 
2018 /**
2019  * struct extscan_cached_result_params - ext scan cached parameter
2020  * @request_id: request_id
2021  * @vdev_id: vdev id
2022  * @flush: cached results flush
2023  */
2024 struct extscan_cached_result_params {
2025 	uint32_t request_id;
2026 	uint8_t vdev_id;
2027 	bool flush;
2028 };
2029 
2030 #define WMI_WLAN_EXTSCAN_MAX_CHANNELS                 36
2031 #define WMI_WLAN_EXTSCAN_MAX_BUCKETS                  16
2032 #define WMI_WLAN_EXTSCAN_MAX_HOTLIST_APS              128
2033 #define WMI_WLAN_EXTSCAN_MAX_SIGNIFICANT_CHANGE_APS   64
2034 #define WMI_EXTSCAN_MAX_HOTLIST_SSIDS            8
2035 
2036 /**
2037  * struct wifi_scan_channelspec_params - wifi scan channel parameter
2038  * @channel: Frequency in MHz
2039  * @dwell_time_ms: dwell time in milliseconds
2040  * @passive: passive scan
2041  * @channel_class: channel class
2042  */
2043 struct wifi_scan_channelspec_params {
2044 	uint32_t channel;
2045 	uint32_t dwell_time_ms;
2046 	bool passive;
2047 	uint8_t channel_class;
2048 };
2049 
2050 /**
2051  * enum wmi_wifi_band - wifi band
2052  * @WMI_WIFI_BAND_UNSPECIFIED: unspecified band
2053  * @WMI_WIFI_BAND_BG: 2.4 GHz
2054  * @WMI_WIFI_BAND_A: 5 GHz without DFS
2055  * @WMI_WIFI_BAND_ABG: 2.4 GHz + 5 GHz; no DFS
2056  * @WMI_WIFI_BAND_A_DFS_ONLY: 5 GHz DFS only
2057  * @WMI_WIFI_BAND_A_WITH_DFS: 5 GHz with DFS
2058  * @WMI_WIFI_BAND_ABG_WITH_DFS: 2.4 GHz + 5 GHz with DFS
2059  * @WMI_WIFI_BAND_MAX: max range
2060  */
2061 enum wmi_wifi_band {
2062 	WMI_WIFI_BAND_UNSPECIFIED,
2063 	WMI_WIFI_BAND_BG = 1,
2064 	WMI_WIFI_BAND_A = 2,
2065 	WMI_WIFI_BAND_ABG = 3,
2066 	WMI_WIFI_BAND_A_DFS_ONLY = 4,
2067 	/* 5 is reserved */
2068 	WMI_WIFI_BAND_A_WITH_DFS = 6,
2069 	WMI_WIFI_BAND_ABG_WITH_DFS = 7,
2070 	/* Keep it last */
2071 	WMI_WIFI_BAND_MAX
2072 };
2073 
2074 /**
2075  * struct wifi_scan_bucket_params - wifi scan bucket spec
2076  * @bucket: bucket identifier
2077  * @band: wifi band
2078  * @period: Desired period, in millisecond; if this is too
2079  *		low, the firmware should choose to generate results as fast as
2080  *		it can instead of failing the command byte
2081  *		for exponential backoff bucket this is the min_period
2082  * @report_events: 0 => normal reporting (reporting rssi history
2083  *		only, when rssi history buffer is % full)
2084  *		1 => same as 0 + report a scan completion event after scanning
2085  *		this bucket
2086  *		2 => same as 1 + forward scan results
2087  *		(beacons/probe responses + IEs) in real time to HAL
2088  * @max_period: if max_period is non zero or different than period,
2089  *		then this bucket is an exponential backoff bucket and
2090  *		the scan period will grow exponentially as per formula:
2091  *		actual_period(N) = period ^ (N/(step_count+1)) to a
2092  *		maximum period of max_period
2093  * @exponent: for exponential back off bucket: multiplier:
2094  *		new_period = old_period * exponent
2095  * @step_count: for exponential back off bucket, number of scans performed
2096  *		at a given period and until the exponent is applied
2097  * @num_channels: channels to scan; these may include DFS channels
2098  *		Note that a given channel may appear in multiple buckets
2099  * @min_dwell_time_active: per bucket minimum active dwell time
2100  * @max_dwell_time_active: per bucket maximum active dwell time
2101  * @min_dwell_time_passive: per bucket minimum passive dwell time
2102  * @max_dwell_time_passive: per bucket maximum passive dwell time
2103  * @channels: Channel list
2104  */
2105 struct wifi_scan_bucket_params {
2106 	uint8_t         bucket;
2107 	enum wmi_wifi_band   band;
2108 	uint32_t        period;
2109 	uint32_t        report_events;
2110 	uint32_t        max_period;
2111 	uint32_t        exponent;
2112 	uint32_t        step_count;
2113 	uint32_t        num_channels;
2114 	uint32_t        min_dwell_time_active;
2115 	uint32_t        max_dwell_time_active;
2116 	uint32_t        min_dwell_time_passive;
2117 	uint32_t        max_dwell_time_passive;
2118 	struct wifi_scan_channelspec_params
2119 			channels[WMI_WLAN_EXTSCAN_MAX_CHANNELS];
2120 };
2121 
2122 /**
2123  * struct wifi_scan_cmd_req_params - wifi scan command request params
2124  * @base_period: base timer period
2125  * @max_ap_per_scan: max ap per scan
2126  * @report_threshold_percent: report threshold
2127  *	in %, when buffer is this much full, wake up host
2128  * @report_threshold_num_scans: report threshold number of scans
2129  *	in number of scans, wake up host after these many scans
2130  * @request_id: request id
2131  * @vdev_id: vdev that is the target of the request
2132  * @num_buckets: number of buckets
2133  * @min_dwell_time_active: per bucket minimum active dwell time
2134  * @max_dwell_time_active: per bucket maximum active dwell time
2135  * @min_dwell_time_passive: per bucket minimum passive dwell time
2136  * @max_dwell_time_passive: per bucket maximum passive dwell time
2137  * @configuration_flags: configuration flags
2138  * @extscan_adaptive_dwell_mode: adaptive dwelltime mode for extscan
2139  * @buckets: buckets array
2140  */
2141 struct wifi_scan_cmd_req_params {
2142 	uint32_t base_period;
2143 	uint32_t max_ap_per_scan;
2144 	uint32_t report_threshold_percent;
2145 	uint32_t report_threshold_num_scans;
2146 	uint32_t request_id;
2147 	uint8_t  vdev_id;
2148 	uint32_t num_buckets;
2149 	uint32_t min_dwell_time_active;
2150 	uint32_t max_dwell_time_active;
2151 	uint32_t min_dwell_time_passive;
2152 	uint32_t max_dwell_time_passive;
2153 	uint32_t configuration_flags;
2154 	enum scan_dwelltime_adaptive_mode extscan_adaptive_dwell_mode;
2155 	struct wifi_scan_bucket_params buckets[WMI_WLAN_EXTSCAN_MAX_BUCKETS];
2156 };
2157 
2158 /**
2159  * struct mac_ts_info_tfc - mac ts info parameters
2160  * @burstSizeDefn: burst size
2161  * @reserved: reserved
2162  * @ackPolicy: ack policy
2163  * @psb: psb
2164  * @aggregation: aggregation
2165  * @accessPolicy: access policy
2166  * @direction: direction
2167  * @tsid: direction
2168  * @trafficType: traffic type
2169  */
2170 struct mac_ts_info_tfc {
2171 #ifndef ANI_LITTLE_BIT_ENDIAN
2172 	uint8_t burstSizeDefn:1;
2173 	uint8_t reserved:7;
2174 #else
2175 	uint8_t reserved:7;
2176 	uint8_t burstSizeDefn:1;
2177 #endif
2178 
2179 #ifndef ANI_LITTLE_BIT_ENDIAN
2180 	uint16_t ackPolicy:2;
2181 	uint16_t userPrio:3;
2182 	uint16_t psb:1;
2183 	uint16_t aggregation:1;
2184 	uint16_t accessPolicy:2;
2185 	uint16_t direction:2;
2186 	uint16_t tsid:4;
2187 	uint16_t trafficType:1;
2188 #else
2189 	uint16_t trafficType:1;
2190 	uint16_t tsid:4;
2191 	uint16_t direction:2;
2192 	uint16_t accessPolicy:2;
2193 	uint16_t aggregation:1;
2194 	uint16_t psb:1;
2195 	uint16_t userPrio:3;
2196 	uint16_t ackPolicy:2;
2197 #endif
2198 } qdf_packed;
2199 
2200 /**
2201  * struct mac_ts_info_sch - mac ts info schedule parameters
2202  * @rsvd: reserved
2203  * @schedule: schedule bit
2204  */
2205 struct mac_ts_info_sch {
2206 #ifndef ANI_LITTLE_BIT_ENDIAN
2207 	uint8_t rsvd:7;
2208 	uint8_t schedule:1;
2209 #else
2210 	uint8_t schedule:1;
2211 	uint8_t rsvd:7;
2212 #endif
2213 } qdf_packed;
2214 
2215 /**
2216  * struct mac_ts_info_sch - mac ts info schedule parameters
2217  * @traffic: mac tfc parameter
2218  * @schedule: mac schedule parameters
2219  */
2220 struct mac_ts_info {
2221 	struct mac_ts_info_tfc traffic;
2222 	struct mac_ts_info_sch schedule;
2223 } qdf_packed;
2224 
2225 /**
2226  * struct mac_tspec_ie - mac ts spec
2227  * @type: type
2228  * @length: length
2229  * @tsinfo: tsinfo
2230  * @nomMsduSz: nomMsduSz
2231  * @maxMsduSz: maxMsduSz
2232  * @minSvcInterval: minSvcInterval
2233  * @maxSvcInterval: maxSvcInterval
2234  * @inactInterval: inactInterval
2235  * @suspendInterval: suspendInterval
2236  * @svcStartTime: svcStartTime
2237  * @minDataRate: minDataRate
2238  * @meanDataRate: meanDataRate
2239  * @peakDataRate: peakDataRate
2240  * @maxBurstSz: maxBurstSz
2241  * @delayBound: delayBound
2242  * @minPhyRate: minPhyRate
2243  * @surplusBw: surplusBw
2244  * @mediumTime: mediumTime
2245  */
2246 struct mac_tspec_ie {
2247 	uint8_t type;
2248 	uint8_t length;
2249 	struct mac_ts_info tsinfo;
2250 	uint16_t nomMsduSz;
2251 	uint16_t maxMsduSz;
2252 	uint32_t minSvcInterval;
2253 	uint32_t maxSvcInterval;
2254 	uint32_t inactInterval;
2255 	uint32_t suspendInterval;
2256 	uint32_t svcStartTime;
2257 	uint32_t minDataRate;
2258 	uint32_t meanDataRate;
2259 	uint32_t peakDataRate;
2260 	uint32_t maxBurstSz;
2261 	uint32_t delayBound;
2262 	uint32_t minPhyRate;
2263 	uint16_t surplusBw;
2264 	uint16_t mediumTime;
2265 } qdf_packed;
2266 
2267 /**
2268  * struct add_ts_param - ADDTS related parameters
2269  * @vdev_id: vdev id
2270  * @tspec_idx: TSPEC handle uniquely identifying a TSPEC for a STA in a BSS
2271  * @tspec: tspec value
2272  * @status: QDF status
2273  * @pe_session_id: protocol engine session id
2274  * @tsm_interval: TSM interval period passed from UMAC to WMI
2275  * @set_ric_params: Should RIC parameters be set?
2276  */
2277 struct add_ts_param {
2278 	uint8_t vdev_id;
2279 	uint16_t tspec_idx;
2280 	struct mac_tspec_ie tspec;
2281 	QDF_STATUS status;
2282 	uint8_t pe_session_id;
2283 #ifdef FEATURE_WLAN_ESE
2284 	uint16_t tsm_interval;
2285 #endif /* FEATURE_WLAN_ESE */
2286 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
2287 	bool set_ric_params;
2288 #endif /* WLAN_FEATURE_ROAM_OFFLOAD */
2289 };
2290 
2291 /**
2292  * struct delts_req_info - DELTS request parameter
2293  * @tsinfo: ts info
2294  * @tspec: ts spec
2295  * @wmeTspecPresent: wme ts spec flag
2296  * @wsmTspecPresent: wsm ts spec flag
2297  * @lleTspecPresent: lle ts spec flag
2298  */
2299 struct delts_req_info {
2300 	struct mac_ts_info tsinfo;
2301 	struct mac_tspec_ie tspec;
2302 	uint8_t wmeTspecPresent:1;
2303 	uint8_t wsmTspecPresent:1;
2304 	uint8_t lleTspecPresent:1;
2305 };
2306 
2307 /**
2308  * struct del_ts_params - DELTS related parameters
2309  * @tspecIdx: TSPEC identifier uniquely identifying a TSPEC for a STA in a BSS
2310  * @bssId: BSSID
2311  * @sessionId: session id
2312  * @userPrio: user priority
2313  * @delTsInfo: DELTS info
2314  * @setRICparams: RIC parameters
2315  */
2316 struct del_ts_params {
2317 	uint16_t tspecIdx;
2318 	uint8_t bssId[QDF_MAC_ADDR_SIZE];
2319 	uint8_t sessionId;
2320 	uint8_t userPrio;
2321 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
2322 	struct delts_req_info delTsInfo;
2323 	uint8_t setRICparams;
2324 #endif /* WLAN_FEATURE_ROAM_OFFLOAD */
2325 };
2326 
2327 /**
2328  * struct ll_stats_clear_params - ll stats clear parameter
2329  * @req_id: request id
2330  * @vdev_id: vdev id
2331  * @stats_clear_mask: stats clear mask
2332  * @stop_req: stop request
2333  * @peer_macaddr: MAC address of the peer for which stats are to be cleared
2334  */
2335 struct ll_stats_clear_params {
2336 	uint32_t req_id;
2337 	uint8_t vdev_id;
2338 	uint32_t stats_clear_mask;
2339 	uint8_t stop_req;
2340 	struct qdf_mac_addr peer_macaddr;
2341 };
2342 
2343 /**
2344  * struct ll_stats_set_params - ll stats get parameter
2345  * @req_id: request id
2346  * @mpdu_size_threshold: mpdu size threshold
2347  * @aggressive_statistics_gathering: aggressive_statistics_gathering
2348  */
2349 struct ll_stats_set_params {
2350 	uint32_t req_id;
2351 	uint32_t mpdu_size_threshold;
2352 	uint32_t aggressive_statistics_gathering;
2353 };
2354 
2355 /**
2356  * struct ll_stats_get_params - ll stats parameter
2357  * @req_id: request id
2358  * @vdev_id: vdev id
2359  * @param_id_mask: param is mask
2360  * @peer_macaddr: MAC address of the peer for which stats are desired
2361  * @is_mlo_req: is the request for mlo vdev
2362  * @vdev_id_bitmap: vdev_id_bitmap of all the connected mlo vdevs
2363  * @mld_macaddr: MLD MAC address
2364  */
2365 struct ll_stats_get_params {
2366 	uint32_t req_id;
2367 	uint8_t vdev_id;
2368 	uint32_t param_id_mask;
2369 	struct qdf_mac_addr peer_macaddr;
2370 #ifdef WLAN_FEATURE_11BE_MLO
2371 	bool is_mlo_req;
2372 	uint32_t vdev_id_bitmap;
2373 	struct qdf_mac_addr mld_macaddr;
2374 #endif
2375 };
2376 
2377 
2378 /**
2379  * struct link_status_params - link stats parameter
2380  * @vdev_id: ID of the vdev for which link status is desired
2381  */
2382 struct link_status_params {
2383 	uint8_t vdev_id;
2384 };
2385 
2386 /**
2387  * struct dhcp_stop_ind_params - DHCP Stop indication message
2388  * @msgtype: message type is same as the request type
2389  * @msglen: length of the entire request
2390  * @device_mode: Mode of the device(ex:STA, AP)
2391  * @adapter_macaddr: MAC address of the adapter
2392  * @peer_macaddr: MAC address of the connected peer
2393  */
2394 struct dhcp_stop_ind_params {
2395 	uint16_t msgtype;
2396 	uint16_t msglen;
2397 	uint8_t device_mode;
2398 	struct qdf_mac_addr adapter_macaddr;
2399 	struct qdf_mac_addr peer_macaddr;
2400 };
2401 
2402 #define    WMI_MAX_FILTER_TEST_DATA_LEN       8
2403 #define    WMI_MAX_NUM_MULTICAST_ADDRESS    240
2404 #define    WMI_MAX_NUM_FILTERS               20
2405 #define    WMI_MAX_NUM_TESTS_PER_FILTER      10
2406 
2407 /**
2408  * enum packet_filter_type - packet filter type
2409  * @WMI_RCV_FILTER_TYPE_INVALID: invalid type
2410  * @WMI_RCV_FILTER_TYPE_FILTER_PKT: filter packet type
2411  * @WMI_RCV_FILTER_TYPE_BUFFER_PKT: buffer packet type
2412  * @WMI_RCV_FILTER_TYPE_MAX_ENUM_SIZE: max enum size
2413  */
2414 enum packet_filter_type {
2415 	WMI_RCV_FILTER_TYPE_INVALID,
2416 	WMI_RCV_FILTER_TYPE_FILTER_PKT,
2417 	WMI_RCV_FILTER_TYPE_BUFFER_PKT,
2418 	WMI_RCV_FILTER_TYPE_MAX_ENUM_SIZE
2419 };
2420 
2421 /**
2422  * enum packet_protocol_type - packet protocol type
2423  * @WMI_FILTER_HDR_TYPE_INVALID: invalid type
2424  * @WMI_FILTER_HDR_TYPE_MAC: mac type
2425  * @WMI_FILTER_HDR_TYPE_ARP: trp type
2426  * @WMI_FILTER_HDR_TYPE_IPV4: ipv4 type
2427  * @WMI_FILTER_HDR_TYPE_IPV6: ipv6 type
2428  * @WMI_FILTER_HDR_TYPE_UDP: udp type
2429  * @WMI_FILTER_HDR_TYPE_MAX: max type
2430  */
2431 enum packet_protocol_type {
2432 	WMI_FILTER_HDR_TYPE_INVALID,
2433 	WMI_FILTER_HDR_TYPE_MAC,
2434 	WMI_FILTER_HDR_TYPE_ARP,
2435 	WMI_FILTER_HDR_TYPE_IPV4,
2436 	WMI_FILTER_HDR_TYPE_IPV6,
2437 	WMI_FILTER_HDR_TYPE_UDP,
2438 	WMI_FILTER_HDR_TYPE_MAX
2439 };
2440 
2441 /**
2442  * enum packet_filter_comp_type - packet filter comparison type
2443  * @WMI_FILTER_CMP_TYPE_INVALID: invalid type
2444  * @WMI_FILTER_CMP_TYPE_EQUAL: type equal
2445  * @WMI_FILTER_CMP_TYPE_MASK_EQUAL: mask equal
2446  * @WMI_FILTER_CMP_TYPE_NOT_EQUAL: type not equal
2447  * @WMI_FILTER_CMP_TYPE_MASK_NOT_EQUAL: mask not equal
2448  * @WMI_FILTER_CMP_TYPE_MAX: max type
2449  */
2450 enum packet_filter_comp_type {
2451 	WMI_FILTER_CMP_TYPE_INVALID,
2452 	WMI_FILTER_CMP_TYPE_EQUAL,
2453 	WMI_FILTER_CMP_TYPE_MASK_EQUAL,
2454 	WMI_FILTER_CMP_TYPE_NOT_EQUAL,
2455 	WMI_FILTER_CMP_TYPE_MASK_NOT_EQUAL,
2456 	WMI_FILTER_CMP_TYPE_MAX
2457 };
2458 
2459 /**
2460  * struct rcv_pkt_filter_params - receive packet filter parameters
2461  * @protocolLayer - protocol layer
2462  * @cmpFlag - comparison flag
2463  * @dataLength - data length
2464  * @dataOffset - data offset
2465  * @reserved - resserved
2466  * @compareData - compare data
2467  * @dataMask - data mask
2468  */
2469 struct rcv_pkt_filter_params {
2470 	enum packet_protocol_type protocolLayer;
2471 	enum packet_filter_comp_type cmpFlag;
2472 	uint16_t dataLength;
2473 	uint8_t dataOffset;
2474 	uint8_t reserved;
2475 	uint8_t compareData[WMI_MAX_FILTER_TEST_DATA_LEN];
2476 	uint8_t dataMask[WMI_MAX_FILTER_TEST_DATA_LEN];
2477 };
2478 
2479 /**
2480  * struct rcv_pkt_filter_config - receive packet filter info
2481  * @filterId - filter id
2482  * @filterType - filter type
2483  * @numFieldParams - no of fields
2484  * @coalesceTime - reserved parameter
2485  * @self_macaddr - self mac address
2486  * @bssid - Bssid of the connected AP
2487  * @paramsData - data parameter
2488  */
2489 struct rcv_pkt_filter_config {
2490 	uint8_t filterId;
2491 	enum packet_filter_type filterType;
2492 	uint32_t numFieldParams;
2493 	uint32_t coalesceTime;
2494 	struct qdf_mac_addr self_macaddr;
2495 	struct qdf_mac_addr bssid;
2496 	struct rcv_pkt_filter_params paramsData[WMI_MAX_NUM_TESTS_PER_FILTER];
2497 };
2498 
2499 /**
2500  * struct cfg_action_frm_tb_ppdu_param - action frm in TB PPDU cfg
2501  * @cfg - enable/disable
2502  * @frm_len - length of the frame
2503  * @data - data pointer
2504  */
2505 struct cfg_action_frm_tb_ppdu_param {
2506 	uint32_t cfg;
2507 	uint32_t frm_len;
2508 	uint8_t *data;
2509 };
2510 
2511 #define WMI_MAX_NUM_FW_SEGMENTS 4
2512 
2513 /**
2514  * struct fw_dump_seg_req_param - individual segment details
2515  * @seg_id - segment id.
2516  * @seg_start_addr_lo - lower address of the segment.
2517  * @seg_start_addr_hi - higher address of the segment.
2518  * @seg_length - length of the segment.
2519  * @dst_addr_lo - lower address of the destination buffer.
2520  * @dst_addr_hi - higher address of the destination buffer.
2521  *
2522  * This structure carries the information to firmware about the
2523  * individual segments. This structure is part of firmware memory
2524  * dump request.
2525  */
2526 struct fw_dump_seg_req_param {
2527 	uint8_t seg_id;
2528 	uint32_t seg_start_addr_lo;
2529 	uint32_t seg_start_addr_hi;
2530 	uint32_t seg_length;
2531 	uint32_t dst_addr_lo;
2532 	uint32_t dst_addr_hi;
2533 };
2534 
2535 /**
2536  * struct fw_dump_req_param - firmware memory dump request details.
2537  * @request_id - request id.
2538  * @num_seg - requested number of segments.
2539  * @fw_dump_seg_req - individual segment information.
2540  *
2541  * This structure carries information about the firmware
2542  * memory dump request.
2543  */
2544 struct fw_dump_req_param {
2545 	uint32_t request_id;
2546 	uint32_t num_seg;
2547 	struct fw_dump_seg_req_param segment[WMI_MAX_NUM_FW_SEGMENTS];
2548 };
2549 
2550 /**
2551  * struct dhcp_offload_info_params - dhcp offload parameters
2552  * @vdev_id: request data length
2553  * @dhcp_offload_enabled: dhcp offload enabled
2554  * @dhcp_client_num: dhcp client no
2555  * @dhcp_srv_addr: dhcp server ip
2556  */
2557 struct dhcp_offload_info_params {
2558 	uint32_t vdev_id;
2559 	bool dhcp_offload_enabled;
2560 	uint32_t dhcp_client_num;
2561 	uint32_t dhcp_srv_addr;
2562 };
2563 
2564 /**
2565  * struct app_type2_params - app type2parameter
2566  * @vdev_id: vdev id
2567  * @rc4_key: rc4 key
2568  * @rc4_key_len: rc4 key length
2569  * @ip_id: NC id
2570  * @ip_device_ip: NC IP address
2571  * @ip_server_ip: Push server IP address
2572  * @tcp_src_port: NC TCP port
2573  * @tcp_dst_port: Push server TCP port
2574  * @tcp_seq: tcp sequence
2575  * @tcp_ack_seq: tcp ack sequence
2576  * @keepalive_init: Initial ping interval
2577  * @keepalive_min: Minimum ping interval
2578  * @keepalive_max: Maximum ping interval
2579  * @keepalive_inc: Increment of ping interval
2580  * @gateway_mac: gateway mac address
2581  * @tcp_tx_timeout_val: tcp tx timeout value
2582  * @tcp_rx_timeout_val: tcp rx timeout value
2583  */
2584 struct app_type2_params {
2585 	uint8_t vdev_id;
2586 	uint8_t rc4_key[16];
2587 	uint32_t rc4_key_len;
2588 	/** ip header parameter */
2589 	uint32_t ip_id;
2590 	uint32_t ip_device_ip;
2591 	uint32_t ip_server_ip;
2592 	/** tcp header parameter */
2593 	uint16_t tcp_src_port;
2594 	uint16_t tcp_dst_port;
2595 	uint32_t tcp_seq;
2596 	uint32_t tcp_ack_seq;
2597 	uint32_t keepalive_init;
2598 	uint32_t keepalive_min;
2599 	uint32_t keepalive_max;
2600 	uint32_t keepalive_inc;
2601 	struct qdf_mac_addr gateway_mac;
2602 	uint32_t tcp_tx_timeout_val;
2603 	uint32_t tcp_rx_timeout_val;
2604 };
2605 
2606 /**
2607  * struct app_type1_params - app type1 parameter
2608  * @vdev_id: vdev id
2609  * @wakee_mac_addr: mac address
2610  * @identification_id: identification id
2611  * @password: password
2612  * @id_length: id length
2613  * @pass_length: password length
2614  */
2615 struct app_type1_params {
2616 	uint8_t vdev_id;
2617 	struct qdf_mac_addr wakee_mac_addr;
2618 	uint8_t identification_id[8];
2619 	uint8_t password[16];
2620 	uint32_t id_length;
2621 	uint32_t pass_length;
2622 };
2623 
2624 /**
2625  * enum wmi_ext_wow_type - wow type
2626  * @WMI_EXT_WOW_TYPE_APP_TYPE1: only enable wakeup for app type1
2627  * @WMI_EXT_WOW_TYPE_APP_TYPE2: only enable wakeup for app type2
2628  * @WMI_EXT_WOW_TYPE_APP_TYPE1_2: enable wakeup for app type1&2
2629  */
2630 enum wmi_ext_wow_type {
2631 	WMI_EXT_WOW_TYPE_APP_TYPE1,
2632 	WMI_EXT_WOW_TYPE_APP_TYPE2,
2633 	WMI_EXT_WOW_TYPE_APP_TYPE1_2,
2634 };
2635 
2636 /**
2637  * struct ext_wow_params - ext wow parameters
2638  * @vdev_id: vdev id
2639  * @type: wow type
2640  * @wakeup_pin_num: wake up gpio no
2641  */
2642 struct ext_wow_params {
2643 	uint8_t vdev_id;
2644 	enum wmi_ext_wow_type type;
2645 	uint32_t wakeup_pin_num;
2646 };
2647 
2648 /**
2649  * struct stats_ext_params - ext stats request
2650  * @vdev_id: vdev id
2651  * @request_data_len: request data length
2652  * @vdev_id_bitmap: mlo connected vdev id bitmap
2653  * @request_data: request data
2654  */
2655 struct stats_ext_params {
2656 	uint32_t vdev_id;
2657 	uint32_t request_data_len;
2658 	uint32_t vdev_id_bitmap;
2659 	uint8_t request_data[];
2660 };
2661 
2662 #define WMI_GTK_OFFLOAD_KEK_BYTES       64
2663 #define WMI_GTK_OFFLOAD_KCK_BYTES       16
2664 #define WMI_GTK_OFFLOAD_ENABLE          0
2665 #define WMI_GTK_OFFLOAD_DISABLE         1
2666 
2667 #define MAX_MEM_CHUNKS 32
2668 /**
2669  * struct wmi_host_mem_chunk - host memory chunk structure
2670  * @vaddr: Pointer to virtual address
2671  * @paddr: Physical address
2672  * @memctx: qdf memory context for mapped address.
2673  * @len: length of chunk
2674  * @req_id: request id from target
2675  */
2676 struct wmi_host_mem_chunk {
2677 	uint32_t *vaddr;
2678 	qdf_dma_addr_t paddr;
2679 	qdf_dma_mem_context(memctx);
2680 	uint32_t len;
2681 	uint32_t req_id;
2682 };
2683 
2684 /**
2685  * struct wmi_wifi_start_log - Structure to store the params sent to start/
2686  * stop logging
2687  * @name:          Attribute which indicates the type of logging like per packet
2688  *                 statistics, connectivity etc.
2689  * @verbose_level: Verbose level which can be 0,1,2,3
2690  * @flag:          Flag field for future use
2691  */
2692 struct wmi_wifi_start_log {
2693 	uint32_t ring_id;
2694 	uint32_t verbose_level;
2695 	uint32_t flag;
2696 };
2697 
2698 /**
2699  * struct wmi_pcl_list - Format of PCL
2700  * @pcl_list: List of preferred channels
2701  * @weight_list: Weights of the PCL
2702  * @pcl_len: Number of channels in the PCL
2703  */
2704 struct wmi_pcl_list {
2705 	uint8_t pcl_list[NUM_CHANNELS];
2706 	uint8_t weight_list[NUM_CHANNELS];
2707 	uint32_t pcl_len;
2708 };
2709 
2710 /**
2711  * struct wmi_hw_mode_params - HW mode params
2712  * @mac0_tx_ss: MAC0 Tx spatial stream
2713  * @mac0_rx_ss: MAC0 Rx spatial stream
2714  * @mac1_tx_ss: MAC1 Tx spatial stream
2715  * @mac1_rx_ss: MAC1 Rx spatial stream
2716  * @mac0_bw: MAC0 bandwidth
2717  * @mac1_bw: MAC1 bandwidth
2718  * @dbs_cap: DBS capabality
2719  * @agile_dfs_cap: Agile DFS capabality
2720  */
2721 struct wmi_hw_mode_params {
2722 	uint8_t mac0_tx_ss;
2723 	uint8_t mac0_rx_ss;
2724 	uint8_t mac1_tx_ss;
2725 	uint8_t mac1_rx_ss;
2726 	uint8_t mac0_bw;
2727 	uint8_t mac1_bw;
2728 	uint8_t dbs_cap;
2729 	uint8_t agile_dfs_cap;
2730 };
2731 
2732 /**
2733  * struct wmi_unit_test_cmd - unit test command parameters
2734  * @vdev_id: vdev id
2735  * @module_id: module id
2736  * @num_args: number of arguments
2737  * @diag_token: dialog token, which identifies the transaction.
2738  *              this number is generated by wifitool and may be used to
2739  *              identify the transaction in the event path
2740  * @args: arguments
2741  */
2742 struct wmi_unit_test_cmd {
2743 	uint32_t vdev_id;
2744 	uint32_t module_id;
2745 	uint32_t num_args;
2746 	uint32_t diag_token;
2747 	uint32_t args[WMI_UNIT_TEST_MAX_NUM_ARGS];
2748 };
2749 
2750 /**
2751  * struct extscan_bssid_hotlist_set_params - set hotlist request
2752  * @request_id: request_id
2753  * @vdev_id: vdev id
2754  * @lost_ap_sample_size: number of samples to confirm AP loss
2755  * @num_ap: Number of hotlist APs
2756  * @ap: hotlist APs
2757  */
2758 struct extscan_bssid_hotlist_set_params {
2759 	uint32_t  request_id;
2760 	uint8_t   vdev_id;
2761 	uint32_t  lost_ap_sample_size;
2762 	uint32_t  num_ap;
2763 	struct ap_threshold_params ap[WMI_WLAN_EXTSCAN_MAX_HOTLIST_APS];
2764 };
2765 
2766 /**
2767  * struct host_mem_req - Host memory request paramseters request by target
2768  * @req_id: Request id to identify the request.
2769  * @unit_size: Size of single unit requested.
2770  * @num_unit_info: Memory chunk info
2771  * @num_units: number of units requested.
2772  * @tgt_num_units: number of units request by target.
2773  */
2774 typedef struct {
2775 	uint32_t	req_id;
2776 	uint32_t	unit_size;
2777 	uint32_t	num_unit_info;
2778 	uint32_t	num_units;
2779 	uint32_t	tgt_num_units;
2780 } host_mem_req;
2781 
2782 #define WMI_HOST_DSCP_MAP_MAX	(64)
2783 
2784 /**
2785  * struct wmi_host_ext_resource_config - Extended resource config
2786  * @host_platform_config: Host plaform configuration.
2787  * @fw_featuew_bitmap: FW feature requested bitmap.
2788  */
2789 typedef struct {
2790 	uint32_t host_platform_config;
2791 
2792 #define WMI_HOST_FW_FEATURE_LTEU_SUPPORT	           0x0001
2793 #define WMI_HOST_FW_FEATURE_COEX_GPIO_SUPPORT	       0x0002
2794 #define WMI_HOST_FW_FEATURE_AUX_RADIO_SPECTRAL_INTF	   0x0004
2795 #define WMI_HOST_FW_FEATURE_AUX_RADIO_CHAN_LOAD_INTF   0x0008
2796 #define WMI_HOST_FW_FEATURE_BSS_CHANNEL_INFO_64	       0x0010
2797 #define WMI_HOST_FW_FEATURE_PEER_STATS                 0x0020
2798 #define WMI_HOST_FW_FEATURE_VDEV_STATS                 0x0040
2799 #define WMI_HOST_FW_FEATURE_VOW_FEATURES               0x00004000
2800 #define WMI_HOST_FW_FEATURE_VOW_STATS                  0x00008000
2801 	/**
2802 	* @brief fw_feature_bitmask - Enable/Disable features in FW
2803 	* @details
2804 	*  The bits in fw_feature_bitmask are used as shown by the masks below:
2805 	*	0x0001 - LTEU Config enable/disable
2806 	*	0x0002 - COEX GPIO Config enable/disable
2807 	*	0x0004 - Aux Radio enhancement for spectral scan enable/disable
2808 	*	0x0008 - Aux Radio enhancement for chan load scan enable/disable
2809 	*	0x0010 - BSS channel info stats enable/disable
2810 	* The features in question are enabled by setting
2811 	* the feature's bit to 1,
2812 	*  or disabled by setting the feature's bit to 0.
2813 	*/
2814 	uint32_t fw_feature_bitmap;
2815 
2816 	/* WLAN priority GPIO number
2817 	 * The target uses a GPIO pin to indicate when it is transmitting
2818 	 * high-priority traffic (e.g. beacon, management, or AC_VI) or
2819 	 * low-priority traffic (e.g. AC_BE, AC_BK).  The HW uses this
2820 	 * WLAN GPIO pin to determine whether to abort WLAN tx in favor of
2821 	 * BT activity.
2822 	 * Which GPIO is used for this WLAN tx traffic priority specification
2823 	 * varies between platforms, so the host needs to indicate to the
2824 	 * target which GPIO to use.
2825 	 */
2826 	uint32_t wlan_priority_gpio;
2827 
2828 	/* Host will notify target which coex algorithm has to be
2829 	 * enabled based on HW, FW capability and device tree config.
2830 	 * Till now the coex algorithms were target specific. Now the
2831 	 * same target can choose between multiple coex algorithms
2832 	 * depending on device tree config on host. For backward
2833 	 * compatibility, version support will have option 0 and will
2834 	 * rely on FW compile time flags to decide the coex version
2835 	 * between VERSION_1, VERSION_2 and VERSION_3. Version info is
2836 	 * mandatory from VERSION_4 onwards for any new coex algorithms.
2837 	 *
2838 	 * 0 = no version support
2839 	 * 1 = COEX_VERSION_1 (3 wire coex)
2840 	 * 2 = COEX_VERSION_2 (2.5 wire coex)
2841 	 * 3 = COEX_VERSION_3 (2.5 wire coex+duty cycle)
2842 	 * 4 = COEX_VERSION_4 (4 wire coex)
2843 	 */
2844 	uint32_t coex_version;
2845 
2846 	/* There are multiple coex implementations on FW to support different
2847 	 * hardwares. Since the coex algos are mutually exclusive, host will
2848 	 * use below fields to send GPIO info to FW and these GPIO pins will
2849 	 * have different usages depending on the feature enabled. This is to
2850 	 * avoid adding multiple GPIO fields here for different features.
2851 	 *
2852 	 * COEX VERSION_4 (4 wire coex) :
2853 	 * 4 wire coex feature uses 1 common input request line from BT/ZB/
2854 	 * Thread which interrupts the WLAN target processor directly, 1 input
2855 	 * priority line from BT and ZB each, 1 output line to grant access to
2856 	 * requesting IOT subsystem. WLAN uses the input priority line to
2857 	 * identify the requesting IOT subsystem. Request is granted based on
2858 	 * IOT interface priority and WLAN traffic. GPIO pin usage is as below:
2859 	 * coex_gpio_pin_1 = BT PRIORITY INPUT GPIO
2860 	 * coex_gpio_pin_2 = ZIGBEE PRIORITY INPUT GPIO
2861 	 * coex_gpio_pin_3 = GRANT OUTPUT GPIO
2862 	 * when a BT active interrupt is raised, WLAN reads
2863 	 * BT and ZB priority input GPIO pins to compare against the coex
2864 	 * priority table and accordingly sets the grant output GPIO to give
2865 	 * access to requesting IOT subsystem.
2866 	 */
2867 	uint32_t coex_gpio_pin_1;
2868 	uint32_t coex_gpio_pin_2;
2869 	uint32_t coex_gpio_pin_3;
2870 
2871 	/* add new members here */
2872 } wmi_host_ext_resource_config;
2873 
2874 /**
2875  * struct set_fwtest_params - FW test params
2876  * @arg: FW param id
2877  * @value: value
2878  */
2879 struct set_fwtest_params {
2880 	uint32_t arg;
2881 	uint32_t value;
2882 };
2883 
2884 /**
2885  * enum wfa_test_cmds - WFA test config command
2886  * @WFA_CONFIG_RXNE: configure an override for the RSNXE Used
2887  * @WFA_CONFIG_CSA: configure the driver to ignore CSA
2888  * @WFA_CONFIG_OCV: configure OCI
2889  * @WFA_CONFIG_SA_QUERY: configure driver/firmware to ignore SAquery timeout
2890  * @WFA_FILS_DISCV_FRAMES: FD frames TX enable disable config
2891  * @WFA_IGNORE_H2E_RSNXE: configure driver/firmware to ignore H2E_RSNXE in case
2892  *                        of 6g connection
2893  */
2894 enum wfa_test_cmds {
2895 	WFA_CONFIG_RXNE,
2896 	WFA_CONFIG_CSA,
2897 	WFA_CONFIG_OCV,
2898 	WFA_CONFIG_SA_QUERY,
2899 	WFA_FILS_DISCV_FRAMES,
2900 	WFA_IGNORE_H2E_RSNXE,
2901 };
2902 
2903 /**
2904  * enum wmi_host_wfa_config_ocv_frmtype - OCI override frame type
2905  * @WMI_HOST_WFA_CONFIG_OCV_FRMTYPE_SAQUERY_REQ: SA Query Request frame
2906  * @WMI_HOST_WFA_CONFIG_OCV_FRMTYPE_SAQUERY_RSP: SA Query Response frame
2907  * @WMI_HOST_WFA_CONFIG_OCV_FRMTYPE_FT_REASSOC_REQ: FT Reassociation Req frm
2908  * @WMI_HOST_WFA_CONFIG_OCV_FRMTYPE_FILS_REASSOC_REQ: FILS Reassoc Req frm
2909  */
2910 enum wmi_host_wfa_config_ocv_frmtype {
2911 	WMI_HOST_WFA_CONFIG_OCV_FRMTYPE_SAQUERY_REQ          = 0x00000001,
2912 	WMI_HOST_WFA_CONFIG_OCV_FRMTYPE_SAQUERY_RSP          = 0x00000002,
2913 	WMI_HOST_WFA_CONFIG_OCV_FRMTYPE_FT_REASSOC_REQ       = 0x00000004,
2914 	WMI_HOST_WFA_CONFIG_OCV_FRMTYPE_FILS_REASSOC_REQ     = 0x00000008,
2915 };
2916 
2917 /**
2918  * struct ocv_wfatest_params - ocv WFA test params
2919  * @frame_type: frame type req for OCV config
2920  * @freq: frequency to set
2921  */
2922 struct ocv_wfatest_params {
2923 	uint8_t frame_type;
2924 	uint32_t freq;
2925 };
2926 
2927 /**
2928  * struct set_wfatest_params - WFA test params
2929  * @vdev_id: vdev id
2930  * @value: wfa test config value
2931  * @cmd: WFA test command
2932  * @ocv_param: pointer to ocv params
2933  */
2934 struct set_wfatest_params {
2935 	uint8_t vdev_id;
2936 	uint32_t value;
2937 	enum wfa_test_cmds cmd;
2938 	struct ocv_wfatest_params *ocv_param;
2939 };
2940 
2941 /*
2942  * msduq_update_params - MSDUQ update param structure
2943  * @tid_num: TID number
2944  * @msduq_update_mask: update bit mask
2945  * @qdepth_thresh_value: threshold value for the queue depth
2946  */
2947 
2948 #define QDEPTH_THRESH_MAX_UPDATES 1
2949 
2950 typedef struct {
2951 	uint32_t tid_num;
2952 	uint32_t msduq_update_mask;
2953 	uint32_t qdepth_thresh_value;
2954 } msduq_update_params;
2955 
2956 /**
2957  * struct set_qdepth_thresh_params - MSDU Queue Depth Threshold Params
2958  * @vdev_id: vdev id
2959  * @pdev_id: pdev id
2960  * @mac_addr: MAC address
2961  * @num_of_msduq_updates: holds the number of tid updates
2962  */
2963 
2964 struct set_qdepth_thresh_params {
2965 	uint32_t pdev_id;
2966 	uint32_t vdev_id;
2967 	uint8_t mac_addr[QDF_MAC_ADDR_SIZE];
2968 	uint32_t num_of_msduq_updates;
2969 	msduq_update_params update_params[QDEPTH_THRESH_MAX_UPDATES];
2970 };
2971 
2972 /**
2973  * struct peer_chan_width_switch_info - Peer channel width capability params
2974  * @mac_addr: MAC address of peer
2975  * @chan_width: Max supported channel width of peer
2976  *              (enum ieee80211_cwm_width)
2977  */
2978 
2979 struct peer_chan_width_switch_info {
2980 	uint8_t mac_addr[QDF_MAC_ADDR_SIZE];
2981 	uint32_t chan_width;
2982 };
2983 
2984 /**
2985  * struct set_bridge_mac_addr_params - set bridge MAC addr params
2986  * @dest_addr: Pointer to bridge macaddr
2987  */
2988 struct set_bridge_mac_addr_params {
2989 	uint8_t *bridge_addr;
2990 };
2991 
2992 /**
2993  * struct peer_del_all_wds_entries_params - WDS peer entries del params
2994  * @wds_macaddr: Pointer to destination macaddr
2995  * @peer_macaddr: Pointer to peer mac addr
2996  * @flags: flags
2997  */
2998 struct peer_del_all_wds_entries_params {
2999 	uint8_t *wds_macaddr;
3000 	uint8_t *peer_macaddr;
3001 	uint32_t flags;
3002 };
3003 
3004 /**
3005  * struct set_ps_mode_params - PS mode params
3006  * @vdev_id: vdev id
3007  * @psmode: PS mode
3008  */
3009 struct set_ps_mode_params {
3010 	uint8_t vdev_id;
3011 	uint8_t psmode;
3012 };
3013 
3014 /**
3015  * @struct tt_level_config - Set Thermal throttlling config
3016  * @tmplwm: Temperature low water mark
3017  * @tmphwm: Temperature high water mark
3018  * @dcoffpercent: dc off percentage
3019  * @priority: priority
3020  */
3021 typedef struct {
3022 	uint32_t tmplwm;
3023 	uint32_t tmphwm;
3024 	uint32_t dcoffpercent;
3025 	uint32_t priority;
3026 } tt_level_config;
3027 
3028 /**
3029  * struct thermal_mitigation_params - Thermal mitigation params
3030  * @enable: Enable/Disable Thermal mitigation
3031  * @dc: DC
3032  * @dc_per_event: DC per event
3033  * @num_thermal_conf: Number of thermal configurations to be sent
3034  * @client_id: Thermal client id either apps or wpps
3035  * @priority: Priority of apps/wpps
3036  * @tt_level_config: TT level config params
3037  */
3038 struct thermal_mitigation_params {
3039 	uint32_t pdev_id;
3040 	uint32_t enable;
3041 	uint32_t dc;
3042 	uint32_t dc_per_event;
3043 	uint8_t num_thermal_conf;
3044 	uint8_t client_id;
3045 	uint8_t priority;
3046 	tt_level_config levelconf[THERMAL_LEVELS];
3047 };
3048 
3049 /**
3050  * struct smart_ant_enable_tx_feedback_params - SA tx feeback params
3051  * @enable: Enable TX feedback for SA
3052  */
3053 struct smart_ant_enable_tx_feedback_params {
3054 	int enable;
3055 };
3056 
3057 /**
3058  * struct vdev_spectral_configure_params - SPectral config params
3059  * @vdev_id: VDEV id
3060  * @count: count
3061  * @period: period
3062  * @fft_recap: FFT recapture enable/disable
3063  * @spectral_pri: Spectral priority
3064  * @fft_size: FFT size
3065  * @gc_enable: GC enable
3066  * @restart_enable: restart enabled
3067  * @noise_floor_ref: Noise floor reference
3068  * @init_delay: Init delays
3069  * @nb_tone_thr: NB tone threshold
3070  * @str_bin_thr: STR BIN threshold
3071  * @wb_rpt_mode: WB BIN threshold
3072  * @rssi_rpt_mode: RSSI report mode
3073  * @rssi_thr: RSSI threshold
3074  * @pwr_format: Power format
3075  * @rpt_mode: Report mdoe
3076  * @bin_scale: BIN scale
3077  * @dbm_adj: DBM adjust
3078  * @chn_mask: chain mask
3079  * @mode: Mode
3080  * @center_freq1: Center frequency 1
3081  * @center_freq2: Center frequency 2
3082  * @chan_freq: Primary channel frequency
3083  * @chan_width: Channel width
3084  */
3085 struct vdev_spectral_configure_params {
3086 	uint8_t vdev_id;
3087 	uint16_t count;
3088 	uint16_t period;
3089 	uint16_t fft_recap;
3090 	uint16_t spectral_pri;
3091 	uint16_t fft_size;
3092 	uint16_t gc_enable;
3093 	uint16_t restart_enable;
3094 	uint16_t noise_floor_ref;
3095 	uint16_t init_delay;
3096 	uint16_t nb_tone_thr;
3097 	uint16_t str_bin_thr;
3098 	uint16_t wb_rpt_mode;
3099 	uint16_t rssi_rpt_mode;
3100 	uint16_t rssi_thr;
3101 	uint16_t pwr_format;
3102 	uint16_t rpt_mode;
3103 	uint16_t bin_scale;
3104 	uint16_t dbm_adj;
3105 	uint16_t chn_mask;
3106 	uint16_t mode;
3107 	uint16_t center_freq1;
3108 	uint16_t center_freq2;
3109 	uint16_t chan_freq;
3110 	uint16_t chan_width;
3111 };
3112 
3113 /**
3114  * struct vdev_spectral_enable_params - Spectral enabled params
3115  * @vdev_id: VDEV id
3116  * @active_valid: Active valid
3117  * @active: active
3118  * @enabled_valid: Enabled valid
3119  * @enabled: enabled
3120  * @mode: Mode
3121  */
3122 struct vdev_spectral_enable_params {
3123 	uint8_t vdev_id;
3124 	uint8_t active_valid;
3125 	uint8_t active;
3126 	uint8_t enabled_valid;
3127 	uint8_t enabled;
3128 	uint8_t mode;
3129 };
3130 
3131 #ifdef WLAN_CONV_SPECTRAL_ENABLE
3132 /**
3133  * struct spectral_fft_bin_markers_160_165mhz - Stores the start index
3134  * and length of FFT bins in 165 MHz/Restricted 80p80 or 160 MHz
3135  * mode in targets with a single Spectral detector
3136  * @is_valid: Indicates whether this structure holds valid data
3137  * @start_pri80: Starting index of FFT bins corresponding to primary 80 MHz
3138  *               in 165 MHz/Restricted 80p80 or 160 MHz mode
3139  * @num_pri80: Number of FFT bins corresponding to primary 80 MHz
3140  *             in 165 MHz/Restricted 80p80 or 160 MHz mode
3141  * @start_5mhz: Starting index of FFT bins corresponding to extra 5 MHz
3142  *               in 165 MHz/Restricted 80p80 mode
3143  * @num_5mhz: Number of FFT bins corresponding to extra 5 MHz
3144  *             in 165 MHz/Restricted 80p80 mode
3145  * @start_sec80: Starting index of FFT bins corresponding to secondary 80 MHz
3146  *               in 165 MHz/Restricted 80p80 or 160 MHz mode
3147  * @num_sec80: Number of FFT bins corresponding to secondary 80 MHz
3148  *             in 165 MHz/Restricted 80p80 or 160 MHz mode
3149  */
3150 struct spectral_fft_bin_markers_160_165mhz {
3151 	bool is_valid;
3152 	uint16_t start_pri80;
3153 	uint16_t num_pri80;
3154 	uint16_t start_5mhz;
3155 	uint16_t num_5mhz;
3156 	uint16_t start_sec80;
3157 	uint16_t num_sec80;
3158 };
3159 
3160 /**
3161  * struct spectral_startscan_resp_params - Params from the event send by
3162  * FW as a response to the scan start command
3163  * @pdev_id: Pdev id
3164  * @smode: Spectral scan mode
3165  * @num_fft_bin_index: Number of TLVs with FFT bin start and end indices
3166  * @num_det_info: Number of detector info TLVs
3167  */
3168 struct spectral_startscan_resp_params {
3169 	uint32_t pdev_id;
3170 	enum spectral_scan_mode smode;
3171 	uint8_t num_fft_bin_index;
3172 	uint8_t num_det_info;
3173 };
3174 
3175 /**
3176  * struct spectral_session_chan_info - Spectral scan session channel information
3177  * @operating_pri20_freq: frequency of primary 20MHz channel (in MHz)
3178  * @operating_cfreq1: center frequency 1 of operating channel (in MHz)
3179  * @operating_cfreq2: center frequency 2 of operating channel (in MHz).
3180  * For contiguous channels, @operating_cfreq1 should be represent the center of
3181  * the entire span and @operating_cfreq2 should be 0, whereas for non-contiguous
3182  * channels, @operating_cfreq1 should represent the center of primary segment
3183  * and @@operating_cfreq2 should represent the center of secondary segment.
3184  * @operating_bw: operating bandwidth enumeration
3185  * @operating_puncture_20mhz_bitmap: Puncture bitmap of operating channel.
3186  * Each bit indicates one 20 MHz punctured channel
3187  * @sscan_cfreq1: center frequency 1 (in MHz) of the channel in which spectral
3188  * scan is done
3189  * @sscan_cfreq2: center frequency 2 (in MHz) of the channel in which spectral
3190  * scan is done. For contiguous channels, @sscan_cfreq1 should be represent the
3191  * center of the entire span and @sscan_cfreq2 should be 0, whereas for
3192  * non-contiguous channels, @sscan_cfreq1 should represent the center of primary
3193  * segment and @sscan_cfreq2 should represent the center of secondary segment.
3194  * @sscan_bw: bandwidth of the channel in which spectral scan is done
3195  * @sscan_puncture_20mhz_bitmap: Puncture bitmap of channel in which spectral
3196  * scan is done. Each bit indicates one 20 MHz punctured channel.
3197  */
3198 struct spectral_session_chan_info {
3199 	qdf_freq_t operating_pri20_freq;
3200 	qdf_freq_t operating_cfreq1;
3201 	qdf_freq_t operating_cfreq2;
3202 	enum phy_ch_width operating_bw;
3203 	uint16_t operating_puncture_20mhz_bitmap;
3204 
3205 	qdf_freq_t sscan_cfreq1;
3206 	qdf_freq_t sscan_cfreq2;
3207 	enum phy_ch_width sscan_bw;
3208 	uint16_t sscan_puncture_20mhz_bitmap;
3209 };
3210 
3211 /**
3212  * struct spectral_session_det_info - Detector info for a spectral scan session
3213  * @det_id: detector ID
3214  * @start_freq: start frequency (in MHz) of this detector
3215  * @end_freq: end frequency (in MHz) of this detector
3216  */
3217 struct spectral_session_det_info {
3218 	uint8_t det_id;
3219 	qdf_freq_t start_freq;
3220 	qdf_freq_t end_freq;
3221 };
3222 
3223 /**
3224  * struct spectral_capabilities_event_params - parameters related to Spectral
3225  * capabilities event
3226  * @num_sscan_bw_caps: Number of spectral_scan_bw_capabilities TLVs
3227  * @num_fft_size_caps: Number of spectral_fft_size_capabilities TLVs
3228  */
3229 struct spectral_capabilities_event_params {
3230 	uint8_t num_sscan_bw_caps;
3231 	uint8_t num_fft_size_caps;
3232 };
3233 
3234 /**
3235  * struct spectral_scan_bw_capabilities - Spectral scan bandwidth caps
3236  * that are extracted from Spectral capabilities WMI event
3237  * @pdev_id: pdev ID
3238  * @smode: Spectral scan mode
3239  * @operating_bw: Operating bandwidth
3240  * @supported_bws: Supported sscan bandwidths bitmap for given @pdev_id,
3241  * @operating_bw, and @smode
3242  */
3243 struct spectral_scan_bw_capabilities {
3244 	uint8_t pdev_id;
3245 	enum spectral_scan_mode smode;
3246 	enum phy_ch_width operating_bw;
3247 	uint32_t supported_bws;
3248 };
3249 
3250 /**
3251  * struct spectral_fft_size_capabilities - Spectral scan FFT size caps
3252  * that are extracted from Spectral capabilities WMI event
3253  * @pdev_id: pdev ID
3254  * @sscan_bw: Spectral scan bandwidth
3255  * @sscan_bw: Supported FFT sizes bitmap for given @pdev_id and @sscan_bw
3256  */
3257 struct spectral_fft_size_capabilities {
3258 	uint8_t pdev_id;
3259 	enum phy_ch_width sscan_bw;
3260 	uint32_t supports_fft_sizes;
3261 };
3262 #endif
3263 
3264 /**
3265  * struct pdev_set_regdomain_params - PDEV set reg domain params
3266  * @currentRDinuse: Current Reg domain
3267  * @currentRD2G: Current Reg domain 2G
3268  * @currentRD5G: Current Reg domain 5G
3269  * @ctl_2G: CTL 2G
3270  * @ctl_5G: CTL 5G
3271  * @dfsDomain: DFS domain
3272  * @pdev_id: pdev_id
3273  */
3274 struct pdev_set_regdomain_params {
3275 	uint16_t currentRDinuse;
3276 	uint16_t currentRD2G;
3277 	uint16_t currentRD5G;
3278 	uint32_t ctl_2G;
3279 	uint32_t ctl_5G;
3280 	uint8_t dfsDomain;
3281 	uint32_t pdev_id;
3282 };
3283 
3284 /**
3285  * struct set_beacon_filter_params - Set beacon filter params
3286  * @vdev_id: VDEV id
3287  * @ie: Pointer to IE fields
3288  */
3289 struct set_beacon_filter_params {
3290 	uint8_t vdev_id;
3291 	uint32_t *ie;
3292 };
3293 
3294 /**
3295  * struct remove_beacon_filter_params - Remove beacon filter params
3296  * @vdev_id: VDEV id
3297  */
3298 struct remove_beacon_filter_params {
3299 	uint8_t vdev_id;
3300 };
3301 
3302 /**
3303  * struct mgmt_params - Mgmt params
3304  * @vdev_id: vdev id
3305  * @buf_len: length of frame buffer
3306  * @wbuf: frame buffer
3307  */
3308 struct mgmt_params {
3309 	int vdev_id;
3310 	uint32_t buf_len;
3311 	qdf_nbuf_t wbuf;
3312 };
3313 
3314 /**
3315  * struct addba_clearresponse_params - Addba clear response params
3316  * @vdev_id: VDEV id
3317  */
3318 struct addba_clearresponse_params {
3319 	uint8_t vdev_id;
3320 };
3321 
3322 /**
3323  * struct addba_send_params - ADDBA send params
3324  * @vdev_id: vdev id
3325  * @tidno: TID
3326  * @buffersize: buffer size
3327  */
3328 struct addba_send_params {
3329 	uint8_t vdev_id;
3330 	uint8_t tidno;
3331 	uint16_t buffersize;
3332 };
3333 
3334 /**
3335  * struct delba_send_params - DELBA send params
3336  * @vdev_id: vdev id
3337  * @tidno: TID
3338  * @initiator: initiator
3339  * @reasoncode: reason code
3340  */
3341 struct delba_send_params {
3342 	uint8_t vdev_id;
3343 	uint8_t tidno;
3344 	uint8_t initiator;
3345 	uint16_t reasoncode;
3346 };
3347 /**
3348  * struct addba_setresponse_arams - Set ADDBA response params
3349  * @vdev_id: vdev id
3350  * @tidno: TID
3351  * @statuscode: status code in response
3352  */
3353 struct addba_setresponse_params {
3354 	uint8_t vdev_id;
3355 	uint8_t tidno;
3356 	uint16_t statuscode;
3357 };
3358 
3359 /**
3360  * struct singleamsdu_params - Single AMSDU params
3361  * @vdev_id: vdev is
3362  * @tidno: TID
3363  */
3364 struct singleamsdu_params {
3365 	uint8_t vdev_id;
3366 	uint8_t tidno;
3367 };
3368 
3369 /**
3370  * struct mu_scan_params - MU scan params
3371  * @id: id
3372  * @type: type
3373  * @duration: Duration
3374  * @lteu_tx_power: LTEU tx power
3375  */
3376 struct mu_scan_params {
3377 	uint8_t id;
3378 	uint8_t type;
3379 	uint32_t duration;
3380 	uint32_t lteu_tx_power;
3381 	uint32_t rssi_thr_bssid;
3382 	uint32_t rssi_thr_sta;
3383 	uint32_t rssi_thr_sc;
3384 	uint32_t plmn_id;
3385 	uint32_t alpha_num_bssid;
3386 };
3387 
3388 /**
3389  * struct lteu_config_params - LTEU config params
3390  * @lteu_gpio_start: start MU/AP scan after GPIO toggle
3391  * @lteu_num_bins: no. of elements in the following arrays
3392  * @use_actual_nf: whether to use the actual NF obtained or a hardcoded one
3393  * @lteu_weight: weights for MU algo
3394  * @lteu_thresh: thresholds for MU algo
3395  * @lteu_gamma:  gamma's for MU algo
3396  * @lteu_scan_timeout: timeout in ms to gpio toggle
3397  * @alpha_num_ssid: alpha for num active bssid calculation
3398  * @wifi_tx_power: Wifi Tx power
3399  */
3400 struct lteu_config_params {
3401 	uint8_t lteu_gpio_start;
3402 	uint8_t lteu_num_bins;
3403 	uint8_t use_actual_nf;
3404 	uint32_t lteu_weight[LTEU_MAX_BINS];
3405 	uint32_t lteu_thresh[LTEU_MAX_BINS];
3406 	uint32_t lteu_gamma[LTEU_MAX_BINS];
3407 	uint32_t lteu_scan_timeout;
3408 	uint32_t alpha_num_bssid;
3409 	uint32_t wifi_tx_power;
3410 	uint32_t allow_err_packets;
3411 };
3412 
3413 struct wmi_macaddr_t {
3414 	/** upper 4 bytes of  MAC address */
3415 	uint32_t mac_addr31to0;
3416 	/** lower 2 bytes of  MAC address */
3417 	uint32_t mac_addr47to32;
3418 };
3419 
3420 /**
3421  * struct wlan_profile_params - WLAN profile params
3422  * @param_id: param id
3423  * @profile_id: profile id
3424  * @enable: enable
3425  */
3426 struct wlan_profile_params {
3427 	uint32_t param_id;
3428 	uint32_t profile_id;
3429 	uint32_t enable;
3430 };
3431 
3432 /**
3433  * struct wmi_host_wmevParams - WME params
3434  * @wmep_acm: ACM paramete
3435  * @wmep_aifsn:	AIFSN parameters
3436  * @wmep_logcwmin: cwmin in exponential form
3437  * @wmep_logcwmax: cwmax in exponential form
3438  * @wmep_txopLimit: txopLimit
3439  * @wmep_noackPolicy: No-Ack Policy: 0=ack, 1=no-ack
3440  */
3441 struct wmi_host_wme_vparams {
3442 	u_int32_t	acm;
3443 	u_int32_t	aifs;
3444 	u_int32_t	cwmin;
3445 	u_int32_t	cwmax;
3446 	union {
3447 		u_int32_t txoplimit;
3448 		u_int32_t mu_edca_timer;
3449 	};
3450 	u_int32_t	noackpolicy;
3451 };
3452 
3453 /**
3454  * struct ratepwr_table_params - Rate power table params
3455  * @ratepwr_tbl: pointer to rate power table
3456  * @ratepwr_len: rate power table len
3457  */
3458 struct ratepwr_table_params {
3459 	uint8_t *ratepwr_tbl;
3460 	uint16_t ratepwr_len;
3461 };
3462 
3463 /**
3464  * struct ratepwr_chainmask_params - Rate power chainmask params
3465  * @ratepwr_chain_tbl: pointer to ratepwr chain table
3466  * @num_rate: number of rate in table
3467  * @pream_type: preamble type
3468  * @ops: ops
3469  */
3470 struct ratepwr_chainmsk_params {
3471 	uint32_t *ratepwr_chain_tbl;
3472 	uint16_t num_rate;
3473 	uint8_t pream_type;
3474 	uint8_t ops;
3475 };
3476 
3477 struct macaddr_params {
3478 	uint8_t *macaddr;
3479 };
3480 
3481 /**
3482  * struct acparams_params - acparams config structure
3483  * @ac: AC to configure
3484  * @use_rts: Use rts for this AC
3485  * @aggrsize_scaling: Aggregrate size scaling for the AC
3486  * @min_kbps: min kbps req
3487  */
3488 struct acparams_params {
3489 	uint8_t ac;
3490 	uint8_t use_rts;
3491 	uint8_t aggrsize_scaling;
3492 	uint32_t min_kbps;
3493 };
3494 
3495 /**
3496  * struct vap_dscp_tid_map_params - DSCP tid map params
3497  * @vdev_id: vdev id
3498  * @dscp_to_tid_map: pointer to arry of tid to dscp map table
3499  */
3500 struct vap_dscp_tid_map_params {
3501 	uint8_t vdev_id;
3502 	uint32_t *dscp_to_tid_map;
3503 };
3504 
3505 /**
3506  * struct proxy_ast_reserve_params - Proxy AST reserve params
3507  * @macaddr: macaddr for proxy ast entry
3508  */
3509 struct proxy_ast_reserve_params {
3510 	uint8_t *macaddr;
3511 };
3512 
3513 /**
3514  * struct fips_params - FIPS params config
3515  * @key: pointer to key
3516  * @key_len: length of key
3517  * @data: pointer data buf
3518  * @data_len: length of data buf
3519  * @mode: mode
3520  * @op: operation
3521  * @pdev_id: pdev_id for identifying the MAC
3522  */
3523 struct fips_params {
3524 	uint8_t *key;
3525 	uint32_t key_len;
3526 	uint8_t *data;
3527 	uint32_t data_len;
3528 	uint32_t mode;
3529 	uint32_t op;
3530 	uint32_t pdev_id;
3531 };
3532 
3533 #ifdef WLAN_FEATURE_FIPS_BER_CCMGCM
3534 #define MAX_KEY_LEN_FIPS_EXTEND 64
3535 #define MAX_NONCEIV_LEN_FIPS_EXTEND 16
3536 /**
3537  * struct fips_extend_cmd_params - FIPS extend params config for first frag
3538  * @fips_cmd:  1 - Encrypt, 2 - Decrypt
3539  * key_cipher: 0 - CCM, 1 - GCM
3540  * @key_len: length of key
3541  * @key: key_data
3542  * @nonce_iv_len: length of nonce or iv
3543  * @nonce_iv: nonce_iv
3544  * @tag_len: length of tag/mic
3545  * @aad_len: length of aad
3546  * @payload_len: length of payload
3547  */
3548 struct fips_extend_cmd_params {
3549 	u_int32_t fips_cmd;
3550 	u_int32_t key_cipher;
3551 	u_int32_t key_len;
3552 	u_int8_t  key[MAX_KEY_LEN_FIPS_EXTEND];
3553 	u_int32_t nonce_iv_len;
3554 	u_int8_t  nonce_iv[MAX_NONCEIV_LEN_FIPS_EXTEND];
3555 	u_int32_t tag_len;
3556 	u_int32_t aad_len;
3557 	u_int32_t payload_len;
3558 };
3559 
3560 /**
3561  * struct fips_extend_params - FIPS extend params config
3562  * @pdev_id: pdev_id for identifying the MAC
3563  * @cookie: cookie value
3564  * @frag_idx: fragment index
3565  * @more_bit: more bit
3566  * @data_len: length of data buf
3567  * @cmd_params: cmd_params set for first fragment
3568  * @data: pointer data buf
3569  */
3570 struct fips_extend_params {
3571 	uint32_t pdev_id;
3572 	u_int32_t cookie;
3573 	u_int32_t frag_idx;
3574 	u_int32_t more_bit;
3575 	u_int32_t data_len;
3576 	struct fips_extend_cmd_params cmd_params;
3577 	u_int32_t *data;
3578 };
3579 
3580 /**
3581  * struct fips_mode_set_params - FIPS mode enable param
3582  * @pdev_id: pdev_id for identifying the MAC
3583  * @mode: value to disable or enable fips extend mode
3584  */
3585 struct fips_mode_set_params {
3586 	uint32_t pdev_id;
3587 	uint32_t mode;
3588 };
3589 #endif
3590 
3591 #ifdef WLAN_FEATURE_DISA_FIPS
3592 /**
3593  * struct disa_encrypt_decrypt_req_params - disa encrypt request
3594  * @vdev_id: virtual device id
3595  * @key_flag: This indicates firmware to encrypt/decrypt payload
3596  *    see ENCRYPT_DECRYPT_FLAG
3597  * @key_idx: Index used in storing key
3598  * @key_cipher: cipher used for encryption/decryption
3599  *    Eg: see WMI_CIPHER_AES_CCM for CCMP
3600  * @key_len: length of key data
3601  * @key_txmic_len: length of Tx MIC
3602  * @key_rxmic_len: length of Rx MIC
3603  * @key_data: Key
3604  * @pn: packet number
3605  * @mac_header: MAC header
3606  * @data_len: length of data
3607  * @data: pointer to payload
3608  */
3609 struct disa_encrypt_decrypt_req_params {
3610 	uint32_t vdev_id;
3611 	uint8_t key_flag;
3612 	uint32_t key_idx;
3613 	uint32_t key_cipher;
3614 	uint32_t key_len;
3615 	uint32_t key_txmic_len;
3616 	uint32_t key_rxmic_len;
3617 	uint8_t key_data[MAC_MAX_KEY_LENGTH];
3618 	uint8_t pn[MAC_PN_LENGTH];
3619 	uint8_t mac_header[MAX_MAC_HEADER_LEN];
3620 	uint32_t data_len;
3621 	uint8_t *data;
3622 };
3623 #endif
3624 
3625 /**
3626  * struct periodic_chan_stats_param - periodic channel stats req param
3627  * @stats_period: stats period update
3628  * @enable: enable/disable
3629  */
3630 struct periodic_chan_stats_params {
3631 	uint32_t stats_period;
3632 	bool enable;
3633 	uint32_t pdev_id;
3634 };
3635 
3636 /**
3637  * enum wmi_host_packet_power_rate_flags: packer power rate flags
3638  * @WMI_HOST_FLAG_RTSENA: RTS enabled
3639  * @WMI_HOST_FLAG_CTSENA: CTS enabled
3640  * @WMI_HOST_FLAG_STBC: STBC is set
3641  * @WMI_HOST_FLAG_LDPC: LDPC is set
3642  * @WMI_HOST_FLAG_TXBF: Tx Bf enabled
3643  * @WMI_HOST_FLAG_MU2: MU2 data
3644  * @WMI_HOST_FLAG_MU3: MU3 data
3645  * @WMI_HOST_FLAG_SERIES1: Rate series 1
3646  * @WMI_HOST_FLAG_SGI: Short gaurd interval
3647  */
3648 enum wmi_host_packet_power_rate_flags {
3649 	WMI_HOST_FLAG_RTSENA        =  0x0001,
3650 	WMI_HOST_FLAG_CTSENA        =  0x0002,
3651 	WMI_HOST_FLAG_STBC          =  0x0004,
3652 	WMI_HOST_FLAG_LDPC          =  0x0008,
3653 	WMI_HOST_FLAG_TXBF          =  0x0010,
3654 	WMI_HOST_FLAG_MU2           =  0x0020,
3655 	WMI_HOST_FLAG_MU3           =  0x0040,
3656 	WMI_HOST_FLAG_SERIES1       =  0x0080,
3657 	WMI_HOST_FLAG_SGI           =  0x0100,
3658 };
3659 
3660 /**
3661  * enum wmi_host_su_mu_ofdma_flags: packer power su mu ofdma flags
3662  * @WMI_HOST_FLAG_SU: SU Data
3663  * @WMI_HOST_FLAG_DL_MU_MIMO_AC: DL AC MU data
3664  * @WMI_HOST_FLAG_DL_MU_MIMO_AX: DL AX MU data
3665  * @WMI_HOST_FLAG_DL_OFDMA: DL OFDMA data
3666  * @WMI_HOST_FLAG_UL_OFDMA: UL OFDMA data
3667  * @WMI_HOST_FLAG_UL_MU_MIMO: UL MU data
3668  */
3669 enum wmi_host_su_mu_ofdma_flags {
3670 	WMI_HOST_FLAG_SU            =  0x0001,
3671 	WMI_HOST_FLAG_DL_MU_MIMO_AC =  0x0002,
3672 	WMI_HOST_FLAG_DL_MU_MIMO_AX =  0x0003,
3673 	WMI_HOST_FLAG_DL_OFDMA      =  0x0004,
3674 	WMI_HOST_FLAG_UL_OFDMA      =  0x0005,
3675 	WMI_HOST_FLAG_UL_MU_MIMO    =  0x0006,
3676 };
3677 
3678 /**
3679  * enum wmi_host_preamble_type: preamble type
3680  * @WMI_HOST_PREAMBLE_OFDM: ofdm rate
3681  * @WMI_HOST_PREAMBLE_CCK:  cck rate
3682  * @WMI_HOST_PREAMBLE_HT: ht rate
3683  * @WMI_HOST_PREAMBLE_VHT: vht rate
3684  * @WMI_HOST_PREAMBLE_HE: 11ax he rate
3685  */
3686 enum wmi_host_preamble_type {
3687 	WMI_HOST_PREAMBLE_OFDM  =  0,
3688 	WMI_HOST_PREAMBLE_CCK   =  1,
3689 	WMI_HOST_PREAMBLE_HT    =  2,
3690 	WMI_HOST_PREAMBLE_VHT   =  3,
3691 	WMI_HOST_PREAMBLE_HE    =  4,
3692 };
3693 
3694 /**
3695  * enum wmi_ratemask_type: ratemask type
3696  * @WMI_RATEMASK_TYPE_CCK: CCK rate mask type
3697  * @WMI_RATEMASK_TYPE_HT:  HT rate mask type
3698  * @WMI_RATEMASK_TYPE_VHT: VHT rate mask type
3699  * @WMI_RATEMASK_TYPE_HE:  HE rate mask type
3700  *
3701  * This is used for 'type' in WMI_VDEV_RATEMASK_CMDID
3702  */
3703 enum wmi_ratemask_type {
3704 	WMI_RATEMASK_TYPE_CCK = 0,
3705 	WMI_RATEMASK_TYPE_HT  = 1,
3706 	WMI_RATEMASK_TYPE_VHT = 2,
3707 	WMI_RATEMASK_TYPE_HE  = 3,
3708 };
3709 
3710 /**
3711  * enum peer_txq_flush_policy - Peer flush policy values
3712  * @PEER_TXQ_FLUSH_POLICY_NONE: No policy configured for peer TID queues
3713  * @PEER_TXQ_FLUSH_POLICY_TWT_SP_END: flush peer TID queues after SP end
3714  *
3715  * This is mapped to 'flush_policy' in WMI_PEER_FLUSH_POLICY_CMDID
3716  */
3717 enum peer_txq_flush_policy {
3718 	PEER_TXQ_FLUSH_POLICY_NONE = 0,
3719 	PEER_TXQ_FLUSH_POLICY_TWT_SP_END = 1,
3720 	/*keep last */
3721 	PEER_TXQ_FLUSH_POLICY_INVALID,
3722 };
3723 
3724 /**
3725  * struct peer_txq_flush_config_params: Peer TXQ flush configuration parameters
3726  * @vdev_id: vdev id
3727  * @peer: Peer mac address
3728  * @tid_mask: TID queues of the peer being configured
3729  * @policy: Policy to be applied
3730  */
3731 struct peer_txq_flush_config_params {
3732 	uint8_t vdev_id;
3733 	uint8_t peer[QDF_MAC_ADDR_SIZE];
3734 	uint32_t tid_mask;
3735 	enum peer_txq_flush_policy policy;
3736 };
3737 
3738 /**
3739  * enum gpio_pull_type - GPIO PULL TYPE
3740  * @WMI_HOST_GPIO_PULL_NONE: set gpio pull type to none
3741  * @WMI_HOST_GPIO_PULL_UP: set gpio to pull up
3742  * @WMI_HOST_GPIO_PULL_DOWN: set gpio to pull down
3743  * @WMI_HOST_GPIO_PULL_MAX: invalid pull type
3744  */
3745 enum gpio_pull_type {
3746 	WMI_HOST_GPIO_PULL_NONE = 0,
3747 	WMI_HOST_GPIO_PULL_UP = 1,
3748 	WMI_HOST_GPIO_PULL_DOWN = 2,
3749 	WMI_HOST_GPIO_PULL_MAX,
3750 };
3751 
3752 /**
3753  * enum gpio_interrupt_mode - GPIO INTERRUPT MODE
3754  * @WMI_HOST_GPIO_INTMODE_DISABLE: disable interrupt mode
3755  * @WMI_HOST_GPIO_INTMODE_RISING_EDGE: interrupt with rising edge trigger
3756  * @WMI_HOST_GPIO_INTMODE_FALLING_EDGE: interrupt with falling edge trigger
3757  * @WMI_HOST_GPIO_INTMODE_BOTH_EDGE: interrupt with both edge trigger
3758  * @WMI_HOST_GPIO_INTMODE_LEVEL_LOW: interrupt with gpio level low trigger
3759  * @WMI_HOST_GPIO_INTMODE_LEVEL_HIGH: interrupt with gpio level high trigger
3760  * @WMI_HOST_GPIO_INTMODE_MAX: invalid interrupt mode
3761  */
3762 enum gpio_interrupt_mode {
3763 	WMI_HOST_GPIO_INTMODE_DISABLE = 0,
3764 	WMI_HOST_GPIO_INTMODE_RISING_EDGE = 1,
3765 	WMI_HOST_GPIO_INTMODE_FALLING_EDGE = 2,
3766 	WMI_HOST_GPIO_INTMODE_BOTH_EDGE = 3,
3767 	WMI_HOST_GPIO_INTMODE_LEVEL_LOW = 4,
3768 	WMI_HOST_GPIO_INTMODE_LEVEL_HIGH = 5,
3769 	WMI_HOST_GPIO_INTMODE_MAX,
3770 };
3771 
3772 /**
3773  * enum qca_gpio_direction - GPIO Direction
3774  * @WLAN_GPIO_INPUT: set gpio as input mode
3775  * @WLAN_GPIO_OUTPUT: set gpio as output mode
3776  * @WLAN_GPIO_VALUE_MAX: invalid gpio direction
3777  */
3778 enum gpio_direction {
3779 	WMI_HOST_GPIO_INPUT = 0,
3780 	WMI_HOST_GPIO_OUTPUT = 1,
3781 	WMI_HOST_GPIO_DIR_MAX,
3782 };
3783 
3784 /**
3785  * enum fw_gpio_direction - GPIO Direction
3786  * @WMI_FW_GPIO_OUTPUT: set gpio as output mode
3787  * @WMI_FW_GPIO_INPUT: set gpio as input mode
3788  */
3789 enum fw_gpio_direction {
3790 	WMI_FW_GPIO_OUTPUT = 0,
3791 	WMI_FW_GPIO_INPUT = 1,
3792 };
3793 
3794 /**
3795  * enum qca_gpio_value - GPIO Value
3796  * @WLAN_GPIO_LEVEL_LOW: set gpio output level low
3797  * @WLAN_GPIO_LEVEL_HIGH: set gpio output level high
3798  * @WLAN_GPIO_LEVEL_MAX: invalid gpio value
3799  */
3800 enum gpio_value {
3801 	WMI_HOST_GPIO_LEVEL_LOW = 0,
3802 	WMI_HOST_GPIO_LEVEL_HIGH = 1,
3803 	WMI_HOST_GPIO_LEVEL_MAX,
3804 };
3805 
3806 /**
3807  * enum gpio_init_enable - GPIO init enable
3808  * @WMI_HOST_GPIO_INIT_DISABLE: Disable INIT
3809  * @WMI_HOST_GPIO_INIT_ENABLE: Enable INIT
3810  * @WMI_HOST_GPIO_INIT_MAX: invalid gpio init_enable
3811  */
3812 enum gpio_init_enable {
3813 	WMI_HOST_GPIO_INIT_DISABLE = 0,
3814 	WMI_HOST_GPIO_INIT_ENABLE = 1,
3815 	WMI_HOST_GPIO_INIT_MAX,
3816 };
3817 
3818 /**
3819  * enum gpio_drive - GPIO drive
3820  * @WMI_HOST_GPIO_DRIVE_2MA: drive 2MA
3821  * @WMI_HOST_GPIO_DRIVE_4MA: drive 4MA
3822  * @WMI_HOST_GPIO_DRIVE_6MA: drive 6MA
3823  * @WMI_HOST_GPIO_DRIVE_8MA: drive 8MA
3824  * @WMI_HOST_GPIO_DRIVE_10MA: drive 10MA
3825  * @WMI_HOST_GPIO_DRIVE_12MA: drive 12MA
3826  * @WMI_HOST_GPIO_DRIVE_14MA: drive 14MA
3827  * @WMI_HOST_GPIO_DRIVE_16MA: drive 16MA
3828  * @WMI_HOST_GPIO_DRIVE_MAX: invalid gpio drive
3829  */
3830 enum gpio_drive {
3831 	WMI_HOST_GPIO_DRIVE_2MA = 0,
3832 	WMI_HOST_GPIO_DRIVE_4MA = 1,
3833 	WMI_HOST_GPIO_DRIVE_6MA = 2,
3834 	WMI_HOST_GPIO_DRIVE_8MA = 3,
3835 	WMI_HOST_GPIO_DRIVE_10MA = 4,
3836 	WMI_HOST_GPIO_DRIVE_12MA = 5,
3837 	WMI_HOST_GPIO_DRIVE_14MA = 6,
3838 	WMI_HOST_GPIO_DRIVE_16MA = 7,
3839 	WMI_HOST_GPIO_DRIVE_MAX,
3840 };
3841 
3842 /**
3843  * enum gpio_mux_config - GPIO mux_config
3844  * @WMI_HOST_GPIO_MUX_DEFAULT: Default mux value
3845  * @WMI_HOST_GPIO_MUX_MAX: maximum allowed gpio mux_config
3846  */
3847 enum gpio_mux_config {
3848 	WMI_HOST_GPIO_MUX_DEFAULT = 0,
3849 	WMI_HOST_GPIO_MUX_MAX = 15,
3850 };
3851 
3852 /**
3853  * struct wmi_host_gpio_input_event - GPIO input event structure
3854  * @gpio_num: GPIO number which changed state
3855  */
3856 typedef struct {
3857 	uint32_t gpio_num;	/* GPIO number which changed state */
3858 } wmi_host_gpio_input_event;
3859 
3860 /**
3861  * struct gpio_config_params - GPIO config params
3862  * @pin_num: GPIO number to config
3863  * @pin_dir: gpio direction, 1-input/0-output
3864  * @pin_pull_type: pull type define in gpio_pull_type
3865  * @pin_intr_mode: interrupt mode define in gpio_interrupt_mode
3866  */
3867 struct gpio_config_params {
3868 	uint32_t pin_num;
3869 	enum gpio_direction pin_dir;
3870 	enum gpio_pull_type pin_pull_type;
3871 	enum gpio_interrupt_mode pin_intr_mode;
3872 	enum gpio_mux_config mux_config_val;
3873 	enum gpio_drive drive;
3874 	enum gpio_init_enable init_enable;
3875 };
3876 
3877 /**
3878  * struct gpio_output_params - GPIO output params
3879  * @pin_num: GPIO number to configure
3880  * @pinset: 1 mean gpio output high level, 0 mean gpio output low level
3881  */
3882 struct gpio_output_params {
3883 	uint32_t pin_num;
3884 	enum gpio_value pin_set;
3885 };
3886 
3887 /* flags bit 0: to configure wlan priority bitmap */
3888 #define WMI_HOST_BTCOEX_PARAM_FLAGS_WLAN_PRIORITY_BITMAP_BIT (1<<0)
3889 /* flags bit 1: to configure both period and wlan duration */
3890 #define WMI_HOST_BTCOEX_PARAM_FLAGS_DUTY_CYCLE_BIT (1<<1)
3891 struct btcoex_cfg_params {
3892 	/* WLAN priority bitmask for different frame types */
3893 	uint32_t  btcoex_wlan_priority_bitmap;
3894 	/* This command is used to configure different btcoex params
3895 	 * in different situations.The host sets the appropriate bit(s)
3896 	 * in btcoex_param_flags to indicate which configuration parameters
3897 	 * are valid within a particular BT coex config message, so that one
3898 	 * BT configuration parameter can be configured without affecting
3899 	 * other BT configuration parameters.E.g. if the host wants to
3900 	 * configure only btcoex_wlan_priority_bitmap it sets only
3901 	 * WMI_BTCOEX_PARAM_FLAGS_WLAN_PRIORITY_BITMAP_BIT in
3902 	 * btcoex_param_flags so that firmware will not overwrite
3903 	 * other params with default value passed in the command.
3904 	 * Host can also set multiple bits in btcoex_param_flags
3905 	 * to configure more than one param in single message.
3906 	 */
3907 	uint32_t btcoex_param_flags;
3908 	/* period denotes the total time in milliseconds which WLAN and BT share
3909 	 * configured percentage for transmission and reception.
3910 	 */
3911 	uint32_t period;
3912 	/* wlan duration is the time in milliseconds given for wlan
3913 	 * in above period.
3914 	 */
3915 	uint32_t wlan_duration;
3916 };
3917 
3918 #define WMI_HOST_COEX_CONFIG_BUF_MAX_LEN 32 /* 128 bytes */
3919 /**
3920  * coex_ver_cfg_t
3921  * @coex_version: Version for 4 wire coex
3922  * @length: Length of payload buffer based on version
3923  * @config_buf: Payload Buffer
3924  */
3925 typedef struct {
3926 	/* VERSION_4 (4 wire coex) */
3927 	uint32_t coex_version;
3928 
3929 	/* No. of uint32_t elements in payload buffer. Will depend on the coex
3930 	 * version
3931 	 */
3932 	uint32_t length;
3933 
3934 	/* Payload buffer */
3935 	uint32_t config_buf[WMI_HOST_COEX_CONFIG_BUF_MAX_LEN];
3936 } coex_ver_cfg_t;
3937 
3938 #define WMI_HOST_RTT_REPORT_CFR	0
3939 #define WMI_HOST_RTT_NO_REPORT_CFR	1
3940 #define WMI_HOST_RTT_AGGREGATE_REPORT_NON_CFR	2
3941 /**
3942  * struct rtt_meas_req_test_params
3943  * @peer: peer mac address
3944  * @req_frame_type: RTT request frame type
3945  * @req_bw: requested bandwidth
3946  * @req_preamble: Preamble
3947  * @req_num_req: num of requests
3948  * @req_report_type: report type
3949  * @num_measurements: number of measurements
3950  * @asap_mode: priority
3951  * @lci_requested: LCI requested
3952  * @loc_civ_requested:
3953  * @channel_param: channel param
3954  * @req_id: requested id
3955  */
3956 struct rtt_meas_req_test_params {
3957 	uint8_t peer[QDF_MAC_ADDR_SIZE];
3958 	int req_frame_type;
3959 	int req_bw;
3960 	int req_preamble;
3961 	int req_num_req;
3962 	int req_report_type;
3963 	uint32_t num_measurements;
3964 	uint32_t asap_mode;
3965 	uint32_t lci_requested;
3966 	uint32_t loc_civ_requested;
3967 	struct channel_param channel;
3968 	uint8_t req_id;
3969 };
3970 
3971 /**
3972  * struct peer_request_pn_param - PN request params
3973  * @vdev_id: vdev id
3974  * @peer_macaddr: Peer mac address
3975  * @key_type: key type
3976  */
3977 struct peer_request_pn_param {
3978 	uint32_t vdev_id;
3979 	uint8_t  peer_macaddr[QDF_MAC_ADDR_SIZE];
3980 	uint32_t key_type;
3981 };
3982 
3983 /**
3984  * struct peer_request_rxpn_param - Rx PN request params
3985  * @vdev_id: vdev id
3986  * @peer_macaddr: Peer mac address
3987  * @keyix: key index
3988  */
3989 struct peer_request_rxpn_param {
3990 	uint32_t vdev_id;
3991 	uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE];
3992 	uint16_t keyix;
3993 };
3994 
3995 /**
3996  * struct rtt_meas_req_params - RTT measurement request params
3997  * @req_id: Request id
3998  * @vdev_id: vdev id
3999  * @is_mode_na: 11NA
4000  * @is_mode_ac: AC
4001  * @is_bw_20: 20
4002  * @is_bw_40: 40
4003  * @is_bw_80: 80
4004  * @sta_mac_addr: pointer to station mac address
4005  * @spoof_mac_addr: pointer to spoof mac address
4006  * @num_probe_rqst: number of probe request
4007  * @channel_param: channel param
4008  */
4009 struct rtt_meas_req_params {
4010 	uint8_t req_id;
4011 	uint8_t vdev_id;
4012 	bool is_mode_na;
4013 	bool is_mode_ac;
4014 	bool is_bw_20;
4015 	bool is_bw_40;
4016 	bool is_bw_80;
4017 	uint8_t *sta_mac_addr;
4018 	uint8_t *spoof_mac_addr;
4019 	uint32_t num_probe_rqst;
4020 	struct channel_param channel;
4021 };
4022 
4023 /**
4024  * struct lci_set_params - LCI params
4025  * @lci_data: pointer to LCI data
4026  * @latitude_unc: latitude
4027  * @latitude_0_12: bits 0 to 1 of latitude
4028  * @latitude_2_33: bits 2 to 33 of latitude
4029  * @longitude_unc: longitude
4030  * @longitude_0_1: bits 0 to 1 of longitude
4031  * @longitude_2_33: bits 2 to 33 of longitude
4032  * @altitude_type: altitude type
4033  * @altitude_unc_0_3: altitude bits 0 - 3
4034  * @altitude_unc_4_5: altitude bits 4 - 5
4035  * @altitude: altitude
4036  * @datum: dataum
4037  * @reg_loc_agmt:
4038  * @reg_loc_dse:
4039  * @dep_sta:
4040  * @version: version
4041  */
4042 struct lci_set_params {
4043 	void *lci_data;
4044 	uint8_t	latitude_unc:6,
4045 		latitude_0_1:2;
4046 	uint32_t latitude_2_33;
4047 	uint8_t	longitude_unc:6,
4048 		longitude_0_1:2;
4049 	uint32_t longitude_2_33;
4050 	uint8_t	altitude_type:4,
4051 		altitude_unc_0_3:4;
4052 	uint32_t altitude_unc_4_5:2,
4053 		altitude:30;
4054 	uint8_t	datum:3,
4055 		reg_loc_agmt:1,
4056 		reg_loc_dse:1,
4057 		dep_sta:1,
4058 		version:2;
4059 	uint8_t *colocated_bss;
4060 	int msg_len;
4061 };
4062 
4063 /**
4064  * struct lcr_set_params - LCR params
4065  * @lcr_data: pointer to lcr data
4066  */
4067 struct lcr_set_params {
4068 	void *lcr_data;
4069 	int msg_len;
4070 };
4071 
4072 /**
4073  * struct rtt_keepalive_req_params - RTT keepalive params
4074  * @macaddr: pointer to macaddress
4075  * @req_id: Request id
4076  * @vdev_id: vdev id
4077  * @stop: start/stop
4078  */
4079 struct rtt_keepalive_req_params {
4080 	uint8_t *macaddr;
4081 	uint8_t req_id;
4082 	uint8_t vdev_id;
4083 	bool stop;
4084 };
4085 
4086 /**
4087  * struct rx_reorder_queue_setup_params  - Reorder queue setup params
4088  * @peer_mac_addr: Peer mac address
4089  * @tid: TID
4090  * @vdev_id: vdev id
4091  * @hw_qdesc_paddr_lo: lower 32 bits of queue desc adddress
4092  * @hw_qdesc_paddr_hi: upper 32 bits of queue desc adddress
4093  * @queue_no: 16-bit number assigned by host for queue
4094  * @ba_window_size_valid: BA window size validity flag
4095  * @ba_window_size: BA window size
4096  */
4097 struct rx_reorder_queue_setup_params {
4098 	uint8_t *peer_macaddr;
4099 	uint16_t tid;
4100 	uint16_t vdev_id;
4101 	uint32_t hw_qdesc_paddr_lo;
4102 	uint32_t hw_qdesc_paddr_hi;
4103 	uint16_t queue_no;
4104 	uint8_t ba_window_size_valid;
4105 	uint16_t ba_window_size;
4106 
4107 };
4108 
4109 /**
4110  * struct rx_reorder_queue_remove_params  - Reorder queue setup params
4111  * @peer_mac_addr: Peer mac address
4112  * @vdev_id: vdev id
4113  * @peer_tid_bitmap: peer tid bitmap
4114  */
4115 struct rx_reorder_queue_remove_params {
4116 	uint8_t *peer_macaddr;
4117 	uint16_t vdev_id;
4118 	uint32_t peer_tid_bitmap;
4119 };
4120 
4121 /**
4122  * struct wmi_host_stats_event - Stats event params
4123  * @stats_id: stats id of type wmi_host_stats_event
4124  * @num_pdev_stats: number of pdev stats event structures 0 or 1
4125  * @num_pdev_ext_stats: number of pdev ext stats event structures
4126  * @num_vdev_stats: number of vdev stats
4127  * @num_peer_stats: number of peer stats event structures 0 or max peers
4128  * @num_peer_extd_stats: number of peer extended stats event structures 0
4129  * or max peers
4130  * @num_bcnflt_stats: number of beacon filter stats
4131  * @num_chan_stats: number of channel stats
4132  * @pdev_id: device id for the radio
4133  * @num_bcn_stats: number of beacon stats
4134  * @num_rssi_stats: number of rssi stats
4135  * @num_peer_adv_stats: number of peer adv stats
4136  * @num_mib_stats: number of mib stats
4137  * @num_mib_extd_stats: number of extended mib stats
4138  * @num_peer_stats_info_ext: number of peer extended stats info
4139  * @num_vdev_extd_stats: number of vdev extended stats info
4140  * @last_event: specify if the current event is the last event
4141  */
4142 typedef struct {
4143 	wmi_host_stats_id stats_id;
4144 	uint32_t num_pdev_stats;
4145 	uint32_t num_pdev_ext_stats;
4146 	uint32_t num_vdev_stats;
4147 	uint32_t num_peer_stats;
4148 	uint32_t num_peer_extd_stats;
4149 	uint32_t num_bcnflt_stats;
4150 	uint32_t num_chan_stats;
4151 	uint32_t pdev_id;
4152 	uint32_t num_bcn_stats;
4153 	uint32_t num_rssi_stats;
4154 	uint32_t num_peer_adv_stats;
4155 	uint32_t num_mib_stats;
4156 	uint32_t num_mib_extd_stats;
4157 	uint32_t num_peer_stats_info_ext;
4158 	uint32_t num_vdev_extd_stats;
4159 	uint32_t last_event;
4160 } wmi_host_stats_event;
4161 
4162 /**
4163  * struct wmi_host_peer_extd_stats - peer extd stats event structure
4164  * @peer_macaddr: Peer mac address
4165  * @inactive_time: inactive time in secs
4166  * @peer_chain_rssi: peer rssi
4167  * @rx_duration: RX duration
4168  * @peer_tx_bytes: TX bytes
4169  * @last_tx_rate_code: Tx rate code of last frame
4170  * @last_tx_power: Tx power latest
4171  * @atf_tokens_allocated: atf tokens allocated
4172  * @atf_tokens_utilized: atf tokens utilized
4173  * @num_mu_tx_denylisted: Denylisted MU Tx count
4174  * @sgi_count: sgi count of the peer
4175  * @rx_mc_bc_cnt: Total number of received multicast & broadcast data frames
4176  * corresponding to this peer, 1 in the MSB of rx_mc_bc_cnt represents a
4177  * valid data
4178  * @rx_retry_cnt: Number of rx retries received from current station
4179  */
4180 typedef struct {
4181 	wmi_host_mac_addr peer_macaddr;
4182 	uint32_t inactive_time;
4183 	uint32_t peer_chain_rssi;
4184 	uint32_t rx_duration;
4185 	uint32_t peer_tx_bytes;
4186 	uint32_t last_tx_rate_code;
4187 	uint32_t last_tx_power;
4188 	uint32_t atf_tokens_allocated;
4189 	uint32_t atf_tokens_utilized;
4190 	uint32_t num_mu_tx_denylisted;
4191 	uint32_t sgi_count;
4192 	uint32_t rx_mc_bc_cnt;
4193 	uint32_t rx_retry_cnt;
4194 } wmi_host_peer_extd_stats;
4195 
4196 /**
4197  * struct wmi_host_peer_adv_stats - peer adv stats event structure
4198  * @peer_macaddr: mac address
4199  * @fcs_count: fcs count
4200  * @rx_count: rx count
4201  * @rx_bytes: rx bytes
4202  */
4203 struct wmi_host_peer_adv_stats {
4204 	uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE];
4205 	uint32_t fcs_count;
4206 	uint32_t rx_count;
4207 	uint64_t rx_bytes;
4208 };
4209 
4210 /**
4211  * struct wmi_host_pdev_ext_stats - peer ext stats structure
4212  * @rx_rssi_comb: RX rssi
4213  * @rx_rssi_chain0: RX rssi chain 0
4214  * @rx_rssi_chain1: RX rssi chain 1
4215  * @rx_rssi_chain2: RX rssi chain 2
4216  * @rx_rssi_chain3: RX rssi chain 3
4217  * @rx_mcs: RX MCS array
4218  * @tx_mcs: TX MCS array
4219  * @ack_rssi: Ack rssi
4220  * @my_rx_count: What portion of time, as measured by the MAC HW clock was
4221  *               occupied by receiving PPDUs addressed to one of the vdevs
4222  *               within this pdev.
4223  * @rx_matched_11ax_msdu_cnt: number of Rx 11ax MSDUs with matching BSS color
4224  *                            counter updated at EOP (end of packet)
4225  * @rx_other_11ax_msdu_cnt: number of Rx 11ax MSDUs with other BSS color counter
4226  *                          updated at EOP (end of packet)
4227  * @pdev_id: pdev id
4228  */
4229 typedef struct {
4230 	uint32_t	rx_rssi_comb;
4231 	uint32_t	rx_rssi_chain0;
4232 	uint32_t	rx_rssi_chain1;
4233 	uint32_t	rx_rssi_chain2;
4234 	uint32_t	rx_rssi_chain3;
4235 	uint32_t	rx_mcs[10];
4236 	uint32_t	tx_mcs[10];
4237 	uint32_t	ack_rssi;
4238 	uint32_t	my_rx_count;
4239 	uint32_t	rx_matched_11ax_msdu_cnt;
4240 	uint32_t	rx_other_11ax_msdu_cnt;
4241 	uint32_t	pdev_id;
4242 } wmi_host_pdev_ext_stats;
4243 
4244 /**
4245  * struct wmi_host_dbg_tx_stats - Debug stats
4246  * @comp_queued: Num HTT cookies queued to dispatch list
4247  * @comp_delivered: Num HTT cookies dispatched
4248  * @msdu_enqued: Num MSDU queued to WAL
4249  * @mpdu_enqued: Num MPDU queue to WAL
4250  * @wmm_drop: Num MSDUs dropped by WMM limit
4251  * @local_enqued: Num Local frames queued
4252  * @local_freed: Num Local frames done
4253  * @hw_queued: Num queued to HW
4254  * @hw_reaped: Num PPDU reaped from HW
4255  * @underrun: Num underruns
4256  * @hw_paused: HW Paused.
4257  * @tx_abort: Num PPDUs cleaned up in TX abort
4258  * @mpdus_requed: Num MPDUs requed by SW
4259  * @tx_ko: excessive retries
4260  * @tx_xretry:
4261  * @data_rc: data hw rate code
4262  * @self_triggers: Scheduler self triggers
4263  * @sw_retry_failure: frames dropped due to excessive sw retries
4264  * @illgl_rate_phy_err: illegal rate phy errors
4265  * @pdev_cont_xretry: wal pdev continuous xretry
4266  * @pdev_tx_timeout: wal pdev continuous xretry
4267  * @pdev_resets: wal pdev resets
4268  * @stateless_tid_alloc_failure: frames dropped due to non-availability of
4269  *                               stateless TIDs
4270  * @phy_underrun: PhY/BB underrun
4271  * @txop_ovf: MPDU is more than txop limit
4272  * @seq_posted: Number of Sequences posted
4273  * @seq_failed_queueing: Number of Sequences failed queueing
4274  * @seq_completed: Number of Sequences completed
4275  * @seq_restarted: Number of Sequences restarted
4276  * @mu_seq_posted: Number of MU Sequences posted
4277  * @mpdus_sw_flush: Num MPDUs flushed by SW, HWPAUSED, SW TXABORT
4278  *                  (Reset,channel change)
4279  * @mpdus_hw_filter: Num MPDUs filtered by HW, all filter condition
4280  *                   (TTL expired)
4281  * @mpdus_truncated: Num MPDUs truncated by PDG (TXOP, TBTT,
4282  *                   PPDU_duration based on rate, dyn_bw)
4283  * @mpdus_ack_failed: Num MPDUs that was tried but didn't receive ACK or BA
4284  * @mpdus_expired: Num MPDUs that was dropped du to expiry.
4285  * @mc_dropr: Num mc drops
4286  */
4287 typedef struct {
4288 	int32_t comp_queued;
4289 	int32_t comp_delivered;
4290 	int32_t msdu_enqued;
4291 	int32_t mpdu_enqued;
4292 	int32_t wmm_drop;
4293 	int32_t local_enqued;
4294 	int32_t local_freed;
4295 	int32_t hw_queued;
4296 	int32_t hw_reaped;
4297 	int32_t underrun;
4298 	uint32_t hw_paused;
4299 	int32_t tx_abort;
4300 	int32_t mpdus_requed;
4301 	uint32_t tx_ko;
4302 	uint32_t tx_xretry;
4303 	uint32_t data_rc;
4304 	uint32_t self_triggers;
4305 	uint32_t sw_retry_failure;
4306 	uint32_t illgl_rate_phy_err;
4307 	uint32_t pdev_cont_xretry;
4308 	uint32_t pdev_tx_timeout;
4309 	uint32_t pdev_resets;
4310 	uint32_t stateless_tid_alloc_failure;
4311 	uint32_t phy_underrun;
4312 	uint32_t txop_ovf;
4313 	uint32_t seq_posted;
4314 	uint32_t seq_failed_queueing;
4315 	uint32_t seq_completed;
4316 	uint32_t seq_restarted;
4317 	uint32_t mu_seq_posted;
4318 	int32_t mpdus_sw_flush;
4319 	int32_t mpdus_hw_filter;
4320 	int32_t mpdus_truncated;
4321 	int32_t mpdus_ack_failed;
4322 	int32_t mpdus_expired;
4323 	uint32_t mc_drop;
4324 } wmi_host_dbg_tx_stats;
4325 
4326 /**
4327  * struct wmi_host_dbg_rx_stats - RX Debug stats
4328  * @mid_ppdu_route_change: Cnts any change in ring routing mid-ppdu
4329  * @status_rcvd: Total number of statuses processed
4330  * @r0_frags: Extra frags on rings 0
4331  * @r1_frags: Extra frags on rings 1
4332  * @r2_frags: Extra frags on rings 2
4333  * @r3_frags: Extra frags on rings 3
4334  * @htt_msdus: MSDUs delivered to HTT
4335  * @htt_mpdus: MPDUs delivered to HTT
4336  * @loc_msdus: MSDUs delivered to local stack
4337  * @loc_mpdus: MPDUS delivered to local stack
4338  * @oversize_amsdu: AMSDUs that have more MSDUs than the status ring size
4339  * @phy_errs: Number of PHY errors
4340  * @phy_err_drop: Number of PHY errors drops
4341  * @mpdu_errs: Number of mpdu errors - FCS, MIC, ENC etc.
4342  * @pdev_rx_timeout: Number of rx inactivity timeouts
4343  * @rx_ovfl_errs: Number of rx overflow errors.
4344  */
4345 typedef struct {
4346 	int32_t mid_ppdu_route_change;
4347 	int32_t status_rcvd;
4348 	int32_t r0_frags;
4349 	int32_t r1_frags;
4350 	int32_t r2_frags;
4351 	int32_t r3_frags;
4352 	int32_t htt_msdus;
4353 	int32_t htt_mpdus;
4354 	int32_t loc_msdus;
4355 	int32_t loc_mpdus;
4356 	int32_t oversize_amsdu;
4357 	int32_t phy_errs;
4358 	int32_t phy_err_drop;
4359 	int32_t mpdu_errs;
4360 	uint32_t pdev_rx_timeout;
4361 	int32_t rx_ovfl_errs;
4362 } wmi_host_dbg_rx_stats;
4363 
4364 /** struct wmi_host_dbg_mem_stats - memory stats
4365  * @iram_free_size: IRAM free size on target
4366  * @dram_free_size: DRAM free size on target
4367  * @sram_free_size: SRAM free size on target
4368  */
4369 typedef struct {
4370 	uint32_t iram_free_size;
4371 	uint32_t dram_free_size;
4372 	/* Only Non-TLV */
4373 	uint32_t sram_free_size;
4374 } wmi_host_dbg_mem_stats;
4375 
4376 typedef struct {
4377 	/* Only TLV */
4378 	int32_t dummy;/* REMOVE THIS ONCE REAL PEER STAT COUNTERS ARE ADDED */
4379 } wmi_host_dbg_peer_stats;
4380 
4381 /**
4382  * struct wmi_host_dbg_stats - host debug stats
4383  * @tx: TX stats of type wmi_host_dbg_tx_stats
4384  * @rx: RX stats of type wmi_host_dbg_rx_stats
4385  * @mem: Memory stats of type wmi_host_dbg_mem_stats
4386  * @peer: peer stats of type wmi_host_dbg_peer_stats
4387  */
4388 typedef struct {
4389 	wmi_host_dbg_tx_stats tx;
4390 	wmi_host_dbg_rx_stats rx;
4391 	wmi_host_dbg_mem_stats mem;
4392 	wmi_host_dbg_peer_stats peer;
4393 } wmi_host_dbg_stats;
4394 
4395 /**
4396  * struct wmi_host_pdev_stats - PDEV stats
4397  * @chan_nf: Channel noise floor
4398  * @tx_frame_count: TX frame count
4399  * @rx_frame_count: RX frame count
4400  * @rx_clear_count: rx clear count
4401  * @cycle_count: cycle count
4402  * @phy_err_count: Phy error count
4403  * @chan_tx_pwr: Channel Tx Power
4404  * @pdev_stats: WAL dbg stats
4405  * @ackRcvBad:
4406  * @rtsBad:
4407  * @rtsGood:
4408  * @fcsBad:
4409  * @noBeacons:
4410  * @mib_int_count:
4411  * @pdev_id: pdev id
4412  */
4413 typedef struct {
4414 	int32_t chan_nf;
4415 	uint32_t tx_frame_count;
4416 	uint32_t rx_frame_count;
4417 	uint32_t rx_clear_count;
4418 	uint32_t cycle_count;
4419 	uint32_t phy_err_count;
4420 	uint32_t chan_tx_pwr;
4421 	wmi_host_dbg_stats pdev_stats;
4422 	uint32_t	ackRcvBad;
4423 	uint32_t	rtsBad;
4424 	uint32_t	rtsGood;
4425 	uint32_t	fcsBad;
4426 	uint32_t	noBeacons;
4427 	uint32_t	mib_int_count;
4428 	uint32_t pdev_id;
4429 } wmi_host_pdev_stats;
4430 
4431 /**
4432  * struct wmi_host_pmf_bcn_protect_stats - PMF bcn protect stats
4433  * @igtk_mic_fail_cnt: MIC failure count of management packets using IGTK
4434  * @igtk_replay_cnt: Replay detection count of management packets using IGTK
4435  * @bcn_mic_fail_cnt: MIC failure count of beacon packets using BIGTK
4436  * @bcn_replay_cnt: Replay detection count of beacon packets using BIGTK
4437  */
4438 typedef struct {
4439 	uint32_t igtk_mic_fail_cnt;
4440 	uint32_t igtk_replay_cnt;
4441 	uint32_t bcn_mic_fail_cnt;
4442 	uint32_t bcn_replay_cnt;
4443 } wmi_host_pmf_bcn_protect_stats;
4444 
4445 /**
4446  * struct wmi_unit_test_event - Structure corresponding to WMI Unit test event
4447  * @vdev_id: VDEV ID
4448  * @module_id: MODULE ID
4449  * @diag_token: Diag Token (the number that was generated in the unit-test cmd)
4450  * @flag: flag has 2 bits 0x1 indicates status, and 0x2 indicates done-bit
4451  * @payload_len: payload_len (blindly copied from payload_len field in WMI)
4452  * @buffer_len: actual number of data bytes in the variable data size TLV
4453  *              buffer_len is likely to be the nearest multiple of 4 (from
4454  *              payload_len). both buffer_len and payload_len need to be
4455  *              passed to wifitool so that the driver can be agnostic
4456  *              regarding these differences.
4457  * @buffer: data buffer
4458  */
4459 typedef struct {
4460 	uint32_t vdev_id;
4461 	uint32_t module_id;
4462 	uint32_t diag_token;
4463 	uint32_t flag;
4464 	uint32_t payload_len;
4465 	uint32_t buffer_len;
4466 	uint8_t buffer[1];
4467 } wmi_unit_test_event;
4468 
4469 
4470 /**
4471  * struct wmi_host_snr_info - WMI host Signal to noise ration info
4472  * @bcn_snr: beacon SNR
4473  * @dat_snr: Data frames SNR
4474  */
4475 typedef struct {
4476 	int32_t bcn_snr;
4477 	int32_t dat_snr;
4478 } wmi_host_snr_info;
4479 
4480 #define WMI_HOST_MAX_TX_RATE_VALUES	10	/*Max Tx Rates */
4481 #define WMI_HOST_MAX_RSSI_VALUES	10	/*Max Rssi values */
4482 
4483 /* The WLAN_MAX_AC macro cannot be changed without breaking
4484  *  * WMI compatibility.
4485  *   * The maximum value of access category
4486  *	*/
4487 #define WMI_HOST_WLAN_MAX_AC  4
4488 
4489 /* The WMI_HOST_MAX_CHAINS macro cannot be changed without breaking WMI
4490  * compatibility.
4491  * The maximum value of number of chains
4492  */
4493 #define WMI_HOST_MAX_CHAINS   8
4494 
4495 /**
4496  * struct wmi_host_vdev_stats - vdev stats structure
4497  * @vdev_id: unique id identifying the VDEV, generated by the caller
4498  *        Rest all Only TLV
4499  * @vdev_snr: wmi_host_snr_info
4500  * @tx_frm_cnt: Total number of packets(per AC) that were successfully
4501  *              transmitted (with and without retries,
4502  *              including multi-cast, broadcast)
4503  * @rx_frm_cnt: Total number of packets that were successfully received
4504  *             (after appropriate filter rules including multi-cast, broadcast)
4505  * @multiple_retry_cnt: The number of MSDU packets and MMPDU frames per AC
4506  *      that the 802.11 station successfully transmitted after
4507  *      more than one retransmission attempt
4508  * @fail_cnt: Total number packets(per AC) failed to transmit
4509  * @rts_fail_cnt: Total number of RTS/CTS sequence failures for transmission
4510  *      of a packet
4511  * @rts_succ_cnt: Total number of RTS/CTS sequence success for transmission
4512  *      of a packet
4513  * @rx_err_cnt: The receive error count. HAL will provide the
4514  *      RxP FCS error global
4515  * @rx_discard_cnt: The sum of the receive error count and
4516  *      dropped-receive-buffer error count (FCS error)
4517  * @ack_fail_cnt: Total number packets failed transmit because of no
4518  *      ACK from the remote entity
4519  * @tx_rate_history:History of last ten transmit rate, in units of 500 kbit/sec
4520  * @bcn_rssi_history: History of last ten Beacon rssi of the connected Bss
4521  */
4522 typedef struct {
4523 	uint32_t vdev_id;
4524 	/* Rest all Only TLV */
4525 	wmi_host_snr_info vdev_snr;
4526 	uint32_t tx_frm_cnt[WMI_HOST_WLAN_MAX_AC];
4527 	uint32_t rx_frm_cnt;
4528 	uint32_t multiple_retry_cnt[WMI_HOST_WLAN_MAX_AC];
4529 	uint32_t fail_cnt[WMI_HOST_WLAN_MAX_AC];
4530 	uint32_t rts_fail_cnt;
4531 	uint32_t rts_succ_cnt;
4532 	uint32_t rx_err_cnt;
4533 	uint32_t rx_discard_cnt;
4534 	uint32_t ack_fail_cnt;
4535 	uint32_t tx_rate_history[WMI_HOST_MAX_TX_RATE_VALUES];
4536 	uint32_t bcn_rssi_history[WMI_HOST_MAX_RSSI_VALUES];
4537 } wmi_host_vdev_stats;
4538 
4539 /**
4540  * struct wmi_host_vdev_stats - vdev stats structure
4541  * @vdev_id: unique id identifying the VDEV, generated by the caller
4542  * @tx_bcn_succ_cnt: Total number of beacon frame transmitted successfully
4543  * @tx_bcn_outage_cnt: Total number of failed beacons
4544  */
4545 typedef struct {
4546 	uint32_t vdev_id;
4547 	uint32_t tx_bcn_succ_cnt;
4548 	uint32_t tx_bcn_outage_cnt;
4549 } wmi_host_bcn_stats;
4550 
4551 /**
4552  * struct wmi_host_vdev_extd_stats - VDEV extended stats
4553  * @vdev_id: unique id identifying the VDEV, generated by the caller
4554  * @ppdu_aggr_cnt: No of Aggrs Queued to HW
4555  * @ppdu_noack: No of PPDU's not Acked includes both aggr and nonaggr's
4556  * @mpdu_queued: No of MPDU/Subframes's queued to HW in Aggregates
4557  * @ppdu_nonaggr_cnt: No of NonAggr/MPDU/Subframes's queued to HW
4558  *         in Legacy NonAggregates
4559  * @mpdu_sw_requed: No of MPDU/Subframes's SW requeued includes
4560  *         both Aggr and NonAggr
4561  * @mpdu_suc_retry: No of MPDU/Subframes's transmitted Successfully
4562  *         after Single/mul HW retry
4563  * @mpdu_suc_multitry: No of MPDU/Subframes's transmitted Success
4564  *         after Multiple HW retry
4565  * @mpdu_fail_retry: No of MPDU/Subframes's failed transmission
4566  *         after Multiple HW retry
4567  * @reserved[13]: for future extensions set to 0x0
4568  */
4569 typedef struct {
4570 	uint32_t vdev_id;
4571 	uint32_t ppdu_aggr_cnt;
4572 	uint32_t ppdu_noack;
4573 	uint32_t mpdu_queued;
4574 	uint32_t ppdu_nonaggr_cnt;
4575 	uint32_t mpdu_sw_requed;
4576 	uint32_t mpdu_suc_retry;
4577 	uint32_t mpdu_suc_multitry;
4578 	uint32_t mpdu_fail_retry;
4579 	uint32_t reserved[13];
4580 } wmi_host_vdev_extd_stats;
4581 
4582 /**
4583  * struct wmi_host_vdev_prb_fils_stats - VDEV probe response fils stats
4584  * @vdev_id: unique id identifying the VDEV, generated by the caller
4585  * @fd_succ_cnt: Total number of successfully transmitted Fils Discovery frames
4586  * @fd_fail_cnt: Toatl number of Fils discovery failed count
4587  * @unsolicited_prb_succ_cnt: Successful unsolicited probe response frames cnt
4588  * @unsolicited_prb_fail_cnt: Failed unsolictied probe response frames cnt
4589  */
4590 struct wmi_host_vdev_prb_fils_stats {
4591 	uint32_t vdev_id;
4592 	uint32_t fd_succ_cnt;
4593 	uint32_t fd_fail_cnt;
4594 	uint32_t unsolicited_prb_succ_cnt;
4595 	uint32_t unsolicited_prb_fail_cnt;
4596 };
4597 
4598 /**
4599  * struct wmi_host_vdev_nac_rssi_event - VDEV nac rssi stats
4600  * @vdev_id: unique id identifying the VDEV, generated by the caller
4601  * @last_rssi: rssi
4602  * @avg_rssi: averge rssi
4603  * @rssi_seq_num: rssi sequence number
4604  */
4605 struct wmi_host_vdev_nac_rssi_event {
4606 	uint32_t vdev_id;
4607 	uint32_t last_rssi;
4608 	uint32_t avg_rssi;
4609 	uint32_t rssi_seq_num;
4610 };
4611 
4612 /**
4613  * structure wmi_host_peer_retry_stats - peer retry stats
4614  * @peer_macaddr: peer macaddr
4615  * @retry_counter_wraparnd_ind: wraparound counter indication
4616  * @msdu_success: successfully transmitted msdus
4617  * @msdu_retried: Retried msdus
4618  * @msdu_mul_retried: msdus retried for more than once
4619  * @msdu_failed: msdus failed
4620  * @reserved: for furure extensions
4621  */
4622 struct wmi_host_peer_retry_stats {
4623 	wmi_host_mac_addr peer_macaddr;
4624 	uint32_t retry_counter_wraparnd_ind;
4625 	uint32_t msdus_success;
4626 	uint32_t msdus_retried;
4627 	uint32_t msdus_mul_retried;
4628 	uint32_t msdus_failed;
4629 	uint32_t reserved[4];
4630 };
4631 
4632 /**
4633  * struct wmi_host_per_chain_rssi_stats - VDEV nac rssi stats
4634  * @vdev_id: unique id identifying the VDEV, generated by the caller
4635  * @rssi_avg_beacon: per chain avg rssi for beacon
4636  * @rssi_avg_data: per chain avg rssi for data
4637  * @peer_macaddr: peer macaddr
4638  */
4639 struct wmi_host_per_chain_rssi_stats {
4640 	uint32_t vdev_id;
4641 	int32_t rssi_avg_beacon[WMI_HOST_MAX_CHAINS];
4642 	int32_t rssi_avg_data[WMI_HOST_MAX_CHAINS];
4643 	wmi_host_mac_addr peer_macaddr;
4644 };
4645 
4646 /**
4647  * struct wmi_host_peer_stats - peer stats
4648  * @peer_macaddr: peer MAC address
4649  * @peer_rssi: rssi
4650  * @peer_rssi_seq_num: rssi sequence number
4651  * @peer_tx_rate: last tx data rate used for peer
4652  * @peer_rx_rate: last rx data rate used for peer
4653  * @currentper: Current PER
4654  * @retries: Retries happened during transmission
4655  * @txratecount: Maximum Aggregation Size
4656  * @max4msframelen: Max4msframelen of tx rates used
4657  * @totalsubframes: Total no of subframes
4658  * @txbytes: No of bytes transmitted to the client
4659  * @nobuffs[4]: Packet Loss due to buffer overflows
4660  * @excretries[4]: Packet Loss due to excessive retries
4661  * @peer_rssi_changed: how many times peer's RSSI changed by a
4662  *        non-negligible amount
4663  */
4664 typedef struct {
4665 	wmi_host_mac_addr peer_macaddr;
4666 	int8_t  peer_rssi;
4667 	uint32_t  peer_rssi_seq_num;
4668 	uint32_t  peer_tx_rate;
4669 	uint32_t  peer_rx_rate;
4670 	uint32_t  currentper;
4671 	uint32_t  retries;
4672 	uint32_t  txratecount;
4673 	uint32_t  max4msframelen;
4674 	uint32_t  totalsubframes;
4675 	uint32_t txbytes;
4676 	uint32_t  nobuffs[4];
4677 	uint32_t  excretries[4];
4678 	uint32_t  peer_rssi_changed;
4679 } wmi_host_peer_stats;
4680 
4681 typedef struct {
4682 	uint32_t dummy;
4683 } wmi_host_bcnflt_stats;
4684 
4685 /**
4686  * struct wmi_host_chan_stats - WMI chan stats
4687  * @chan_mhz: Primary channel freq of the channel for which stats are sent
4688  * @sampling_period_us: Time spent on the channel
4689  * @rx_clear_count: Aggregate duration over a sampling period for
4690  *       which channel activity was observed
4691  * @tx_duration_us: Accumalation of the TX PPDU duration over a sampling period
4692  * @rx_duration_us: Accumalation of the RX PPDU duration over a sampling period
4693  */
4694 typedef struct {
4695 	uint32_t chan_mhz;
4696 	uint32_t sampling_period_us;
4697 	uint32_t rx_clear_count;
4698 	uint32_t tx_duration_us;
4699 	uint32_t rx_duration_us;
4700 } wmi_host_chan_stats;
4701 
4702 #ifdef FEATURE_WLAN_TIME_SYNC_FTM
4703 
4704 #define FTM_TIME_SYNC_QTIME_PAIR_MAX 32
4705 
4706 /**
4707  * struct ftm_time_sync_start_stop_param- Get wlan time sync ftm info
4708  * @vdev_id: vdev id
4709  * @timer_interval: periodicity to trigger wlan time sync strobe
4710  * @num_reads: Number of times to trigger wlabn time sync strobe
4711  * @qtime: ref Qtimer value
4712  * @mac_time: ref Mac timer value
4713  */
4714 struct ftm_time_sync_start_stop_params {
4715 	uint32_t vdev_id;
4716 	uint32_t timer_interval;
4717 	uint32_t num_reads;
4718 	uint64_t qtime;
4719 	uint64_t mac_time;
4720 };
4721 
4722 /**
4723  * struct wlan_time_sync_qtime_pair- Get wlan time sync qtime pair value
4724  * @vdev_id: vdev id
4725  * @qtime_initiator: qtimer value of initiator
4726  * @qtime_target: qtimer value of target
4727  */
4728 struct wlan_time_sync_qtime_pair {
4729 	uint64_t qtime_initiator;
4730 	uint64_t qtime_target;
4731 };
4732 
4733 /**
4734  * struct ftm_time_sync_offset- Get ftm time sync offset
4735  * @vdev_id: vdev id
4736  * @num_qtime: number of qtime values received
4737  * @pairs: array of qtime pairs
4738  */
4739 struct ftm_time_sync_offset {
4740 	uint32_t vdev_id;
4741 	uint32_t num_qtime;
4742 	struct wlan_time_sync_qtime_pair pairs[FTM_TIME_SYNC_QTIME_PAIR_MAX];
4743 };
4744 #endif
4745 
4746 /**
4747  * struct wmi_host_tsf_event_- Get tsf event info
4748  * @vdev_id: vdev id
4749  * @tsf: tsf
4750  * @tsf_low: low 32bit of tsf
4751  * @tsf_high: high 32 bit of tsf
4752  * @qtimer_low: low 32 bits of qtimer
4753  * @qtimer_high: high 32 bits of qtimer
4754  * @tsf_id: TSF ID for the current vdev
4755  * @tsf_id_valid: is TSF valid
4756  * @mac_id: MAC identifier
4757  * @mac_id_valid: is MAC id valid
4758  * @wlan_global_tsf_low: low 32 bits of wlan global tsf
4759  * @wlan_global_tsf_high: high 32 bits of wlan global tsf
4760  */
4761 struct wmi_host_tsf_event {
4762 	uint32_t vdev_id;
4763 	uint64_t tsf;
4764 	uint32_t tsf_low;
4765 	uint32_t tsf_high;
4766 	uint32_t qtimer_low;
4767 	uint32_t qtimer_high;
4768 	uint32_t tsf_id;
4769 	uint32_t tsf_id_valid;
4770 	uint32_t mac_id;
4771 	uint32_t mac_id_valid;
4772 	uint32_t wlan_global_tsf_low;
4773 	uint32_t wlan_global_tsf_high;
4774 	uint32_t tqm_timer_low;
4775 	uint32_t tqm_timer_high;
4776 	uint32_t use_tqm_timer;
4777 };
4778 
4779 /**
4780  * struct wmi_host_peer_adv_stats - peer adv stats event structure
4781  * @avg_chan_lat_per_ac: average channel latency
4782  * @estimated_air_time_per_ac: Percentage of air time available for each AC
4783  * BIT[0-7]   : AC_BE
4784  * BIT[8-15]  : AC_BK
4785  * BIT[16-23] : AC_VI
4786  * BIT[24-31] : AC_VO
4787  */
4788 struct wmi_host_pdev_telemetry_stats {
4789 	uint32_t avg_chan_lat_per_ac[WIFI_AC_MAX];
4790 	uint32_t estimated_air_time_per_ac;
4791 };
4792 
4793 #define WMI_EVENT_ID_INVALID 0
4794 /**
4795  * Host based ENUM IDs for events to abstract target enums for event_id
4796  */
4797 typedef enum {
4798 	wmi_service_ready_event_id = 0,
4799 	wmi_ready_event_id,
4800 	wmi_dbg_msg_event_id,
4801 	wmi_scan_event_id,
4802 	wmi_echo_event_id,
4803 	wmi_update_stats_event_id,
4804 	wmi_inst_rssi_stats_event_id,
4805 	wmi_vdev_start_resp_event_id,
4806 	wmi_vdev_standby_req_event_id,
4807 	wmi_vdev_resume_req_event_id,
4808 	wmi_vdev_stopped_event_id,
4809 	wmi_peer_sta_kickout_event_id,
4810 	wmi_host_swba_event_id,
4811 	wmi_tbttoffset_update_event_id,
4812 	wmi_mgmt_rx_event_id,
4813 	wmi_chan_info_event_id,
4814 	wmi_phyerr_event_id,
4815 	wmi_roam_event_id,
4816 	wmi_profile_match,
4817 	wmi_debug_print_event_id,
4818 	wmi_pdev_qvit_event_id,
4819 	wmi_wlan_profile_data_event_id,
4820 	wmi_rtt_meas_report_event_id,
4821 	wmi_tsf_meas_report_event_id,
4822 	wmi_rtt_error_report_event_id,
4823 	wmi_rtt_keepalive_event_id,
4824 	wmi_oem_cap_event_id,
4825 	wmi_oem_meas_report_event_id,
4826 	wmi_oem_report_event_id,
4827 	wmi_nan_event_id,
4828 	wmi_wow_wakeup_host_event_id,
4829 	wmi_gtk_offload_status_event_id,
4830 	wmi_gtk_rekey_fail_event_id,
4831 	wmi_dcs_interference_event_id,
4832 	wmi_pdev_tpc_config_event_id,
4833 	wmi_csa_handling_event_id,
4834 	wmi_gpio_input_event_id,
4835 	wmi_peer_ratecode_list_event_id,
4836 	wmi_generic_buffer_event_id,
4837 	wmi_mcast_buf_release_event_id,
4838 	wmi_mcast_list_ageout_event_id,
4839 	wmi_vdev_get_keepalive_event_id,
4840 	wmi_wds_peer_event_id,
4841 	wmi_peer_sta_ps_statechg_event_id,
4842 	wmi_pdev_fips_event_id,
4843 	wmi_tt_stats_event_id,
4844 	wmi_pdev_channel_hopping_event_id,
4845 	wmi_pdev_ani_cck_level_event_id,
4846 	wmi_pdev_ani_ofdm_level_event_id,
4847 	wmi_pdev_reserve_ast_entry_event_id,
4848 	wmi_pdev_nfcal_power_event_id,
4849 	wmi_pdev_tpc_event_id,
4850 	wmi_pdev_get_ast_info_event_id,
4851 	wmi_pdev_temperature_event_id,
4852 	wmi_pdev_nfcal_power_all_channels_event_id,
4853 	wmi_pdev_bss_chan_info_event_id,
4854 	wmi_mu_report_event_id,
4855 	wmi_pdev_utf_event_id,
4856 	wmi_pdev_dump_event_id,
4857 	wmi_tx_pause_event_id,
4858 	wmi_dfs_radar_event_id,
4859 	wmi_pdev_l1ss_track_event_id,
4860 	wmi_service_ready_ext_event_id,
4861 	wmi_vdev_install_key_complete_event_id,
4862 	wmi_vdev_mcc_bcn_intvl_change_req_event_id,
4863 	wmi_vdev_tsf_report_event_id,
4864 	wmi_peer_info_event_id,
4865 	wmi_peer_tx_fail_cnt_thr_event_id,
4866 	wmi_peer_estimated_linkspeed_event_id,
4867 	wmi_peer_state_event_id,
4868 	wmi_offload_bcn_tx_status_event_id,
4869 	wmi_offload_prob_resp_tx_status_event_id,
4870 	wmi_mgmt_tx_completion_event_id,
4871 	wmi_tx_delba_complete_event_id,
4872 	wmi_tx_addba_complete_event_id,
4873 	wmi_ba_rsp_ssn_event_id,
4874 	wmi_aggr_state_trig_event_id,
4875 	wmi_roam_synch_event_id,
4876 	wmi_roam_synch_frame_event_id,
4877 	wmi_p2p_disc_event_id,
4878 	wmi_p2p_noa_event_id,
4879 	wmi_p2p_lo_stop_event_id,
4880 	wmi_vdev_add_macaddr_rx_filter_event_id,
4881 	wmi_pdev_resume_event_id,
4882 	wmi_d0_wow_disable_ack_event_id,
4883 	wmi_wow_initial_wakeup_event_id,
4884 	wmi_stats_ext_event_id,
4885 	wmi_iface_link_stats_event_id,
4886 	wmi_peer_link_stats_event_id,
4887 	wmi_radio_link_stats_link,
4888 	wmi_update_fw_mem_dump_event_id,
4889 	wmi_diag_event_id_log_supported_event_id,
4890 	wmi_nlo_match_event_id,
4891 	wmi_nlo_scan_complete_event_id,
4892 	wmi_apfind_event_id,
4893 	wmi_passpoint_match_event_id,
4894 	wmi_chatter_pc_query_event_id,
4895 	wmi_pdev_ftm_intg_event_id,
4896 	wmi_wlan_freq_avoid_event_id,
4897 	wmi_thermal_mgmt_event_id,
4898 	wmi_diag_container_event_id,
4899 	wmi_host_auto_shutdown_event_id,
4900 	wmi_update_whal_mib_stats_event_id,
4901 	wmi_update_vdev_rate_stats_event_id,
4902 	wmi_diag_event_id,
4903 	wmi_unit_test_event_id,
4904 	wmi_ocb_set_sched_event_id,
4905 	wmi_dbg_mesg_flush_complete_event_id,
4906 	wmi_rssi_breach_event_id,
4907 	wmi_uploadh_event_id,
4908 	wmi_captureh_event_id,
4909 	wmi_rfkill_state_change_event_id,
4910 	wmi_tdls_peer_event_id,
4911 	wmi_batch_scan_enabled_event_id,
4912 	wmi_batch_scan_result_event_id,
4913 	wmi_lpi_result_event_id,
4914 	wmi_lpi_status_event_id,
4915 	wmi_lpi_handoff_event_id,
4916 	wmi_extscan_start_stop_event_id,
4917 	wmi_extscan_operation_event_id,
4918 	wmi_extscan_table_usage_event_id,
4919 	wmi_extscan_cached_results_event_id,
4920 	wmi_extscan_wlan_change_results_event_id,
4921 	wmi_extscan_hotlist_match_event_id,
4922 	wmi_extscan_capabilities_event_id,
4923 	wmi_extscan_hotlist_ssid_match_event_id,
4924 	wmi_mdns_stats_event_id,
4925 	wmi_sap_ofl_add_sta_event_id,
4926 	wmi_sap_ofl_del_sta_event_id,
4927 	wmi_ocb_set_config_resp_event_id,
4928 	wmi_ocb_get_tsf_timer_resp_event_id,
4929 	wmi_dcc_get_stats_resp_event_id,
4930 	wmi_dcc_update_ndl_resp_event_id,
4931 	wmi_dcc_stats_event_id,
4932 	wmi_soc_set_hw_mode_resp_event_id,
4933 	wmi_soc_hw_mode_transition_event_id,
4934 	wmi_soc_set_dual_mac_config_resp_event_id,
4935 	wmi_tx_data_traffic_ctrl_event_id,
4936 	wmi_peer_tx_mu_txmit_count_event_id,
4937 	wmi_peer_gid_userpos_list_event_id,
4938 	wmi_pdev_check_cal_version_event_id,
4939 	wmi_atf_peer_stats_event_id,
4940 	wmi_peer_delete_response_event_id,
4941 	wmi_peer_delete_all_response_event_id,
4942 	wmi_pdev_csa_switch_count_status_event_id,
4943 	wmi_reg_chan_list_cc_event_id,
4944 	wmi_reg_chan_list_cc_ext_event_id,
4945 #ifdef CONFIG_AFC_SUPPORT
4946 	wmi_afc_event_id,
4947 #endif
4948 	wmi_offchan_data_tx_completion_event,
4949 	wmi_dfs_cac_complete_id,
4950 	wmi_dfs_radar_detection_event_id,
4951 	wmi_ext_tbttoffset_update_event_id,
4952 	wmi_11d_new_country_event_id,
4953 	wmi_get_arp_stats_req_id,
4954 	wmi_service_available_event_id,
4955 	wmi_update_rcpi_event_id,
4956 	wmi_pdev_wds_entry_list_event_id,
4957 	wmi_ndp_initiator_rsp_event_id,
4958 	wmi_ndp_indication_event_id,
4959 	wmi_ndp_confirm_event_id,
4960 	wmi_ndp_responder_rsp_event_id,
4961 	wmi_ndp_end_indication_event_id,
4962 	wmi_ndp_end_rsp_event_id,
4963 	wmi_nan_dmesg_event_id,
4964 	wmi_ndl_schedule_update_event_id,
4965 	wmi_ndp_event_id,
4966 	wmi_oem_response_event_id,
4967 	wmi_peer_stats_info_event_id,
4968 	wmi_pdev_chip_power_stats_event_id,
4969 	wmi_ap_ps_egap_info_event_id,
4970 	wmi_peer_assoc_conf_event_id,
4971 	wmi_vdev_delete_resp_event_id,
4972 	wmi_apf_capability_info_event_id,
4973 	wmi_vdev_encrypt_decrypt_data_rsp_event_id,
4974 	wmi_report_rx_aggr_failure_event_id,
4975 	wmi_pdev_chip_pwr_save_failure_detect_event_id,
4976 	wmi_peer_antdiv_info_event_id,
4977 	wmi_pdev_set_hw_mode_rsp_event_id,
4978 	wmi_pdev_hw_mode_transition_event_id,
4979 	wmi_pdev_set_mac_config_resp_event_id,
4980 	wmi_coex_bt_activity_event_id,
4981 	wmi_mgmt_tx_bundle_completion_event_id,
4982 	wmi_radio_tx_power_level_stats_event_id,
4983 	wmi_report_stats_event_id,
4984 	wmi_dma_buf_release_event_id,
4985 	wmi_sap_obss_detection_report_event_id,
4986 	wmi_obss_color_collision_report_event_id,
4987 	wmi_host_swfda_event_id,
4988 	wmi_sar_get_limits_event_id,
4989 	wmi_pdev_div_rssi_antid_event_id,
4990 #if defined(WLAN_DFS_PARTIAL_OFFLOAD) && defined(HOST_DFS_SPOOF_TEST)
4991 	wmi_host_dfs_status_check_event_id,
4992 #endif
4993 #ifdef WLAN_SUPPORT_TWT
4994 	wmi_twt_enable_complete_event_id,
4995 	wmi_twt_disable_complete_event_id,
4996 	wmi_twt_add_dialog_complete_event_id,
4997 	wmi_twt_del_dialog_complete_event_id,
4998 	wmi_twt_pause_dialog_complete_event_id,
4999 	wmi_twt_resume_dialog_complete_event_id,
5000 	wmi_twt_nudge_dialog_complete_event_id,
5001 	wmi_twt_session_stats_event_id,
5002 	wmi_twt_notify_event_id,
5003 	wmi_twt_ack_complete_event_id,
5004 #endif
5005 	wmi_apf_get_vdev_work_memory_resp_event_id,
5006 	wmi_roam_scan_stats_event_id,
5007 	wmi_vdev_ocac_complete_event_id,
5008 
5009 #ifdef OL_ATH_SMART_LOGGING
5010 	wmi_debug_fatal_condition_eventid,
5011 #endif /* OL_ATH_SMART_LOGGING */
5012 	wmi_wlan_sar2_result_event_id,
5013 	wmi_esp_estimate_event_id,
5014 	wmi_pdev_ctl_failsafe_check_event_id,
5015 	wmi_vdev_bcn_reception_stats_event_id,
5016 	wmi_roam_denylist_event_id,
5017 	wmi_wlm_stats_event_id,
5018 	wmi_peer_cfr_capture_event_id,
5019 	wmi_pdev_cold_boot_cal_event_id,
5020 	wmi_vdev_get_mws_coex_state_eventid,
5021 	wmi_vdev_get_mws_coex_dpwb_state_eventid,
5022 	wmi_vdev_get_mws_coex_tdm_state_eventid,
5023 	wmi_vdev_get_mws_coex_idrx_state_eventid,
5024 	wmi_vdev_get_mws_coex_antenna_sharing_state_eventid,
5025 #ifdef WLAN_FEATURE_INTEROP_ISSUES_AP
5026 	wmi_pdev_interop_issues_ap_event_id,
5027 #endif
5028 	wmi_coex_report_antenna_isolation_event_id,
5029 	wmi_chan_rf_characterization_info_event_id,
5030 	wmi_roam_auth_offload_event_id,
5031 	wmi_service_ready_ext2_event_id,
5032 	wmi_get_elna_bypass_event_id,
5033 	wmi_motion_det_host_eventid,
5034 	wmi_motion_det_base_line_host_eventid,
5035 	wmi_get_ani_level_event_id,
5036 	wmi_peer_tx_pn_response_event_id,
5037 	wmi_roam_stats_event_id,
5038 	wmi_oem_data_event_id,
5039 	wmi_mgmt_offload_data_event_id,
5040 	wmi_pdev_multi_vdev_restart_response_event_id,
5041 	wmi_roam_pmkid_request_event_id,
5042 #ifdef FEATURE_WLAN_TIME_SYNC_FTM
5043 	wmi_wlan_time_sync_ftm_start_stop_event_id,
5044 	wmi_wlan_time_sync_q_initiator_target_offset_eventid,
5045 #endif
5046 	wmi_roam_scan_chan_list_id,
5047 	wmi_muedca_params_config_eventid,
5048 	wmi_pdev_sscan_fw_param_eventid,
5049 	wmi_roam_cap_report_event_id,
5050 	wmi_vdev_bcn_latency_event_id,
5051 	wmi_vdev_disconnect_event_id,
5052 	wmi_peer_create_conf_event_id,
5053 	wmi_pdev_cp_fwstats_eventid,
5054 	wmi_pdev_halphy_fwstats_eventid,
5055 	wmi_vdev_send_big_data_p2_eventid,
5056 	wmi_pdev_get_dpd_status_event_id,
5057 #ifdef WLAN_FEATURE_PKT_CAPTURE_V2
5058 	wmi_vdev_smart_monitor_event_id,
5059 #endif
5060 	wmi_pdev_get_halphy_cal_status_event_id,
5061 	wmi_pdev_set_halphy_cal_event_id,
5062 	wmi_pdev_aoa_phasedelta_event_id,
5063 #ifdef WLAN_MGMT_RX_REO_SUPPORT
5064 	wmi_mgmt_rx_fw_consumed_eventid,
5065 #endif
5066 #ifdef WLAN_FEATURE_11BE_MLO
5067 	wmi_mlo_setup_complete_event_id,
5068 	wmi_mlo_teardown_complete_event_id,
5069 	wmi_mlo_link_set_active_resp_eventid,
5070 #endif
5071 	wmi_pdev_fips_extend_event_id,
5072 	wmi_roam_frame_event_id,
5073 #ifdef WLAN_FEATURE_DYNAMIC_MAC_ADDR_UPDATE
5074 	wmi_vdev_update_mac_addr_conf_eventid,
5075 #endif
5076 #ifdef WLAN_FEATURE_11BE_MLO
5077 	wmi_vdev_quiet_offload_eventid,
5078 #endif
5079 #ifdef WLAN_FEATURE_MCC_QUOTA
5080 	wmi_resmgr_chan_time_quota_changed_eventid,
5081 #endif
5082 	wmi_peer_rx_pn_response_event_id,
5083 	wmi_extract_pktlog_decode_info_eventid,
5084 #ifdef QCA_RSSI_DB2DBM
5085 	wmi_pdev_rssi_dbm_conversion_params_info_eventid,
5086 #endif
5087 #ifdef MULTI_CLIENT_LL_SUPPORT
5088 	wmi_vdev_latency_event_id,
5089 #endif
5090 #if defined(WIFI_POS_CONVERGED) && defined(WLAN_FEATURE_RTT_11AZ_SUPPORT)
5091 	wmi_rtt_pasn_peer_create_req_eventid,
5092 	wmi_rtt_pasn_peer_delete_eventid,
5093 #endif
5094 #ifdef WLAN_VENDOR_HANDOFF_CONTROL
5095 	wmi_get_roam_vendor_control_param_event_id,
5096 #endif
5097 #ifdef WLAN_FEATURE_DBAM_CONFIG
5098 	wmi_coex_dbam_complete_event_id,
5099 #endif
5100 	wmi_spectral_capabilities_eventid,
5101 	wmi_events_max,
5102 } wmi_conv_event_id;
5103 
5104 #define WMI_UNAVAILABLE_PARAM 0
5105 /**
5106  * Host based ENUM IDs for PDEV params to abstract target enums
5107  */
5108 typedef enum {
5109 	wmi_pdev_param_tx_chain_mask = 0,
5110 	wmi_pdev_param_rx_chain_mask,
5111 	wmi_pdev_param_txpower_limit2g,
5112 	wmi_pdev_param_txpower_limit5g,
5113 	wmi_pdev_param_txpower_scale,
5114 	wmi_pdev_param_beacon_gen_mode,
5115 	wmi_pdev_param_beacon_tx_mode,
5116 	wmi_pdev_param_resmgr_offchan_mode,
5117 	wmi_pdev_param_protection_mode,
5118 	wmi_pdev_param_dynamic_bw,
5119 	wmi_pdev_param_non_agg_sw_retry_th,
5120 	wmi_pdev_param_agg_sw_retry_th,
5121 	wmi_pdev_param_sta_kickout_th,
5122 	wmi_pdev_param_ac_aggrsize_scaling,
5123 	wmi_pdev_param_ltr_enable,
5124 	wmi_pdev_param_ltr_ac_latency_be,
5125 	wmi_pdev_param_ltr_ac_latency_bk,
5126 	wmi_pdev_param_ltr_ac_latency_vi,
5127 	wmi_pdev_param_ltr_ac_latency_vo,
5128 	wmi_pdev_param_ltr_ac_latency_timeout,
5129 	wmi_pdev_param_ltr_sleep_override,
5130 	wmi_pdev_param_ltr_rx_override,
5131 	wmi_pdev_param_ltr_tx_activity_timeout,
5132 	wmi_pdev_param_l1ss_enable,
5133 	wmi_pdev_param_dsleep_enable,
5134 	wmi_pdev_param_pcielp_txbuf_flush,
5135 	wmi_pdev_param_pcielp_txbuf_watermark,
5136 	wmi_pdev_param_pcielp_txbuf_tmo_en,
5137 	wmi_pdev_param_pcielp_txbuf_tmo_value,
5138 	wmi_pdev_param_pdev_stats_update_period,
5139 	wmi_pdev_param_vdev_stats_update_period,
5140 	wmi_pdev_param_peer_stats_update_period,
5141 	wmi_pdev_param_bcnflt_stats_update_period,
5142 	wmi_pdev_param_pmf_qos,
5143 	wmi_pdev_param_arp_ac_override,
5144 	wmi_pdev_param_dcs,
5145 	wmi_pdev_param_ani_enable,
5146 	wmi_pdev_param_ani_poll_period,
5147 	wmi_pdev_param_ani_listen_period,
5148 	wmi_pdev_param_ani_ofdm_level,
5149 	wmi_pdev_param_ani_cck_level,
5150 	wmi_pdev_param_dyntxchain,
5151 	wmi_pdev_param_proxy_sta,
5152 	wmi_pdev_param_idle_ps_config,
5153 	wmi_pdev_param_power_gating_sleep,
5154 	wmi_pdev_param_aggr_burst,
5155 	wmi_pdev_param_rx_decap_mode,
5156 	wmi_pdev_param_fast_channel_reset,
5157 	wmi_pdev_param_burst_dur,
5158 	wmi_pdev_param_burst_enable,
5159 	wmi_pdev_param_smart_antenna_default_antenna,
5160 	wmi_pdev_param_igmpmld_override,
5161 	wmi_pdev_param_igmpmld_tid,
5162 	wmi_pdev_param_antenna_gain,
5163 	wmi_pdev_param_rx_filter,
5164 	wmi_pdev_set_mcast_to_ucast_tid,
5165 	wmi_pdev_param_proxy_sta_mode,
5166 	wmi_pdev_param_set_mcast2ucast_mode,
5167 	wmi_pdev_param_set_mcast2ucast_buffer,
5168 	wmi_pdev_param_remove_mcast2ucast_buffer,
5169 	wmi_pdev_peer_sta_ps_statechg_enable,
5170 	wmi_pdev_param_block_interbss,
5171 	wmi_pdev_param_set_disable_reset_cmdid,
5172 	wmi_pdev_param_set_msdu_ttl_cmdid,
5173 	wmi_pdev_param_set_ppdu_duration_cmdid,
5174 	wmi_pdev_param_txbf_sound_period_cmdid,
5175 	wmi_pdev_param_set_promisc_mode_cmdid,
5176 	wmi_pdev_param_set_burst_mode_cmdid,
5177 	wmi_pdev_param_en_stats,
5178 	wmi_pdev_param_mu_group_policy,
5179 	wmi_pdev_param_noise_detection,
5180 	wmi_pdev_param_noise_threshold,
5181 	wmi_pdev_param_dpd_enable,
5182 	wmi_pdev_param_set_mcast_bcast_echo,
5183 	wmi_pdev_param_atf_strict_sch,
5184 	wmi_pdev_param_atf_sched_duration,
5185 	wmi_pdev_param_ant_plzn,
5186 	wmi_pdev_param_mgmt_retry_limit,
5187 	wmi_pdev_param_sensitivity_level,
5188 	wmi_pdev_param_signed_txpower_2g,
5189 	wmi_pdev_param_signed_txpower_5g,
5190 	wmi_pdev_param_enable_per_tid_amsdu,
5191 	wmi_pdev_param_enable_per_tid_ampdu,
5192 	wmi_pdev_param_cca_threshold,
5193 	wmi_pdev_param_rts_fixed_rate,
5194 	wmi_pdev_param_cal_period,
5195 	wmi_pdev_param_pdev_reset,
5196 	wmi_pdev_param_wapi_mbssid_offset,
5197 	wmi_pdev_param_arp_srcaddr,
5198 	wmi_pdev_param_arp_dstaddr,
5199 	wmi_pdev_param_txpower_decr_db,
5200 	wmi_pdev_param_rx_batchmode,
5201 	wmi_pdev_param_packet_aggr_delay,
5202 	wmi_pdev_param_atf_obss_noise_sch,
5203 	wmi_pdev_param_atf_obss_noise_scaling_factor,
5204 	wmi_pdev_param_cust_txpower_scale,
5205 	wmi_pdev_param_atf_dynamic_enable,
5206 	wmi_pdev_param_atf_ssid_group_policy,
5207 	wmi_pdev_param_rfkill_enable,
5208 	wmi_pdev_param_hw_rfkill_config,
5209 	wmi_pdev_param_low_power_rf_enable,
5210 	wmi_pdev_param_l1ss_track,
5211 	wmi_pdev_param_hyst_en,
5212 	wmi_pdev_param_power_collapse_enable,
5213 	wmi_pdev_param_led_sys_state,
5214 	wmi_pdev_param_led_enable,
5215 	wmi_pdev_param_audio_over_wlan_latency,
5216 	wmi_pdev_param_audio_over_wlan_enable,
5217 	wmi_pdev_param_whal_mib_stats_update_enable,
5218 	wmi_pdev_param_vdev_rate_stats_update_period,
5219 	wmi_pdev_param_cts_cbw,
5220 	wmi_pdev_param_wnts_config,
5221 	wmi_pdev_param_adaptive_early_rx_enable,
5222 	wmi_pdev_param_adaptive_early_rx_min_sleep_slop,
5223 	wmi_pdev_param_adaptive_early_rx_inc_dec_step,
5224 	wmi_pdev_param_early_rx_fix_sleep_slop,
5225 	wmi_pdev_param_bmiss_based_adaptive_bto_enable,
5226 	wmi_pdev_param_bmiss_bto_min_bcn_timeout,
5227 	wmi_pdev_param_bmiss_bto_inc_dec_step,
5228 	wmi_pdev_param_bto_fix_bcn_timeout,
5229 	wmi_pdev_param_ce_based_adaptive_bto_enable,
5230 	wmi_pdev_param_ce_bto_combo_ce_value,
5231 	wmi_pdev_param_tx_chain_mask_2g,
5232 	wmi_pdev_param_rx_chain_mask_2g,
5233 	wmi_pdev_param_tx_chain_mask_5g,
5234 	wmi_pdev_param_rx_chain_mask_5g,
5235 	wmi_pdev_param_tx_chain_mask_cck,
5236 	wmi_pdev_param_tx_chain_mask_1ss,
5237 	wmi_pdev_param_enable_btcoex,
5238 	wmi_pdev_param_atf_peer_stats,
5239 	wmi_pdev_param_btcoex_cfg,
5240 	wmi_pdev_param_mesh_mcast_enable,
5241 	wmi_pdev_param_tx_ack_timeout,
5242 	wmi_pdev_param_soft_tx_chain_mask,
5243 	wmi_pdev_param_cck_tx_enable,
5244 	wmi_pdev_param_esp_indication_period,
5245 	wmi_pdev_param_antenna_gain_half_db,
5246 	wmi_pdev_param_ru26_allowed,
5247 	wmi_pdev_param_esp_ba_window,
5248 	wmi_pdev_param_esp_airtime_fraction,
5249 	wmi_pdev_param_esp_ppdu_duration,
5250 	wmi_pdev_param_use_nol,
5251 	wmi_pdev_param_enable_peer_retry_stats,
5252 	wmi_pdev_param_ul_trig_int,
5253 	wmi_pdev_param_sub_channel_marking,
5254 	wmi_pdev_param_ul_ppdu_duration,
5255 	wmi_pdev_param_equal_ru_allocation_enable,
5256 	wmi_pdev_param_per_peer_prd_cfr_enable,
5257 	wmi_pdev_param_nav_override_config,
5258 	wmi_pdev_param_set_mgmt_ttl,
5259 	wmi_pdev_param_set_prb_rsp_ttl,
5260 	wmi_pdev_param_set_mu_ppdu_duration,
5261 	wmi_pdev_param_set_tbtt_ctrl,
5262 	wmi_pdev_param_set_cmd_obss_pd_threshold,
5263 	wmi_pdev_param_set_cmd_obss_pd_per_ac,
5264 	wmi_pdev_param_set_cong_ctrl_max_msdus,
5265 	wmi_pdev_param_enable_fw_dynamic_he_edca,
5266 	wmi_pdev_param_enable_srp,
5267 	wmi_pdev_param_enable_sr_prohibit,
5268 	wmi_pdev_param_sr_trigger_margin,
5269 	wmi_pdev_param_pream_punct_bw,
5270 	wmi_pdev_param_enable_mbssid_ctrl_frame,
5271 	wmi_pdev_param_set_mesh_params,
5272 	wmi_pdev_param_mpd_userpd_ssr,
5273 	wmi_pdev_param_low_latency_mode,
5274 	wmi_pdev_param_scan_radio_tx_on_dfs,
5275 	wmi_pdev_param_en_probe_all_bw,
5276 	wmi_pdev_param_obss_min_duration_check_for_sr,
5277 	wmi_pdev_param_truncate_sr,
5278 	wmi_pdev_param_ctrl_frame_obss_pd_threshold,
5279 	wmi_pdev_param_rate_upper_cap,
5280 	wmi_pdev_param_rate_retry_mcs_drop,
5281 	wmi_pdev_param_mcs_probe_intvl,
5282 	wmi_pdev_param_nss_probe_intvl,
5283 	wmi_pdev_param_max,
5284 } wmi_conv_pdev_params_id;
5285 
5286 
5287 /**
5288  * Host based ENUM IDs for VDEV params to abstract target enums
5289  */
5290 typedef enum {
5291 	wmi_vdev_param_rts_threshold = 0,
5292 	wmi_vdev_param_fragmentation_threshold,
5293 	wmi_vdev_param_beacon_interval,
5294 	wmi_vdev_param_listen_interval,
5295 	wmi_vdev_param_multicast_rate,
5296 	wmi_vdev_param_mgmt_tx_rate,
5297 	wmi_vdev_param_slot_time,
5298 	wmi_vdev_param_preamble,
5299 	wmi_vdev_param_swba_time,
5300 	wmi_vdev_stats_update_period,
5301 	wmi_vdev_pwrsave_ageout_time,
5302 	wmi_vdev_host_swba_interval,
5303 	wmi_vdev_param_dtim_period,
5304 	wmi_vdev_oc_scheduler_air_time_limit,
5305 	wmi_vdev_param_wds,
5306 	wmi_vdev_param_atim_window,
5307 	wmi_vdev_param_bmiss_count_max,
5308 	wmi_vdev_param_bmiss_first_bcnt,
5309 	wmi_vdev_param_bmiss_final_bcnt,
5310 	wmi_vdev_param_feature_wmm,
5311 	wmi_vdev_param_chwidth,
5312 	wmi_vdev_param_chextoffset,
5313 	wmi_vdev_param_disable_htprotection,
5314 	wmi_vdev_param_sta_quickkickout,
5315 	wmi_vdev_param_mgmt_rate,
5316 	wmi_vdev_param_protection_mode,
5317 	wmi_vdev_param_fixed_rate,
5318 	wmi_vdev_param_sgi,
5319 	wmi_vdev_param_ldpc,
5320 	wmi_vdev_param_tx_stbc,
5321 	wmi_vdev_param_rx_stbc,
5322 	wmi_vdev_param_intra_bss_fwd,
5323 	wmi_vdev_param_def_keyid,
5324 	wmi_vdev_param_nss,
5325 	wmi_vdev_param_bcast_data_rate,
5326 	wmi_vdev_param_mcast_data_rate,
5327 	wmi_vdev_param_mcast_indicate,
5328 	wmi_vdev_param_dhcp_indicate,
5329 	wmi_vdev_param_unknown_dest_indicate,
5330 	wmi_vdev_param_ap_keepalive_min_idle_inactive_time_secs,
5331 	wmi_vdev_param_ap_keepalive_max_idle_inactive_time_secs,
5332 	wmi_vdev_param_ap_keepalive_max_unresponsive_time_secs,
5333 	wmi_vdev_param_ap_enable_nawds,
5334 	wmi_vdev_param_mcast2ucast_set,
5335 	wmi_vdev_param_enable_rtscts,
5336 	wmi_vdev_param_rc_num_retries,
5337 	wmi_vdev_param_txbf,
5338 	wmi_vdev_param_packet_powersave,
5339 	wmi_vdev_param_drop_unencry,
5340 	wmi_vdev_param_tx_encap_type,
5341 	wmi_vdev_param_ap_detect_out_of_sync_sleeping_sta_time_secs,
5342 	wmi_vdev_param_cabq_maxdur,
5343 	wmi_vdev_param_mfptest_set,
5344 	wmi_vdev_param_rts_fixed_rate,
5345 	wmi_vdev_param_vht_sgimask,
5346 	wmi_vdev_param_vht80_ratemask,
5347 	wmi_vdev_param_early_rx_adjust_enable,
5348 	wmi_vdev_param_early_rx_tgt_bmiss_num,
5349 	wmi_vdev_param_early_rx_bmiss_sample_cycle,
5350 	wmi_vdev_param_early_rx_slop_step,
5351 	wmi_vdev_param_early_rx_init_slop,
5352 	wmi_vdev_param_early_rx_adjust_pause,
5353 	wmi_vdev_param_proxy_sta,
5354 	wmi_vdev_param_meru_vc,
5355 	wmi_vdev_param_rx_decap_type,
5356 	wmi_vdev_param_bw_nss_ratemask,
5357 	wmi_vdev_param_sensor_ap,
5358 	wmi_vdev_param_beacon_rate,
5359 	wmi_vdev_param_dtim_enable_cts,
5360 	wmi_vdev_param_sta_kickout,
5361 	wmi_vdev_param_tx_pwrlimit,
5362 	wmi_vdev_param_snr_num_for_cal,
5363 	wmi_vdev_param_roam_fw_offload,
5364 	wmi_vdev_param_enable_rmc,
5365 	wmi_vdev_param_ibss_max_bcn_lost_ms,
5366 	wmi_vdev_param_max_rate,
5367 	wmi_vdev_param_early_rx_drift_sample,
5368 	wmi_vdev_param_set_ibss_tx_fail_cnt_thr,
5369 	wmi_vdev_param_ebt_resync_timeout,
5370 	wmi_vdev_param_aggr_trig_event_enable,
5371 	wmi_vdev_param_is_ibss_power_save_allowed,
5372 	wmi_vdev_param_is_power_collapse_allowed,
5373 	wmi_vdev_param_is_awake_on_txrx_enabled,
5374 	wmi_vdev_param_inactivity_cnt,
5375 	wmi_vdev_param_txsp_end_inactivity_time_ms,
5376 	wmi_vdev_param_dtim_policy,
5377 	wmi_vdev_param_ibss_ps_warmup_time_secs,
5378 	wmi_vdev_param_ibss_ps_1rx_chain_in_atim_window_enable,
5379 	wmi_vdev_param_rx_leak_window,
5380 	wmi_vdev_param_stats_avg_factor,
5381 	wmi_vdev_param_disconnect_th,
5382 	wmi_vdev_param_rtscts_rate,
5383 	wmi_vdev_param_mcc_rtscts_protection_enable,
5384 	wmi_vdev_param_mcc_broadcast_probe_enable,
5385 	wmi_vdev_param_capabilities,
5386 	wmi_vdev_param_mgmt_tx_power,
5387 	wmi_vdev_param_atf_ssid_sched_policy,
5388 	wmi_vdev_param_disable_dyn_bw_rts,
5389 	wmi_vdev_param_ampdu_subframe_size_per_ac,
5390 	wmi_vdev_param_he_dcm_enable,
5391 	wmi_vdev_param_he_bss_color,
5392 	wmi_vdev_param_he_range_ext_enable,
5393 	wmi_vdev_param_set_hemu_mode,
5394 	wmi_vdev_param_set_he_ltf,
5395 	wmi_vdev_param_set_heop,
5396 	wmi_vdev_param_disable_cabq,
5397 	wmi_vdev_param_rate_dropdown_bmap,
5398 	wmi_vdev_param_tx_power,
5399 	wmi_vdev_param_set_ba_mode,
5400 	wmi_vdev_param_autorate_misc_cfg,
5401 	wmi_vdev_param_amsdu_subframe_size_per_ac,
5402 	wmi_vdev_param_set_he_sounding_mode,
5403 	wmi_vdev_param_sifs_trigger_rate,
5404 	wmi_vdev_param_ul_shortgi,
5405 	wmi_vdev_param_ul_he_ltf,
5406 	wmi_vdev_param_ul_nss,
5407 	wmi_vdev_param_ul_ppdu_bw,
5408 	wmi_vdev_param_ul_ldpc,
5409 	wmi_vdev_param_ul_stbc,
5410 	wmi_vdev_param_ul_fixed_rate,
5411 	wmi_vdev_param_rawmode_open_war,
5412 	wmi_vdev_param_max_mtu_size,
5413 	wmi_vdev_param_mcast_rc_stale_period,
5414 	wmi_vdev_param_enable_multi_group_key,
5415 	wmi_vdev_param_max_group_keys,
5416 	wmi_vdev_param_enable_mcast_rc,
5417 	wmi_vdev_param_6ghz_params,
5418 	wmi_vdev_param_enable_disable_roam_reason_vsie,
5419 	wmi_vdev_param_set_cmd_obss_pd_threshold,
5420 	wmi_vdev_param_set_cmd_obss_pd_per_ac,
5421 	wmi_vdev_param_enable_srp,
5422 	wmi_vdev_param_nan_config_features,
5423 	wmi_vdev_param_enable_disable_rtt_responder_role,
5424 	wmi_vdev_param_enable_disable_rtt_initiator_role,
5425 	wmi_vdev_param_mcast_steer,
5426 #ifdef WLAN_FEATURE_11BE
5427 	wmi_vdev_param_set_ehtop,
5428 	wmi_vdev_param_set_eht_mu_mode,
5429 	wmi_vdev_param_set_eht_puncturing_mode,
5430 	wmi_vdev_param_set_eht_ltf,
5431 	wmi_vdev_param_set_ul_eht_ltf,
5432 	wmi_vdev_param_set_eht_dcm,
5433 	wmi_vdev_param_set_eht_range_ext,
5434 	wmi_vdev_param_set_non_data_eht_range_ext,
5435 #endif
5436 #ifdef MULTI_CLIENT_LL_SUPPORT
5437 	wmi_vdev_param_set_normal_latency_flags_config,
5438 	wmi_vdev_param_set_xr_latency_flags_config,
5439 	wmi_vdev_param_set_low_latency_flags_config,
5440 	wmi_vdev_param_set_ultra_low_latency_flags_config,
5441 	wmi_vdev_param_set_normal_latency_ul_dl_config,
5442 	wmi_vdev_param_set_xr_latency_ul_dl_config,
5443 	wmi_vdev_param_set_low_latency_ul_dl_config,
5444 	wmi_vdev_param_set_ultra_low_latency_ul_dl_config,
5445 	wmi_vdev_param_set_default_ll_config,
5446 	wmi_vdev_param_set_multi_client_ll_feature_config,
5447 #endif
5448 	wmi_vdev_param_set_traffic_config,
5449 } wmi_conv_vdev_param_id;
5450 
5451 /**
5452  * Host based ENUM IDs for service bits to abstract target enums
5453  */
5454 typedef enum {
5455 	wmi_service_beacon_offload = 0,
5456 	wmi_service_scan_offload,
5457 	wmi_service_roam_offload,
5458 	wmi_service_bcn_miss_offload,
5459 	wmi_service_sta_pwrsave,
5460 	wmi_service_sta_advanced_pwrsave,
5461 	wmi_service_ap_uapsd,
5462 	wmi_service_ap_dfs,
5463 	wmi_service_11ac,
5464 	wmi_service_blockack,
5465 	wmi_service_phyerr,
5466 	wmi_service_bcn_filter,
5467 	wmi_service_rtt,
5468 	wmi_service_ratectrl,
5469 	wmi_service_wow,
5470 	wmi_service_ratectrl_cache,
5471 	wmi_service_iram_tids,
5472 	wmi_service_burst,
5473 	wmi_service_smart_antenna_sw_support,
5474 	wmi_service_gtk_offload,
5475 	wmi_service_scan_sch,
5476 	wmi_service_csa_offload,
5477 	wmi_service_chatter,
5478 	wmi_service_coex_freqavoid,
5479 	wmi_service_packet_power_save,
5480 	wmi_service_force_fw_hang,
5481 	wmi_service_smart_antenna_hw_support,
5482 	wmi_service_gpio,
5483 	wmi_sta_uapsd_basic_auto_trig,
5484 	wmi_sta_uapsd_var_auto_trig,
5485 	wmi_service_sta_keep_alive,
5486 	wmi_service_tx_encap,
5487 	wmi_service_ap_ps_detect_out_of_sync,
5488 	wmi_service_early_rx,
5489 	wmi_service_enhanced_proxy_sta,
5490 	wmi_service_tt,
5491 	wmi_service_atf,
5492 	wmi_service_peer_caching,
5493 	wmi_service_coex_gpio,
5494 	wmi_service_aux_spectral_intf,
5495 	wmi_service_aux_chan_load_intf,
5496 	wmi_service_bss_channel_info_64,
5497 	wmi_service_ext_res_cfg_support,
5498 	wmi_service_mesh,
5499 	wmi_service_restrt_chnl_support,
5500 	wmi_service_roam_scan_offload,
5501 	wmi_service_arpns_offload,
5502 	wmi_service_nlo,
5503 	wmi_service_sta_dtim_ps_modulated_dtim,
5504 	wmi_service_sta_smps,
5505 	wmi_service_fwtest,
5506 	wmi_service_sta_wmmac,
5507 	wmi_service_tdls,
5508 	wmi_service_mcc_bcn_interval_change,
5509 	wmi_service_adaptive_ocs,
5510 	wmi_service_ba_ssn_support,
5511 	wmi_service_filter_ipsec_natkeepalive,
5512 	wmi_service_wlan_hb,
5513 	wmi_service_lte_ant_share_support,
5514 	wmi_service_batch_scan,
5515 	wmi_service_qpower,
5516 	wmi_service_plmreq,
5517 	wmi_service_thermal_mgmt,
5518 	wmi_service_rmc,
5519 	wmi_service_mhf_offload,
5520 	wmi_service_coex_sar,
5521 	wmi_service_bcn_txrate_override,
5522 	wmi_service_nan,
5523 	wmi_service_l1ss_stat,
5524 	wmi_service_estimate_linkspeed,
5525 	wmi_service_obss_scan,
5526 	wmi_service_tdls_offchan,
5527 	wmi_service_tdls_uapsd_buffer_sta,
5528 	wmi_service_tdls_uapsd_sleep_sta,
5529 	wmi_service_ibss_pwrsave,
5530 	wmi_service_lpass,
5531 	wmi_service_extscan,
5532 	wmi_service_d0wow,
5533 	wmi_service_hsoffload,
5534 	wmi_service_roam_ho_offload,
5535 	wmi_service_rx_full_reorder,
5536 	wmi_service_dhcp_offload,
5537 	wmi_service_sta_rx_ipa_offload_support,
5538 	wmi_service_mdns_offload,
5539 	wmi_service_sap_auth_offload,
5540 	wmi_service_dual_band_simultaneous_support,
5541 	wmi_service_ocb,
5542 	wmi_service_ap_arpns_offload,
5543 	wmi_service_per_band_chainmask_support,
5544 	wmi_service_packet_filter_offload,
5545 	wmi_service_mgmt_tx_htt,
5546 	wmi_service_mgmt_tx_wmi,
5547 	wmi_service_ext_msg,
5548 	wmi_service_mawc,
5549 
5550 	wmi_service_peer_stats,
5551 	wmi_service_mesh_11s,
5552 	wmi_service_periodic_chan_stat_support,
5553 	wmi_service_tx_mode_push_only,
5554 	wmi_service_tx_mode_push_pull,
5555 	wmi_service_tx_mode_dynamic,
5556 	wmi_service_check_cal_version,
5557 	wmi_service_btcoex_duty_cycle,
5558 	wmi_service_4_wire_coex_support,
5559 	wmi_service_multiple_vdev_restart,
5560 	wmi_service_peer_assoc_conf,
5561 	wmi_service_egap,
5562 	wmi_service_sta_pmf_offload,
5563 	wmi_service_unified_wow_capability,
5564 	wmi_service_enterprise_mesh,
5565 	wmi_service_apf_offload,
5566 	wmi_service_sync_delete_cmds,
5567 	wmi_service_ratectrl_limit_max_min_rates,
5568 	wmi_service_nan_data,
5569 	wmi_service_nan_rtt,
5570 	wmi_service_11ax,
5571 	wmi_service_deprecated_replace,
5572 	wmi_service_tdls_conn_tracker_in_host_mode,
5573 	wmi_service_enhanced_mcast_filter,
5574 	wmi_service_half_rate_quarter_rate_support,
5575 	wmi_service_vdev_rx_filter,
5576 	wmi_service_p2p_listen_offload_support,
5577 	wmi_service_mark_first_wakeup_packet,
5578 	wmi_service_multiple_mcast_filter_set,
5579 	wmi_service_host_managed_rx_reorder,
5580 	wmi_service_flash_rdwr_support,
5581 	wmi_service_wlan_stats_report,
5582 	wmi_service_tx_msdu_id_new_partition_support,
5583 	wmi_service_dfs_phyerr_offload,
5584 	wmi_service_rcpi_support,
5585 	wmi_service_fw_mem_dump_support,
5586 	wmi_service_peer_stats_info,
5587 	wmi_service_regulatory_db,
5588 	wmi_service_11d_offload,
5589 	wmi_service_hw_data_filtering,
5590 	wmi_service_pkt_routing,
5591 	wmi_service_offchan_tx_wmi,
5592 	wmi_service_chan_load_info,
5593 	wmi_service_extended_nss_support,
5594 	wmi_service_ack_timeout,
5595 	wmi_service_widebw_scan,
5596 	wmi_service_bcn_offload_start_stop_support,
5597 	wmi_service_offchan_data_tid_support,
5598 	wmi_service_support_dma,
5599 	wmi_service_8ss_tx_bfee,
5600 	wmi_service_fils_support,
5601 	wmi_service_mawc_support,
5602 	wmi_service_wow_wakeup_by_timer_pattern,
5603 	wmi_service_11k_neighbour_report_support,
5604 	wmi_service_ap_obss_detection_offload,
5605 	wmi_service_bss_color_offload,
5606 	wmi_service_gmac_offload_support,
5607 	wmi_service_host_dfs_check_support,
5608 	wmi_service_dual_beacon_on_single_mac_scc_support,
5609 	wmi_service_dual_beacon_on_single_mac_mcc_support,
5610 	wmi_service_twt_requestor,
5611 	wmi_service_twt_responder,
5612 	wmi_service_listen_interval_offload_support,
5613 
5614 #ifdef OL_ATH_SMART_LOGGING
5615 	wmi_service_smart_logging_support,
5616 #endif
5617 	wmi_service_infra_mbssid,
5618 	wmi_service_esp_support,
5619 	wmi_service_obss_spatial_reuse,
5620 	wmi_service_per_vdev_chain_support,
5621 	wmi_service_new_htt_msg_format,
5622 	wmi_service_peer_unmap_cnf_support,
5623 	wmi_service_beacon_reception_stats,
5624 	wmi_service_vdev_latency_config,
5625 	wmi_service_nan_dbs_support,
5626 	wmi_service_ndi_dbs_support,
5627 	wmi_service_nan_sap_support,
5628 	wmi_service_ndi_sap_support,
5629 	wmi_service_nan_disable_support,
5630 	wmi_service_sta_plus_sta_support,
5631 	wmi_service_hw_db2dbm_support,
5632 	wmi_service_wlm_stats_support,
5633 	wmi_service_ul_ru26_allowed,
5634 	wmi_service_cfr_capture_support,
5635 	wmi_service_bcast_twt_support,
5636 	wmi_service_wpa3_ft_sae_support,
5637 	wmi_service_wpa3_ft_suite_b_support,
5638 	wmi_service_ft_fils,
5639 	wmi_service_adaptive_11r_support,
5640 	wmi_service_data_stall_recovery_support,
5641 	wmi_service_tx_compl_tsf64,
5642 	wmi_service_vdev_delete_all_peer,
5643 	wmi_service_three_way_coex_config_legacy,
5644 	wmi_service_rx_fse_support,
5645 	wmi_service_dynamic_hw_mode,
5646 	wmi_service_sae_roam_support,
5647 	wmi_service_owe_roam_support,
5648 	wmi_service_ext2_msg,
5649 	wmi_service_6ghz_support,
5650 	wmi_service_bw_165mhz_support,
5651 	wmi_service_bw_restricted_80p80_support,
5652 	wmi_service_packet_capture_support,
5653 	wmi_service_nan_vdev,
5654 	wmi_service_multiple_vdev_restart_ext,
5655 	wmi_service_peer_delete_no_peer_flush_tids_cmd,
5656 	wmi_service_time_sync_ftm,
5657 	wmi_service_nss_ratio_to_host_support,
5658 	wmi_roam_scan_chan_list_to_host_support,
5659 	wmi_beacon_protection_support,
5660 	wmi_service_sta_nan_ndi_four_port,
5661 	wmi_service_host_scan_stop_vdev_all,
5662 	wmi_service_ema_ap_support,
5663 	wmi_support_extend_address,
5664 	wmi_service_srg_srp_spatial_reuse_support,
5665 	wmi_service_suiteb_roam_support,
5666 	wmi_service_no_interband_mcc_support,
5667 	wmi_service_dual_sta_roam_support,
5668 	wmi_service_peer_create_conf,
5669 	wmi_service_configure_roam_trigger_param_support,
5670 	wmi_service_5dot9_ghz_support,
5671 	wmi_service_cfr_ta_ra_as_fp_support,
5672 	wmi_service_cfr_capture_count_support,
5673 	wmi_service_ocv_support,
5674 	wmi_service_ll_stats_per_chan_rx_tx_time,
5675 	wmi_service_thermal_multi_client_support,
5676 	wmi_service_mbss_param_in_vdev_start_support,
5677 	wmi_service_fse_cmem_alloc_support,
5678 #ifdef FEATURE_CLUB_LL_STATS_AND_GET_STATION
5679 	wmi_service_get_station_in_ll_stats_req,
5680 #endif
5681 	wmi_service_scan_conf_per_ch_support,
5682 	wmi_service_csa_beacon_template,
5683 	wmi_service_twt_bcast_req_support,
5684 	wmi_service_twt_bcast_resp_support,
5685 	wmi_service_spectral_scan_disabled,
5686 #ifdef WLAN_SUPPORT_TWT
5687 	wmi_service_twt_nudge,
5688 	wmi_service_all_twt,
5689 	wmi_service_twt_statistics,
5690 #endif
5691 	wmi_service_wapi_concurrency_supported,
5692 	wmi_service_sap_connected_d3_wow,
5693 	wmi_service_go_connected_d3_wow,
5694 	wmi_service_ext_tpc_reg_support,
5695 	wmi_service_ndi_txbf_support,
5696 	wmi_service_reg_cc_ext_event_support,
5697 #if defined(CONFIG_BAND_6GHZ)
5698 	wmi_service_lower_6g_edge_ch_supp,
5699 	wmi_service_disable_upper_6g_edge_ch_supp,
5700 #endif
5701 	wmi_service_dcs_awgn_int_support,
5702 #ifdef WLAN_FEATURE_IGMP_OFFLOAD
5703 	wmi_service_igmp_offload_support,
5704 #endif
5705 #ifdef WLAN_FEATURE_11BE
5706 	wmi_service_11be,
5707 #endif
5708 #ifdef WLAN_FEATURE_11AX
5709 #ifdef FEATURE_WLAN_TDLS
5710 	wmi_service_tdls_ax_support,
5711 #endif
5712 #endif
5713 #ifdef WLAN_FEATURE_BIG_DATA_STATS
5714 	wmi_service_big_data_support,
5715 #endif
5716 	wmi_service_sae_eapol_offload_support,
5717 	wmi_service_ampdu_tx_buf_size_256_support,
5718 	wmi_service_halphy_cal_enable_disable_support,
5719 	wmi_service_halphy_cal_status,
5720 	wmi_service_rtt_ap_initiator_staggered_mode_supported,
5721 	wmi_service_rtt_ap_initiator_bursted_mode_supported,
5722 	wmi_service_ema_multiple_group_supported,
5723 	wmi_service_large_beacon_supported,
5724 	wmi_service_aoa_for_rcc_supported,
5725 #ifdef WLAN_FEATURE_P2P_P2P_STA
5726 	wmi_service_p2p_p2p_cc_support,
5727 #endif
5728 #ifdef THERMAL_STATS_SUPPORT
5729 	wmi_service_thermal_stats_temp_range_supported,
5730 #endif
5731 	wmi_service_hw_mode_policy_offload_support,
5732 	wmi_service_mgmt_rx_reo_supported,
5733 	wmi_service_phy_dma_byte_swap_support,
5734 	wmi_service_spectral_session_info_support,
5735 	wmi_service_umac_hang_recovery_support,
5736 	wmi_service_mu_snif,
5737 #ifdef WLAN_FEATURE_DYNAMIC_MAC_ADDR_UPDATE
5738 	wmi_service_dynamic_update_vdev_macaddr_support,
5739 #endif
5740 	wmi_service_probe_all_bw_support,
5741 	wmi_service_pno_scan_conf_per_ch_support,
5742 #ifdef QCA_UNDECODED_METADATA_SUPPORT
5743 	wmi_service_fp_phy_err_filter_support,
5744 #endif
5745 #ifdef WLAN_FEATURE_11BE_MLO
5746 	wmi_service_mlo_sta_nan_ndi_support,
5747 #endif
5748 	wmi_service_pdev_rate_config_support,
5749 	wmi_service_multi_peer_group_cmd_support,
5750 #ifdef WLAN_FEATURE_11BE
5751 	wmi_service_radar_found_chan_freq_eq_center_freq,
5752 #endif
5753 	wmi_service_pn_replay_check_support,
5754 #ifdef QCA_RSSI_DB2DBM
5755 	wmi_service_pdev_rssi_dbm_conv_event_support,
5756 #endif
5757 #ifdef WIFI_POS_CONVERGED
5758 	wmi_service_rtt_11az_mac_phy_sec_support,
5759 	wmi_service_rtt_11az_mac_sec_support,
5760 	wmi_service_rtt_11az_ntb_support,
5761 	wmi_service_rtt_11az_tb_support,
5762 #endif
5763 	wmi_service_pktlog_decode_info_support,
5764 #ifdef WLAN_FEATURE_ROAM_OFFLOAD
5765 	wmi_service_roam_stats_per_candidate_frame_info,
5766 #endif
5767 #ifdef MULTI_CLIENT_LL_SUPPORT
5768 	wmi_service_configure_multi_client_ll_support,
5769 #endif
5770 #ifdef WLAN_VENDOR_HANDOFF_CONTROL
5771 	wmi_service_configure_vendor_handoff_control_support,
5772 #endif
5773 #ifdef FEATURE_WLAN_TDLS
5774 #ifdef WLAN_FEATURE_11AX
5775 	wmi_service_tdls_6g_support,
5776 #endif
5777 	wmi_service_tdls_wideband_support,
5778 #endif
5779 	wmi_service_is_my_mgmt_frame,
5780 	wmi_service_linkspeed_roam_trigger_support,
5781 
5782 	wmi_services_max,
5783 } wmi_conv_service_ids;
5784 #define WMI_SERVICE_UNAVAILABLE 0xFFFF
5785 
5786 /**
5787  * enum WMI_DBG_PARAM - Debug params
5788  * @WMI_DBGLOG_LOG_LEVEL: Set the loglevel
5789  * @WMI_DBGLOG_VAP_ENABLE:  Enable VAP level debug
5790  * @WMI_DBGLOG_VAP_DISABLE: Disable VAP level debug
5791  * @WMI_DBGLOG_MODULE_ENABLE: Enable MODULE level debug
5792  * @WMI_DBGLOG_MODULE_DISABLE: Disable MODULE level debug
5793  * @WMI_DBGLOG_MOD_LOG_LEVEL: Enable MODULE level debug
5794  * @WMI_DBGLOG_TYPE: set type of the debug output
5795  * @WMI_DBGLOG_REPORT_ENABLE: Enable Disable debug
5796  * @WMI_DBGLOG_MOD_WOW_LOG_LEVEL: set the WOW MODULE debug loglevel
5797  */
5798 typedef enum {
5799 	WMI_DBGLOG_LOG_LEVEL = 0x1,
5800 	WMI_DBGLOG_VAP_ENABLE,
5801 	WMI_DBGLOG_VAP_DISABLE,
5802 	WMI_DBGLOG_MODULE_ENABLE,
5803 	WMI_DBGLOG_MODULE_DISABLE,
5804 	WMI_DBGLOG_MOD_LOG_LEVEL,
5805 	WMI_DBGLOG_TYPE,
5806 	WMI_DBGLOG_REPORT_ENABLE,
5807 	WMI_DBGLOG_MOD_WOW_LOG_LEVEL
5808 } WMI_DBG_PARAM;
5809 
5810 /**
5811  * struct wmi_host_fw_ver - FW version in non-tlv target
5812  * @sw_version: Versin info
5813  * @sw_version_1: Second dword of version
5814  */
5815 struct wmi_host_fw_ver {
5816 	uint32_t    sw_version;
5817 	uint32_t    sw_version_1;
5818 };
5819 
5820 /**
5821  * struct wmi_host_fw_abi_ver - FW version in non-tlv target
5822  * @sw_version: Versin info
5823  * @abi_version: ABI version
5824  */
5825 struct wmi_host_fw_abi_ver {
5826 	uint32_t    sw_version;
5827 	uint32_t    abi_version;
5828 };
5829 
5830 /**
5831  * struct target_resource_config - Resource config sent from host to target
5832  *               abstracted out to include union of both configs
5833  * @num_vdevs: Number vdevs configured
5834  * @num_peers: Number of peers
5835  * @num_active_peers: Number of active peers for peer cache
5836  * @num_offload_peers: Number of offload peers
5837  * @num_offload_reorder_buffs: number of offload reorder buffs
5838  * @num_peer_keys: number of peer keys
5839  * @num_tids: number of tids
5840  * @ast_skid_limit: AST skid limit
5841  * @tx_chain_mask: TX chain mask
5842  * @rx_chain_mask: RX chain mask
5843  * @rx_timeout_pri: RX reorder timeout per AC
5844  * @rx_decap_mode: RX decap mode
5845  * @scan_max_pending_req: Scan mac pending req
5846  * @bmiss_offload_max_vdev: Beacom miss offload max vdevs
5847  * @roam_offload_max_vdev: Roam offload max vdevs
5848  * @roam_offload_max_ap_profiles: roam offload max ap profiles
5849  * @num_mcast_groups: num mcast groups
5850  * @num_mcast_table_elems: number of macst table elems
5851  * @mcast2ucast_mode: mcast enhance mode
5852  * @tx_dbg_log_size: DBG log buf size
5853  * @num_wds_entries: number of WDS entries
5854  * @dma_burst_size: DMA burst size.
5855  * @mac_aggr_delim: Mac aggr delim
5856  * @rx_skip_defrag_timeout_dup_detection_check: Defrag dup check in host?
5857  * @vow_config: vow configuration
5858  * @gtk_offload_max_vdev: Max vdevs for GTK offload
5859  * @num_msdu_desc: Number of msdu desc
5860  * @max_frag_entries: Max frag entries
5861  * @agile_capability: Target Agile Capability
5862  *      End common
5863  * @enable_pci_gen: To enable pci gen switch
5864  * @max_peer_ext_stats: Max peer EXT stats
5865  * @smart_ant_cap: Smart antenna capabilities
5866  * @BK_Minfree: BIN configuration for BK traffic
5867  * @BE_Minfree: BIN configuration for BE traffic
5868  * @VI_Minfree: BIN configuration for VI traffic
5869  * @VO_Minfree: BIN configuration for VO traffic
5870  * @rx_batchmode: RX batch mode
5871  * @tt_support: Thermal throttling support
5872  * @atf_config: ATF config
5873  * @mgmt_comp_evt_bundle_support: bundle support required for mgmt complete evt
5874  * @tx_msdu_new_partition_id_support: new partiition id support for tx msdu
5875  * @peer_unmap_conf_support: peer unmap conf support in fw
5876  * @iphdr_pad_config: ipheader pad config
5877  * @qwrap_config: Qwrap configuration
5878  * @alloc_frag_desc_for_data_pkt: Frag desc for data
5879  *      Added in MCL
5880  * @num_tdls_vdevs:
5881  * @num_tdls_conn_table_entries:
5882  * @beacon_tx_offload_max_vdev:
5883  * @num_multicast_filter_entries:
5884  * @num_wow_filters:
5885  * @num_keep_alive_pattern:
5886  * @keep_alive_pattern_size:
5887  * @max_tdls_concurrent_sleep_sta:
5888  * @max_tdls_concurrent_buffer_sta:
5889  * @wmi_send_separate:
5890  * @num_ocb_vdevs:
5891  * @num_ocb_channels:
5892  * @num_ocb_schedules:
5893  * @num_packet_filters: maximum number of packet filter rules to support
5894  * @num_max_sta_vdevs: maximum number of concurrent station vdevs to support
5895  * @num_ns_ext_tuples_cfg:
5896  * @apf_instruction_size:
5897  * @max_bssid_rx_filters:
5898  * @use_pdev_id:
5899  * @max_num_dbs_scan_duty_cycle: max dbs can duty cycle value
5900  * @cce_disable: disable cce component
5901  * @peer_map_unmap_v2/peer_map_unmap_version: configure peer map/unmap version
5902  * @twt_ap_pdev_count: Number of MAC on which AP TWT feature is supported
5903  * @twt_ap_sta_count: Max no of STA with which TWT sessions can be formed
5904  *                    by the AP
5905  * @max_bssid_indicator: max number of MBSS VAPs
5906  * @three_way_coex_config_legacy_en: enable three way coex legacy feature
5907  * @max_num_group_keys: max number of group keys supported for VLAN
5908  * @re_ul_resp: enable 11ax UL response feature (UL-OFDMA) for repeater
5909  * @ipa_disable: disable IPA feature
5910  * @ast_1_valid_mask_enable: mask to enable ast index 1
5911  * @ast_2_valid_mask_enable: mask to enable ast index 2
5912  * @ast_3_valid_mask_enable: mask to enable ast index 3
5913  * @ast_0_flow_mask_enable: mask to enable flow support for ast index 0
5914  * @ast_1_flow_mask_enable: mask to enable flow support for ast index 1
5915  * @ast_2_flow_mask_enable: mask to enable flow support for ast index 2
5916  * @ast_3_flow_mask_enable: mask to enable flow support for ast index 3
5917  * @ast_tid_high_mask_enable: enable tid valid mask for high priority flow
5918  * @ast_tid_low_mask_enable: enable tid valid mask for low priority flow
5919  * @nan_separate_iface_support: Separate iface creation for NAN
5920  * @time_sync_ftm: enable ftm based time sync
5921  * @is_reg_cc_ext_event_supported: Flag to indicate if reg_cc_ext is supported
5922  * @max_rnr_neighbours: Max supported RNR neighbors in multisoc APs
5923  * @ema_max_vap_cnt: Number of maximum EMA tx-vaps at any instance of time
5924  * @ema_max_profile_period: Maximum EMA profile periodicity on any pdev
5925  * @max_ndp_sessions: Max ndp sessions support
5926  * @max_ndi: max number of ndi host supports
5927  * @carrier_vow_optmization: configure vow-optimization for carrier-usecase
5928  * @is_sap_connected_d3wow_enabled: is sap d3wow with connected client supported
5929  * @is_go_connected_d3wow_enabled: is go d3wow with connected client supported
5930  * @dynamic_pcie_gen_speed_change: is dynamic pcie gen speed change enabled
5931  * @is_6ghz_sp_pwrmode_supp_enabled: Indicates whether AP is capable of
5932  *                                   operating in SP Power mode in 6GHz.
5933  *                                   0 - AP can operate in non-SP power mode.
5934  *                                       Eg: LPI mode
5935  *                                   1 - AP can operate in all power modes,
5936  *                                       inclusive of SP power mode.
5937  * @afc_timer_check_disable: Disables AFC Timer related checks in FW
5938  * @afc_req_id_check_disable: Disables AFC Request ID check in FW
5939  * @afc_indoor_support: AFC support indoor deployment
5940  * @afc_outdoor_support: AFC support outdoor deployment
5941  * @carrier_profile_config: Configuration for per-carrier profile
5942  * @reo_qdesc_shared_addr_table_enabled: Reo shared qref enhancement enabled
5943  * @num_max_active_vdevs: max number of active virtual devices (VAPs) to
5944  * support
5945  * @notify_frame_support: capability to mark notify frames from host
5946  */
5947 typedef struct {
5948 	uint32_t num_vdevs;
5949 	uint32_t num_peers;
5950 	uint32_t num_active_peers;
5951 	uint32_t num_offload_peers;
5952 	uint32_t num_offload_reorder_buffs;
5953 	uint32_t num_peer_keys;
5954 	uint32_t num_tids;
5955 	uint32_t ast_skid_limit;
5956 	uint32_t tx_chain_mask;
5957 	uint32_t rx_chain_mask;
5958 	uint32_t rx_timeout_pri[4];
5959 	uint32_t rx_decap_mode;
5960 	uint32_t scan_max_pending_req;
5961 	uint32_t bmiss_offload_max_vdev;
5962 	uint32_t roam_offload_max_vdev;
5963 	uint32_t roam_offload_max_ap_profiles;
5964 	uint32_t num_mcast_groups;
5965 	uint32_t num_mcast_table_elems;
5966 	uint32_t mcast2ucast_mode;
5967 	uint32_t tx_dbg_log_size;
5968 	uint32_t num_wds_entries;
5969 	uint32_t dma_burst_size;
5970 	uint32_t mac_aggr_delim;
5971 	uint32_t rx_skip_defrag_timeout_dup_detection_check;
5972 	uint32_t vow_config;
5973 	uint32_t gtk_offload_max_vdev;
5974 	uint32_t num_msdu_desc; /* Number of msdu desc */
5975 	uint32_t max_frag_entries;
5976 	uint32_t scheduler_params;
5977 	uint32_t agile_capability;
5978 	uint32_t enable_pci_gen;
5979 	/* End common */
5980 
5981 	/* Added for Beeliner */
5982 	uint32_t max_peer_ext_stats;
5983 	uint32_t smart_ant_cap;
5984 	uint32_t BK_Minfree;
5985 	uint32_t BE_Minfree;
5986 	uint32_t VI_Minfree;
5987 	uint32_t VO_Minfree;
5988 	uint32_t rx_batchmode;
5989 	uint32_t tt_support;
5990 	uint32_t atf_config:1,
5991 		 mgmt_comp_evt_bundle_support:1,
5992 		 tx_msdu_new_partition_id_support:1,
5993 		 new_htt_msg_format:1,
5994 		 peer_unmap_conf_support:1,
5995 		 pktcapture_support:1;
5996 	uint32_t iphdr_pad_config;
5997 	uint32_t
5998 		qwrap_config:16,
5999 		alloc_frag_desc_for_data_pkt:16;
6000 
6001 	/* Added in MCL */
6002 	uint32_t num_tdls_vdevs;
6003 	uint32_t num_tdls_conn_table_entries;
6004 	uint32_t beacon_tx_offload_max_vdev;
6005 	uint32_t num_multicast_filter_entries;
6006 	uint32_t num_wow_filters;
6007 	uint32_t num_keep_alive_pattern;
6008 	uint32_t keep_alive_pattern_size;
6009 	uint32_t max_tdls_concurrent_sleep_sta;
6010 	uint32_t max_tdls_concurrent_buffer_sta;
6011 	uint32_t wmi_send_separate;
6012 	uint32_t num_ocb_vdevs;
6013 	uint32_t num_ocb_channels;
6014 	uint32_t num_ocb_schedules;
6015 	uint32_t num_packet_filters;
6016 	uint32_t num_max_sta_vdevs;
6017 	uint32_t num_ns_ext_tuples_cfg;
6018 	uint32_t apf_instruction_size;
6019 	uint32_t max_bssid_rx_filters;
6020 	uint32_t use_pdev_id;
6021 	uint32_t max_num_dbs_scan_duty_cycle;
6022 	bool cce_disable;
6023 	union {
6024 		bool peer_map_unmap_v2;
6025 		uint8_t peer_map_unmap_version;
6026 	};
6027 	uint32_t twt_ap_pdev_count;
6028 	uint32_t twt_ap_sta_count;
6029 	uint32_t max_bssid_indicator;
6030 	uint32_t eapol_minrate_set:1,
6031 		 eapol_minrate_ac_set:2;
6032 	bool tstamp64_en;
6033 	bool three_way_coex_config_legacy_en;
6034 	uint32_t max_num_group_keys;
6035 	uint32_t re_ul_resp;
6036 	bool ipa_disable;
6037 	uint32_t ast_1_valid_mask_enable:1,
6038 		 ast_2_valid_mask_enable:1,
6039 		 ast_3_valid_mask_enable:1;
6040 	uint32_t ast_0_flow_mask_enable:4,
6041 		 ast_1_flow_mask_enable:4,
6042 		 ast_2_flow_mask_enable:4,
6043 		 ast_3_flow_mask_enable:4,
6044 		 ast_tid_high_mask_enable:8,
6045 		 ast_tid_low_mask_enable:8;
6046 	bool nan_separate_iface_support;
6047 	bool time_sync_ftm;
6048 	bool is_reg_cc_ext_event_supported;
6049 	uint32_t max_rnr_neighbours;
6050 	uint32_t ema_max_vap_cnt;
6051 	uint32_t ema_max_profile_period;
6052 	uint32_t max_ndp_sessions;
6053 	uint32_t max_ndi;
6054 	bool carrier_vow_optimization;
6055 	uint32_t is_sap_connected_d3wow_enabled;
6056 	uint32_t is_go_connected_d3wow_enabled;
6057 	bool sae_eapol_offload;
6058 	bool dynamic_pcie_gen_speed_change;
6059 	bool twt_ack_support_cap;
6060 	uint32_t ema_init_config;
6061 	uint32_t target_cap_flags;
6062 	bool is_6ghz_sp_pwrmode_supp_enabled;
6063 	bool afc_timer_check_disable;
6064 	bool afc_req_id_check_disable;
6065 	bool afc_indoor_support;
6066 	bool afc_outdoor_support;
6067 	uint32_t carrier_profile_config;
6068 	bool sawf;
6069 	bool reo_qdesc_shared_addr_table_enabled;
6070 	uint32_t num_max_active_vdevs;
6071 	uint8_t notify_frame_support;
6072 } target_resource_config;
6073 
6074 /**
6075  * Enum replicated for host abstraction with FW
6076  */
6077 typedef enum {
6078 	/* Event respose of START CMD */
6079 	WMI_HOST_VDEV_START_RESP_EVENT = 0,
6080 	/* Event respose of RESTART CMD */
6081 	WMI_HOST_VDEV_RESTART_RESP_EVENT,
6082 } WMI_HOST_START_EVENT_PARAM;
6083 
6084 /**
6085  * struct wmi_host_roam_event - host roam event param
6086  * @vdev_id: vdev id
6087  * @reason: roam reason
6088  * @rssi: RSSI
6089  */
6090 typedef struct {
6091 	uint32_t vdev_id;
6092 	uint32_t reason;
6093 	uint32_t rssi;
6094 } wmi_host_roam_event;
6095 
6096 /**
6097  * ENUM wmi_host_scan_event_type - Scan event type
6098  */
6099 enum wmi_host_scan_event_type {
6100 	WMI_HOST_SCAN_EVENT_STARTED = 0x1,
6101 	WMI_HOST_SCAN_EVENT_COMPLETED = 0x2,
6102 	WMI_HOST_SCAN_EVENT_BSS_CHANNEL = 0x4,
6103 	WMI_HOST_SCAN_EVENT_FOREIGN_CHANNEL = 0x8,
6104 	WMI_HOST_SCAN_EVENT_DEQUEUED = 0x10,
6105 	WMI_HOST_SCAN_EVENT_PREEMPTED = 0x20,
6106 	WMI_HOST_SCAN_EVENT_START_FAILED = 0x40,
6107 	WMI_HOST_SCAN_EVENT_RESTARTED = 0x80,
6108 	WMI_HOST_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = 0x100,
6109 	WMI_HOST_SCAN_EVENT_INVALID = 0x200,
6110 	WMI_HOST_SCAN_EVENT_GPIO_TIMEOUT = 0x400,
6111 	WMI_HOST_SCAN_EVENT_MAX = 0x8000
6112 };
6113 
6114 /**
6115  * ENUM wmi_host_scan_completion_reason - Scan completion event type
6116  */
6117 enum wmi_host_scan_completion_reason {
6118 	/** scan related events */
6119 	WMI_HOST_SCAN_REASON_NONE = 0xFF,
6120 	WMI_HOST_SCAN_REASON_COMPLETED = 0,
6121 	WMI_HOST_SCAN_REASON_CANCELLED = 1,
6122 	WMI_HOST_SCAN_REASON_PREEMPTED = 2,
6123 	WMI_HOST_SCAN_REASON_TIMEDOUT = 3,
6124 	WMI_HOST_SCAN_REASON_INTERNAL_FAILURE = 4,
6125 	WMI_HOST_SCAN_REASON_MAX,
6126 };
6127 
6128 /**
6129  * struct wmi_host_scan_event - Scan event response from target
6130  * @event: event type
6131  * @reason: Reason for event
6132  * @channel_freq: channel frequency
6133  * @requestor: requestor id
6134  * @scan_id: scan id
6135  * @vdev_id: vdev id
6136  */
6137 typedef struct {
6138 	uint32_t event;
6139 	uint32_t reason;
6140 	uint32_t channel_freq;
6141 	uint32_t requestor;
6142 	uint32_t scan_id;
6143 	uint32_t vdev_id;
6144 } wmi_host_scan_event;
6145 
6146 /**
6147  * struct wmi_host_pdev_reserve_ast_entry_event - Reserve AST entry
6148  * @result: result
6149  */
6150 typedef struct {
6151 	uint32_t result;
6152 } wmi_host_pdev_reserve_ast_entry_event;
6153 
6154 /**
6155  * struct wmi_host_mcast_ageout_entry - mcast aged-out entry
6156  * @grp_addr: IPv4/6 mcast group addr
6157  * @vdev_id: vdev id
6158  */
6159 typedef struct {
6160 	uint8_t grp_addr[16];
6161 	uint32_t vdev_id;
6162 } wmi_host_mcast_ageout_entry;
6163 
6164 /**
6165  * struct wmi_host_mcast_list_ageout_event - List of mcast entry aged-out
6166  * @num_entry: Number of mcast entries timed-out
6167  * @entry: List of wmi_host_mcast_ageout_entry
6168  */
6169 typedef struct {
6170 	uint32_t num_entry;
6171 	wmi_host_mcast_ageout_entry entry[1];
6172 } wmi_host_mcast_list_ageout_event;
6173 
6174 /**
6175  * enum wmi_host_pdev_tpc_event_offset: offsets of TPC events
6176  * @WMI_HOST_TX_POWER_MAX: offset of max tx power
6177  * @WMI_HOST_TX_POWER_MIN: offset of min tx power
6178  * @WMI_HOST_TX_POWER_LEN: size of tpc values
6179  */
6180 enum wmi_host_pdev_tpc_event_offset {
6181 	WMI_HOST_TX_POWER_MAX,
6182 	WMI_HOST_TX_POWER_MIN,
6183 	WMI_HOST_TX_POWER_LEN,
6184 };
6185 
6186 /**
6187  * struct wmi_host_pdev_generic_buffer_event
6188  * @buf_type: Buffer type
6189  * @frag_id: Frag id
6190  * @more_frag: more frags pending
6191  * @buf_len: buffer length
6192  * @buf_info: variable length buffer
6193  */
6194 typedef struct {
6195 	uint32_t buf_type;
6196 	uint32_t frag_id;
6197 	uint32_t more_frag;
6198 	uint32_t buf_len;
6199 	uint32_t buf_info[1];
6200 } wmi_host_pdev_generic_buffer_event;
6201 /**
6202  * Enum for host buffer event
6203  */
6204 enum {
6205 	WMI_HOST_BUFFER_TYPE_RATEPWR_TABLE,
6206 	WMI_HOST_BUFFER_TYPE_CTL_TABLE,
6207 };
6208 
6209 /**
6210  * Enums for TPC event
6211  */
6212 typedef enum {
6213 	WMI_HOST_TPC_CONFIG_EVENT_FLAG_TABLE_CDD	= 0x1,
6214 	WMI_HOST_TPC_CONFIG_EVENT_FLAG_TABLE_STBC	= 0x2,
6215 	WMI_HOST_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF	= 0x4,
6216 } WMI_HOST_TPC_CONFIG_EVENT_FLAG;
6217 
6218 /**
6219  * Medium Utilization evaluation algorithms
6220  * These algorithms can be complementary rather than exclusive.
6221  */
6222 typedef enum {
6223 	WMI_HOST_MU_BASIC_ALGO = 0x1,
6224 	WMI_HOST_MU_PER_BSSID_ALGO = 0x2,
6225 	WMI_HOST_MU_HIDDEN_NODE_ALGO = 0x4,
6226 } WMI_HOST_MU_ALGO_TYPE;
6227 /* max MU alg combinations supported by target */
6228 #define WMI_HOST_MU_MAX_ALGO_TYPE 3
6229 
6230 /**
6231  * struct wmi_host_mu_db_entry
6232  * @event_type: 0=AP, 1=STA, 2=Small Cell(SC)
6233  * @bssid_mac_addr: Transmitter MAC if entry is WiFi node. PLMNID if SC
6234  * @tx_addr: Transmitter MAC if entry is WiFi node. PLMNID if SC
6235  * @avg_duration_us: Avg. duration for which node was transmitting
6236  * @avg_rssi: Avg. RSSI of all TX packets by node. Unit dBm
6237  * @mu_percent: % medium utilization by node
6238  */
6239 typedef struct {
6240 	uint32_t     entry_type;
6241 	wmi_host_mac_addr bssid_mac_addr;
6242 	wmi_host_mac_addr tx_addr;
6243 	uint32_t     avg_duration_us;
6244 	uint32_t     avg_rssi;
6245 	uint32_t     mu_percent;
6246 } wmi_host_mu_db_entry;
6247 
6248 /**
6249  * struct wmi_host_mu_report_event - WMI_MU_REPORT_EVENTID
6250  * @mu_request_id: request id
6251  * @status_reason: MU_STATUS_REASON
6252  * @total_mu: MU_ALG_TYPE combinations
6253  * @num_active_bssid: number of active bssid
6254  * @hidden_node_mu : hidden node algo MU per bin
6255  * @num_TA_entries : No. of entries found in MU db report
6256  */
6257 typedef struct {
6258 	uint32_t mu_request_id;
6259 	uint32_t status_reason;
6260 	uint32_t total_mu[WMI_HOST_MU_MAX_ALGO_TYPE];
6261 	uint32_t num_active_bssid;
6262 	uint32_t hidden_node_mu[LTEU_MAX_BINS];
6263 	uint32_t num_TA_entries;
6264 } wmi_host_mu_report_event;
6265 
6266 #define WMI_HOST_TIM_BITMAP_ARRAY_SIZE 17
6267 
6268 /**
6269  * struct wmi_host_p2p_noa_descriptor - NoA desc in SWBA event
6270  * @type_count: Absence count
6271  * @duration: NoA duration
6272  * @interval: NoA interval
6273  * @start_time: start time
6274  */
6275 typedef struct {
6276 	uint32_t type_count;
6277 	uint32_t duration;
6278 	uint32_t interval;
6279 	uint32_t start_time;
6280 } wmi_host_p2p_noa_descriptor;
6281 
6282 /* Maximum CCK, OFDM rates supported */
6283 #define WMI_SA_MAX_CCK_OFDM_RATES 12
6284 /* Maximum MCS rates supported; 4 rates in each dword */
6285 /* Maximum MCS ratecodes with 11ax */
6286 #define WMI_SA_MAX_MCS_RATES 96
6287 #define WMI_SA_MAX_RATE_COUNTERS 4
6288 /* Maximum rate series used for transmission */
6289 #define SA_MAX_RATE_SERIES 2
6290 
6291 #define SA_MAX_LEGACY_RATE_DWORDS 3
6292 #define SA_MAX_HT_RATE_DWORDS 10
6293 #define SA_BYTES_IN_DWORD 4
6294 #define SA_MASK_BYTE 0xff
6295 #define SA_MASK_BYTE3 0xff0000
6296 
6297 /* Support 11ax 11bit ratecode */
6298 #define SA_MASK_RCODE 0x7ff
6299 #define SA_WORD_BITS_LEN 16
6300 #define SA_WORDS_IN_DWORD 2
6301 #define SA_MAX_LEGACY_RATE_WORDS 6
6302 #define SA_MAX_HT_RATE_WORDS 48
6303 
6304 /* TODO: ratecode_160 needs to add for future chips */
6305 /**
6306  * struct wmi_sa_rate_cap - smart antenna rat capabilities
6307  * @pdev_id: pdev_id
6308  * @ratecode_legacy: Rate code array for CCK OFDM
6309  * @ratecode_20: Rate code array for 20MHz BW
6310  * @ratecode_40: Rate code array for 40MHz BW
6311  * @ratecode_80: Rate code array for 80MHz BW
6312  * @ratecount: Max Rate count for each mode
6313  */
6314 typedef struct {
6315 	uint16_t ratecode_legacy[WMI_SA_MAX_CCK_OFDM_RATES];
6316 	uint16_t ratecode_20[WMI_SA_MAX_MCS_RATES];
6317 	uint16_t ratecode_40[WMI_SA_MAX_MCS_RATES];
6318 	uint16_t ratecode_80[WMI_SA_MAX_MCS_RATES];
6319 	uint8_t ratecount[WMI_SA_MAX_RATE_COUNTERS];
6320 } wmi_sa_rate_cap;
6321 
6322 /** Preamble types to be used with VDEV fixed rate configuration */
6323 typedef enum {
6324 	WMI_HOST_RATE_PREAMBLE_OFDM,
6325 	WMI_HOST_RATE_PREAMBLE_CCK,
6326 	WMI_HOST_RATE_PREAMBLE_HT,
6327 	WMI_HOST_RATE_PREAMBLE_VHT,
6328 	WMI_HOST_RATE_PREAMBLE_HE,
6329 #ifdef WLAN_FEATURE_11BE
6330 	WMI_HOST_RATE_PREAMBLE_EHT,
6331 #endif
6332 } WMI_HOST_RATE_PREAMBLE;
6333 
6334 #define WMI_HOST_FIXED_RATE_NONE	(0xff)
6335 
6336 /** preablbe long */
6337 #define WMI_HOST_VDEV_PREAMBLE_LONG	0x1
6338 /** preablbe short */
6339 #define WMI_HOST_VDEV_PREAMBLE_SHORT	0x2
6340 /** found a better AP */
6341 #define WMI_HOST_ROAM_REASON_BETTER_AP  0x1
6342 /** beacon miss detected */
6343 #define WMI_HOST_ROAM_REASON_BMISS	0x2
6344 /** deauth/disassoc received */
6345 #define WMI_HOST_ROAM_REASON_DEAUTH	0x2
6346 /** connected AP's low rssi condition detected */
6347 #define WMI_HOST_ROAM_REASON_LOW_RSSI  0x3
6348 /** found another AP that matches SSID and Security profile in
6349  * WMI_ROAM_AP_PROFILE, found during scan triggered upon FINAL_BMISS
6350  */
6351 #define WMI_HOST_ROAM_REASON_SUITABLE_AP 0x4
6352 /** LFR3.0 roaming failed, indicate the disconnection to host */
6353 #define WMI_HOST_ROAM_REASON_HO_FAILED  0x5
6354 
6355 /** values for vdev_type */
6356 #define WMI_HOST_VDEV_TYPE_AP	0x1
6357 #define WMI_HOST_VDEV_TYPE_STA	0x2
6358 #define WMI_HOST_VDEV_TYPE_IBSS	0x3
6359 #define WMI_HOST_VDEV_TYPE_MONITOR	0x4
6360 
6361 /** values for vdev_subtype */
6362 #define WMI_HOST_VDEV_SUBTYPE_P2P_DEVICE 0x1
6363 #define WMI_HOST_VDEV_SUBTYPE_P2P_CLIENT 0x2
6364 #define WMI_HOST_VDEV_SUBTYPE_P2P_GO	0x3
6365 #define WMI_HOST_VDEV_SUBTYPE_PROXY_STA  0x4
6366 #define WMI_HOST_VDEV_SUBTYPE_MESH	0x5
6367 
6368 #define WMI_HOST_MGMT_TID	17
6369 /* Disable aging & learning */
6370 #define WMI_HOST_WDS_FLAG_STATIC	0x1
6371 
6372 /**
6373  * Peer param enum abstracted from target
6374  * @WMI_HOST_PEER_MIMO_PS_STATE: mimo powersave state
6375  * @WMI_HOST_PEER_AMPDU: enable/disable AMPDU . initial value (enabled)
6376  * @WMI_HOST_PEER_AUTHORIZE: authorize/unauthorize peer.
6377  *                           initial value is unauthorized (0)
6378  * @WMI_HOST_PEER_CHWIDTH: Peer channel bandwidth
6379  * @WMI_HOST_PEER_NSS: peer NSS
6380  * @WMI_HOST_PEER_USE_4ADDR: USE 4 ADDR
6381  * @WMI_HOST_PEER_EXT_STATS_ENABLE: Enable extended peer stats
6382  * @WMI_HOST_PEER_USE_FIXED_PWR: Use FIXED Pwr,
6383  * @WMI_HOST_PEER_PARAM_FIXED_RATE: Set peer fixed rate
6384  * @WMI_HOST_PEER_SET_MU_ALLOWLIST: Allowlist peer TIDs
6385  * @WMI_HOST_PEER_MEMBERSHIP: set group membership status
6386  * @WMI_HOST_PEER_USERPOS: User POS
6387  * @WMI_HOST_PEER_CRIT_PROTO_HINT_ENABLED: Critical Protocol Hint enabled
6388  * @WMI_HOST_PEER_TX_FAIL_CNT_THR: Tx Fail count threshold
6389  * @WMI_HOST_PEER_SET_HW_RETRY_CTS2S: Set hardware retry CTS to self
6390  * @WMI_HOST_PEER_IBSS_ATIM_WINDOW_LENGTH: IBSS ATIM window length
6391  * @WMI_HOST_PEER_PHYMODE: Peer Phymode
6392  * @WMI_HOST_PEER_SET_MAC_TX_RATE: Set MAC Tx rate
6393  * @WMI_HOST_PEER_SET_DEFAULT_ROUTING: Set default Rx routing
6394  * @WMI_HOST_PEER_SET_MIN_TX_RATE: Set Minimum T rate
6395  * @WMI_HOST_PEER_NSS_VHT160: peer NSS for 160Mhz
6396  * @WMI_HOST_PEER_NSS_VHT80_80: peer NSS for 80+80MHz
6397  * @WMI_HOST_PEER_PARAM_SU_TXBF_SOUNDING_INTERVAL: Set SU sounding interval
6398  * @WMI_HOST_PEER_PARAM_MU_TXBF_SOUNDING_INTERVAL: Set MU sounding interval
6399  * @WMI_HOST_PEER_PARAM_TXBF_SOUNDING_ENABLE: Enable sounding interval set
6400  * @WMI_HOST_PEER_PARAM_MU_ENABLE: Enable MU support
6401  * @WMI_HOST_PEER_PARAM_OFDMA_ENABLE: Enable OFDMA support
6402  * @WMI_HOST_PEER_PARAM_ENABLE_FT: Notify FT roam
6403  */
6404 enum {
6405 	WMI_HOST_PEER_MIMO_PS_STATE = 0x1,
6406 	WMI_HOST_PEER_AMPDU,
6407 	WMI_HOST_PEER_AUTHORIZE,
6408 	WMI_HOST_PEER_CHWIDTH,
6409 	WMI_HOST_PEER_NSS,
6410 	WMI_HOST_PEER_USE_4ADDR,
6411 	WMI_HOST_PEER_EXT_STATS_ENABLE,
6412 	WMI_HOST_PEER_USE_FIXED_PWR,
6413 	WMI_HOST_PEER_PARAM_FIXED_RATE,
6414 	WMI_HOST_PEER_SET_MU_ALLOWLIST,
6415 	WMI_HOST_PEER_MEMBERSHIP,
6416 	WMI_HOST_PEER_USERPOS,
6417 	WMI_HOST_PEER_CRIT_PROTO_HINT_ENABLED,
6418 	WMI_HOST_PEER_TX_FAIL_CNT_THR,
6419 	WMI_HOST_PEER_SET_HW_RETRY_CTS2S,
6420 	WMI_HOST_PEER_IBSS_ATIM_WINDOW_LENGTH,
6421 	WMI_HOST_PEER_PHYMODE,
6422 	WMI_HOST_PEER_SET_MAC_TX_RATE,
6423 	WMI_HOST_PEER_SET_DEFAULT_ROUTING,
6424 	WMI_HOST_PEER_SET_MIN_TX_RATE,
6425 	WMI_HOST_PEER_NSS_VHT160,
6426 	WMI_HOST_PEER_NSS_VHT80_80,
6427 	WMI_HOST_PEER_PARAM_SU_TXBF_SOUNDING_INTERVAL,
6428 	WMI_HOST_PEER_PARAM_MU_TXBF_SOUNDING_INTERVAL,
6429 	WMI_HOST_PEER_PARAM_TXBF_SOUNDING_ENABLE,
6430 	WMI_HOST_PEER_PARAM_MU_ENABLE,
6431 	WMI_HOST_PEER_PARAM_OFDMA_ENABLE,
6432 	WMI_HOST_PEER_PARAM_ENABLE_FT,
6433 };
6434 #define WMI_HOST_PEER_MIMO_PS_NONE	0x0
6435 #define WMI_HOST_PEER_MIMO_PS_STATIC	0x1
6436 #define WMI_HOST_PEER_MIMO_PS_DYNAMIC	0x2
6437 typedef enum {
6438 	HOST_PLATFORM_HIGH_PERF,
6439 	HOST_PLATFORM_LOW_PERF,
6440 	HOST_PLATFORM_LOW_PERF_NO_FETCH,
6441 } HOST_PLATFORM_TYPE;
6442 
6443 enum wmi_host_sta_ps_mode {
6444 	/** enable power save for the given STA VDEV */
6445 	WMI_HOST_STA_PS_MODE_DISABLED = 0,
6446 	/** disable power save  for a given STA VDEV */
6447 	WMI_HOST_STA_PS_MODE_ENABLED = 1,
6448 };
6449 enum wmi_host_sta_powersave_param {
6450 	/**
6451 	* Controls how frames are retrievd from AP while STA is sleeping
6452 	*
6453 	* (see enum wmi_sta_ps_param_rx_wake_policy)
6454 	*/
6455 	WMI_HOST_STA_PS_PARAM_RX_WAKE_POLICY = 0,
6456 
6457 	/**
6458 	* The STA will go active after this many TX
6459 	*
6460 	* (see enum wmi_sta_ps_param_tx_wake_threshold)
6461 	*/
6462 	WMI_HOST_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
6463 
6464 	/**
6465 	* Number of PS-Poll to send before STA wakes up
6466 	*
6467 	* (see enum wmi_sta_ps_param_pspoll_count)
6468 	*
6469 	*/
6470 	WMI_HOST_STA_PS_PARAM_PSPOLL_COUNT = 2,
6471 
6472 	/**
6473 	* TX/RX inactivity time in msec before going to sleep.
6474 	*
6475 	* The power save SM will monitor tx/rx activity on the VDEV, if no
6476 	* activity for the specified msec of the parameter
6477 	* the Power save SM will go to sleep.
6478 	*/
6479 	WMI_HOST_STA_PS_PARAM_INACTIVITY_TIME = 3,
6480 
6481 	/**
6482 	* Set uapsd configuration.
6483 	*
6484 	* (see enum wmi_sta_ps_param_uapsd)
6485 	*/
6486 	WMI_HOST_STA_PS_PARAM_UAPSD = 4,
6487 };
6488 /* prefix used by scan requestor ids on the host
6489  * replicated here form wmi_unified.h*/
6490 #define WMI_HOST_P_SCAN_REQUESTOR_ID_PREFIX 0xA000
6491 /* prefix used by scan request ids generated on the host */
6492 /* host cycles through the lower 12 bits to generate ids */
6493 #define WMI_HOST_P_SCAN_REQ_ID_PREFIX 0xA000
6494 
6495 #define WMI_HOST_RC_DS_FLAG	0x01	/* Dual stream flag */
6496 #define WMI_HOST_RC_CW40_FLAG	0x02	/* CW 40 */
6497 #define WMI_HOST_RC_SGI_FLAG	0x04	/* Short Guard Interval */
6498 #define WMI_HOST_RC_HT_FLAG	0x08	/* HT */
6499 #define WMI_HOST_RC_RTSCTS_FLAG	0x10	/* RTS-CTS */
6500 #define WMI_HOST_RC_TX_STBC_FLAG	0x20	/* TX STBC */
6501 #define WMI_HOST_RC_RX_STBC_FLAG	0xC0	/* RX STBC ,2 bits */
6502 #define WMI_HOST_RC_RX_STBC_FLAG_S   6	/* RX STBC ,2 bits */
6503 #define WMI_HOST_RC_WEP_TKIP_FLAG	0x100   /* WEP/TKIP encryption */
6504 #define WMI_HOST_RC_TS_FLAG	0x200   /* Three stream flag */
6505 #define WMI_HOST_RC_UAPSD_FLAG	0x400   /* UAPSD Rate Control */
6506 
6507 /** HT Capabilities*/
6508 #define WMI_HOST_HT_CAP_ENABLED	0x0001   /* HT Enabled/ disabled */
6509 /* Short Guard Interval with HT20 */
6510 #define WMI_HOST_HT_CAP_HT20_SGI	0x0002
6511 #define WMI_HOST_HT_CAP_DYNAMIC_SMPS	0x0004   /* Dynamic MIMO powersave */
6512 #define WMI_HOST_HT_CAP_TX_STBC	0x0008   /* B3 TX STBC */
6513 #define WMI_HOST_HT_CAP_TX_STBC_MASK_SHIFT	3
6514 #define WMI_HOST_HT_CAP_RX_STBC	0x0030   /* B4-B5 RX STBC */
6515 #define WMI_HOST_HT_CAP_RX_STBC_MASK_SHIFT	4
6516 #define WMI_HOST_HT_CAP_LDPC	0x0040   /* LDPC supported */
6517 #define WMI_HOST_HT_CAP_L_SIG_TXOP_PROT	0x0080   /* L-SIG TXOP Protection */
6518 #define WMI_HOST_HT_CAP_MPDU_DENSITY	0x0700   /* MPDU Density */
6519 #define WMI_HOST_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
6520 #define WMI_HOST_HT_CAP_HT40_SGI	0x0800
6521 #define WMI_HOST_HT_CAP_RX_LDPC         0x1000
6522 #define WMI_HOST_HT_CAP_TX_LDPC         0x2000
6523 #define WMI_HOST_HT_CAP_IBF_BFER	0x4000
6524 
6525 /* These macros should be used when we wish to advertise STBC support for
6526  * only 1SS or 2SS or 3SS. */
6527 #define WMI_HOST_HT_CAP_RX_STBC_1SS	0x0010   /* B4-B5 RX STBC */
6528 #define WMI_HOST_HT_CAP_RX_STBC_2SS	0x0020   /* B4-B5 RX STBC */
6529 #define WMI_HOST_HT_CAP_RX_STBC_3SS	0x0030   /* B4-B5 RX STBC */
6530 
6531 
6532 #define WMI_HOST_HT_CAP_DEFAULT_ALL (WMI_HOST_HT_CAP_ENABLED	| \
6533 	WMI_HOST_HT_CAP_HT20_SGI	| \
6534 	WMI_HOST_HT_CAP_HT40_SGI	| \
6535 	WMI_HOST_HT_CAP_TX_STBC	| \
6536 	WMI_HOST_HT_CAP_RX_STBC	| \
6537 	WMI_HOST_HT_CAP_LDPC)
6538 
6539 /* WMI_HOST_VHT_CAP_* these maps to ieee 802.11ac vht capability information
6540    field. The fields not defined here are not supported, or reserved.
6541    Do not change these masks and if you have to add new one follow the
6542    bitmask as specified by 802.11ac draft.
6543 */
6544 
6545 #define WMI_HOST_VHT_CAP_MAX_MPDU_LEN_MASK	0x00000003
6546 #define WMI_HOST_VHT_CAP_RX_LDPC	0x00000010
6547 #define WMI_HOST_VHT_CAP_SGI_80MHZ	0x00000020
6548 #define WMI_HOST_VHT_CAP_SGI_160MHZ	0x00000040
6549 #define WMI_HOST_VHT_CAP_TX_STBC	0x00000080
6550 #define WMI_HOST_VHT_CAP_RX_STBC_MASK	0x00000300
6551 #define WMI_HOST_VHT_CAP_RX_STBC_MASK_SHIFT	8
6552 #define WMI_HOST_VHT_CAP_SU_BFER	0x00000800
6553 #define WMI_HOST_VHT_CAP_SU_BFEE	0x00001000
6554 #define WMI_HOST_VHT_CAP_MAX_CS_ANT_MASK	0x0000E000
6555 #define WMI_HOST_VHT_CAP_MAX_CS_ANT_MASK_SHIFT	13
6556 #define WMI_HOST_VHT_CAP_MAX_SND_DIM_MASK	0x00070000
6557 #define WMI_HOST_VHT_CAP_MAX_SND_DIM_MASK_SHIFT	16
6558 #define WMI_HOST_VHT_CAP_MU_BFER	0x00080000
6559 #define WMI_HOST_VHT_CAP_MU_BFEE	0x00100000
6560 #define WMI_HOST_VHT_CAP_MAX_AMPDU_LEN_EXP	0x03800000
6561 #define WMI_HOST_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIT	23
6562 #define WMI_HOST_VHT_CAP_RX_FIXED_ANT	0x10000000
6563 #define WMI_HOST_VHT_CAP_TX_FIXED_ANT	0x20000000
6564 
6565 #define WMI_HOST_VHT_CAP_MAX_MPDU_LEN_11454	0x00000002
6566 
6567 /* These macros should be used when we wish to advertise STBC support for
6568  * only 1SS or 2SS or 3SS. */
6569 #define WMI_HOST_VHT_CAP_RX_STBC_1SS	0x00000100
6570 #define WMI_HOST_VHT_CAP_RX_STBC_2SS	0x00000200
6571 #define WMI_HOST_VHT_CAP_RX_STBC_3SS	0x00000300
6572 
6573 #define WMI_HOST_VHT_CAP_DEFAULT_ALL (WMI_HOST_VHT_CAP_MAX_MPDU_LEN_11454  | \
6574 	WMI_HOST_VHT_CAP_SGI_80MHZ	|	\
6575 	WMI_HOST_VHT_CAP_TX_STBC	|	\
6576 	WMI_HOST_VHT_CAP_RX_STBC_MASK	|	\
6577 	WMI_HOST_VHT_CAP_RX_LDPC	|	\
6578 	WMI_HOST_VHT_CAP_MAX_AMPDU_LEN_EXP   |	\
6579 	WMI_HOST_VHT_CAP_RX_FIXED_ANT	|	\
6580 	WMI_HOST_VHT_CAP_TX_FIXED_ANT)
6581 
6582 /* Interested readers refer to Rx/Tx MCS Map definition as defined in
6583    802.11ac
6584 */
6585 #define WMI_HOST_VHT_MAX_MCS_4_SS_MASK(r, ss) ((3 & (r)) << (((ss) - 1) << 1))
6586 #define WMI_HOST_VHT_MAX_SUPP_RATE_MASK	0x1fff0000
6587 #define WMI_HOST_VHT_MAX_SUPP_RATE_MASK_SHIFT 16
6588 
6589 /** U-APSD configuration of peer station from (re)assoc request and TSPECs */
6590 enum wmi_host_ap_ps_param_uapsd {
6591 	WMI_HOST_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
6592 	WMI_HOST_AP_PS_UAPSD_AC0_TRIGGER_EN  = (1 << 1),
6593 	WMI_HOST_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
6594 	WMI_HOST_AP_PS_UAPSD_AC1_TRIGGER_EN  = (1 << 3),
6595 	WMI_HOST_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
6596 	WMI_HOST_AP_PS_UAPSD_AC2_TRIGGER_EN  = (1 << 5),
6597 	WMI_HOST_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
6598 	WMI_HOST_AP_PS_UAPSD_AC3_TRIGGER_EN  = (1 << 7),
6599 };
6600 /** U-APSD maximum service period of peer station */
6601 enum wmi_host_ap_ps_peer_param_max_sp {
6602 	WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
6603 	WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
6604 	WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
6605 	WMI_HOST_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
6606 
6607 	/* keep last! */
6608 	MAX_HOST_WMI_AP_PS_PEER_PARAM_MAX_SP,
6609 };
6610 
6611 #define WMI_HOST_UAPSD_AC_TYPE_DELI 0
6612 #define WMI_HOST_UAPSD_AC_TYPE_TRIG 1
6613 
6614 #define WMI_HOST_UAPSD_AC_BIT_MASK(ac, type) \
6615 	((type ==  WMI_HOST_UAPSD_AC_TYPE_DELI) ? (1<<(ac<<1)) :\
6616 	 (1<<((ac<<1)+1)))
6617 
6618 enum wmi_host_ap_ps_peer_param_wnm_sleep {
6619 	WMI_HOST_AP_PS_PEER_PARAM_WNM_SLEEP_ENABLE,
6620 	WMI_HOST_AP_PS_PEER_PARAM_WNM_SLEEP_DISABLE,
6621 };
6622 
6623 enum wmi_host_ap_ps_peer_param {
6624 	/** Set uapsd configuration for a given peer.
6625 	*
6626 	* This will include the delivery and trigger enabled state for every AC.
6627 	* The host  MLME needs to set this based on AP capability and stations
6628 	* request Set in the association request  received from the station.
6629 	*
6630 	* Lower 8 bits of the value specify the UAPSD configuration.
6631 	*
6632 	* (see enum wmi_ap_ps_param_uapsd)
6633 	* The default value is 0.
6634 	*/
6635 	WMI_HOST_AP_PS_PEER_PARAM_UAPSD = 0,
6636 
6637 	/**
6638 	* Set the service period for a UAPSD capable station
6639 	*
6640 	* The service period from wme ie in the (re)assoc request frame.
6641 	*
6642 	* (see enum wmi_ap_ps_peer_param_max_sp)
6643 	*/
6644 	WMI_HOST_AP_PS_PEER_PARAM_MAX_SP = 1,
6645 
6646 	/** Time in seconds for aging out buffered frames
6647       * for STA in power save */
6648 	WMI_HOST_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
6649 
6650 	/** Specify frame types that are considered SIFS
6651       * RESP trigger frame */
6652 	WMI_HOST_AP_PS_PEER_PARAM_SIFS_RESP_FRMTYPE = 3,
6653 
6654 	/** Specifies the trigger state of TID.
6655 	* Valid only for UAPSD frame type  */
6656 	WMI_HOST_AP_PS_PEER_PARAM_SIFS_RESP_UAPSD = 4,
6657 
6658 	/** Specifies the WNM sleep state of a STA */
6659 	WMI_HOST_AP_PS_PEER_PARAM_WNM_SLEEP = 5,
6660 };
6661 #define WMI_HOST_RXERR_CRC	0x01 /* CRC error on frame */
6662 #define WMI_HOST_RXERR_DECRYPT	0x08 /* non-Michael decrypt error */
6663 #define WMI_HOST_RXERR_MIC	0x10 /* Michael MIC decrypt error */
6664 #define WMI_HOST_RXERR_KEY_CACHE_MISS 0x20 /* No/incorrect key matter in h/w */
6665 #define WMI_HOST_RXERR_PN	0x80 /* invalid PN in frame */
6666 
6667 enum wmi_host_sta_ps_param_rx_wake_policy {
6668 	/* Wake up when ever there is an  RX activity on the VDEV. In this mode
6669 	* the Power save SM(state machine) will come out of sleep by either
6670 	* sending null frame (or) a data frame (with PS==0) in response to TIM
6671 	* bit set in the received beacon frame from AP.
6672 	*/
6673 	WMI_HOST_STA_PS_RX_WAKE_POLICY_WAKE = 0,
6674 
6675 	/* Here the power save state machine will not wakeup in response to TIM
6676 	* bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
6677 	* configuration setup by WMISET_PS_SET_UAPSD  WMI command.  When all
6678 	* access categories are delivery-enabled, the station will send a UAPSD
6679 	* trigger frame, otherwise it will send a PS-Poll.
6680 	*/
6681 	WMI_HOST_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
6682 };
6683 enum wmi_host_sta_ps_param_pspoll_count {
6684 	WMI_HOST_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
6685 	/* Values greater than 0 indicate the maximum numer of PS-Poll frames FW
6686 	* will send before waking up.
6687 	*/
6688 };
6689 /** Number of tx frames/beacon  that cause the power save SM to wake up.
6690  *
6691  * Value 1 causes the SM to wake up for every TX. Value 0 has a special
6692  * meaning, It will cause the SM to never wake up. This is useful if you want
6693  * to keep the system to sleep all the time for some kind of test mode . host
6694  * can change this parameter any time.  It will affect at the next tx frame.
6695  */
6696 enum wmi_host_sta_ps_param_tx_wake_threshold {
6697 	WMI_HOST_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
6698 	WMI_HOST_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
6699 
6700 	/* Values greater than one indicate that many TX attempts per beacon
6701 	* interval before the STA will wake up
6702 	*/
6703 };
6704 /*
6705  * Transmit power scale factor.
6706  *
6707  */
6708 typedef enum {
6709 	WMI_HOST_TP_SCALE_MAX	= 0,	/* no scaling (default) */
6710 	WMI_HOST_TP_SCALE_50	= 1,	/* 50% of max (-3 dBm) */
6711 	WMI_HOST_TP_SCALE_25	= 2,	/* 25% of max (-6 dBm) */
6712 	WMI_HOST_TP_SCALE_12	= 3,	/* 12% of max (-9 dBm) */
6713 	WMI_HOST_TP_SCALE_6	= 4,	/* 6% of max (-12 dBm) */
6714 	WMI_HOST_TP_SCALE_MIN	= 5,	/* min, but still on   */
6715 	WMI_HOST_TP_SCALE_SIZE  = 6,	/* max num of enum	*/
6716 } WMI_HOST_TP_SCALE;
6717 enum {
6718 	WMI_HOST_RATEPWR_TABLE_OPS_SET,
6719 	WMI_HOST_RATEPWR_TABLE_OPS_GET,
6720 };
6721 /* reserved up through 0xF */
6722 /**
6723  *  struct wmi_host_dcs_mib_stats - WLAN IM stats from target to host
6724  *      Below statistics are sent from target to host periodically.
6725  *      These are collected at target as long as target is running
6726  *      and target chip is not in sleep.
6727  * @listen_time:
6728  * @reg_tx_frame_cnt:
6729  * @reg_rx_frame_cnt:
6730  * @reg_rxclr_cnt:
6731  * @reg_cycle_cnt: delta cycle count
6732  * @reg_rxclr_ext_cnt:
6733  * @reg_ofdm_phyerr_cnt:
6734  * @reg_cck_phyerr_cnt: CCK err count since last reset, read from register
6735  */
6736 typedef struct _hp_dcs_mib_stats  {
6737 	int32_t    listen_time;
6738 	uint32_t   reg_tx_frame_cnt;
6739 	uint32_t   reg_rx_frame_cnt;
6740 	uint32_t   reg_rxclr_cnt;
6741 	uint32_t   reg_cycle_cnt;
6742 	uint32_t   reg_rxclr_ext_cnt;
6743 	uint32_t   reg_ofdm_phyerr_cnt;
6744 	uint32_t   reg_cck_phyerr_cnt;
6745 } wmi_host_dcs_mib_stats_t;
6746 
6747 /**
6748  * struct wmi_host_dcs_im_tgt_stats - DCS IM target stats
6749  * @reg_tsf32: current running TSF from the TSF-1
6750  * @last_ack_rssi: Known last frame rssi, in case of multiple stations, if
6751  *      and at different ranges, this would not gaurantee that
6752  *      this is the least rssi.
6753  * @tx_waste_time: Sum of all the failed durations in the last
6754  *      one second interval.
6755  * @rx_time: count how many times the hal_rxerr_phy is marked, in this
6756  *      time period
6757  * @phyerr_cnt:
6758  * @mib_stats: wmi_host_dcs_mib_stats_t - collected mib stats as explained
6759  *      in mib structure
6760  * @chan_nf: Channel noise floor (Units are in dBm)
6761  * @my_bss_rx_cycle_count: BSS rx cycle count
6762  * @reg_rxclr_ext40_cnt: extension channel 40Mhz rxclear count
6763  * @reg_rxclr_ext80_cnt: extension channel 80Mhz rxclear count
6764  */
6765 typedef struct _wmi_host_dcs_im_tgt_stats {
6766 	uint32_t                     reg_tsf32;
6767 	uint32_t                     last_ack_rssi;
6768 	uint32_t                     tx_waste_time;
6769 	uint32_t                     rx_time;
6770 	uint32_t                     phyerr_cnt;
6771 	wmi_host_dcs_mib_stats_t     mib_stats;
6772 	uint32_t		     chan_nf;
6773 	uint32_t		     my_bss_rx_cycle_count;
6774 	/* these fields are added here for backward compatibility instead of
6775 	 * wmi_host_dcs_mib_stats_t
6776 	 */
6777 	uint32_t                     reg_rxclr_ext40_cnt;
6778 	uint32_t                     reg_rxclr_ext80_cnt;
6779 } wmi_host_dcs_im_tgt_stats_t;
6780 
6781 #ifndef BIT
6782 #define BIT(n) (1 << (n))
6783 #endif
6784 
6785 /**
6786  * Enum for pktlog req
6787  */
6788 enum {
6789 	WMI_HOST_PKTLOG_EVENT_RX_BIT,
6790 	WMI_HOST_PKTLOG_EVENT_TX_BIT,
6791 	WMI_HOST_PKTLOG_EVENT_RCF_BIT,
6792 	WMI_HOST_PKTLOG_EVENT_RCU_BIT,
6793 	WMI_HOST_PKTLOG_EVENT_DBG_PRINT_BIT,
6794 	WMI_HOST_PKTLOG_EVENT_SMART_ANTENNA_BIT,
6795 	WMI_HOST_PKTLOG_EVENT_H_INFO_BIT,
6796 	WMI_HOST_PKTLOG_EVENT_STEERING_BIT,
6797 	WMI_HOST_PKTLOG_EVENT_TX_DATA_CAPTURE_BIT,
6798 	WMI_HOST_PKTLOG_EVENT_PHY_LOGGING_BIT,
6799 	WMI_HOST_PKTLOG_EVENT_CBF_BIT,
6800 #ifdef BE_PKTLOG_SUPPORT
6801 	WMI_HOST_PKTLOG_EVENT_HYBRID_TX_BIT,
6802 #endif
6803 };
6804 
6805 typedef enum {
6806 	WMI_HOST_PKTLOG_EVENT_RX	= BIT(WMI_HOST_PKTLOG_EVENT_RX_BIT),
6807 	WMI_HOST_PKTLOG_EVENT_TX	= BIT(WMI_HOST_PKTLOG_EVENT_TX_BIT),
6808 	WMI_HOST_PKTLOG_EVENT_RCF	=
6809 		BIT(WMI_HOST_PKTLOG_EVENT_RCF_BIT), /* Rate Control Find */
6810 	WMI_HOST_PKTLOG_EVENT_RCU	=
6811 		BIT(WMI_HOST_PKTLOG_EVENT_RCU_BIT), /* Rate Control Update */
6812 	WMI_HOST_PKTLOG_EVENT_DBG_PRINT =
6813 		BIT(WMI_HOST_PKTLOG_EVENT_DBG_PRINT_BIT), /* DEBUG prints */
6814 	/* To support Smart Antenna */
6815 	WMI_HOST_PKTLOG_EVENT_SMART_ANTENNA =
6816 		BIT(WMI_HOST_PKTLOG_EVENT_SMART_ANTENNA_BIT),
6817 	WMI_HOST_PKTLOG_EVENT_H_INFO =
6818 		BIT(WMI_HOST_PKTLOG_EVENT_H_INFO_BIT),
6819 	WMI_HOST_PKTLOG_EVENT_STEERING =
6820 		BIT(WMI_HOST_PKTLOG_EVENT_STEERING_BIT),
6821 	/* To support Tx data Capture */
6822 	WMI_HOST_PKTLOG_EVENT_TX_DATA_CAPTURE =
6823 		BIT(WMI_HOST_PKTLOG_EVENT_TX_DATA_CAPTURE_BIT),
6824 	/* To support PHY logging */
6825 	WMI_HOST_PKTLOG_EVENT_PHY_LOGGING =
6826 		BIT(WMI_HOST_PKTLOG_EVENT_PHY_LOGGING_BIT),
6827 	WMI_HOST_PKTLOG_EVENT_CBF =
6828 		BIT(WMI_HOST_PKTLOG_EVENT_CBF_BIT),
6829 #ifdef BE_PKTLOG_SUPPORT
6830 	WMI_HOST_PKTLOG_EVENT_HYBRID_TX =
6831 		BIT(WMI_HOST_PKTLOG_EVENT_HYBRID_TX_BIT),
6832 #endif
6833 } WMI_HOST_PKTLOG_EVENT;
6834 
6835 /**
6836  * wmi_host_phyerr
6837  *
6838  */
6839 #define WMI_HOST_PHY_ERROR_SPECTRAL_SCAN	0x26
6840 #define WMI_HOST_PHY_ERROR_FALSE_RADAR_EXT	0x24
6841 
6842 #define WMI_HOST_AR900B_DFS_PHYERR_MASK	0x4
6843 #define WMI_HOST_AR900B_SPECTRAL_PHYERR_MASK	0x4000000
6844 
6845 /**
6846  * struct wmi_host_perchain_rssi_info - per chain RSSI info
6847  * @rssi_pri20: RSSI on primary 20
6848  * @rssi_sec20: RSSI on secomdary 20
6849  * @rssi_sec40: RSSI secondary 40
6850  * @rssi_sec80: RSSI secondary 80
6851  */
6852 typedef struct wmi_host_perchain_rssi_info {
6853 	int8_t rssi_pri20;
6854 	int8_t rssi_sec20;
6855 	int8_t rssi_sec40;
6856 	int8_t rssi_sec80;
6857 } wmi_host_perchain_rssi_info_t;
6858 
6859 /**
6860  * struct _wmi_host_rf_info - RF measurement information
6861  * @rssi_comb: RSSI Information
6862  * @pc_rssi_info[4]: For now, we know we are getting information
6863  *      for only 4 chains at max. For future extensions
6864  *      use a define
6865  * @noise_floor: Noise floor information
6866  */
6867 typedef struct _wmi_host_rf_info {
6868 	int8_t rssi_comb;
6869 	wmi_host_perchain_rssi_info_t pc_rssi_info[4];
6870 	int16_t noise_floor[4];
6871 } wmi_host_rf_info_t;
6872 
6873 /**
6874  * struct _wmi_host_chan_info
6875  * @center_freq1: center frequency 1 in MHz
6876  * @center_freq2: center frequency 2 in MHz -valid only for
6877  *                11ACVHT 80PLUS80 mode
6878  * @chan_width: channel width in MHz
6879  */
6880 typedef struct _wmi_host_chan_info {
6881 	u_int16_t center_freq1;
6882 	u_int16_t center_freq2;
6883 	u_int8_t chan_width;
6884 } wmi_host_chan_info_t;
6885 
6886 /**
6887  * struct wmi_host_phyerr
6888  * @rf_info:
6889  * @chan_info:
6890  * @tsf64:
6891  * @phy_err_code:
6892  * @tsf_timestamp:
6893  * @bufp:
6894  * @buf_len:
6895  * @phy_err_mask0:
6896  * @phy_err_mask1:
6897  * @pdev_id: pdev_id
6898  */
6899 typedef struct _wmi_host_phyerr {
6900 	wmi_host_rf_info_t rf_info;
6901 	wmi_host_chan_info_t chan_info;
6902 	uint64_t tsf64;
6903 	int32_t phy_err_code;
6904 	uint32_t tsf_timestamp;
6905 	uint8_t *bufp;
6906 	uint32_t buf_len;
6907 	uint32_t phy_err_mask0;
6908 	uint32_t phy_err_mask1;
6909 	uint32_t pdev_id;
6910 } wmi_host_phyerr_t;
6911 
6912 /**
6913  * struct wmi_host_rtt_event_hdr
6914  * @req_id: request id
6915  * @status: status
6916  * @meas_done: measurement done flag
6917  * @meas_type: measurement type
6918  * @report_type: report type
6919  * @v3_status: v2 status
6920  * @v3_finish:
6921  * @v3_tm_start:
6922  * @num_ap: number of AP
6923  * @result: resuult
6924  * @dest_mac: destination mac
6925  */
6926 typedef struct {
6927 	uint16_t req_id;
6928 	uint16_t status:1,
6929 		meas_done:1,
6930 		meas_type:3,
6931 		report_type:3,
6932 		v3_status:2,
6933 		v3_finish:1,
6934 		v3_tm_start:1,
6935 		num_ap:4;
6936 	uint16_t result;
6937 	uint8_t  dest_mac[QDF_MAC_ADDR_SIZE];
6938 } wmi_host_rtt_event_hdr;
6939 
6940 /**
6941  * struct wmi_host_rtt_meas_event - RTT measurement event
6942  * @chain_mask:
6943  * @bw:
6944  * @rsvd:
6945  * @txrxchain_mask: Bit:0-3:chain mask
6946  *                  Bit 4-5: band width info
6947  *                  00 --Legacy 20, 01 --HT/VHT20
6948  *                  10 --HT/VHT40, 11 -- VHT80
6949  * @tod: resolution of 0.1ns
6950  * @toa: resolution of 0.1ns
6951  * @t3:
6952  * @t4:
6953  * @rssi0:
6954  * @rssi1:
6955  * @rssi2:
6956  * @rssi3:
6957  */
6958 typedef struct {
6959 	uint32_t chain_mask:3,
6960 		bw:2,
6961 		rsvd:27;
6962 	uint32_t txrxchain_mask;
6963 	uint64_t tod;
6964 	uint64_t toa;
6965 	uint64_t t3;
6966 	uint64_t t4;
6967 	uint32_t rssi0;
6968 	uint32_t rssi1;
6969 	uint32_t rssi2;
6970 	uint32_t rssi3;
6971 } wmi_host_rtt_meas_event;
6972 
6973 /*----RTT Report event definition  ----*/
6974 typedef enum {
6975 	/* rtt cmd header parsing error  --terminate */
6976 	WMI_HOST_RTT_COMMAND_HEADER_ERROR = 0,
6977 	/* rtt body parsing error -- skip current STA REQ */
6978 	WMI_HOST_RTT_COMMAND_ERROR,
6979 	/* rtt no resource	-- terminate */
6980 	WMI_HOST_RTT_MODULE_BUSY,
6981 	/* STA exceed the support limit -- only server the first n STA */
6982 	WMI_HOST_RTT_TOO_MANY_STA,
6983 	/* any allocate failure */
6984 	WMI_HOST_RTT_NO_RESOURCE,
6985 	/* can not find vdev with vdev ID - skip current STA REQ */
6986 	WMI_HOST_RTT_VDEV_ERROR,
6987 	/* Tx failure   -- continiue and measure number */
6988 	WMI_HOST_RTT_TRANSIMISSION_ERROR,
6989 	/* wait for first TM timer expire-terminate current STA measurement */
6990 	WMI_HOST_RTT_TM_TIMER_EXPIRE,
6991 	/* we do not support RTT measurement with this type of frame */
6992 	WMI_HOST_RTT_FRAME_TYPE_NOSUPPORT,
6993 	/* whole RTT measurement timer expire-terminate
6994 	** current STA measurement */
6995 	WMI_HOST_RTT_TIMER_EXPIRE,
6996 	/* channel swicth failed */
6997 	WMI_HOST_RTT_CHAN_SWITCH_ERROR,
6998 	/* TMR trans error, this dest peer will be skipped */
6999 	WMI_HOST_RTT_TMR_TRANS_ERROR,
7000 	/* V3 only. If both CFR and Token mismatch, do not report */
7001 	WMI_HOST_RTT_NO_REPORT_BAD_CFR_TOKEN,
7002 	/* For First TM, if CFR is bad, then do not report */
7003 	WMI_HOST_RTT_NO_REPORT_FIRST_TM_BAD_CFR,
7004 	/* do not allow report type2 mix with type 0, 1 */
7005 	WMI_HOST_RTT_REPORT_TYPE2_MIX,
7006 	/* LCI Configuration OK. - Responder only */
7007 	WMI_HOST_RTT_LCI_CFG_OK,
7008 	/* LCR configuration OK. - Responder only */
7009 	WMI_HOST_RTT_LCR_CFG_OK,
7010 	/* Bad configuration LCI (or) LCR request - Responder only */
7011 	WMI_HOST_RTT_CFG_ERROR,
7012 	WMI_HOST_WMI_RTT_REJECT_MAX,
7013 } WMI_HOST_RTT_ERROR_INDICATOR;
7014 typedef struct {
7015 	wmi_host_rtt_event_hdr hdr;
7016 	WMI_HOST_RTT_ERROR_INDICATOR reject_reason;
7017 } wmi_host_rtt_error_report_event;
7018 
7019 #if defined(AR9888)
7020 typedef enum {
7021 	WMI_HOST_PROF_CPU_IDLE,
7022 	WMI_HOST_PROF_PPDU_PROC,
7023 	WMI_HOST_PROF_PPDU_POST,
7024 	WMI_HOST_PROF_HTT_TX_INPUT,
7025 	WMI_HOST_PROF_MSDU_ENQ,
7026 	WMI_HOST_PROF_PPDU_POST_HAL,
7027 	WMI_HOST_PROF_COMPUTE_TX_TIME,
7028 
7029 	/* Add new ID's above this. */
7030 	WMI_HOST_PROF_MAX_ID,
7031 } wmi_host_profile_id_t;
7032 #endif
7033 
7034 #define WMI_HOST_WLAN_PROFILE_MAX_HIST	3
7035 #define WMI_HOST_WLAN_PROFILE_MAX_BIN_CNT 32
7036 
7037 #if defined(AR9888)
7038 #define WMI_HOST_MAX_PROFILE	WMI_HOST_PROF_MAX_ID
7039 #else
7040 #define WMI_HOST_MAX_PROFILE	WMI_HOST_WLAN_PROFILE_MAX_BIN_CNT
7041 #endif
7042 
7043 /**
7044  * struct wmi_host_wlan_profile - Host profile param
7045  * @id: profile id
7046  * @cnt: Count
7047  * @tot:
7048  * @min: minimum
7049  * @max: Mac
7050  * @hist_intvl: history interval
7051  * @hist: profile data history
7052  */
7053 typedef struct {
7054 	uint32_t id;
7055 	uint32_t cnt;
7056 	uint32_t tot;
7057 	uint32_t min;
7058 	uint32_t max;
7059 	uint32_t hist_intvl;
7060 	uint32_t hist[WMI_HOST_WLAN_PROFILE_MAX_HIST];
7061 } wmi_host_wlan_profile_t;
7062 
7063 /**
7064  * struct wmi_host_wlan_profile_ctx_t - profile context
7065  * @tot: time in us
7066  * @tx_msdu_cnt: MSDU TX count
7067  * @tx_mpdu_cnt: MPDU tx count
7068  * @tx_ppdu_cnt: PPDU tx count
7069  * @rx_msdu_cnt: MSDU RX count
7070  * @rx_mpdu_cnt: MPDU RXcount
7071  * @bin_count: Bin count
7072  */
7073 typedef struct {
7074 	uint32_t tot;
7075 	uint32_t tx_msdu_cnt;
7076 	uint32_t tx_mpdu_cnt;
7077 	uint32_t tx_ppdu_cnt;
7078 	uint32_t rx_msdu_cnt;
7079 	uint32_t rx_mpdu_cnt;
7080 	uint32_t bin_count;
7081 } wmi_host_wlan_profile_ctx_t;
7082 
7083 /**
7084  * struct wmi_host_pdev_bss_chan_info_event
7085  * @pdev_id: pdev_id
7086  * @freq: Units in MHz
7087  * @noise_floor: units are dBm
7088  * @rx_clear_count_low:
7089  * @rx_clear_count_high:
7090  * @cycle_count_low:
7091  * @cycle_count_high:
7092  * @tx_cycle_count_low:
7093  * @tx_cycle_count_high:
7094  * @rx_cycle_count_low:
7095  * @rx_cycle_count_high:
7096  * @rx_bss_cycle_count_low:
7097  * @rx_bss_cycle_count_high:
7098  * @reserved:
7099  */
7100 typedef struct {
7101 	uint32_t pdev_id;
7102 	uint32_t freq;
7103 	uint32_t noise_floor;
7104 	uint32_t rx_clear_count_low;
7105 	uint32_t rx_clear_count_high;
7106 	uint32_t cycle_count_low;
7107 	uint32_t cycle_count_high;
7108 	uint32_t tx_cycle_count_low;
7109 	uint32_t tx_cycle_count_high;
7110 	uint32_t rx_cycle_count_low;
7111 	uint32_t rx_cycle_count_high;
7112 	uint32_t rx_bss_cycle_count_low;
7113 	uint32_t rx_bss_cycle_count_high;
7114 	uint32_t reserved;
7115 } wmi_host_pdev_bss_chan_info_event;
7116 
7117 /**
7118  * struct wmi_host_pdev_ctl_failsafe_event
7119  * @ctl_failsafe_status: Indicate if Failsafe value is imposed on CTL
7120  */
7121 struct wmi_host_pdev_ctl_failsafe_event {
7122 	uint32_t ctl_failsafe_status;
7123 };
7124 
7125 #define WMI_HOST_INST_STATS_INVALID_RSSI 0
7126 
7127 /* Event definition and new structure addition to send event
7128  * to host to block/unblock tx data traffic based on peer_ast_idx or vdev id
7129  */
7130 #define WMI_HOST_INVALID_PEER_AST_INDEX              0xffff
7131 #define WMI_HOST_TX_DATA_TRAFFIC_CTRL_BLOCK          0x1
7132 #define WMI_HOST_TX_DATA_TRAFFIC_CTRL_UNBLOCK        0x2
7133 /**
7134  * struct wmi_host_tx_data_traffic_ctrl_event
7135  * @peer_ast_idx: For vdev based control, peer_ast_idx will be
7136  *                WMI_INVALID_PEER_AST_INDEX
7137  * @vdev_id: only applies if peer_ast_idx == INVALID
7138  * @ctrl_cmd: WMI_TX_DATA_TRAFFIC_CTRL_BLOCK or
7139  *            WMI_TX_DATA_TRAFFIC_CTRL_UNBLOCK
7140  * @wmm_ac: Indicates AC to be blocked or unblocked
7141  *          Bits  4-31 : Reserved (Shall be zero)
7142  *          Bits  0-3  : WMM AC NO [ BE (1), BK (2), VI (3), VO (4)]
7143  *          Started numbering from 1 to preserve backward compatibility
7144  */
7145 typedef struct {
7146 	uint32_t peer_ast_idx;
7147 	uint32_t vdev_id;
7148 	uint32_t ctrl_cmd;
7149 	uint32_t wmm_ac;
7150 } wmi_host_tx_data_traffic_ctrl_event;
7151 
7152 /**
7153  * struct wmi_host_ath_dcs_cw_int
7154  * @channel: either number or freq in mhz
7155  */
7156 typedef struct {
7157 	uint32_t channel;
7158 } wmi_host_ath_dcs_cw_int;
7159 
7160 /**
7161  * struct wmi_host_dcs_awgn_info:
7162  * @channel_width      : Channel width of interference
7163  * @center_freq        : Center frequency of primary channel
7164  * @center_freq0       : Center frequency of segment 1
7165  * @center_freq1       : Center frequency of segment 2
7166  * @chan_bw_intf_bitmap: Per-20MHz interference bitmap
7167  */
7168 struct wmi_host_dcs_awgn_info {
7169 	wmi_host_channel_width channel_width;
7170 	uint32_t               center_freq;
7171 	uint32_t               center_freq0;
7172 	uint32_t               center_freq1;
7173 	uint32_t               chan_bw_intf_bitmap;
7174 };
7175 
7176 #define WMI_MAX_POWER_DBG_ARGS 8
7177 
7178 /**
7179  * struct wmi_power_dbg_params - power debug command parameter
7180  * @pdev_id: subsystem identifier
7181  * @module_id: parameter id
7182  * @num_arg: no of arguments
7183  * @args: arguments
7184  */
7185 struct wmi_power_dbg_params {
7186 	uint32_t pdev_id;
7187 	uint32_t module_id;
7188 	uint32_t num_args;
7189 	uint32_t args[WMI_MAX_POWER_DBG_ARGS];
7190 };
7191 
7192 /**
7193  * struct wmi_fw_dump_seg_req - individual segment details
7194  * @seg_id - segment id.
7195  * @seg_start_addr_lo - lower address of the segment.
7196  * @seg_start_addr_hi - higher address of the segment.
7197  * @seg_length - length of the segment.
7198  * @dst_addr_lo - lower address of the destination buffer.
7199  * @dst_addr_hi - higher address of the destination buffer.
7200  *
7201  * This structure carries the information to firmware about the
7202  * individual segments. This structure is part of firmware memory
7203  * dump request.
7204  */
7205 struct wmi_fw_dump_seg_req {
7206 	uint8_t seg_id;
7207 	uint32_t seg_start_addr_lo;
7208 	uint32_t seg_start_addr_hi;
7209 	uint32_t seg_length;
7210 	uint32_t dst_addr_lo;
7211 	uint32_t dst_addr_hi;
7212 };
7213 
7214 /**
7215  * enum wmi_userspace_log_level - Log level at userspace
7216  * @WMI_LOG_LEVEL_NO_COLLECTION: verbose_level 0 corresponds to no collection
7217  * @WMI_LOG_LEVEL_NORMAL_COLLECT: verbose_level 1 correspond to normal log
7218  * level with minimal user impact. This is the default value.
7219  * @WMI_LOG_LEVEL_ISSUE_REPRO: verbose_level 2 are enabled when user is lazily
7220  * trying to reproduce a problem, wifi performances and power can be impacted
7221  * but device should not otherwise be significantly impacted
7222  * @WMI_LOG_LEVEL_ACTIVE: verbose_level 3+ are used when trying to
7223  * actively debug a problem
7224  *
7225  * Various log levels defined in the userspace for logging applications
7226  */
7227 enum wmi_userspace_log_level {
7228 	WMI_LOG_LEVEL_NO_COLLECTION,
7229 	WMI_LOG_LEVEL_NORMAL_COLLECT,
7230 	WMI_LOG_LEVEL_ISSUE_REPRO,
7231 	WMI_LOG_LEVEL_ACTIVE,
7232 };
7233 
7234 /**
7235  * HW mode config type replicated from FW header
7236  * @WMI_HOST_HW_MODE_SINGLE: Only one PHY is active.
7237  * @WMI_HOST_HW_MODE_DBS: Both PHYs are active in different bands,
7238  *                        one in 2G and another in 5G.
7239  * @WMI_HOST_HW_MODE_SBS_PASSIVE: Both PHYs are in passive mode (only rx) in
7240  *                        same band; no tx allowed.
7241  * @WMI_HOST_HW_MODE_SBS: Both PHYs are active in the same band.
7242  *                        Support for both PHYs within one band is planned
7243  *                        for 5G only(as indicated in WMI_MAC_PHY_CAPABILITIES),
7244  *                        but could be extended to other bands in the future.
7245  *                        The separation of the band between the two PHYs needs
7246  *                        to be communicated separately.
7247  * @WMI_HOST_HW_MODE_DBS_SBS: 3 PHYs, with 2 on the same band doing SBS
7248  *                           as in WMI_HW_MODE_SBS, and 3rd on the other band
7249  * @WMI_HOST_HW_MODE_DBS_OR_SBS: Two PHY with one PHY capabale of both 2G and
7250  *                        5G. It can support SBS (5G + 5G) OR DBS (5G + 2G).
7251  * @WMI_HOST_HW_MODE_FW_INTERNAL: FW specific internal mode
7252  * @WMI_HOST_HW_MODE_2G_PHYB: Only one phy is active. 2G mode on PhyB.
7253  * @WMI_HOST_HW_MODE_MAX: Max hw_mode_id. Used to indicate invalid mode.
7254  * @WMI_HOST_HW_MODE_DETECT: Mode id used by host to choose mode from target
7255  *                        supported modes.
7256  */
7257 enum wmi_host_hw_mode_config_type {
7258 	WMI_HOST_HW_MODE_SINGLE       = 0,
7259 	WMI_HOST_HW_MODE_DBS          = 1,
7260 	WMI_HOST_HW_MODE_SBS_PASSIVE  = 2,
7261 	WMI_HOST_HW_MODE_SBS          = 3,
7262 	WMI_HOST_HW_MODE_DBS_SBS      = 4,
7263 	WMI_HOST_HW_MODE_DBS_OR_SBS   = 5,
7264 	WMI_HOST_HW_MODE_FW_INTERNAL  = 6,
7265 	WMI_HOST_HW_MODE_2G_PHYB      = 7,
7266 	WMI_HOST_HW_MODE_MAX,
7267 	WMI_HOST_HW_MODE_DETECT,
7268 };
7269 
7270 /**
7271  * enum wmi_host_dynamic_hw_mode_config_type - Host defined enum for
7272  * dynamic mode switch
7273  * @WMI_HOST_DYNAMIC_HW_MODE_DISABLED: hw mode switch is disabled
7274  * @WMI_HOST_DYNAMIC_HW_MODE_SLOW: hw mode switch with interface down/up
7275  * @WMI_HOST_DYNAMIC_HW_MODE_FAST: hw mode switch without interface down/up
7276  * @WMI_HOST_DYNAMIC_HW_MODE_MAX: Max value to indicate invalid mode
7277  */
7278 enum wmi_host_dynamic_hw_mode_config_type {
7279 	WMI_HOST_DYNAMIC_HW_MODE_DISABLED = 0,
7280 	WMI_HOST_DYNAMIC_HW_MODE_SLOW     = 1,
7281 	WMI_HOST_DYNAMIC_HW_MODE_FAST     = 2,
7282 	WMI_HOST_DYNAMIC_HW_MODE_MAX,
7283 };
7284 
7285 /*
7286  * struct wmi_host_peer_txmu_cnt_event
7287  * @tx_mu_transmitted - MU-MIMO tx count
7288  */
7289 typedef struct {
7290 	uint32_t tx_mu_transmitted;
7291 } wmi_host_peer_txmu_cnt_event;
7292 
7293 /**
7294  * struct esp_estimation_event - esp airtime estimation event
7295  * @ac_airtime_percentage: Estimated Airtime
7296  * @pdev_id: PDEV_ID of Data
7297  */
7298 struct esp_estimation_event {
7299 	uint32_t ac_airtime_percentage;
7300 	uint32_t pdev_id;
7301 };
7302 
7303 /*
7304  * struct wmi_peer_gid_userpos_list_event
7305  * @usr_list - User list
7306  */
7307 #define GID_OVERLOAD_GROUP_COUNT  15
7308 typedef struct {
7309 	uint32_t usr_list[GID_OVERLOAD_GROUP_COUNT];
7310 } wmi_host_peer_gid_userpos_list_event;
7311 
7312 /**
7313  * enum rcpi_measurement_type - for identifying type of rcpi measurement
7314  * @RCPI_MEASUREMENT_TYPE_AVG_MGMT: avg rcpi of mgmt frames
7315  * @RCPI_MEASUREMENT_TYPE_AVG_DATA: avg rcpi of data frames
7316  * @RCPI_MEASUREMENT_TYPE_LAST_MGMT: rcpi of last mgmt frame
7317  * @RCPI_MEASUREMENT_TYPE_LAST_DATA: rcpi of last data frame
7318  * @RCPI_MEASUREMENT_TYPE_INVALID: invalid rcpi measurement type
7319  */
7320 enum rcpi_measurement_type {
7321 	RCPI_MEASUREMENT_TYPE_AVG_MGMT  = 0x1,
7322 	RCPI_MEASUREMENT_TYPE_AVG_DATA  = 0x2,
7323 	RCPI_MEASUREMENT_TYPE_LAST_MGMT = 0x3,
7324 	RCPI_MEASUREMENT_TYPE_LAST_DATA = 0x4,
7325 	RCPI_MEASUREMENT_TYPE_INVALID = 0x5,
7326 };
7327 
7328 /**
7329  * struct rcpi_req - RCPI req parameter
7330  * @vdev_id: virtual device id
7331  * @measurement_type: type of rcpi from enum wmi_rcpi_measurement_type
7332  * @mac_addr: peer mac addr for which measurement is required
7333  */
7334 struct rcpi_req {
7335 	uint32_t vdev_id;
7336 	enum rcpi_measurement_type measurement_type;
7337 	uint8_t mac_addr[QDF_MAC_ADDR_SIZE];
7338 };
7339 
7340 /**
7341  * struct rcpi_res - RCPI response parameter
7342  * @vdev_id: virtual device id
7343  * @measurement_type: type of rcpi from enum wmi_rcpi_measurement_type
7344  * @mac_addr: peer mac addr for which measurement is required
7345  * @rcpi_value: value of RCPI computed by firmware
7346  */
7347 struct rcpi_res {
7348 	uint32_t vdev_id;
7349 	enum rcpi_measurement_type measurement_type;
7350 	uint8_t mac_addr[QDF_MAC_ADDR_SIZE];
7351 	int32_t rcpi_value;
7352 };
7353 
7354 #define WMI_HOST_BOARD_MCN_STRING_MAX_SIZE 19
7355 #define WMI_HOST_BOARD_MCN_STRING_BUF_SIZE \
7356 	(WMI_HOST_BOARD_MCN_STRING_MAX_SIZE+1) /* null-terminator */
7357 
7358 /**
7359  * enum WMI_HOST_CALIBRATION_STATUS - Host defined Enums for cal status
7360  * @WMI_HOST_NO_FEATURE: The board was calibrated with a meta
7361  *                       which did not have this feature
7362  * @WMI_HOST_CALIBRATION_OK: The calibration status is OK
7363  * @WMI_HOST_CALIBRATION_NOT_OK: The calibration status is NOT OK
7364  */
7365 enum WMI_HOST_CALIBRATION_STATUS {
7366 	WMI_HOST_NO_FEATURE = 0,
7367 	WMI_HOST_CALIBRATION_OK,
7368 	WMI_HOST_CALIBRATION_NOT_OK,
7369 };
7370 
7371 /**
7372  * struct wmi_host_pdev_utf_event - Host defined struct to hold utf event data
7373  * @data:        Pointer to data
7374  * @datalen:     Data length
7375  * @pdev_id:     Pdev_id of data
7376  *
7377  */
7378 struct wmi_host_pdev_utf_event {
7379 	uint8_t *data;
7380 	uint16_t datalen;
7381 	uint32_t pdev_id;
7382 };
7383 
7384 /**
7385  * struct wmi_host_utf_seg_header_info - Host defined struct to map seg info in
7386  *                         UTF event
7387  * @len:        segment length
7388  * @msgref:     message reference
7389  * @segment_info: segment info
7390  * @pdev_id:  pdev_id
7391  *
7392  */
7393 struct wmi_host_utf_seg_header_info {
7394 	uint32_t len;
7395 	uint32_t msgref;
7396 	uint32_t segment_info;
7397 	uint32_t pdev_id;
7398 };
7399 
7400 /**
7401  * struct wmi_host_pdev_qvit_event - Host defined struct to hold qvit event data
7402  * @data:        Pointer to data
7403  * @datalen:     Data length
7404  *
7405  */
7406 struct wmi_host_pdev_qvit_event {
7407 	uint8_t *data;
7408 	uint16_t datalen;
7409 	uint32_t pdev_id;
7410 };
7411 
7412 /**
7413  * enum wmi_peer_create_status - Peer Create response status
7414  * @WMI_PEER_CREATE_SUCCESS: Peer creation successful at fw
7415  * @WMI_PEER_EXISTS: Peer with same mac exists at fw
7416  * @WMI_PEER_CREATE_FAILED: Peer creation failed at fw
7417  */
7418 enum wmi_peer_create_status {
7419 	WMI_PEER_CREATE_SUCCESS = 0,
7420 	WMI_PEER_EXISTS = 1,
7421 	WMI_PEER_CREATE_FAILED = 2,
7422 };
7423 
7424 /**
7425  * @struct wmi_host_dcs_interference_param
7426  * @interference_type: Type of DCS Interference
7427  * @uint32_t pdev_id: pdev id
7428  */
7429 struct wmi_host_dcs_interference_param {
7430 	uint32_t interference_type;
7431 	uint32_t pdev_id;
7432 };
7433 
7434 /**
7435  * struct wmi_host_rf_characterization_event_param - rf characterization table
7436  * @freq: center frequency of primary channel (in MHz)
7437  * @chan_metric: primary channel-specific metric
7438  * @bw: bandwidth of primary channel (in MHz)
7439  */
7440 struct wmi_host_rf_characterization_event_param {
7441 	uint16_t freq;
7442 	uint8_t chan_metric;
7443 	wmi_host_channel_width bw;
7444 };
7445 
7446 /*
7447  * struct wmi_host_fips_event_param: FIPS event param
7448  * @pdev_id: pdev id
7449  * @error_status: Error status: 0 (no err), 1, or OPER_TIMEOUR
7450  * @data_len: FIPS data length
7451  * @data: pointer to data
7452  */
7453 struct wmi_host_fips_event_param {
7454 	uint32_t pdev_id;
7455 	uint32_t error_status;
7456 	uint32_t data_len;
7457 	uint32_t *data;
7458 };
7459 
7460 #ifdef WLAN_FEATURE_FIPS_BER_CCMGCM
7461 /*
7462  * struct wmi_host_fips_extend_event_param: FIPS extend event param
7463  * @pdev_id: pdev id
7464  * @fips_cookie: fips_cookie
7465  * @cmd_frag_idx: cmd_frag_idx
7466  * @more_bit: more_bit
7467  * @error_status: Error status: 0 (no err), 1, or OPER_TIMEOUR
7468  * @data_len: FIPS data length
7469  * @data: pointer to data
7470  */
7471 struct wmi_host_fips_extend_event_param {
7472 	uint32_t pdev_id;
7473 	uint32_t fips_cookie;
7474 	uint32_t cmd_frag_idx;
7475 	uint32_t more_bit;
7476 	uint32_t error_status;
7477 	uint32_t data_len;
7478 	uint32_t *data;
7479 };
7480 #endif
7481 
7482 #ifdef WLAN_FEATURE_DISA_FIPS
7483 /**
7484  * struct disa_encrypt_decrypt_resp_params - disa encrypt response
7485  * @vdev_id: vdev id
7486  * @status: status
7487  * @data_length: data length
7488  * @data: data pointer
7489  */
7490 struct disa_encrypt_decrypt_resp_params {
7491 	uint32_t vdev_id;
7492 	int32_t status;
7493 	uint32_t data_len;
7494 	uint8_t *data;
7495 };
7496 #endif
7497 
7498 /**
7499  * struct wmi_host_proxy_ast_reserve_param
7500  * @pdev_id: pdev id
7501  * @result: result
7502  */
7503 struct wmi_host_proxy_ast_reserve_param {
7504 	uint32_t pdev_id;
7505 	uint32_t result;
7506 };
7507 
7508 /**
7509  * struct wmi_host_pdev_band_to_mac - freq range for mac
7510  * @pdev_id: PDEV ID to identifiy mac
7511  * @start_freq: start frequency value
7512  * @end_freq: end frequency value
7513  */
7514 struct wmi_host_pdev_band_to_mac {
7515 	uint32_t pdev_id;
7516 	uint32_t start_freq;
7517 	uint32_t end_freq;
7518 };
7519 #define WMI_HOST_MAX_PDEV 3
7520 
7521 #ifdef OL_ATH_SMART_LOGGING
7522 
7523 #define WMI_HOST_SMART_LOG_SCENARIO_SET(flag, scenario) ((flag) |= (scenario))
7524 #define WMI_HOST_SMART_LOG_SCENARIO_GET(flag, scenario) ((flag) &  (scenario))
7525 
7526 /**
7527  * enum wmi_host_smart_log_scenario - Smart log scenarios to be enabled/disabled
7528  * @WMI_HOST_SMART_LOG_ALL: All smart logging features.
7529  * @WMI_HOST_SMART_LOG_CE_FULL_DETECT_BY_FW: CE with full detect by FW.
7530  * @WMI_HOST_SMART_LOG_TX_RX_TIMEOUT: Tx/Rx timeout.
7531  * @WMI_HOST_SMART_LOG_STA_KICKOUT: STA Kickout.
7532  * @WMI_HOST_SMART_LOG_BCN_CMD_FAILURE: Beacon command failure.
7533  * @WMI_HOST_SMART_LOG_P1_PING_FAILURE: P1 ping failure. Ping failure detection
7534  * is done by host entities. So, host should be able to control the
7535  * enable/disable of this feature. Yet, this is provided in case the
7536  * corresponding FW specific debugs alone have to be enabled/disabled.
7537  * @WMI_HOST_SMART_LOG_CONNECTION_FAILURE: Connection failure. Connection
7538  * failure detection is done by host entities. So, host should be able to
7539  * control the enable/disable of this feature. Yet, this is provided in case the
7540  * corresponding FW specific debugs alone have to be enabled/disabled.
7541  * @WMI_HOST_SMART_LOG_FW_INITIATED_PKT_LOG: FW Initiated packetlog.
7542  * @WMI_HOST_SMART_LOG_EXTENSION_1: If WMI_HOST_SMART_LOG_EXTENSION_1 is set,
7543  * then the 'log_case_ext_1' field in 'wmi_smart_logging' is used; else
7544  * log_case_ext_1 is ignored.
7545  */
7546 enum wmi_host_smart_log_scenario {
7547 	WMI_HOST_SMART_LOG_ALL                      =        0x0,
7548 	WMI_HOST_SMART_LOG_CE_FULL_DETECT_BY_FW     =        0x1,
7549 	WMI_HOST_SMART_LOG_TX_RX_TIMEOUT            =        0x2,
7550 	WMI_HOST_SMART_LOG_STA_KICKOUT              =        0x4,
7551 	WMI_HOST_SMART_LOG_BCN_CMD_FAILURE          =        0x8,
7552 	WMI_HOST_SMART_LOG_P1_PING_FAILURE          =       0x10,
7553 	WMI_HOST_SMART_LOG_CONNECTION_FAILURE       =       0x20,
7554 	WMI_HOST_SMART_LOG_FW_INITIATED_PKT_LOG     =       0x40,
7555 
7556 	/* New scenarios to be added here */
7557 
7558 	WMI_HOST_SMART_LOG_EXTENSION_1              = 0x80000000,
7559 };
7560 
7561 /**
7562  * struct wmi_fatal_condition_event - Fatal condition event param
7563  * @type: Type of event
7564  * @subtype: Subtype of event
7565  * @type_subtype_specific_data: Data specific to combination of type and
7566  * subtype. This is held in a union with the original "reserved0" for backward
7567  * compatibility with any code that might refer to it. The previously-reserved
7568  * field now holds data under some conditions. The kind of data depends on the
7569  * above "type" and "subtype" fields. The interpretation of the
7570  * type_subtype_specific_data field based on different type + subtype values is
7571  * shown below:
7572  * 1. type == WMI_HOST_FATAL_CONDITION_PACKET_LOG_CONFIG + subtype
7573  * == WMI_HOST_FATAL_SUBTYPE_PACKET_LOG_CONFIG_START ->
7574  * type_subtype_specific_data = WMI_HOST_PKTLOG_EVENT
7575  * For any type+subtype combinations not listed above, the recipient is expected
7576  * to ignore the type_subtype_specific_data field.
7577  */
7578 struct wmi_fatal_condition_event {
7579 	uint32_t type;
7580 	uint32_t subtype;
7581 	union {
7582 		uint32_t reserved0;
7583 		uint32_t type_subtype_specific_data;
7584 	};
7585 };
7586 
7587 /*Currently the Max fatal events is 3 */
7588 #define FATAL_EVENTS_MAX 3
7589 
7590 /**
7591  * struct wmi_debug_fatal_events: Fatal events list
7592  * @num_events:Number of events
7593  * @event[FATAL_EVENTS_MAX]: Each event data
7594  */
7595 struct wmi_debug_fatal_events {
7596 	uint32_t num_events;
7597 	struct wmi_fatal_condition_event event[FATAL_EVENTS_MAX];
7598 };
7599 
7600 /**
7601  * enum wmi_host_fatal_condition_type - Values that 'type' can take in
7602  * wmi_fatal_condition_event
7603  * @WMI_HOST_FATAL_CONDITION_EVENT_COMPLETION: Fatal condition event completion
7604  * @WMI_HOST_FATAL_CONDITION_CE_FAILURE: CE failure
7605  * @WMI_HOST_FATAL_CONDITION_TIMEOUTS: Communication timeouts
7606  * @WMI_HOST_FATAL_CONDITION_CONNECTION_ISSUE: Connection issue
7607  * @WMI_HOST_FATAL_CONDITION_PACKET_LOG_CONFIG: Configuration for FW initiated
7608  * packetlog
7609  */
7610 enum wmi_host_fatal_condition_type {
7611 	WMI_HOST_FATAL_CONDITION_EVENT_COMPLETION,
7612 	WMI_HOST_FATAL_CONDITION_CE_FAILURE,
7613 	WMI_HOST_FATAL_CONDITION_TIMEOUTS,
7614 	WMI_HOST_FATAL_CONDITION_CONNECTION_ISSUE,
7615 	WMI_HOST_FATAL_CONDITION_PACKET_LOG_CONFIG,
7616 };
7617 
7618 /**
7619  * enum wmi_host_fatal_condition_subtype_timeouts - Possible subtypes for
7620  * WMI_HOST_FATAL_CONDITION_TIMEOUTS
7621  * @WMI_HOST_FATAL_SUBTYPE_TX_TIMEOUT: Tx timeout
7622  * @WMI_HOST_FATAL_SUBTYPE_RX_TIMEOUT: Rx timeout
7623  */
7624 enum wmi_host_fatal_condition_subtype_timeouts {
7625 	WMI_HOST_FATAL_SUBTYPE_TX_TIMEOUT,
7626 	WMI_HOST_FATAL_SUBTYPE_RX_TIMEOUT,
7627 };
7628 
7629 /**
7630  * enum wmi_host_fatal_condition_subtype_connection_issue - Possible subtypes
7631  * for WMI_HOST_FATAL_CONDITION_CONNECTION_ISSUE
7632  * @WMI_HOST_FATAL_SUBTYPE_STA_KICKOUT: STA Kickout
7633  * @WMI_HOST_FATAL_SUBTYPE_P1_PING_FAILURE_START_DEBUG: Start debugging for P1
7634  * ping failure
7635  * @WMI_HOST_FATAL_SUBTYPE_P1_PING_FAILURE_STOP_DEBUG: Stop debugging for P1
7636  * ping failure
7637  * @WMI_HOST_FATAL_SUBTYPE_CONNECTION_FAILURE_START_DEBUG: Start debugging for
7638  * connection failure
7639  * @WMI_HOST_FATAL_SUBTYPE_CONNECTION_FAILURE_STOP_DEBUG: Stop debugging for
7640  * connection failure
7641  */
7642 enum wmi_host_fatal_condition_subtype_connection_issue {
7643 	WMI_HOST_FATAL_SUBTYPE_STA_KICKOUT,
7644 	WMI_HOST_FATAL_SUBTYPE_P1_PING_FAILURE_START_DEBUG,
7645 	WMI_HOST_FATAL_SUBTYPE_P1_PING_FAILURE_STOP_DEBUG,
7646 	WMI_HOST_FATAL_SUBTYPE_CONNECTION_FAILURE_START_DEBUG,
7647 	WMI_HOST_FATAL_SUBTYPE_CONNECTION_FAILURE_STOP_DEBUG,
7648 };
7649 
7650 /**
7651  * enum wmi_host_fatal_condition_subtype_packet_log_config - Possible subtypes
7652  * for WMI_HOST_FATAL_CONDITION_PACKET_LOG_CONFIG
7653  * @WMI_HOST_FATAL_SUBTYPE_PACKET_LOG_CONFIG_START: Start FW initiated packetlog
7654  * @WMI_HOST_FATAL_SUBTYPE_PACKET_LOG_CONFIG_STOP: Stop FW initiated packetlog
7655  */
7656 enum wmi_host_fatal_condition_subtype_packet_log_config {
7657 	WMI_HOST_FATAL_SUBTYPE_PACKET_LOG_CONFIG_START,
7658 	WMI_HOST_FATAL_SUBTYPE_PACKET_LOG_CONFIG_STOP,
7659 };
7660 
7661 #endif /* OL_ATH_SMART_LOGGING */
7662 
7663 #define GET_PN_MAX_LEN 16
7664 #define GET_RX_PN_MAX_LEN 8
7665 
7666 /**
7667  * struct wmi_host_get_pn_event - PN event params
7668  * @vdev_id: vdev id
7669  * @peer_macaddr: Peer mac address
7670  * @key_type: key type
7671  * @pn : pn value
7672  */
7673 struct wmi_host_get_pn_event {
7674 	uint32_t vdev_id;
7675 	uint8_t mac_addr[QDF_MAC_ADDR_SIZE];
7676 	uint32_t key_type;
7677 	uint8_t pn[GET_PN_MAX_LEN];
7678 };
7679 
7680 /**
7681  * struct wmi_host_get_rxpn_event - Rx PN event params
7682  * @vdev_id: vdev id
7683  * @peer_macaddr: Peer mac address
7684  * @keyix: key index
7685  * @pn: pn value
7686  */
7687 struct wmi_host_get_rxpn_event {
7688 	uint32_t vdev_id;
7689 	uint8_t mac_addr[QDF_MAC_ADDR_SIZE];
7690 	uint16_t keyix;
7691 	uint8_t pn[GET_RX_PN_MAX_LEN];
7692 };
7693 
7694 /**
7695  * struct wmi_init_cmd_param - INIT command params
7696  * @target_resource_config: pointer to resource config
7697  * @num_mem_chunks: number of memory chunks
7698  * @struct wmi_host_mem_chunk: pointer to memory chunks
7699  * @hw_mode_index: HW mode index chosen
7700  * @num_band_to_mac: Number of band to mac setting
7701  * @struct wmi_host_pdev_band_to_mac: band to mac setting
7702  */
7703 struct wmi_init_cmd_param {
7704 	target_resource_config *res_cfg;
7705 	uint8_t num_mem_chunks;
7706 	struct wmi_host_mem_chunk *mem_chunks;
7707 	uint32_t hw_mode_id;
7708 	uint32_t num_band_to_mac;
7709 	struct wmi_host_pdev_band_to_mac band_to_mac[WMI_HOST_MAX_PDEV];
7710 };
7711 
7712 /**
7713  * struct pdev_csa_switch_count_status - CSA switch count status event param
7714  * @pdev_id: Physical device identifier
7715  * @current_switch_count: Current CSA switch count
7716  * @num_vdevs: Number of vdevs that need restart
7717  * @vdev_ids: Array containing the vdev ids that need restart
7718  */
7719 struct pdev_csa_switch_count_status {
7720 	uint32_t pdev_id;
7721 	uint32_t current_switch_count;
7722 	uint32_t num_vdevs;
7723 	uint32_t *vdev_ids;
7724 };
7725 
7726 /**
7727  * enum wmi_host_active-apf_mode - FW_ACTIVE_APF_MODE, replicated from FW header
7728  * @WMI_HOST_ACTIVE_APF_DISABLED: APF is disabled for all packets in active mode
7729  * @WMI_HOST_ACTIVE_APF_ENABLED: APF is enabled for all packets in active mode
7730  * @WMI_HOST_ACTIVE_APF_ADAPTIVE: APF is enabled for packets up to some
7731  *	threshold in active mode
7732  */
7733 enum wmi_host_active_apf_mode {
7734 	WMI_HOST_ACTIVE_APF_DISABLED =	(1 << 1),
7735 	WMI_HOST_ACTIVE_APF_ENABLED =	(1 << 2),
7736 	WMI_HOST_ACTIVE_APF_ADAPTIVE =	(1 << 3)
7737 };
7738 
7739 /**
7740  * struct coex_config_params - Coex config command params
7741  * @vdev_id: Virtual AP device identifier
7742  * @config_type: Configuration type - wmi_coex_config_type enum
7743  * @config_arg1: Configuration argument based on config type
7744  * @config_arg2: Configuration argument based on config type
7745  * @config_arg3: Configuration argument based on config type
7746  * @config_arg4: Configuration argument based on config type
7747  * @config_arg5: Configuration argument based on config type
7748  * @config_arg6: Configuration argument based on config type
7749  */
7750 struct coex_config_params {
7751 	uint32_t vdev_id;
7752 	uint32_t config_type;
7753 	uint32_t config_arg1;
7754 	uint32_t config_arg2;
7755 	uint32_t config_arg3;
7756 	uint32_t config_arg4;
7757 	uint32_t config_arg5;
7758 	uint32_t config_arg6;
7759 };
7760 
7761 #define WMI_HOST_PDEV_ID_SOC 0xFF
7762 #define WMI_HOST_PDEV_ID_0   0
7763 #define WMI_HOST_PDEV_ID_1   1
7764 #define WMI_HOST_PDEV_ID_2   2
7765 #define WMI_HOST_PDEV_ID_INVALID 0xFFFFFFFF
7766 
7767 /**
7768  * struct wmi_host_ready_ev_param - Data revieved in ready event
7769  * @status:         FW init status. Success or Failure.
7770  * @num_dscp_table: Number of DSCP table supported in FW
7771  * @num_extra_mac_addr: Extra mac address present in ready event. Used
7772  *                  in DBDC mode to provide multiple mac per pdev.
7773  * @num_total_peer: Total number of peers FW could allocate. Zero means
7774  *                  FW could  allocate num peers requested by host in init.
7775  *                  Otherwise, host need update it max_peer to this value.
7776  * @num_extra_peer: Number of extra peers created and used within FW. Host
7777  *                  should expect peer_id can be num_total_peer + num_extra_peer
7778  *                  but it can create only upto num_total_peer.
7779  * @agile_capability: Boolean specification of whether the target supports
7780  *                  agile DFS, by means of using one 80 MHz radio chain for
7781  *                  radar detection, concurrently with using another radio
7782  *                  chain for non-160 MHz regular operation.
7783  * @max_ast_index: Max number of AST entries that FW could allocate.
7784  * @pktlog_defs_checksum: checksum computed from the definitions of the enums
7785  *                        and structs used within pktlog traces. This is sent
7786  *                        from the FW as part of FW ready event and needs
7787  *                        to be embedded in the pktlog buffer header as version.
7788  * @num_max_active_vdevs: number of max active virtual devices (VAPs) to
7789  *  support
7790  */
7791 struct wmi_host_ready_ev_param {
7792 	uint32_t status;
7793 	uint32_t num_dscp_table;
7794 	uint32_t num_extra_mac_addr;
7795 	uint32_t num_total_peer;
7796 	uint32_t num_extra_peer;
7797 	bool agile_capability;
7798 	uint32_t max_ast_index;
7799 	uint32_t pktlog_defs_checksum;
7800 	uint32_t num_max_active_vdevs;
7801 };
7802 
7803 enum bcn_offload_control_param {
7804 	BCN_OFFLD_CTRL_TX_DISABLE = 0,
7805 	BCN_OFFLD_CTRL_TX_ENABLE,
7806 	BCN_OFFLD_CTRL_SWBA_DISABLE,
7807 	BCN_OFFLD_CTRL_SWBA_ENABLE,
7808 };
7809 
7810 #ifdef OBSS_PD
7811 /**
7812  * struct wmi_host_obss_spatial_reuse_set_param - OBSS_PD_SPATIAL Reuse
7813  *                                                structure
7814  * @enable: Enable/Disable Spatial Reuse
7815  * @obss_min: Minimum OBSS level to use
7816  * @obss_max: Maximum OBSS level to use
7817  * @pdev_id: Pdev id
7818  */
7819 struct wmi_host_obss_spatial_reuse_set_param {
7820 	uint32_t enable;
7821 	int32_t obss_min;
7822 	int32_t obss_max;
7823 	uint32_t vdev_id;
7824 };
7825 
7826 /**
7827  * struct wmi_host_obss_spatial_reuse_set_def_thresh - default obsspd offsets
7828  * @obss_min: Minimum OBSS level to use
7829  * @obss_max: Maximum OBSS level to use
7830  * @vdev_type: vdev_type should be one of WMI_VDEV_TYPE_STA or WMI_VDEV_TYPE_AP
7831  */
7832 struct wmi_host_obss_spatial_reuse_set_def_thresh {
7833 	int32_t obss_min;
7834 	int32_t obss_max;
7835 	uint32_t vdev_type;
7836 };
7837 #endif
7838 
7839 /**
7840  * struct wmi_host_injector_frame_params - Injector frame configuration params
7841  * @vdev_id: vdev identifer of VAP
7842  * @enable: Enable/disable flag for the frame
7843  * @frame_type: Frame type to be enabled
7844  * @frame_inject_period: Periodicity of injector frame transmission in msecs
7845  * @frame_duration: Frame Duration field in usecs
7846  * @dstmac: Destination address to be used for the frame
7847  */
7848 struct wmi_host_injector_frame_params {
7849 	uint32_t vdev_id;
7850 	uint32_t enable;
7851 	uint32_t frame_type;
7852 	uint32_t frame_inject_period;
7853 	uint32_t frame_duration;
7854 	uint8_t dstmac[QDF_MAC_ADDR_SIZE];
7855 };
7856 
7857 /**
7858  * struct wds_entry - WDS entry structure
7859  * @peer_mac: peer mac
7860  * @wds_mac: wds mac address
7861  * @flags: flags
7862  */
7863 struct wdsentry {
7864 	u_int8_t peer_mac[QDF_MAC_ADDR_SIZE];
7865 	u_int8_t wds_mac[QDF_MAC_ADDR_SIZE];
7866 	uint32_t flags;
7867 };
7868 
7869 /**
7870  * struct wmi_obss_detection_cfg_param - obss detection cfg
7871  * @vdev_id: vdev id
7872  * @obss_detect_period_ms: detection period in ms
7873  * @obss_11b_ap_detect_mode: detect whether there is 11b ap/ibss
7874  * @obss_11b_sta_detect_mode: detect whether there is 11b sta
7875  *                            connected with other APs
7876  * @obss_11g_ap_detect_mode: detect whether there is 11g AP
7877  * @obss_11a_detect_mode: detect whether there is legacy 11a traffic
7878  * @obss_ht_legacy_detect_mode: detect whether there is ap which is
7879  *                              ht legacy mode
7880  * @obss_ht_mixed_detect_mode: detect whether there is ap which is ht mixed mode
7881  * @obss_ht_20mhz_detect_mode: detect whether there is ap which has 20M only
7882  *                             station
7883  */
7884 struct wmi_obss_detection_cfg_param {
7885 	uint32_t vdev_id;
7886 	uint32_t obss_detect_period_ms;
7887 	uint32_t obss_11b_ap_detect_mode;
7888 	uint32_t obss_11b_sta_detect_mode;
7889 	uint32_t obss_11g_ap_detect_mode;
7890 	uint32_t obss_11a_detect_mode;
7891 	uint32_t obss_ht_legacy_detect_mode;
7892 	uint32_t obss_ht_mixed_detect_mode;
7893 	uint32_t obss_ht_20mhz_detect_mode;
7894 };
7895 
7896 /**
7897  * enum wmi_obss_detection_reason - obss detection event reasons
7898  * @OBSS_OFFLOAD_DETECTION_DISABLED: OBSS detection disabled
7899  * @OBSS_OFFLOAD_DETECTION_PRESENT: OBSS present detection
7900  * @OBSS_OFFLOAD_DETECTION_ABSENT: OBSS absent detection
7901  *
7902  * Defines different types of reasons for obss detection event from firmware.
7903  */
7904 enum wmi_obss_detection_reason {
7905 	OBSS_OFFLOAD_DETECTION_DISABLED = 0,
7906 	OBSS_OFFLOAD_DETECTION_PRESENT  = 1,
7907 	OBSS_OFFLOAD_DETECTION_ABSENT   = 2,
7908 };
7909 
7910 /**
7911  * struct wmi_obss_detect_info - OBSS detection info from firmware
7912  * @vdev_id: ID of the vdev to which this info belongs.
7913  * @reason: Indicate if present or Absent detection,
7914  *          also if not supported offload for this vdev.
7915  * @matched_detection_masks: Detection bit map.
7916  * @matched_bssid_addr: MAC address valid for only if info is present detection.
7917  */
7918 struct wmi_obss_detect_info {
7919 	uint32_t vdev_id;
7920 	enum wmi_obss_detection_reason reason;
7921 	uint32_t matched_detection_masks;
7922 	uint8_t matched_bssid_addr[QDF_MAC_ADDR_SIZE];
7923 };
7924 
7925 #ifdef QCA_SUPPORT_CP_STATS
7926 /**
7927  * struct wmi_host_congestion_stats - host definition of congestion stats
7928  * @vdev_id: ID of the vdev to which this info belongs.
7929  * @congestion: This field holds the congestion percentage =
7930  *                                             (busy_time/total_time)*100
7931  * for the interval from when the vdev was started to the current time
7932  * (or the time at which the vdev was stopped).
7933  */
7934 struct wmi_host_congestion_stats {
7935 	uint32_t vdev_id;
7936 	uint32_t congestion;
7937 };
7938 #endif
7939 
7940 #ifdef FEATURE_WLAN_APF
7941 /**
7942  * struct wmi_apf_write_memory_params - Android Packet Filter write memory
7943  * params
7944  * @vdev_id: VDEV on which APF memory is to be written
7945  * @apf_version: APF version number
7946  * @program_len: Length reserved for program in the APF work memory
7947  * @addr_offset: Relative address in APF work memory to start writing
7948  * @length: Size of the write
7949  * @buf: Pointer to the buffer
7950  */
7951 struct wmi_apf_write_memory_params {
7952 	uint8_t vdev_id;
7953 	uint32_t apf_version;
7954 	uint32_t program_len;
7955 	uint32_t addr_offset;
7956 	uint32_t length;
7957 	uint8_t *buf;
7958 };
7959 
7960 /**
7961  * struct wmi_apf_read_memory_params - Android Packet Filter read memory params
7962  * @vdev_id: vdev id
7963  * @addr_offset: Relative address in APF work memory to read from
7964  * @length: Size of the memory fetch
7965  */
7966 struct wmi_apf_read_memory_params {
7967 	uint8_t vdev_id;
7968 	uint32_t addr_offset;
7969 	uint32_t length;
7970 };
7971 
7972 /**
7973  * struct wmi_apf_read_memory_resp_event_params - Event containing read Android
7974  *	Packet Filter memory response
7975  * @vdev_id: vdev id
7976  * @offset: Read memory offset
7977  * @length: Read memory length
7978  * @more_data: Indicates more data to come
7979  * @data: Pointer to the data
7980  */
7981 struct wmi_apf_read_memory_resp_event_params {
7982 	uint32_t vdev_id;
7983 	uint32_t offset;
7984 	uint32_t length;
7985 	bool more_data;
7986 	uint8_t *data;
7987 };
7988 #endif /* FEATURE_WLAN_APF */
7989 
7990 /* vdev control flags (per bits) */
7991 #define WMI_HOST_VDEV_FLAGS_NON_MBSSID_AP      0x00000001
7992 #define WMI_HOST_VDEV_FLAGS_TRANSMIT_AP        0x00000002
7993 #define WMI_HOST_VDEV_FLAGS_NON_TRANSMIT_AP    0x00000004
7994 
7995 /* Begin of roam scan stats definitions */
7996 
7997 #define WMI_ROAM_SCAN_STATS_MAX             5
7998 #define WMI_ROAM_SCAN_STATS_CANDIDATES_MAX  4
7999 #define WMI_ROAM_SCAN_STATS_CHANNELS_MAX    50
8000 
8001 /**
8002  * struct wmi_roam_scan_stats_req - Structure to hold roam scan stats request
8003  * @vdev_id: interface id
8004  */
8005 struct wmi_roam_scan_stats_req {
8006 	uint32_t vdev_id;
8007 };
8008 
8009 /**
8010  * struct wmi_roam_scan_cand - Roam scan candidates
8011  * @score: score of AP
8012  * @rssi: rssi of the AP
8013  * @freq: center frequency
8014  * @bssid: bssid of AP
8015  */
8016 struct wmi_roam_scan_cand {
8017 	uint32_t score;
8018 	uint32_t rssi;
8019 	uint32_t freq;
8020 	uint8_t  bssid[QDF_MAC_ADDR_SIZE];
8021 };
8022 
8023 /**
8024  * struct wmi_roam_scan_stats_params - Roam scan details
8025  * @time_stamp: time at which this roam scan happened
8026  * @client_id: id of client which triggered this scan
8027  * @num_scan_chans: number of channels that were scanned as part of this scan
8028  * @scan_freqs: frequencies of the channels that were scanned
8029  * @is_roam_successful: whether a successful roaming happened after this scan
8030  * @old_bssid: bssid to which STA is connected just before this scan
8031  * @new_bssid: bssid to which STA is roamed to in case of successful roaming
8032  * @num_roam_candidates: no.of roam candidates that are being reported
8033  * @roam_candidate: roam scan candidate details
8034  * @trigger_id: reason for triggering this roam or roam scan
8035  * @trigger_value: threshold value related to trigger_id
8036  */
8037 struct wmi_roam_scan_stats_params {
8038 	uint64_t time_stamp;
8039 	uint32_t client_id;
8040 	uint32_t num_scan_chans;
8041 	uint32_t scan_freqs[WMI_ROAM_SCAN_STATS_CHANNELS_MAX];
8042 	uint32_t is_roam_successful;
8043 
8044 	/* Bssid to which STA is connected when the roam scan is triggered */
8045 	uint8_t  old_bssid[QDF_MAC_ADDR_SIZE];
8046 
8047 	/*
8048 	 * Bssid to which STA is connected after roaming. Will be valid only
8049 	 * if is_roam_successful is true.
8050 	 */
8051 	uint8_t  new_bssid[QDF_MAC_ADDR_SIZE];
8052 
8053 	/* Number of roam candidates that are being reported in the stats */
8054 	uint32_t num_roam_candidates;
8055 	struct wmi_roam_scan_cand cand[WMI_ROAM_SCAN_STATS_CANDIDATES_MAX];
8056 	uint32_t trigger_id;
8057 	uint32_t trigger_value;
8058 };
8059 
8060 /**
8061  * struct wmi_roam_scan_stats_res - Roam scan stats response from firmware
8062  * @num_roam_scan: number of roam scans triggered
8063  * @roam_scan: place holder to indicate the array of
8064  *             wmi_roam_scan_stats_params followed by this structure
8065  */
8066 struct wmi_roam_scan_stats_res {
8067 	uint32_t num_roam_scans;
8068 	struct wmi_roam_scan_stats_params roam_scan[0];
8069 };
8070 
8071 #define MAX_ROAM_CANDIDATE_AP    9
8072 #define MAX_ROAM_SCAN_CHAN       38
8073 #define MAX_ROAM_SCAN_STATS_TLV  5
8074 #define WLAN_MAX_BTM_CANDIDATE   8
8075 #define WLAN_ROAM_MAX_FRAME_INFO (MAX_ROAM_CANDIDATE_AP * 6)
8076 /**
8077  * struct btm_req_candidate_info  - BTM request candidate
8078  * info
8079  * @candidate_bssid: Candidate bssid received in BTM request
8080  * @timestamp: candidate_timestamp;
8081  * @preference: candidate preference
8082  */
8083 struct wmi_btm_req_candidate_info {
8084 	struct qdf_mac_addr candidate_bssid;
8085 	uint32_t timestamp;
8086 	uint8_t preference;
8087 };
8088 
8089 /**
8090  * struct wmi_roam_btm_trigger_data - BTM roam trigger related information
8091  * @timestamp:             timestamp
8092  * @btm_request_mode:      BTM request mode - solicited/unsolicited
8093  * @disassoc_timer:        Number of TBTT before AP disassociates the STA in ms
8094  * @validity_interval:     Preferred candidate list validity interval in ms
8095  * @candidate_list_count:  Number of candidates in BTM request.
8096  * @btm_resp_status:       Status code of the BTM response.
8097  * @btm_bss_termination_timeout: BTM BSS termination timeout value
8098  * in milli seconds
8099  * @btm_mbo_assoc_retry_timeout: BTM MBO assoc retry timeout value in
8100  * milli seconds
8101  * @token: BTM request dialog token
8102  * @btm_cand: BTM request candidate information
8103  */
8104 struct wmi_roam_btm_trigger_data {
8105 	uint32_t timestamp;
8106 	uint32_t btm_request_mode;
8107 	uint32_t disassoc_timer;
8108 	uint32_t validity_interval;
8109 	uint32_t candidate_list_count;
8110 	uint32_t btm_resp_status;
8111 	uint32_t btm_bss_termination_timeout;
8112 	uint32_t btm_mbo_assoc_retry_timeout;
8113 	uint16_t token;
8114 	struct wmi_btm_req_candidate_info btm_cand[WLAN_MAX_BTM_CANDIDATE];
8115 };
8116 
8117 /**
8118  * struct wmi_roam_cu_trigger_data - BSS Load roam trigger parameters
8119  * @cu_load: Connected AP CU load percentage
8120  */
8121 struct wmi_roam_cu_trigger_data {
8122 	uint32_t cu_load;
8123 	/* TODO: Add threshold value */
8124 };
8125 
8126 /**
8127  * Struct wmi_roam_rssi_trigger_data - RSSI roam trigger related
8128  * parameters
8129  * @threshold: RSSI threshold value in dBm for LOW rssi roam trigger
8130  */
8131 struct wmi_roam_rssi_trigger_data {
8132 	uint32_t threshold;
8133 };
8134 
8135 /**
8136  * struct wmi_roam_deauth_trigger_data - Deauth roaming trigger related
8137  * parameters
8138  * @type:   1- Deauthentication 2- Disassociation
8139  * @reason: Status code of the Deauth/Disassoc received
8140  */
8141 struct wmi_roam_deauth_trigger_data {
8142 	uint32_t type;
8143 	uint32_t reason;
8144 };
8145 
8146 /**
8147  * struct wmi_roam_wtc_btm_trigger_data - wtc btm roaming trigger related
8148  * parameters
8149  * @roaming_mode: Roaming Mode
8150  * @vsie_trigger_reason: Roam trigger reason present in btm request
8151  * @sub_code: Sub code present in btm request
8152  * @wtc_mode: WTC mode
8153  * @wtc_scan_mode: WTC scan mode
8154  * @wtc_rssi_th: Connected AP threshold
8155  * @wtc_candi_rssi_th: Candidate AP threshold
8156  * @wtc_candi_rssi_ext_present: Flag to notify that whether fw sends rssi
8157  * threshold for 5g & 6g AP to host or not
8158  * @wtc_candi_rssi_th_5g: 5g candidate AP rssi threshold
8159  * @wtc_candi_rssi_th_6g: 6g candidate AP rssi threshold
8160  * @duration: WTC duration
8161  */
8162 struct wmi_roam_wtc_btm_trigger_data {
8163 	uint32_t roaming_mode;
8164 	uint32_t vsie_trigger_reason;
8165 	uint32_t sub_code;
8166 	uint32_t wtc_mode;
8167 	uint32_t wtc_scan_mode;
8168 	uint32_t wtc_rssi_th;
8169 	uint32_t wtc_candi_rssi_th;
8170 	uint32_t wtc_candi_rssi_ext_present;
8171 	uint32_t wtc_candi_rssi_th_5g;
8172 	uint32_t wtc_candi_rssi_th_6g;
8173 	uint32_t duration;
8174 };
8175 
8176 /**
8177  *  struct wmi_roam_candidate_info - Roam scan candidate APs related info
8178  *  @timestamp:   Host timestamp in millisecs
8179  *  @type:        0 - Candidate AP; 1 - Current connected AP.
8180  *  @bssid:       AP bssid.
8181  *  @freq:        Channel frquency
8182  *  @cu_load:     Channel utilization load of the AP.
8183  *  @cu_score:    Channel Utilization score.
8184  *  @rssi:        Candidate AP rssi
8185  *  @rssi_score:  AP RSSI score
8186  *  @total_score: Total score of the candidate AP.
8187  *  @etp:         Estimated throughput value of the AP in Mbps
8188  *  @dl_reason:   Denylist reason
8189  *  @dl_source:   Source of adding AP to DL
8190  *  @dl_timestamp:This timestamp indicates the time when AP added
8191  *  to denylist.
8192  *  @dl_original_timeout: Original timeout value in milli seconds
8193  *  when AP added to DL
8194  */
8195 struct wmi_roam_candidate_info {
8196 	uint32_t timestamp;
8197 	uint8_t type;
8198 	struct qdf_mac_addr bssid;
8199 	uint16_t freq;
8200 	uint32_t cu_load;
8201 	uint32_t cu_score;
8202 	uint32_t rssi;
8203 	uint32_t rssi_score;
8204 	uint32_t total_score;
8205 	uint32_t etp;
8206 	uint32_t dl_reason;
8207 	uint32_t dl_source;
8208 	uint32_t dl_timestamp;
8209 	uint32_t dl_original_timeout;
8210 };
8211 
8212 /**
8213  * struct wmi_roam_scan_data - Roam scan event details
8214  * @present:            Flag to check if the roam scan tlv is present
8215  * @is_btcoex_active:   is bluetooth connection active
8216  * @type:      0 - Partial roam scan; 1 - Full roam scan
8217  * @num_ap:    Number of candidate APs.
8218  * @num_chan:  Number of channels.
8219  * @frame_info_count: Frame info TLV count
8220  * @next_rssi_threshold: Next roam can trigger rssi threshold
8221  * @chan_freq: List of frequencies scanned as part of roam scan
8222  * @ap: List of candidate AP info
8223  */
8224 struct wmi_roam_scan_data {
8225 	bool present;
8226 	bool is_btcoex_active;
8227 	uint16_t type;
8228 	uint16_t num_ap;
8229 	uint16_t num_chan;
8230 	uint16_t frame_info_count;
8231 	uint32_t next_rssi_threshold;
8232 	uint16_t chan_freq[MAX_ROAM_SCAN_CHAN];
8233 	struct wmi_roam_candidate_info ap[MAX_ROAM_CANDIDATE_AP];
8234 };
8235 
8236 /**
8237  * struct wmi_roam_result - Roam result related info.
8238  * @present:            Flag to check if the roam result tlv is present
8239  * @timestamp:          Host timestamp in millisecs
8240  * @status:             0 - Roaming is success ; 1 - Roaming failed ;
8241  * 2 - No roam
8242  * @fail_reason:        One of WMI_ROAM_FAIL_REASON_ID
8243  * @fail_bssid:         BSSID of the last attempted roam failed AP
8244  */
8245 struct wmi_roam_result {
8246 	bool present;
8247 	uint32_t timestamp;
8248 	uint32_t status;
8249 	uint32_t fail_reason;
8250 	struct qdf_mac_addr fail_bssid;
8251 };
8252 
8253 #define WLAN_11KV_TYPE_BTM_REQ  1
8254 #define WLAN_11KV_TYPE_NEIGHBOR_RPT 2
8255 
8256 /**
8257  *  struct wmi_neighbor_report_data - Neighbor report/BTM request related
8258  *  data.
8259  *  @present:    Flag to check if the roam 11kv tlv is present
8260  *  @timestamp:  Host timestamp in millisecs
8261  *  @req_type:   1 - BTM query ; 2 - 11K neighbor report request
8262  *  @req_time:   Request timestamp in ms
8263  *  @resp_time:  Response timestamp in ms
8264  *  @num_freq: Number of frequencies
8265  *  @freq:       Channel frequency in Mhz
8266  *  @btm_query_token: BTM query dialog token.
8267  *  @btm_query_reason: BTM query reasons as defined in
8268  *  IEEE802.11v spec table 7-43x
8269  */
8270 struct wmi_neighbor_report_data {
8271 	bool present;
8272 	uint32_t timestamp;
8273 	uint8_t req_type;
8274 	uint32_t req_time;
8275 	uint32_t resp_time;
8276 	uint8_t num_freq;
8277 	uint32_t freq[MAX_ROAM_SCAN_CHAN];
8278 	uint16_t btm_query_token;
8279 	uint8_t btm_query_reason;
8280 };
8281 
8282 /**
8283  * struct wmi_roam_trigger_info() - Roam trigger related details
8284  * @present:            Flag to check if the roam_trigger_info tlv is present
8285  * @trigger_reason:     Roam trigger reason(enum WMI_ROAM_TRIGGER_REASON_ID)
8286  * @trigger_sub_reason: Sub reason for roam trigger if multiple roam scans
8287  * @current_rssi:       Connected AP RSSI
8288  * @timestamp:          Host timestamp in millisecs when roam scan was triggered
8289  * @btm_trig_data:      BTM roam trigger parameters.
8290  * @cu_trig_data:       BSS Load roam trigger parameters.
8291  * @rssi_trig_data:     RSSI trigger related info.
8292  * @deauth_trig_data:   Deauth roam trigger related info
8293  * @wtc_btm_trig_data:  WTC BTM roam trigger related info
8294  */
8295 struct wmi_roam_trigger_info {
8296 	bool present;
8297 	uint32_t trigger_reason;
8298 	uint32_t trigger_sub_reason;
8299 	uint32_t current_rssi;
8300 	uint32_t timestamp;
8301 	union {
8302 		struct wmi_roam_btm_trigger_data btm_trig_data;
8303 		struct wmi_roam_cu_trigger_data cu_trig_data;
8304 		struct wmi_roam_rssi_trigger_data rssi_trig_data;
8305 		struct wmi_roam_deauth_trigger_data deauth_trig_data;
8306 		struct wmi_roam_wtc_btm_trigger_data wtc_btm_trig_data;
8307 	};
8308 };
8309 
8310 /* End of roam scan stats definitions */
8311 
8312 /**
8313  * enum wmi_obss_color_collision_evt_type - bss color collision event type
8314  * @OBSS_COLOR_COLLISION_DETECTION_DISABLE: OBSS color detection disabled
8315  * @OBSS_COLOR_COLLISION_DETECTION: OBSS color collision detection
8316  * @OBSS_COLOR_FREE_SLOT_TIMER_EXPIRY: OBSS free slot detection with
8317  *                                     within expiry period
8318  * @OBSS_COLOR_FREE_SLOT_AVAILABLE: OBSS free slot detection
8319  *
8320  * Defines different types of type for obss color collision event type.
8321  */
8322 enum wmi_obss_color_collision_evt_type {
8323 	OBSS_COLOR_COLLISION_DETECTION_DISABLE = 0,
8324 	OBSS_COLOR_COLLISION_DETECTION = 1,
8325 	OBSS_COLOR_FREE_SLOT_TIMER_EXPIRY = 2,
8326 	OBSS_COLOR_FREE_SLOT_AVAILABLE = 3,
8327 };
8328 
8329 /**
8330  * struct wmi_obss_color_collision_cfg_param - obss color collision cfg
8331  * @vdev_id: vdev id
8332  * @flags: proposed for future use cases, currently not used.
8333  * @evt_type: bss color collision event.
8334  * @current_bss_color: current bss color.
8335  * @detection_period_ms: scan interval for both AP and STA mode.
8336  * @scan_period_ms: scan period for passive scan to detect collision.
8337  * @free_slot_expiry_time_ms: FW to notify host at timer expiry after
8338  *                            which Host will disable the bss color.
8339  */
8340 struct wmi_obss_color_collision_cfg_param {
8341 	uint32_t vdev_id;
8342 	uint32_t flags;
8343 	enum wmi_obss_color_collision_evt_type evt_type;
8344 	uint32_t current_bss_color;
8345 	uint32_t detection_period_ms;
8346 	uint32_t scan_period_ms;
8347 	uint32_t free_slot_expiry_time_ms;
8348 };
8349 
8350 /**
8351  * struct wmi_obss_color_collision_info - bss color detection info from firmware
8352  * @vdev_id: ID of the vdev to which this info belongs.
8353  * @evt_type: bss color collision event.
8354  * @obss_color_bitmap_bit0to31: Bit set indicating BSS color present.
8355  * @obss_color_bitmap_bit32to63: Bit set indicating BSS color present.
8356  */
8357 struct wmi_obss_color_collision_info {
8358 	uint32_t vdev_id;
8359 	enum wmi_obss_color_collision_evt_type evt_type;
8360 	uint32_t obss_color_bitmap_bit0to31;
8361 	uint32_t obss_color_bitmap_bit32to63;
8362 };
8363 
8364 #ifdef WMI_AP_SUPPORT
8365 /**
8366  * struct vap_pcp_tid_map_params - PCP tid map params
8367  * @vdev_id: vdev id
8368  * @pcp_to_tid_map: pointer to arry of pcp to tid map table
8369  */
8370 struct vap_pcp_tid_map_params {
8371 	uint32_t vdev_id;
8372 	uint32_t *pcp_to_tid_map;
8373 };
8374 
8375 /**
8376  * struct vap_tidmap_prec_params - tidmap precedence params
8377  * @vdev_id: vdev id
8378  * @map_precedence: precedence of tid mapping
8379  */
8380 struct vap_tidmap_prec_params {
8381 	uint32_t vdev_id;
8382 	uint32_t map_precedence;
8383 };
8384 
8385 #endif
8386 
8387 /**
8388  * struct wmi_cfr_peer_tx_event_param - CFR peer tx_event params
8389  * @capture_method: CFR data capture method
8390  * @vdev_id: ID of vdev to which this info belongs
8391  * @mac_addr: Peer MAC address. In AP mode, it is the address of connected
8392  *            peer for which CFR capture is needed. In STA mode, this is the
8393  *            address of AP it is connected to.
8394  * @primary_20mhz_chan: Primary 20 MHz channel frequency in MHz
8395  * @bandwidth: BW of measurement
8396  *             0 - 20MHz, 1 - 40MHz, 2 - 80MHz, 3 - 160MHz, 4 - 80+80MHz
8397  * @phy_mode: Phy mode of channel, type - WMI_HOST_WLAN_PHY_MODE
8398  * @band_center_freq1: Center frequency 1 in MHz
8399  * @band_center_freq2: Center frequency 2 in MHz
8400  * @spatial_streams: Number of spatial streams
8401  * @correlation_info_1: Address of data from wmi_dma_buf_release_entry [31:0]
8402  * @correlation_info_2:
8403  *     Bits [3:0]   - Address of data from wmi_dma_buf_release_entry [35:32]
8404  *     Bits [15:4]  - Reserved
8405  *     Bits [31:16] - Hardware PPDU ID [15:0]
8406  * @status:
8407  *     Bits [1:0]   - TX status, if any. 0-OK, 1-XRETRY, 2-DROP, 3-FILTERED.
8408  *     Bits [30:2]  - Reserved
8409  *     Bit  [31]    - Status of the CFR capture of the peer
8410  *                    1 - Successful, 0 - Unsuccessful.
8411  * @timestamp_us: Timestamp in microseconds at which the CFR was captured
8412  *                in the hardware. The clock used for this timestamp is private
8413  *                to the target and not visible to the host. So, Host can
8414  *                interpret only the relative timestamp deltas from one message
8415  *                to the next, but can't interpret the absolute timestamp
8416  *                from a single message
8417  * @counter: Count of the current CFR capture from FW.
8418  *           This is helpful to identify any drops in FW
8419  * @chain_rssi: Per chain RSSI of the peer, for upto WMI_HOST_MAX_CHAINS.
8420  *              Each chain's entry reports the RSSI for different bandwidths.
8421  *     Bits [7:0]   - Primary 20 MHz
8422  *     Bits [15:8]  - Secondary 20 MHz of 40 MHz channel (if applicable)
8423  *     Bits [23:16] - Secondary 40 MHz of 80 MHz channel (if applicable)
8424  *     Bits [31:24] - Secondary 80 MHz of 160 MHz channel (if applicable)
8425  *     Each of these 8-bit RSSI reports is in dBm units. 0x80 means invalid.
8426  *     Unused bytes within used chain_rssi indices will be 0x80.
8427  *     Unused rssi_chain indices will be set to 0x80808080.
8428  * @chain_phase: Per chain phase of peer for upto WMI_HOST_MAX_CHAINS.
8429  */
8430 typedef struct {
8431 	uint32_t capture_method;
8432 	uint32_t vdev_id;
8433 	struct qdf_mac_addr peer_mac_addr;
8434 	uint32_t primary_20mhz_chan;
8435 	uint32_t bandwidth;
8436 	uint32_t phy_mode;
8437 	uint32_t band_center_freq1;
8438 	uint32_t band_center_freq2;
8439 	uint32_t spatial_streams;
8440 	uint32_t correlation_info_1;
8441 	uint32_t correlation_info_2;
8442 	uint32_t status;
8443 	uint32_t timestamp_us;
8444 	uint32_t counter;
8445 	uint32_t chain_rssi[WMI_HOST_MAX_CHAINS];
8446 	uint16_t chain_phase[WMI_HOST_MAX_CHAINS];
8447 	int32_t cfo_measurement;
8448 	uint8_t agc_gain[WMI_HOST_MAX_CHAINS];
8449 	uint32_t rx_start_ts;
8450 	uint32_t rx_ts_reset;
8451 	uint32_t mcs_rate;
8452 	uint32_t gi_type;
8453 	uint8_t agc_gain_tbl_index[WMI_HOST_MAX_CHAINS];
8454 } wmi_cfr_peer_tx_event_param;
8455 
8456 /**
8457  * struct wmi_cfr_phase_delta_param - AoA phase delta params
8458  * @pdev_id: pdev id
8459  * @freq: primary 20 MHz channel frequency in mhz
8460  * @max_chains: indicates max chains for which AoA will be reported
8461  * @chain_phase_mask: indicates the chains to which phase values are
8462  * reported by target
8463  * @phase_delta: phase delta associated with reported chain's each gain value
8464  * ibf_cal_val: IBF values to be added with phase delta of chains reported
8465  */
8466 struct wmi_cfr_phase_delta_param {
8467 	uint32_t pdev_id;
8468 	uint32_t freq;
8469 	uint32_t max_chains;
8470 	uint32_t chain_phase_mask;
8471 	uint32_t phase_delta[WMI_MAX_CHAINS_PHASE][WMI_MAX_AOA_PHASE_DELTA];
8472 	uint32_t ibf_cal_val[WMI_MAX_CHAINS_PHASE];
8473 };
8474 
8475 /**
8476  * struct wmi_host_oem_indirect_data - Indirect OEM data
8477  * @pdev_id: pdev id
8478  * @len: length of data in bytes
8479  * @addr: 36 bit address
8480  */
8481 struct wmi_host_oem_indirect_data {
8482 	uint32_t pdev_id;
8483 	uint32_t len;
8484 	uint64_t addr;
8485 };
8486 
8487 /**
8488  * struct wmi_oem_response_param - OEM response info
8489  * @num_data1: First data response length
8490  * @num_data2: Second data response length
8491  * @data_1: First data
8492  * @data_2: Second data
8493  * @indirect_data: Indirect data
8494  */
8495 struct wmi_oem_response_param {
8496 	uint32_t num_data1;
8497 	uint32_t num_data2;
8498 	uint8_t  *data_1;
8499 	uint8_t  *data_2;
8500 	struct wmi_host_oem_indirect_data indirect_data;
8501 };
8502 
8503 /**
8504  * struct wifi_pos_11az_peer_delete_data  - Wifi pos 11az ranging peer delete
8505  * data. This structure is used to copy the peer related info from PASN
8506  * events and pass it to wifi pos module
8507  * @vdev_id: vdev id
8508  * @num_peers: Total number of peers to be deleted
8509  * @peer_info: PASN peer entry details
8510  */
8511 struct wifi_pos_pasn_peer_data {
8512 	uint8_t vdev_id;
8513 	uint8_t num_peers;
8514 	struct wlan_pasn_request peer_info[WLAN_MAX_11AZ_PEERS];
8515 };
8516 
8517 /**
8518  * struct mws_coex_state - Modem Wireless Subsystem(MWS) coex info
8519  * @vdev_id : vdev id
8520  * @coex_scheme_bitmap: LTE-WLAN coexistence scheme bitmap
8521  * Indicates the final schemes applied for the currrent Coex scenario.
8522  * Bit 0 - TDM policy
8523  * Bit 1 - Forced TDM policy
8524  * Bit 2 - Dynamic Power Back-off policy
8525  * Bit 3 - Channel Avoidance policy
8526  * Bit 4 - Static Power Back-off policy.
8527  * @active_conflict_count : active conflict count
8528  * @potential_conflict_count: Potential conflict count
8529  * @chavd_group0_bitmap : Indicates the WLAN channels to be avoided in
8530  * b/w WLAN CH-1 and WLAN CH-14
8531  * @chavd_group1_bitmap : Indicates the WLAN channels to be avoided in
8532  * WLAN CH-36 and WLAN CH-64
8533  * @chavd_group2_bitmap : Indicates the WLAN channels to be avoided in
8534  * b/w WLAN CH-100 and WLAN CH-140
8535  * @chavd_group2_bitmap : Indicates the WLAN channels to be avoided in
8536  * b/w WLAN CH-149 and WLAN CH-165
8537  */
8538 struct mws_coex_state {
8539 	uint32_t vdev_id;
8540 	uint32_t coex_scheme_bitmap;
8541 	uint32_t active_conflict_count;
8542 	uint32_t potential_conflict_count;
8543 	uint32_t chavd_group0_bitmap;
8544 	uint32_t chavd_group1_bitmap;
8545 	uint32_t chavd_group2_bitmap;
8546 	uint32_t chavd_group3_bitmap;
8547 };
8548 
8549 /**
8550  * struct hdd_mws_coex_dpwb_state - Modem Wireless Subsystem(MWS) coex DPWB info
8551  * @vdev_id : vdev id
8552  * @current_dpwb_state: Current state of the Dynamic Power Back-off SM
8553  * @pnp1_value: Tx power to be applied in next Dynamic Power Back-off cycle
8554  * @lte_dutycycle: Indicates the duty cycle of current LTE frame
8555  * @sinr_wlan_on: LTE SINR value in dB, when WLAN is ON
8556  * @sinr_wlan_off: LTE SINR value in dB, when WLAN is OFF
8557  * @bler_count: LTE blocks with error for the current block err report.
8558  * @block_count: Number of LTE blocks considered for bler count report.
8559  * @wlan_rssi_level: WLAN RSSI level
8560  * @wlan_rssi: WLAN RSSI value in dBm considered in DP backoff algo
8561  * @is_tdm_running: Indicates whether any TDM policy triggered
8562  */
8563 struct mws_coex_dpwb_state {
8564 	uint32_t vdev_id;
8565 	int32_t  current_dpwb_state;
8566 	int32_t  pnp1_value;
8567 	uint32_t lte_dutycycle;
8568 	int32_t  sinr_wlan_on;
8569 	int32_t  sinr_wlan_off;
8570 	uint32_t bler_count;
8571 	uint32_t block_count;
8572 	uint32_t wlan_rssi_level;
8573 	int32_t  wlan_rssi;
8574 	uint32_t is_tdm_running;
8575 };
8576 
8577 /**
8578  * struct mws_coex_tdm_state - Modem Wireless Subsystem(MWS) coex TDM state info
8579  * @vdev_id: vdev id
8580  * @tdm_policy_bitmap: Time Division Multiplexing (TDM) LTE-Coex Policy type.
8581  * @tdm_sf_bitmap: TDM LTE/WLAN sub-frame bitmap.
8582  */
8583 struct mws_coex_tdm_state {
8584 	uint32_t vdev_id;
8585 	uint32_t tdm_policy_bitmap;
8586 	uint32_t tdm_sf_bitmap;
8587 };
8588 
8589 /**
8590  * struct mws_coex_idrx_state - Modem Wireless Subsystem(MWS) coex IDRX state
8591  * @vdev_id: vdev id
8592  * @sub0_techid: SUB0 LTE-coex tech.
8593  * @sub0_policy: SUB0 mitigation policy.
8594  * @sub0_is_link_critical: Set if SUB0 is in link critical state.
8595  * @sub0_static_power: LTE SUB0 imposed static power applied
8596  * to WLAN due to LTE-WLAN coex.
8597  * @sub0_rssi: LTE SUB0 RSSI value in dBm.
8598  * @sub1_techid: SUB1 LTE-coex tech.
8599  * @sub1_policy: SUB1 mitigation policy.
8600  * @sub1_is_link_critical: Set if SUB1 is in link critical state.
8601  * @sub1_static_power: LTE SUB1 imposed static power applied
8602  * to WLAN due to LTE-WLAN coex.
8603  * @sub1_rssi: LTE SUB1 RSSI value in dBm.
8604  */
8605 struct mws_coex_idrx_state {
8606 	uint32_t vdev_id;
8607 	uint32_t sub0_techid;
8608 	uint32_t sub0_policy;
8609 	uint32_t sub0_is_link_critical;
8610 	int32_t  sub0_static_power;
8611 	int32_t  sub0_rssi;
8612 	uint32_t sub1_techid;
8613 	uint32_t sub1_policy;
8614 	uint32_t sub1_is_link_critical;
8615 	int32_t  sub1_static_power;
8616 	int32_t  sub1_rssi;
8617 };
8618 
8619 /**
8620  * struct mws_antenna_sharing_info - MWS Antenna sharing Info
8621  * @vdev_id: vdev id
8622  * @coex_flags: BDF values of Coex flags
8623  * @coex_config: BDF values of Coex Antenna sharing config
8624  * @tx_chain_mask: Tx Chain mask value
8625  * @rx_chain_mask: Rx Chain mask value
8626  * @rx_nss: Currently active Rx Spatial streams
8627  * @force_mrc: Forced MRC policy type
8628  * @rssi_type: RSSI value considered for MRC
8629  * @chain0_rssi: RSSI value measured at Chain-0 in dBm
8630  * @chain1_rssi: RSSI value measured at Chain-1 in dBm
8631  * @combined_rssi: RSSI value of two chains combined in dBm
8632  * @imbalance: Absolute imbalance between two Rx chains in dB
8633  * @mrc_threshold: RSSI threshold defined for the above imbalance value in dBm
8634  * @grant_duration: Antenna grant duration to WLAN, in milliseconds
8635  */
8636 struct mws_antenna_sharing_info {
8637 	uint32_t vdev_id;
8638 	uint32_t coex_flags;
8639 	uint32_t coex_config;
8640 	uint32_t tx_chain_mask;
8641 	uint32_t rx_chain_mask;
8642 	uint32_t rx_nss;
8643 	uint32_t force_mrc;
8644 	uint32_t rssi_type;
8645 	int32_t  chain0_rssi;
8646 	int32_t  chain1_rssi;
8647 	int32_t  combined_rssi;
8648 	uint32_t imbalance;
8649 	int32_t  mrc_threshold;
8650 	uint32_t grant_duration;
8651 };
8652 
8653 #ifdef FEATURE_ANI_LEVEL_REQUEST
8654 /* Maximum number of freqs for which ANI level can be requested */
8655 #define MAX_NUM_FREQS_FOR_ANI_LEVEL 20
8656 
8657 /* A valid ANI level lies between 0 to 9 */
8658 #define MAX_ANI_LEVEL 9
8659 
8660 struct wmi_host_ani_level_event {
8661 	uint32_t chan_freq;
8662 	uint32_t ani_level;
8663 };
8664 #endif /* FEATURE_ANI_LEVEL_REQUEST */
8665 
8666 #define WMI_HOST_TBTT_OFFSET_INVALID 0xffffffff
8667 #define MAX_SUPPORTED_NEIGHBORS 16
8668 
8669 /* command type for WMI_PDEV_TBTT_OFFSET_SYNC_CMDID */
8670 enum wmi_host_tbtt_offset_cmd_type {
8671 	WMI_HOST_PDEV_GET_TBTT_OFFSET,
8672 	WMI_HOST_PDEV_SET_TBTT_OFFSET,
8673 };
8674 
8675 /**
8676  * struct wmi_raw_event_buffer - fw event buffers
8677  * @evt_raw_buf: event raw buffer
8678  * @evt_processed_buf: event processed buffer
8679  */
8680 struct wmi_raw_event_buffer {
8681 	void *evt_raw_buf;
8682 	void *evt_processed_buf;
8683 };
8684 
8685 /* dpd_status fron WMI_PDEV_GET_DPD_STATUS_EVENTID */
8686 enum wmi_host_dpd_status {
8687 	WMI_HOST_DPD_STATUS_FAIL = 0,
8688 	WMI_HOST_DPD_STATUS_PASS = 1,
8689 	WMI_HOST_DPD_STATUS_INVALID = 2,
8690 };
8691 
8692 /**
8693  * struct wmi_host_pdev_get_dpd_status_event
8694  * @pdev_id: pdev id
8695  * @dpd_status: dpd status from FW - FAIL/PASS/INVALID
8696  */
8697 struct wmi_host_pdev_get_dpd_status_event {
8698 	uint32_t pdev_id;
8699 	enum wmi_host_dpd_status dpd_status;
8700 };
8701 
8702 struct wmi_host_pdev_get_halphy_cal_status_event {
8703 	uint32_t pdev_id;
8704 	uint32_t halphy_cal_adc_status:1,
8705 		 halphy_cal_bwfilter_status:1,
8706 		 halphy_cal_pdet_and_pal_status:1,
8707 		 halphy_cal_rxdco_status:1,
8708 		 halphy_cal_comb_txiq_rxiq_status:1,
8709 		 halphy_cal_ibf_status:1,
8710 		 halphy_cal_pa_droop_status:1,
8711 		 halphy_cal_dac_status:1,
8712 		 halphy_cal_ani_status:1,
8713 		 halphy_cal_noise_floor_status:1;
8714 };
8715 
8716 /**
8717  * enum wmi_host_set_halphy_cal_chan_sel - channel select values for
8718  *                                         set halphy cal
8719  * @WMI_HOST_SET_HALPHY_CAL_HOME_CHANNEL: Home channel
8720  * @WMI_HOST_SET_HALPHY_CAL_SCAN_CHANNEL: Scan channel
8721  * @WMI_HOST_SET_HALPHY_CAL_BOTH_CHANNELS: Both (Home + Scan) channels
8722  */
8723 
8724 enum wmi_host_set_halphy_cal_chan_sel {
8725 	WMI_HOST_SET_HALPHY_CAL_HOME_CHANNEL = 0,
8726 	WMI_HOST_SET_HALPHY_CAL_SCAN_CHANNEL = 1,
8727 	WMI_HOST_SET_HALPHY_CAL_BOTH_CHANNELS = 2,
8728 };
8729 
8730 /**
8731  * struct wmi_host_send_set_halphy_cal_info
8732  * @pdev_id: pdev id
8733  * @value: bmap value
8734  * @chan_Sel: channel for calibration - HOME/SCAN/BOTH
8735  */
8736 struct wmi_host_send_set_halphy_cal_info {
8737 	uint8_t pdev_id;
8738 	uint32_t value;
8739 	enum wmi_host_set_halphy_cal_chan_sel chan_sel;
8740 };
8741 
8742 /**
8743  * struct wmi_install_key_comp_event - params of install key complete event
8744  * @vdev_id: unique id identifying the VDEV, generated by the caller
8745  * @key_ix: key index
8746  * @key_flags: key flags
8747  * @status: Event status
8748  * @peer_macaddr: MAC address used for installing
8749  */
8750 struct wmi_install_key_comp_event {
8751 	uint32_t vdev_id;
8752 	uint32_t key_ix;
8753 	uint32_t key_flags;
8754 	uint32_t status;
8755 	uint8_t peer_macaddr[QDF_MAC_ADDR_SIZE];
8756 };
8757 
8758 /**
8759  * wmi_host_set_halphy_cal_status - status values from
8760  *                                 WMI_PDEV_SET_HALPHY_CAL_BMAP_EVENTID
8761  * @WMI_HOST_SET_HALPHY_CAL_STATUS_SUCCESS: set halphy cal success
8762  * @WMI_HOST_SET_HALPHY_CAL_STATUS_FAIL: set halphy cal failure
8763  */
8764 enum wmi_host_set_halphy_cal_status {
8765         WMI_HOST_SET_HALPHY_CAL_STATUS_SUCCESS = 0,
8766         WMI_HOST_SET_HALPHY_CAL_STATUS_FAIL = 1,
8767 };
8768 
8769 /**
8770  * struct wmi_host_send_set_halphy_cal_event
8771  * @pdev_id: pdev id
8772  * @status: PASS/FAIL
8773  */
8774 struct wmi_host_pdev_set_halphy_cal_event {
8775 	uint32_t pdev_id;
8776 	enum wmi_host_set_halphy_cal_status status;
8777 };
8778 
8779 #ifdef FEATURE_MEC_OFFLOAD
8780 /**
8781  * struct set_mec_timer_params - params MEC timer params
8782  * @pdev_id: unique id identifying the PDEV, generated by the caller
8783  * @vdev_id: unique id identifying the VDEV, generated by the caller
8784  * @mec_aging_timer_threshold: The Threshold for mec aging timer in ms
8785  * @enable: Enable/Disable the command
8786  */
8787 struct set_mec_timer_params {
8788 	uint32_t pdev_id;
8789 	uint32_t vdev_id;
8790 	uint32_t mec_aging_timer_threshold;
8791 };
8792 #endif
8793 
8794 #ifdef WLAN_FEATURE_DYNAMIC_MAC_ADDR_UPDATE
8795 /**
8796  * struct set_mac_addr_params - Set MAC address command parameter
8797  * @vdev_id: vdev id
8798  * @mac_addr: VDEV MAC address
8799  * @mmld_addr: MLD address of the vdev
8800  */
8801 struct set_mac_addr_params {
8802 	uint8_t vdev_id;
8803 	struct qdf_mac_addr mac_addr;
8804 	struct qdf_mac_addr mld_addr;
8805 };
8806 #endif
8807 
8808 #ifdef WLAN_FEATURE_SON
8809 /**
8810  * struct wmi_host_inst_rssi_stats_resp - inst rssi stats
8811  * @inst_rssi: instantaneous rssi above the noise floor in dB unit
8812  * @peer_macaddr: peer mac address
8813  * @vdev_id: vdev_id
8814  */
8815 struct wmi_host_inst_rssi_stats_resp {
8816 	uint32_t inst_rssi;
8817 	struct qdf_mac_addr peer_macaddr;
8818 	uint32_t vdev_id;
8819 };
8820 #endif
8821 
8822 /**
8823  * struct vdev_pn_mgmt_rxfilter_params - Send PN mgmt RxFilter command params
8824  * @vdev_id: vdev id
8825  * @pn_rxfilter: Rx Filter
8826  */
8827 struct vdev_pn_mgmt_rxfilter_params {
8828 	uint8_t vdev_id;
8829 	uint32_t pn_rxfilter;
8830 };
8831 
8832 /**
8833  * struct wmi_host_sw_cal_ver - BDF and FTM cal version data
8834  * @bdf_cal_ver: SW cal version in BDF
8835  * @ftm_cal_ver: SW cal version in factory data
8836  * @status: status. 0 for success, non-zero if version is incorrect
8837  */
8838 struct wmi_host_sw_cal_ver {
8839 	uint32_t bdf_cal_ver;
8840 	uint32_t ftm_cal_ver;
8841 	uint32_t status;
8842 };
8843 #endif /* _WMI_UNIFIED_PARAM_H_ */
8844