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