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