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