2 * Copyright (c) 2005-2011 Atheros Communications Inc.
3 * Copyright (c) 2011-2013 Qualcomm Atheros, Inc.
5 * Permission to use, copy, modify, and/or distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21 #include <linux/types.h>
22 #include <net/mac80211.h>
25 * This file specifies the WMI interface for the Unified Software
28 * It includes definitions of all the commands and events. Commands are
29 * messages from the host to the target. Events and Replies are messages
30 * from the target to the host.
32 * Ownership of correctness in regards to WMI commands belongs to the host
33 * driver and the target is not required to validate parameters for value,
34 * proper range, or any other checking.
36 * Guidelines for extending this interface are below.
38 * 1. Add new WMI commands ONLY within the specified range - 0x9000 - 0x9fff
40 * 2. Use ONLY u32 type for defining member variables within WMI
41 * command/event structures. Do not use u8, u16, bool or
42 * enum types within these structures.
44 * 3. DO NOT define bit fields within structures. Implement bit fields
45 * using masks if necessary. Do not use the programming language's bit
48 * 4. Define macros for encode/decode of u8, u16 fields within
49 * the u32 variables. Use these macros for set/get of these fields.
50 * Try to use this to optimize the structure without bloating it with
51 * u32 variables for every lower sized field.
53 * 5. Do not use PACK/UNPACK attributes for the structures as each member
54 * variable is already 4-byte aligned by virtue of being a u32
57 * 6. Comment each parameter part of the WMI command/event structure by
58 * using the 2 stars at the begining of C comment instead of one star to
59 * enable HTML document generation using Doxygen.
68 #define WMI_CMD_HDR_CMD_ID_MASK 0x00FFFFFF
69 #define WMI_CMD_HDR_CMD_ID_LSB 0
70 #define WMI_CMD_HDR_PLT_PRIV_MASK 0xFF000000
71 #define WMI_CMD_HDR_PLT_PRIV_LSB 24
73 #define HTC_PROTOCOL_VERSION 0x0002
74 #define WMI_PROTOCOL_VERSION 0x0002
77 * There is no signed version of __le32, so for a temporary solution come
78 * up with our own version. The idea is from fs/ntfs/types.h.
80 * Use a_ prefix so that it doesn't conflict if we get proper support to
83 typedef __s32 __bitwise a_sle32;
85 static inline a_sle32 a_cpu_to_sle32(s32 val)
87 return (__force a_sle32)cpu_to_le32(val);
90 static inline s32 a_sle32_to_cpu(a_sle32 val)
92 return le32_to_cpu((__force __le32)val);
96 WMI_SERVICE_BEACON_OFFLOAD = 0,
97 WMI_SERVICE_SCAN_OFFLOAD,
98 WMI_SERVICE_ROAM_OFFLOAD,
99 WMI_SERVICE_BCN_MISS_OFFLOAD,
100 WMI_SERVICE_STA_PWRSAVE,
101 WMI_SERVICE_STA_ADVANCED_PWRSAVE,
102 WMI_SERVICE_AP_UAPSD,
105 WMI_SERVICE_BLOCKACK,
107 WMI_SERVICE_BCN_FILTER,
109 WMI_SERVICE_RATECTRL,
111 WMI_SERVICE_RATECTRL_CACHE,
112 WMI_SERVICE_IRAM_TIDS,
113 WMI_SERVICE_ARPNS_OFFLOAD,
115 WMI_SERVICE_GTK_OFFLOAD,
116 WMI_SERVICE_SCAN_SCH,
117 WMI_SERVICE_CSA_OFFLOAD,
119 WMI_SERVICE_COEX_FREQAVOID,
120 WMI_SERVICE_PACKET_POWER_SAVE,
121 WMI_SERVICE_FORCE_FW_HANG,
123 WMI_SERVICE_STA_DTIM_PS_MODULATED_DTIM,
124 WMI_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG,
125 WMI_SERVICE_STA_UAPSD_VAR_AUTO_TRIG,
126 WMI_SERVICE_STA_KEEP_ALIVE,
127 WMI_SERVICE_TX_ENCAP,
129 WMI_SERVICE_SMART_ANTENNA_SW_SUPPORT,
130 WMI_SERVICE_SMART_ANTENNA_HW_SUPPORT,
131 WMI_SERVICE_ROAM_SCAN_OFFLOAD,
132 WMI_SERVICE_AP_PS_DETECT_OUT_OF_SYNC,
133 WMI_SERVICE_EARLY_RX,
134 WMI_SERVICE_STA_SMPS,
136 WMI_SERVICE_STA_WMMAC,
138 WMI_SERVICE_MCC_BCN_INTERVAL_CHANGE,
139 WMI_SERVICE_ADAPTIVE_OCS,
140 WMI_SERVICE_BA_SSN_SUPPORT,
141 WMI_SERVICE_FILTER_IPSEC_NATKEEPALIVE,
143 WMI_SERVICE_LTE_ANT_SHARE_SUPPORT,
144 WMI_SERVICE_BATCH_SCAN,
147 WMI_SERVICE_THERMAL_MGMT,
149 WMI_SERVICE_MHF_OFFLOAD,
150 WMI_SERVICE_COEX_SAR,
151 WMI_SERVICE_BCN_TXRATE_OVERRIDE,
153 WMI_SERVICE_L1SS_STAT,
154 WMI_SERVICE_ESTIMATE_LINKSPEED,
155 WMI_SERVICE_OBSS_SCAN,
156 WMI_SERVICE_TDLS_OFFCHAN,
157 WMI_SERVICE_TDLS_UAPSD_BUFFER_STA,
158 WMI_SERVICE_TDLS_UAPSD_SLEEP_STA,
159 WMI_SERVICE_IBSS_PWRSAVE,
163 WMI_SERVICE_HSOFFLOAD,
164 WMI_SERVICE_ROAM_HO_OFFLOAD,
165 WMI_SERVICE_RX_FULL_REORDER,
166 WMI_SERVICE_DHCP_OFFLOAD,
167 WMI_SERVICE_STA_RX_IPA_OFFLOAD_SUPPORT,
168 WMI_SERVICE_MDNS_OFFLOAD,
169 WMI_SERVICE_SAP_AUTH_OFFLOAD,
171 WMI_SERVICE_COEX_GPIO,
172 WMI_SERVICE_ENHANCED_PROXY_STA,
174 WMI_SERVICE_PEER_CACHING,
175 WMI_SERVICE_AUX_SPECTRAL_INTF,
176 WMI_SERVICE_AUX_CHAN_LOAD_INTF,
177 WMI_SERVICE_BSS_CHANNEL_INFO_64,
183 enum wmi_10x_service {
184 WMI_10X_SERVICE_BEACON_OFFLOAD = 0,
185 WMI_10X_SERVICE_SCAN_OFFLOAD,
186 WMI_10X_SERVICE_ROAM_OFFLOAD,
187 WMI_10X_SERVICE_BCN_MISS_OFFLOAD,
188 WMI_10X_SERVICE_STA_PWRSAVE,
189 WMI_10X_SERVICE_STA_ADVANCED_PWRSAVE,
190 WMI_10X_SERVICE_AP_UAPSD,
191 WMI_10X_SERVICE_AP_DFS,
192 WMI_10X_SERVICE_11AC,
193 WMI_10X_SERVICE_BLOCKACK,
194 WMI_10X_SERVICE_PHYERR,
195 WMI_10X_SERVICE_BCN_FILTER,
197 WMI_10X_SERVICE_RATECTRL,
199 WMI_10X_SERVICE_RATECTRL_CACHE,
200 WMI_10X_SERVICE_IRAM_TIDS,
201 WMI_10X_SERVICE_BURST,
203 /* introduced in 10.2 */
204 WMI_10X_SERVICE_SMART_ANTENNA_SW_SUPPORT,
205 WMI_10X_SERVICE_FORCE_FW_HANG,
206 WMI_10X_SERVICE_SMART_ANTENNA_HW_SUPPORT,
208 WMI_10X_SERVICE_COEX_GPIO,
211 enum wmi_main_service {
212 WMI_MAIN_SERVICE_BEACON_OFFLOAD = 0,
213 WMI_MAIN_SERVICE_SCAN_OFFLOAD,
214 WMI_MAIN_SERVICE_ROAM_OFFLOAD,
215 WMI_MAIN_SERVICE_BCN_MISS_OFFLOAD,
216 WMI_MAIN_SERVICE_STA_PWRSAVE,
217 WMI_MAIN_SERVICE_STA_ADVANCED_PWRSAVE,
218 WMI_MAIN_SERVICE_AP_UAPSD,
219 WMI_MAIN_SERVICE_AP_DFS,
220 WMI_MAIN_SERVICE_11AC,
221 WMI_MAIN_SERVICE_BLOCKACK,
222 WMI_MAIN_SERVICE_PHYERR,
223 WMI_MAIN_SERVICE_BCN_FILTER,
224 WMI_MAIN_SERVICE_RTT,
225 WMI_MAIN_SERVICE_RATECTRL,
226 WMI_MAIN_SERVICE_WOW,
227 WMI_MAIN_SERVICE_RATECTRL_CACHE,
228 WMI_MAIN_SERVICE_IRAM_TIDS,
229 WMI_MAIN_SERVICE_ARPNS_OFFLOAD,
230 WMI_MAIN_SERVICE_NLO,
231 WMI_MAIN_SERVICE_GTK_OFFLOAD,
232 WMI_MAIN_SERVICE_SCAN_SCH,
233 WMI_MAIN_SERVICE_CSA_OFFLOAD,
234 WMI_MAIN_SERVICE_CHATTER,
235 WMI_MAIN_SERVICE_COEX_FREQAVOID,
236 WMI_MAIN_SERVICE_PACKET_POWER_SAVE,
237 WMI_MAIN_SERVICE_FORCE_FW_HANG,
238 WMI_MAIN_SERVICE_GPIO,
239 WMI_MAIN_SERVICE_STA_DTIM_PS_MODULATED_DTIM,
240 WMI_MAIN_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG,
241 WMI_MAIN_SERVICE_STA_UAPSD_VAR_AUTO_TRIG,
242 WMI_MAIN_SERVICE_STA_KEEP_ALIVE,
243 WMI_MAIN_SERVICE_TX_ENCAP,
246 enum wmi_10_4_service {
247 WMI_10_4_SERVICE_BEACON_OFFLOAD = 0,
248 WMI_10_4_SERVICE_SCAN_OFFLOAD,
249 WMI_10_4_SERVICE_ROAM_OFFLOAD,
250 WMI_10_4_SERVICE_BCN_MISS_OFFLOAD,
251 WMI_10_4_SERVICE_STA_PWRSAVE,
252 WMI_10_4_SERVICE_STA_ADVANCED_PWRSAVE,
253 WMI_10_4_SERVICE_AP_UAPSD,
254 WMI_10_4_SERVICE_AP_DFS,
255 WMI_10_4_SERVICE_11AC,
256 WMI_10_4_SERVICE_BLOCKACK,
257 WMI_10_4_SERVICE_PHYERR,
258 WMI_10_4_SERVICE_BCN_FILTER,
259 WMI_10_4_SERVICE_RTT,
260 WMI_10_4_SERVICE_RATECTRL,
261 WMI_10_4_SERVICE_WOW,
262 WMI_10_4_SERVICE_RATECTRL_CACHE,
263 WMI_10_4_SERVICE_IRAM_TIDS,
264 WMI_10_4_SERVICE_BURST,
265 WMI_10_4_SERVICE_SMART_ANTENNA_SW_SUPPORT,
266 WMI_10_4_SERVICE_GTK_OFFLOAD,
267 WMI_10_4_SERVICE_SCAN_SCH,
268 WMI_10_4_SERVICE_CSA_OFFLOAD,
269 WMI_10_4_SERVICE_CHATTER,
270 WMI_10_4_SERVICE_COEX_FREQAVOID,
271 WMI_10_4_SERVICE_PACKET_POWER_SAVE,
272 WMI_10_4_SERVICE_FORCE_FW_HANG,
273 WMI_10_4_SERVICE_SMART_ANTENNA_HW_SUPPORT,
274 WMI_10_4_SERVICE_GPIO,
275 WMI_10_4_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG,
276 WMI_10_4_SERVICE_STA_UAPSD_VAR_AUTO_TRIG,
277 WMI_10_4_SERVICE_STA_KEEP_ALIVE,
278 WMI_10_4_SERVICE_TX_ENCAP,
279 WMI_10_4_SERVICE_AP_PS_DETECT_OUT_OF_SYNC,
280 WMI_10_4_SERVICE_EARLY_RX,
281 WMI_10_4_SERVICE_ENHANCED_PROXY_STA,
283 WMI_10_4_SERVICE_ATF,
284 WMI_10_4_SERVICE_PEER_CACHING,
285 WMI_10_4_SERVICE_COEX_GPIO,
286 WMI_10_4_SERVICE_AUX_SPECTRAL_INTF,
287 WMI_10_4_SERVICE_AUX_CHAN_LOAD_INTF,
288 WMI_10_4_SERVICE_BSS_CHANNEL_INFO_64,
291 static inline char *wmi_service_name(int service_id)
293 #define SVCSTR(x) case x: return #x
295 switch (service_id) {
296 SVCSTR(WMI_SERVICE_BEACON_OFFLOAD);
297 SVCSTR(WMI_SERVICE_SCAN_OFFLOAD);
298 SVCSTR(WMI_SERVICE_ROAM_OFFLOAD);
299 SVCSTR(WMI_SERVICE_BCN_MISS_OFFLOAD);
300 SVCSTR(WMI_SERVICE_STA_PWRSAVE);
301 SVCSTR(WMI_SERVICE_STA_ADVANCED_PWRSAVE);
302 SVCSTR(WMI_SERVICE_AP_UAPSD);
303 SVCSTR(WMI_SERVICE_AP_DFS);
304 SVCSTR(WMI_SERVICE_11AC);
305 SVCSTR(WMI_SERVICE_BLOCKACK);
306 SVCSTR(WMI_SERVICE_PHYERR);
307 SVCSTR(WMI_SERVICE_BCN_FILTER);
308 SVCSTR(WMI_SERVICE_RTT);
309 SVCSTR(WMI_SERVICE_RATECTRL);
310 SVCSTR(WMI_SERVICE_WOW);
311 SVCSTR(WMI_SERVICE_RATECTRL_CACHE);
312 SVCSTR(WMI_SERVICE_IRAM_TIDS);
313 SVCSTR(WMI_SERVICE_ARPNS_OFFLOAD);
314 SVCSTR(WMI_SERVICE_NLO);
315 SVCSTR(WMI_SERVICE_GTK_OFFLOAD);
316 SVCSTR(WMI_SERVICE_SCAN_SCH);
317 SVCSTR(WMI_SERVICE_CSA_OFFLOAD);
318 SVCSTR(WMI_SERVICE_CHATTER);
319 SVCSTR(WMI_SERVICE_COEX_FREQAVOID);
320 SVCSTR(WMI_SERVICE_PACKET_POWER_SAVE);
321 SVCSTR(WMI_SERVICE_FORCE_FW_HANG);
322 SVCSTR(WMI_SERVICE_GPIO);
323 SVCSTR(WMI_SERVICE_STA_DTIM_PS_MODULATED_DTIM);
324 SVCSTR(WMI_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG);
325 SVCSTR(WMI_SERVICE_STA_UAPSD_VAR_AUTO_TRIG);
326 SVCSTR(WMI_SERVICE_STA_KEEP_ALIVE);
327 SVCSTR(WMI_SERVICE_TX_ENCAP);
328 SVCSTR(WMI_SERVICE_BURST);
329 SVCSTR(WMI_SERVICE_SMART_ANTENNA_SW_SUPPORT);
330 SVCSTR(WMI_SERVICE_SMART_ANTENNA_HW_SUPPORT);
331 SVCSTR(WMI_SERVICE_ROAM_SCAN_OFFLOAD);
332 SVCSTR(WMI_SERVICE_AP_PS_DETECT_OUT_OF_SYNC);
333 SVCSTR(WMI_SERVICE_EARLY_RX);
334 SVCSTR(WMI_SERVICE_STA_SMPS);
335 SVCSTR(WMI_SERVICE_FWTEST);
336 SVCSTR(WMI_SERVICE_STA_WMMAC);
337 SVCSTR(WMI_SERVICE_TDLS);
338 SVCSTR(WMI_SERVICE_MCC_BCN_INTERVAL_CHANGE);
339 SVCSTR(WMI_SERVICE_ADAPTIVE_OCS);
340 SVCSTR(WMI_SERVICE_BA_SSN_SUPPORT);
341 SVCSTR(WMI_SERVICE_FILTER_IPSEC_NATKEEPALIVE);
342 SVCSTR(WMI_SERVICE_WLAN_HB);
343 SVCSTR(WMI_SERVICE_LTE_ANT_SHARE_SUPPORT);
344 SVCSTR(WMI_SERVICE_BATCH_SCAN);
345 SVCSTR(WMI_SERVICE_QPOWER);
346 SVCSTR(WMI_SERVICE_PLMREQ);
347 SVCSTR(WMI_SERVICE_THERMAL_MGMT);
348 SVCSTR(WMI_SERVICE_RMC);
349 SVCSTR(WMI_SERVICE_MHF_OFFLOAD);
350 SVCSTR(WMI_SERVICE_COEX_SAR);
351 SVCSTR(WMI_SERVICE_BCN_TXRATE_OVERRIDE);
352 SVCSTR(WMI_SERVICE_NAN);
353 SVCSTR(WMI_SERVICE_L1SS_STAT);
354 SVCSTR(WMI_SERVICE_ESTIMATE_LINKSPEED);
355 SVCSTR(WMI_SERVICE_OBSS_SCAN);
356 SVCSTR(WMI_SERVICE_TDLS_OFFCHAN);
357 SVCSTR(WMI_SERVICE_TDLS_UAPSD_BUFFER_STA);
358 SVCSTR(WMI_SERVICE_TDLS_UAPSD_SLEEP_STA);
359 SVCSTR(WMI_SERVICE_IBSS_PWRSAVE);
360 SVCSTR(WMI_SERVICE_LPASS);
361 SVCSTR(WMI_SERVICE_EXTSCAN);
362 SVCSTR(WMI_SERVICE_D0WOW);
363 SVCSTR(WMI_SERVICE_HSOFFLOAD);
364 SVCSTR(WMI_SERVICE_ROAM_HO_OFFLOAD);
365 SVCSTR(WMI_SERVICE_RX_FULL_REORDER);
366 SVCSTR(WMI_SERVICE_DHCP_OFFLOAD);
367 SVCSTR(WMI_SERVICE_STA_RX_IPA_OFFLOAD_SUPPORT);
368 SVCSTR(WMI_SERVICE_MDNS_OFFLOAD);
369 SVCSTR(WMI_SERVICE_SAP_AUTH_OFFLOAD);
370 SVCSTR(WMI_SERVICE_ATF);
371 SVCSTR(WMI_SERVICE_COEX_GPIO);
372 SVCSTR(WMI_SERVICE_ENHANCED_PROXY_STA);
373 SVCSTR(WMI_SERVICE_TT);
374 SVCSTR(WMI_SERVICE_PEER_CACHING);
375 SVCSTR(WMI_SERVICE_AUX_SPECTRAL_INTF);
376 SVCSTR(WMI_SERVICE_AUX_CHAN_LOAD_INTF);
377 SVCSTR(WMI_SERVICE_BSS_CHANNEL_INFO_64);
385 #define WMI_SERVICE_IS_ENABLED(wmi_svc_bmap, svc_id, len) \
386 ((svc_id) < (len) && \
387 __le32_to_cpu((wmi_svc_bmap)[(svc_id)/(sizeof(u32))]) & \
388 BIT((svc_id)%(sizeof(u32))))
390 #define SVCMAP(x, y, len) \
392 if (WMI_SERVICE_IS_ENABLED((in), (x), (len))) \
396 static inline void wmi_10x_svc_map(const __le32 *in, unsigned long *out,
399 SVCMAP(WMI_10X_SERVICE_BEACON_OFFLOAD,
400 WMI_SERVICE_BEACON_OFFLOAD, len);
401 SVCMAP(WMI_10X_SERVICE_SCAN_OFFLOAD,
402 WMI_SERVICE_SCAN_OFFLOAD, len);
403 SVCMAP(WMI_10X_SERVICE_ROAM_OFFLOAD,
404 WMI_SERVICE_ROAM_OFFLOAD, len);
405 SVCMAP(WMI_10X_SERVICE_BCN_MISS_OFFLOAD,
406 WMI_SERVICE_BCN_MISS_OFFLOAD, len);
407 SVCMAP(WMI_10X_SERVICE_STA_PWRSAVE,
408 WMI_SERVICE_STA_PWRSAVE, len);
409 SVCMAP(WMI_10X_SERVICE_STA_ADVANCED_PWRSAVE,
410 WMI_SERVICE_STA_ADVANCED_PWRSAVE, len);
411 SVCMAP(WMI_10X_SERVICE_AP_UAPSD,
412 WMI_SERVICE_AP_UAPSD, len);
413 SVCMAP(WMI_10X_SERVICE_AP_DFS,
414 WMI_SERVICE_AP_DFS, len);
415 SVCMAP(WMI_10X_SERVICE_11AC,
416 WMI_SERVICE_11AC, len);
417 SVCMAP(WMI_10X_SERVICE_BLOCKACK,
418 WMI_SERVICE_BLOCKACK, len);
419 SVCMAP(WMI_10X_SERVICE_PHYERR,
420 WMI_SERVICE_PHYERR, len);
421 SVCMAP(WMI_10X_SERVICE_BCN_FILTER,
422 WMI_SERVICE_BCN_FILTER, len);
423 SVCMAP(WMI_10X_SERVICE_RTT,
424 WMI_SERVICE_RTT, len);
425 SVCMAP(WMI_10X_SERVICE_RATECTRL,
426 WMI_SERVICE_RATECTRL, len);
427 SVCMAP(WMI_10X_SERVICE_WOW,
428 WMI_SERVICE_WOW, len);
429 SVCMAP(WMI_10X_SERVICE_RATECTRL_CACHE,
430 WMI_SERVICE_RATECTRL_CACHE, len);
431 SVCMAP(WMI_10X_SERVICE_IRAM_TIDS,
432 WMI_SERVICE_IRAM_TIDS, len);
433 SVCMAP(WMI_10X_SERVICE_BURST,
434 WMI_SERVICE_BURST, len);
435 SVCMAP(WMI_10X_SERVICE_SMART_ANTENNA_SW_SUPPORT,
436 WMI_SERVICE_SMART_ANTENNA_SW_SUPPORT, len);
437 SVCMAP(WMI_10X_SERVICE_FORCE_FW_HANG,
438 WMI_SERVICE_FORCE_FW_HANG, len);
439 SVCMAP(WMI_10X_SERVICE_SMART_ANTENNA_HW_SUPPORT,
440 WMI_SERVICE_SMART_ANTENNA_HW_SUPPORT, len);
441 SVCMAP(WMI_10X_SERVICE_ATF,
442 WMI_SERVICE_ATF, len);
443 SVCMAP(WMI_10X_SERVICE_COEX_GPIO,
444 WMI_SERVICE_COEX_GPIO, len);
447 static inline void wmi_main_svc_map(const __le32 *in, unsigned long *out,
450 SVCMAP(WMI_MAIN_SERVICE_BEACON_OFFLOAD,
451 WMI_SERVICE_BEACON_OFFLOAD, len);
452 SVCMAP(WMI_MAIN_SERVICE_SCAN_OFFLOAD,
453 WMI_SERVICE_SCAN_OFFLOAD, len);
454 SVCMAP(WMI_MAIN_SERVICE_ROAM_OFFLOAD,
455 WMI_SERVICE_ROAM_OFFLOAD, len);
456 SVCMAP(WMI_MAIN_SERVICE_BCN_MISS_OFFLOAD,
457 WMI_SERVICE_BCN_MISS_OFFLOAD, len);
458 SVCMAP(WMI_MAIN_SERVICE_STA_PWRSAVE,
459 WMI_SERVICE_STA_PWRSAVE, len);
460 SVCMAP(WMI_MAIN_SERVICE_STA_ADVANCED_PWRSAVE,
461 WMI_SERVICE_STA_ADVANCED_PWRSAVE, len);
462 SVCMAP(WMI_MAIN_SERVICE_AP_UAPSD,
463 WMI_SERVICE_AP_UAPSD, len);
464 SVCMAP(WMI_MAIN_SERVICE_AP_DFS,
465 WMI_SERVICE_AP_DFS, len);
466 SVCMAP(WMI_MAIN_SERVICE_11AC,
467 WMI_SERVICE_11AC, len);
468 SVCMAP(WMI_MAIN_SERVICE_BLOCKACK,
469 WMI_SERVICE_BLOCKACK, len);
470 SVCMAP(WMI_MAIN_SERVICE_PHYERR,
471 WMI_SERVICE_PHYERR, len);
472 SVCMAP(WMI_MAIN_SERVICE_BCN_FILTER,
473 WMI_SERVICE_BCN_FILTER, len);
474 SVCMAP(WMI_MAIN_SERVICE_RTT,
475 WMI_SERVICE_RTT, len);
476 SVCMAP(WMI_MAIN_SERVICE_RATECTRL,
477 WMI_SERVICE_RATECTRL, len);
478 SVCMAP(WMI_MAIN_SERVICE_WOW,
479 WMI_SERVICE_WOW, len);
480 SVCMAP(WMI_MAIN_SERVICE_RATECTRL_CACHE,
481 WMI_SERVICE_RATECTRL_CACHE, len);
482 SVCMAP(WMI_MAIN_SERVICE_IRAM_TIDS,
483 WMI_SERVICE_IRAM_TIDS, len);
484 SVCMAP(WMI_MAIN_SERVICE_ARPNS_OFFLOAD,
485 WMI_SERVICE_ARPNS_OFFLOAD, len);
486 SVCMAP(WMI_MAIN_SERVICE_NLO,
487 WMI_SERVICE_NLO, len);
488 SVCMAP(WMI_MAIN_SERVICE_GTK_OFFLOAD,
489 WMI_SERVICE_GTK_OFFLOAD, len);
490 SVCMAP(WMI_MAIN_SERVICE_SCAN_SCH,
491 WMI_SERVICE_SCAN_SCH, len);
492 SVCMAP(WMI_MAIN_SERVICE_CSA_OFFLOAD,
493 WMI_SERVICE_CSA_OFFLOAD, len);
494 SVCMAP(WMI_MAIN_SERVICE_CHATTER,
495 WMI_SERVICE_CHATTER, len);
496 SVCMAP(WMI_MAIN_SERVICE_COEX_FREQAVOID,
497 WMI_SERVICE_COEX_FREQAVOID, len);
498 SVCMAP(WMI_MAIN_SERVICE_PACKET_POWER_SAVE,
499 WMI_SERVICE_PACKET_POWER_SAVE, len);
500 SVCMAP(WMI_MAIN_SERVICE_FORCE_FW_HANG,
501 WMI_SERVICE_FORCE_FW_HANG, len);
502 SVCMAP(WMI_MAIN_SERVICE_GPIO,
503 WMI_SERVICE_GPIO, len);
504 SVCMAP(WMI_MAIN_SERVICE_STA_DTIM_PS_MODULATED_DTIM,
505 WMI_SERVICE_STA_DTIM_PS_MODULATED_DTIM, len);
506 SVCMAP(WMI_MAIN_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG,
507 WMI_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG, len);
508 SVCMAP(WMI_MAIN_SERVICE_STA_UAPSD_VAR_AUTO_TRIG,
509 WMI_SERVICE_STA_UAPSD_VAR_AUTO_TRIG, len);
510 SVCMAP(WMI_MAIN_SERVICE_STA_KEEP_ALIVE,
511 WMI_SERVICE_STA_KEEP_ALIVE, len);
512 SVCMAP(WMI_MAIN_SERVICE_TX_ENCAP,
513 WMI_SERVICE_TX_ENCAP, len);
516 static inline void wmi_10_4_svc_map(const __le32 *in, unsigned long *out,
519 SVCMAP(WMI_10_4_SERVICE_BEACON_OFFLOAD,
520 WMI_SERVICE_BEACON_OFFLOAD, len);
521 SVCMAP(WMI_10_4_SERVICE_SCAN_OFFLOAD,
522 WMI_SERVICE_SCAN_OFFLOAD, len);
523 SVCMAP(WMI_10_4_SERVICE_ROAM_OFFLOAD,
524 WMI_SERVICE_ROAM_OFFLOAD, len);
525 SVCMAP(WMI_10_4_SERVICE_BCN_MISS_OFFLOAD,
526 WMI_SERVICE_BCN_MISS_OFFLOAD, len);
527 SVCMAP(WMI_10_4_SERVICE_STA_PWRSAVE,
528 WMI_SERVICE_STA_PWRSAVE, len);
529 SVCMAP(WMI_10_4_SERVICE_STA_ADVANCED_PWRSAVE,
530 WMI_SERVICE_STA_ADVANCED_PWRSAVE, len);
531 SVCMAP(WMI_10_4_SERVICE_AP_UAPSD,
532 WMI_SERVICE_AP_UAPSD, len);
533 SVCMAP(WMI_10_4_SERVICE_AP_DFS,
534 WMI_SERVICE_AP_DFS, len);
535 SVCMAP(WMI_10_4_SERVICE_11AC,
536 WMI_SERVICE_11AC, len);
537 SVCMAP(WMI_10_4_SERVICE_BLOCKACK,
538 WMI_SERVICE_BLOCKACK, len);
539 SVCMAP(WMI_10_4_SERVICE_PHYERR,
540 WMI_SERVICE_PHYERR, len);
541 SVCMAP(WMI_10_4_SERVICE_BCN_FILTER,
542 WMI_SERVICE_BCN_FILTER, len);
543 SVCMAP(WMI_10_4_SERVICE_RTT,
544 WMI_SERVICE_RTT, len);
545 SVCMAP(WMI_10_4_SERVICE_RATECTRL,
546 WMI_SERVICE_RATECTRL, len);
547 SVCMAP(WMI_10_4_SERVICE_WOW,
548 WMI_SERVICE_WOW, len);
549 SVCMAP(WMI_10_4_SERVICE_RATECTRL_CACHE,
550 WMI_SERVICE_RATECTRL_CACHE, len);
551 SVCMAP(WMI_10_4_SERVICE_IRAM_TIDS,
552 WMI_SERVICE_IRAM_TIDS, len);
553 SVCMAP(WMI_10_4_SERVICE_BURST,
554 WMI_SERVICE_BURST, len);
555 SVCMAP(WMI_10_4_SERVICE_SMART_ANTENNA_SW_SUPPORT,
556 WMI_SERVICE_SMART_ANTENNA_SW_SUPPORT, len);
557 SVCMAP(WMI_10_4_SERVICE_GTK_OFFLOAD,
558 WMI_SERVICE_GTK_OFFLOAD, len);
559 SVCMAP(WMI_10_4_SERVICE_SCAN_SCH,
560 WMI_SERVICE_SCAN_SCH, len);
561 SVCMAP(WMI_10_4_SERVICE_CSA_OFFLOAD,
562 WMI_SERVICE_CSA_OFFLOAD, len);
563 SVCMAP(WMI_10_4_SERVICE_CHATTER,
564 WMI_SERVICE_CHATTER, len);
565 SVCMAP(WMI_10_4_SERVICE_COEX_FREQAVOID,
566 WMI_SERVICE_COEX_FREQAVOID, len);
567 SVCMAP(WMI_10_4_SERVICE_PACKET_POWER_SAVE,
568 WMI_SERVICE_PACKET_POWER_SAVE, len);
569 SVCMAP(WMI_10_4_SERVICE_FORCE_FW_HANG,
570 WMI_SERVICE_FORCE_FW_HANG, len);
571 SVCMAP(WMI_10_4_SERVICE_SMART_ANTENNA_HW_SUPPORT,
572 WMI_SERVICE_SMART_ANTENNA_HW_SUPPORT, len);
573 SVCMAP(WMI_10_4_SERVICE_GPIO,
574 WMI_SERVICE_GPIO, len);
575 SVCMAP(WMI_10_4_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG,
576 WMI_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG, len);
577 SVCMAP(WMI_10_4_SERVICE_STA_UAPSD_VAR_AUTO_TRIG,
578 WMI_SERVICE_STA_UAPSD_VAR_AUTO_TRIG, len);
579 SVCMAP(WMI_10_4_SERVICE_STA_KEEP_ALIVE,
580 WMI_SERVICE_STA_KEEP_ALIVE, len);
581 SVCMAP(WMI_10_4_SERVICE_TX_ENCAP,
582 WMI_SERVICE_TX_ENCAP, len);
583 SVCMAP(WMI_10_4_SERVICE_AP_PS_DETECT_OUT_OF_SYNC,
584 WMI_SERVICE_AP_PS_DETECT_OUT_OF_SYNC, len);
585 SVCMAP(WMI_10_4_SERVICE_EARLY_RX,
586 WMI_SERVICE_EARLY_RX, len);
587 SVCMAP(WMI_10_4_SERVICE_ENHANCED_PROXY_STA,
588 WMI_SERVICE_ENHANCED_PROXY_STA, len);
589 SVCMAP(WMI_10_4_SERVICE_TT,
590 WMI_SERVICE_TT, len);
591 SVCMAP(WMI_10_4_SERVICE_ATF,
592 WMI_SERVICE_ATF, len);
593 SVCMAP(WMI_10_4_SERVICE_PEER_CACHING,
594 WMI_SERVICE_PEER_CACHING, len);
595 SVCMAP(WMI_10_4_SERVICE_COEX_GPIO,
596 WMI_SERVICE_COEX_GPIO, len);
597 SVCMAP(WMI_10_4_SERVICE_AUX_SPECTRAL_INTF,
598 WMI_SERVICE_AUX_SPECTRAL_INTF, len);
599 SVCMAP(WMI_10_4_SERVICE_AUX_CHAN_LOAD_INTF,
600 WMI_SERVICE_AUX_CHAN_LOAD_INTF, len);
601 SVCMAP(WMI_10_4_SERVICE_BSS_CHANNEL_INFO_64,
602 WMI_SERVICE_BSS_CHANNEL_INFO_64, len);
607 /* 2 word representation of MAC addr */
608 struct wmi_mac_addr {
620 u32 start_scan_cmdid;
622 u32 scan_chan_list_cmdid;
623 u32 scan_sch_prio_tbl_cmdid;
624 u32 pdev_set_regdomain_cmdid;
625 u32 pdev_set_channel_cmdid;
626 u32 pdev_set_param_cmdid;
627 u32 pdev_pktlog_enable_cmdid;
628 u32 pdev_pktlog_disable_cmdid;
629 u32 pdev_set_wmm_params_cmdid;
630 u32 pdev_set_ht_cap_ie_cmdid;
631 u32 pdev_set_vht_cap_ie_cmdid;
632 u32 pdev_set_dscp_tid_map_cmdid;
633 u32 pdev_set_quiet_mode_cmdid;
634 u32 pdev_green_ap_ps_enable_cmdid;
635 u32 pdev_get_tpc_config_cmdid;
636 u32 pdev_set_base_macaddr_cmdid;
637 u32 vdev_create_cmdid;
638 u32 vdev_delete_cmdid;
639 u32 vdev_start_request_cmdid;
640 u32 vdev_restart_request_cmdid;
644 u32 vdev_set_param_cmdid;
645 u32 vdev_install_key_cmdid;
646 u32 peer_create_cmdid;
647 u32 peer_delete_cmdid;
648 u32 peer_flush_tids_cmdid;
649 u32 peer_set_param_cmdid;
650 u32 peer_assoc_cmdid;
651 u32 peer_add_wds_entry_cmdid;
652 u32 peer_remove_wds_entry_cmdid;
653 u32 peer_mcast_group_cmdid;
655 u32 pdev_send_bcn_cmdid;
657 u32 bcn_filter_rx_cmdid;
658 u32 prb_req_filter_rx_cmdid;
661 u32 addba_clear_resp_cmdid;
662 u32 addba_send_cmdid;
663 u32 addba_status_cmdid;
664 u32 delba_send_cmdid;
665 u32 addba_set_resp_cmdid;
666 u32 send_singleamsdu_cmdid;
667 u32 sta_powersave_mode_cmdid;
668 u32 sta_powersave_param_cmdid;
669 u32 sta_mimo_ps_mode_cmdid;
670 u32 pdev_dfs_enable_cmdid;
671 u32 pdev_dfs_disable_cmdid;
673 u32 roam_scan_rssi_threshold;
674 u32 roam_scan_period;
675 u32 roam_scan_rssi_change_threshold;
677 u32 ofl_scan_add_ap_profile;
678 u32 ofl_scan_remove_ap_profile;
680 u32 p2p_dev_set_device_info;
681 u32 p2p_dev_set_discoverability;
682 u32 p2p_go_set_beacon_ie;
683 u32 p2p_go_set_probe_resp_ie;
684 u32 p2p_set_vendor_ie_data_cmdid;
685 u32 ap_ps_peer_param_cmdid;
686 u32 ap_ps_peer_uapsd_coex_cmdid;
687 u32 peer_rate_retry_sched_cmdid;
688 u32 wlan_profile_trigger_cmdid;
689 u32 wlan_profile_set_hist_intvl_cmdid;
690 u32 wlan_profile_get_profile_data_cmdid;
691 u32 wlan_profile_enable_profile_id_cmdid;
692 u32 wlan_profile_list_profile_id_cmdid;
693 u32 pdev_suspend_cmdid;
694 u32 pdev_resume_cmdid;
695 u32 add_bcn_filter_cmdid;
696 u32 rmv_bcn_filter_cmdid;
697 u32 wow_add_wake_pattern_cmdid;
698 u32 wow_del_wake_pattern_cmdid;
699 u32 wow_enable_disable_wake_event_cmdid;
700 u32 wow_enable_cmdid;
701 u32 wow_hostwakeup_from_sleep_cmdid;
702 u32 rtt_measreq_cmdid;
704 u32 vdev_spectral_scan_configure_cmdid;
705 u32 vdev_spectral_scan_enable_cmdid;
706 u32 request_stats_cmdid;
707 u32 set_arp_ns_offload_cmdid;
708 u32 network_list_offload_config_cmdid;
709 u32 gtk_offload_cmdid;
710 u32 csa_offload_enable_cmdid;
711 u32 csa_offload_chanswitch_cmdid;
712 u32 chatter_set_mode_cmdid;
713 u32 peer_tid_addba_cmdid;
714 u32 peer_tid_delba_cmdid;
715 u32 sta_dtim_ps_method_cmdid;
716 u32 sta_uapsd_auto_trig_cmdid;
717 u32 sta_keepalive_cmd;
720 u32 dbglog_cfg_cmdid;
722 u32 pdev_ftm_intg_cmdid;
723 u32 vdev_set_keepalive_cmdid;
724 u32 vdev_get_keepalive_cmdid;
725 u32 force_fw_hang_cmdid;
726 u32 gpio_config_cmdid;
727 u32 gpio_output_cmdid;
728 u32 pdev_get_temperature_cmdid;
729 u32 vdev_set_wmm_params_cmdid;
730 u32 tdls_set_state_cmdid;
731 u32 tdls_peer_update_cmdid;
732 u32 adaptive_qcs_cmdid;
733 u32 scan_update_request_cmdid;
734 u32 vdev_standby_response_cmdid;
735 u32 vdev_resume_response_cmdid;
736 u32 wlan_peer_caching_add_peer_cmdid;
737 u32 wlan_peer_caching_evict_peer_cmdid;
738 u32 wlan_peer_caching_restore_peer_cmdid;
739 u32 wlan_peer_caching_print_all_peers_info_cmdid;
740 u32 peer_update_wds_entry_cmdid;
741 u32 peer_add_proxy_sta_entry_cmdid;
742 u32 rtt_keepalive_cmdid;
745 u32 vdev_ratemask_cmdid;
746 u32 qboost_cfg_cmdid;
747 u32 pdev_smart_ant_enable_cmdid;
748 u32 pdev_smart_ant_set_rx_antenna_cmdid;
749 u32 peer_smart_ant_set_tx_antenna_cmdid;
750 u32 peer_smart_ant_set_train_info_cmdid;
751 u32 peer_smart_ant_set_node_config_ops_cmdid;
752 u32 pdev_set_antenna_switch_table_cmdid;
753 u32 pdev_set_ctl_table_cmdid;
754 u32 pdev_set_mimogain_table_cmdid;
755 u32 pdev_ratepwr_table_cmdid;
756 u32 pdev_ratepwr_chainmsk_table_cmdid;
758 u32 tt_set_conf_cmdid;
760 u32 vdev_atf_request_cmdid;
761 u32 peer_atf_request_cmdid;
762 u32 pdev_get_ani_cck_config_cmdid;
763 u32 pdev_get_ani_ofdm_config_cmdid;
764 u32 pdev_reserve_ast_entry_cmdid;
765 u32 pdev_get_nfcal_power_cmdid;
766 u32 pdev_get_tpc_cmdid;
767 u32 pdev_get_ast_info_cmdid;
768 u32 vdev_set_dscp_tid_map_cmdid;
769 u32 pdev_get_info_cmdid;
770 u32 vdev_get_info_cmdid;
771 u32 vdev_filter_neighbor_rx_packets_cmdid;
772 u32 mu_cal_start_cmdid;
773 u32 set_cca_params_cmdid;
774 u32 pdev_bss_chan_info_request_cmdid;
775 u32 pdev_enable_adaptive_cca_cmdid;
779 * wmi command groups.
782 /* 0 to 2 are reserved */
784 WMI_GRP_SCAN = WMI_GRP_START,
814 #define WMI_CMD_GRP(grp_id) (((grp_id) << 12) | 0x1)
815 #define WMI_EVT_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
817 #define WMI_CMD_UNSUPPORTED 0
819 /* Command IDs and command events for MAIN FW. */
821 WMI_INIT_CMDID = 0x1,
823 /* Scan specific commands */
824 WMI_START_SCAN_CMDID = WMI_CMD_GRP(WMI_GRP_SCAN),
826 WMI_SCAN_CHAN_LIST_CMDID,
827 WMI_SCAN_SCH_PRIO_TBL_CMDID,
829 /* PDEV (physical device) specific commands */
830 WMI_PDEV_SET_REGDOMAIN_CMDID = WMI_CMD_GRP(WMI_GRP_PDEV),
831 WMI_PDEV_SET_CHANNEL_CMDID,
832 WMI_PDEV_SET_PARAM_CMDID,
833 WMI_PDEV_PKTLOG_ENABLE_CMDID,
834 WMI_PDEV_PKTLOG_DISABLE_CMDID,
835 WMI_PDEV_SET_WMM_PARAMS_CMDID,
836 WMI_PDEV_SET_HT_CAP_IE_CMDID,
837 WMI_PDEV_SET_VHT_CAP_IE_CMDID,
838 WMI_PDEV_SET_DSCP_TID_MAP_CMDID,
839 WMI_PDEV_SET_QUIET_MODE_CMDID,
840 WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID,
841 WMI_PDEV_GET_TPC_CONFIG_CMDID,
842 WMI_PDEV_SET_BASE_MACADDR_CMDID,
844 /* VDEV (virtual device) specific commands */
845 WMI_VDEV_CREATE_CMDID = WMI_CMD_GRP(WMI_GRP_VDEV),
846 WMI_VDEV_DELETE_CMDID,
847 WMI_VDEV_START_REQUEST_CMDID,
848 WMI_VDEV_RESTART_REQUEST_CMDID,
852 WMI_VDEV_SET_PARAM_CMDID,
853 WMI_VDEV_INSTALL_KEY_CMDID,
855 /* peer specific commands */
856 WMI_PEER_CREATE_CMDID = WMI_CMD_GRP(WMI_GRP_PEER),
857 WMI_PEER_DELETE_CMDID,
858 WMI_PEER_FLUSH_TIDS_CMDID,
859 WMI_PEER_SET_PARAM_CMDID,
860 WMI_PEER_ASSOC_CMDID,
861 WMI_PEER_ADD_WDS_ENTRY_CMDID,
862 WMI_PEER_REMOVE_WDS_ENTRY_CMDID,
863 WMI_PEER_MCAST_GROUP_CMDID,
865 /* beacon/management specific commands */
866 WMI_BCN_TX_CMDID = WMI_CMD_GRP(WMI_GRP_MGMT),
867 WMI_PDEV_SEND_BCN_CMDID,
869 WMI_BCN_FILTER_RX_CMDID,
870 WMI_PRB_REQ_FILTER_RX_CMDID,
874 /* commands to directly control BA negotiation directly from host. */
875 WMI_ADDBA_CLEAR_RESP_CMDID = WMI_CMD_GRP(WMI_GRP_BA_NEG),
876 WMI_ADDBA_SEND_CMDID,
877 WMI_ADDBA_STATUS_CMDID,
878 WMI_DELBA_SEND_CMDID,
879 WMI_ADDBA_SET_RESP_CMDID,
880 WMI_SEND_SINGLEAMSDU_CMDID,
882 /* Station power save specific config */
883 WMI_STA_POWERSAVE_MODE_CMDID = WMI_CMD_GRP(WMI_GRP_STA_PS),
884 WMI_STA_POWERSAVE_PARAM_CMDID,
885 WMI_STA_MIMO_PS_MODE_CMDID,
887 /** DFS-specific commands */
888 WMI_PDEV_DFS_ENABLE_CMDID = WMI_CMD_GRP(WMI_GRP_DFS),
889 WMI_PDEV_DFS_DISABLE_CMDID,
891 /* Roaming specific commands */
892 WMI_ROAM_SCAN_MODE = WMI_CMD_GRP(WMI_GRP_ROAM),
893 WMI_ROAM_SCAN_RSSI_THRESHOLD,
894 WMI_ROAM_SCAN_PERIOD,
895 WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
898 /* offload scan specific commands */
899 WMI_OFL_SCAN_ADD_AP_PROFILE = WMI_CMD_GRP(WMI_GRP_OFL_SCAN),
900 WMI_OFL_SCAN_REMOVE_AP_PROFILE,
903 /* P2P specific commands */
904 WMI_P2P_DEV_SET_DEVICE_INFO = WMI_CMD_GRP(WMI_GRP_P2P),
905 WMI_P2P_DEV_SET_DISCOVERABILITY,
906 WMI_P2P_GO_SET_BEACON_IE,
907 WMI_P2P_GO_SET_PROBE_RESP_IE,
908 WMI_P2P_SET_VENDOR_IE_DATA_CMDID,
910 /* AP power save specific config */
911 WMI_AP_PS_PEER_PARAM_CMDID = WMI_CMD_GRP(WMI_GRP_AP_PS),
912 WMI_AP_PS_PEER_UAPSD_COEX_CMDID,
914 /* Rate-control specific commands */
915 WMI_PEER_RATE_RETRY_SCHED_CMDID =
916 WMI_CMD_GRP(WMI_GRP_RATE_CTRL),
918 /* WLAN Profiling commands. */
919 WMI_WLAN_PROFILE_TRIGGER_CMDID = WMI_CMD_GRP(WMI_GRP_PROFILE),
920 WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
921 WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
922 WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
923 WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
925 /* Suspend resume command Ids */
926 WMI_PDEV_SUSPEND_CMDID = WMI_CMD_GRP(WMI_GRP_SUSPEND),
927 WMI_PDEV_RESUME_CMDID,
929 /* Beacon filter commands */
930 WMI_ADD_BCN_FILTER_CMDID = WMI_CMD_GRP(WMI_GRP_BCN_FILTER),
931 WMI_RMV_BCN_FILTER_CMDID,
933 /* WOW Specific WMI commands*/
934 WMI_WOW_ADD_WAKE_PATTERN_CMDID = WMI_CMD_GRP(WMI_GRP_WOW),
935 WMI_WOW_DEL_WAKE_PATTERN_CMDID,
936 WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
937 WMI_WOW_ENABLE_CMDID,
938 WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
940 /* RTT measurement related cmd */
941 WMI_RTT_MEASREQ_CMDID = WMI_CMD_GRP(WMI_GRP_RTT),
944 /* spectral scan commands */
945 WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID = WMI_CMD_GRP(WMI_GRP_SPECTRAL),
946 WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
949 WMI_REQUEST_STATS_CMDID = WMI_CMD_GRP(WMI_GRP_STATS),
951 /* ARP OFFLOAD REQUEST*/
952 WMI_SET_ARP_NS_OFFLOAD_CMDID = WMI_CMD_GRP(WMI_GRP_ARP_NS_OFL),
954 /* NS offload confid*/
955 WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID = WMI_CMD_GRP(WMI_GRP_NLO_OFL),
957 /* GTK offload Specific WMI commands*/
958 WMI_GTK_OFFLOAD_CMDID = WMI_CMD_GRP(WMI_GRP_GTK_OFL),
960 /* CSA offload Specific WMI commands*/
961 WMI_CSA_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP(WMI_GRP_CSA_OFL),
962 WMI_CSA_OFFLOAD_CHANSWITCH_CMDID,
964 /* Chatter commands*/
965 WMI_CHATTER_SET_MODE_CMDID = WMI_CMD_GRP(WMI_GRP_CHATTER),
967 /* addba specific commands */
968 WMI_PEER_TID_ADDBA_CMDID = WMI_CMD_GRP(WMI_GRP_TID_ADDBA),
969 WMI_PEER_TID_DELBA_CMDID,
971 /* set station mimo powersave method */
972 WMI_STA_DTIM_PS_METHOD_CMDID,
973 /* Configure the Station UAPSD AC Auto Trigger Parameters */
974 WMI_STA_UAPSD_AUTO_TRIG_CMDID,
976 /* STA Keep alive parameter configuration,
977 Requires WMI_SERVICE_STA_KEEP_ALIVE */
978 WMI_STA_KEEPALIVE_CMD,
980 /* misc command group */
981 WMI_ECHO_CMDID = WMI_CMD_GRP(WMI_GRP_MISC),
983 WMI_DBGLOG_CFG_CMDID,
985 WMI_PDEV_FTM_INTG_CMDID,
986 WMI_VDEV_SET_KEEPALIVE_CMDID,
987 WMI_VDEV_GET_KEEPALIVE_CMDID,
988 WMI_FORCE_FW_HANG_CMDID,
990 /* GPIO Configuration */
991 WMI_GPIO_CONFIG_CMDID = WMI_CMD_GRP(WMI_GRP_GPIO),
992 WMI_GPIO_OUTPUT_CMDID,
996 WMI_SERVICE_READY_EVENTID = 0x1,
999 /* Scan specific events */
1000 WMI_SCAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SCAN),
1002 /* PDEV specific events */
1003 WMI_PDEV_TPC_CONFIG_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PDEV),
1004 WMI_CHAN_INFO_EVENTID,
1007 /* VDEV specific events */
1008 WMI_VDEV_START_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_VDEV),
1009 WMI_VDEV_STOPPED_EVENTID,
1010 WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID,
1012 /* peer specific events */
1013 WMI_PEER_STA_KICKOUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PEER),
1015 /* beacon/mgmt specific events */
1016 WMI_MGMT_RX_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MGMT),
1017 WMI_HOST_SWBA_EVENTID,
1018 WMI_TBTTOFFSET_UPDATE_EVENTID,
1020 /* ADDBA Related WMI Events*/
1021 WMI_TX_DELBA_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BA_NEG),
1022 WMI_TX_ADDBA_COMPLETE_EVENTID,
1024 /* Roam event to trigger roaming on host */
1025 WMI_ROAM_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ROAM),
1029 WMI_WOW_WAKEUP_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_WOW),
1032 WMI_RTT_MEASUREMENT_REPORT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RTT),
1033 WMI_TSF_MEASUREMENT_REPORT_EVENTID,
1034 WMI_RTT_ERROR_REPORT_EVENTID,
1037 WMI_GTK_OFFLOAD_STATUS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GTK_OFL),
1038 WMI_GTK_REKEY_FAIL_EVENTID,
1040 /* CSA IE received event */
1041 WMI_CSA_HANDLING_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_CSA_OFL),
1044 WMI_ECHO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MISC),
1045 WMI_PDEV_UTF_EVENTID,
1046 WMI_DEBUG_MESG_EVENTID,
1047 WMI_UPDATE_STATS_EVENTID,
1048 WMI_DEBUG_PRINT_EVENTID,
1049 WMI_DCS_INTERFERENCE_EVENTID,
1050 WMI_PDEV_QVIT_EVENTID,
1051 WMI_WLAN_PROFILE_DATA_EVENTID,
1052 WMI_PDEV_FTM_INTG_EVENTID,
1053 WMI_WLAN_FREQ_AVOID_EVENTID,
1054 WMI_VDEV_GET_KEEPALIVE_EVENTID,
1057 WMI_GPIO_INPUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GPIO),
1060 /* Command IDs and command events for 10.X firmware */
1061 enum wmi_10x_cmd_id {
1062 WMI_10X_START_CMDID = 0x9000,
1063 WMI_10X_END_CMDID = 0x9FFF,
1065 /* initialize the wlan sub system */
1068 /* Scan specific commands */
1070 WMI_10X_START_SCAN_CMDID = WMI_10X_START_CMDID,
1071 WMI_10X_STOP_SCAN_CMDID,
1072 WMI_10X_SCAN_CHAN_LIST_CMDID,
1075 /* PDEV(physical device) specific commands */
1076 WMI_10X_PDEV_SET_REGDOMAIN_CMDID,
1077 WMI_10X_PDEV_SET_CHANNEL_CMDID,
1078 WMI_10X_PDEV_SET_PARAM_CMDID,
1079 WMI_10X_PDEV_PKTLOG_ENABLE_CMDID,
1080 WMI_10X_PDEV_PKTLOG_DISABLE_CMDID,
1081 WMI_10X_PDEV_SET_WMM_PARAMS_CMDID,
1082 WMI_10X_PDEV_SET_HT_CAP_IE_CMDID,
1083 WMI_10X_PDEV_SET_VHT_CAP_IE_CMDID,
1084 WMI_10X_PDEV_SET_BASE_MACADDR_CMDID,
1085 WMI_10X_PDEV_SET_DSCP_TID_MAP_CMDID,
1086 WMI_10X_PDEV_SET_QUIET_MODE_CMDID,
1087 WMI_10X_PDEV_GREEN_AP_PS_ENABLE_CMDID,
1088 WMI_10X_PDEV_GET_TPC_CONFIG_CMDID,
1090 /* VDEV(virtual device) specific commands */
1091 WMI_10X_VDEV_CREATE_CMDID,
1092 WMI_10X_VDEV_DELETE_CMDID,
1093 WMI_10X_VDEV_START_REQUEST_CMDID,
1094 WMI_10X_VDEV_RESTART_REQUEST_CMDID,
1095 WMI_10X_VDEV_UP_CMDID,
1096 WMI_10X_VDEV_STOP_CMDID,
1097 WMI_10X_VDEV_DOWN_CMDID,
1098 WMI_10X_VDEV_STANDBY_RESPONSE_CMDID,
1099 WMI_10X_VDEV_RESUME_RESPONSE_CMDID,
1100 WMI_10X_VDEV_SET_PARAM_CMDID,
1101 WMI_10X_VDEV_INSTALL_KEY_CMDID,
1103 /* peer specific commands */
1104 WMI_10X_PEER_CREATE_CMDID,
1105 WMI_10X_PEER_DELETE_CMDID,
1106 WMI_10X_PEER_FLUSH_TIDS_CMDID,
1107 WMI_10X_PEER_SET_PARAM_CMDID,
1108 WMI_10X_PEER_ASSOC_CMDID,
1109 WMI_10X_PEER_ADD_WDS_ENTRY_CMDID,
1110 WMI_10X_PEER_REMOVE_WDS_ENTRY_CMDID,
1111 WMI_10X_PEER_MCAST_GROUP_CMDID,
1113 /* beacon/management specific commands */
1115 WMI_10X_BCN_TX_CMDID,
1116 WMI_10X_BCN_PRB_TMPL_CMDID,
1117 WMI_10X_BCN_FILTER_RX_CMDID,
1118 WMI_10X_PRB_REQ_FILTER_RX_CMDID,
1119 WMI_10X_MGMT_TX_CMDID,
1121 /* commands to directly control ba negotiation directly from host. */
1122 WMI_10X_ADDBA_CLEAR_RESP_CMDID,
1123 WMI_10X_ADDBA_SEND_CMDID,
1124 WMI_10X_ADDBA_STATUS_CMDID,
1125 WMI_10X_DELBA_SEND_CMDID,
1126 WMI_10X_ADDBA_SET_RESP_CMDID,
1127 WMI_10X_SEND_SINGLEAMSDU_CMDID,
1129 /* Station power save specific config */
1130 WMI_10X_STA_POWERSAVE_MODE_CMDID,
1131 WMI_10X_STA_POWERSAVE_PARAM_CMDID,
1132 WMI_10X_STA_MIMO_PS_MODE_CMDID,
1134 /* set debug log config */
1135 WMI_10X_DBGLOG_CFG_CMDID,
1137 /* DFS-specific commands */
1138 WMI_10X_PDEV_DFS_ENABLE_CMDID,
1139 WMI_10X_PDEV_DFS_DISABLE_CMDID,
1141 /* QVIT specific command id */
1142 WMI_10X_PDEV_QVIT_CMDID,
1144 /* Offload Scan and Roaming related commands */
1145 WMI_10X_ROAM_SCAN_MODE,
1146 WMI_10X_ROAM_SCAN_RSSI_THRESHOLD,
1147 WMI_10X_ROAM_SCAN_PERIOD,
1148 WMI_10X_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
1149 WMI_10X_ROAM_AP_PROFILE,
1150 WMI_10X_OFL_SCAN_ADD_AP_PROFILE,
1151 WMI_10X_OFL_SCAN_REMOVE_AP_PROFILE,
1152 WMI_10X_OFL_SCAN_PERIOD,
1154 /* P2P specific commands */
1155 WMI_10X_P2P_DEV_SET_DEVICE_INFO,
1156 WMI_10X_P2P_DEV_SET_DISCOVERABILITY,
1157 WMI_10X_P2P_GO_SET_BEACON_IE,
1158 WMI_10X_P2P_GO_SET_PROBE_RESP_IE,
1160 /* AP power save specific config */
1161 WMI_10X_AP_PS_PEER_PARAM_CMDID,
1162 WMI_10X_AP_PS_PEER_UAPSD_COEX_CMDID,
1164 /* Rate-control specific commands */
1165 WMI_10X_PEER_RATE_RETRY_SCHED_CMDID,
1167 /* WLAN Profiling commands. */
1168 WMI_10X_WLAN_PROFILE_TRIGGER_CMDID,
1169 WMI_10X_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
1170 WMI_10X_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
1171 WMI_10X_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
1172 WMI_10X_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
1174 /* Suspend resume command Ids */
1175 WMI_10X_PDEV_SUSPEND_CMDID,
1176 WMI_10X_PDEV_RESUME_CMDID,
1178 /* Beacon filter commands */
1179 WMI_10X_ADD_BCN_FILTER_CMDID,
1180 WMI_10X_RMV_BCN_FILTER_CMDID,
1182 /* WOW Specific WMI commands*/
1183 WMI_10X_WOW_ADD_WAKE_PATTERN_CMDID,
1184 WMI_10X_WOW_DEL_WAKE_PATTERN_CMDID,
1185 WMI_10X_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
1186 WMI_10X_WOW_ENABLE_CMDID,
1187 WMI_10X_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
1189 /* RTT measurement related cmd */
1190 WMI_10X_RTT_MEASREQ_CMDID,
1191 WMI_10X_RTT_TSF_CMDID,
1193 /* transmit beacon by value */
1194 WMI_10X_PDEV_SEND_BCN_CMDID,
1197 WMI_10X_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID,
1198 WMI_10X_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
1199 WMI_10X_REQUEST_STATS_CMDID,
1201 /* GPIO Configuration */
1202 WMI_10X_GPIO_CONFIG_CMDID,
1203 WMI_10X_GPIO_OUTPUT_CMDID,
1205 WMI_10X_PDEV_UTF_CMDID = WMI_10X_END_CMDID - 1,
1208 enum wmi_10x_event_id {
1209 WMI_10X_SERVICE_READY_EVENTID = 0x8000,
1210 WMI_10X_READY_EVENTID,
1211 WMI_10X_START_EVENTID = 0x9000,
1212 WMI_10X_END_EVENTID = 0x9FFF,
1214 /* Scan specific events */
1215 WMI_10X_SCAN_EVENTID = WMI_10X_START_EVENTID,
1216 WMI_10X_ECHO_EVENTID,
1217 WMI_10X_DEBUG_MESG_EVENTID,
1218 WMI_10X_UPDATE_STATS_EVENTID,
1220 /* Instantaneous RSSI event */
1221 WMI_10X_INST_RSSI_STATS_EVENTID,
1223 /* VDEV specific events */
1224 WMI_10X_VDEV_START_RESP_EVENTID,
1225 WMI_10X_VDEV_STANDBY_REQ_EVENTID,
1226 WMI_10X_VDEV_RESUME_REQ_EVENTID,
1227 WMI_10X_VDEV_STOPPED_EVENTID,
1229 /* peer specific events */
1230 WMI_10X_PEER_STA_KICKOUT_EVENTID,
1232 /* beacon/mgmt specific events */
1233 WMI_10X_HOST_SWBA_EVENTID,
1234 WMI_10X_TBTTOFFSET_UPDATE_EVENTID,
1235 WMI_10X_MGMT_RX_EVENTID,
1237 /* Channel stats event */
1238 WMI_10X_CHAN_INFO_EVENTID,
1240 /* PHY Error specific WMI event */
1241 WMI_10X_PHYERR_EVENTID,
1243 /* Roam event to trigger roaming on host */
1244 WMI_10X_ROAM_EVENTID,
1246 /* matching AP found from list of profiles */
1247 WMI_10X_PROFILE_MATCH,
1249 /* debug print message used for tracing FW code while debugging */
1250 WMI_10X_DEBUG_PRINT_EVENTID,
1251 /* VI spoecific event */
1252 WMI_10X_PDEV_QVIT_EVENTID,
1253 /* FW code profile data in response to profile request */
1254 WMI_10X_WLAN_PROFILE_DATA_EVENTID,
1256 /*RTT related event ID*/
1257 WMI_10X_RTT_MEASUREMENT_REPORT_EVENTID,
1258 WMI_10X_TSF_MEASUREMENT_REPORT_EVENTID,
1259 WMI_10X_RTT_ERROR_REPORT_EVENTID,
1261 WMI_10X_WOW_WAKEUP_HOST_EVENTID,
1262 WMI_10X_DCS_INTERFERENCE_EVENTID,
1264 /* TPC config for the current operating channel */
1265 WMI_10X_PDEV_TPC_CONFIG_EVENTID,
1267 WMI_10X_GPIO_INPUT_EVENTID,
1268 WMI_10X_PDEV_UTF_EVENTID = WMI_10X_END_EVENTID-1,
1271 enum wmi_10_2_cmd_id {
1272 WMI_10_2_START_CMDID = 0x9000,
1273 WMI_10_2_END_CMDID = 0x9FFF,
1274 WMI_10_2_INIT_CMDID,
1275 WMI_10_2_START_SCAN_CMDID = WMI_10_2_START_CMDID,
1276 WMI_10_2_STOP_SCAN_CMDID,
1277 WMI_10_2_SCAN_CHAN_LIST_CMDID,
1278 WMI_10_2_ECHO_CMDID,
1279 WMI_10_2_PDEV_SET_REGDOMAIN_CMDID,
1280 WMI_10_2_PDEV_SET_CHANNEL_CMDID,
1281 WMI_10_2_PDEV_SET_PARAM_CMDID,
1282 WMI_10_2_PDEV_PKTLOG_ENABLE_CMDID,
1283 WMI_10_2_PDEV_PKTLOG_DISABLE_CMDID,
1284 WMI_10_2_PDEV_SET_WMM_PARAMS_CMDID,
1285 WMI_10_2_PDEV_SET_HT_CAP_IE_CMDID,
1286 WMI_10_2_PDEV_SET_VHT_CAP_IE_CMDID,
1287 WMI_10_2_PDEV_SET_BASE_MACADDR_CMDID,
1288 WMI_10_2_PDEV_SET_QUIET_MODE_CMDID,
1289 WMI_10_2_PDEV_GREEN_AP_PS_ENABLE_CMDID,
1290 WMI_10_2_PDEV_GET_TPC_CONFIG_CMDID,
1291 WMI_10_2_VDEV_CREATE_CMDID,
1292 WMI_10_2_VDEV_DELETE_CMDID,
1293 WMI_10_2_VDEV_START_REQUEST_CMDID,
1294 WMI_10_2_VDEV_RESTART_REQUEST_CMDID,
1295 WMI_10_2_VDEV_UP_CMDID,
1296 WMI_10_2_VDEV_STOP_CMDID,
1297 WMI_10_2_VDEV_DOWN_CMDID,
1298 WMI_10_2_VDEV_STANDBY_RESPONSE_CMDID,
1299 WMI_10_2_VDEV_RESUME_RESPONSE_CMDID,
1300 WMI_10_2_VDEV_SET_PARAM_CMDID,
1301 WMI_10_2_VDEV_INSTALL_KEY_CMDID,
1302 WMI_10_2_VDEV_SET_DSCP_TID_MAP_CMDID,
1303 WMI_10_2_PEER_CREATE_CMDID,
1304 WMI_10_2_PEER_DELETE_CMDID,
1305 WMI_10_2_PEER_FLUSH_TIDS_CMDID,
1306 WMI_10_2_PEER_SET_PARAM_CMDID,
1307 WMI_10_2_PEER_ASSOC_CMDID,
1308 WMI_10_2_PEER_ADD_WDS_ENTRY_CMDID,
1309 WMI_10_2_PEER_UPDATE_WDS_ENTRY_CMDID,
1310 WMI_10_2_PEER_REMOVE_WDS_ENTRY_CMDID,
1311 WMI_10_2_PEER_MCAST_GROUP_CMDID,
1312 WMI_10_2_BCN_TX_CMDID,
1313 WMI_10_2_BCN_PRB_TMPL_CMDID,
1314 WMI_10_2_BCN_FILTER_RX_CMDID,
1315 WMI_10_2_PRB_REQ_FILTER_RX_CMDID,
1316 WMI_10_2_MGMT_TX_CMDID,
1317 WMI_10_2_ADDBA_CLEAR_RESP_CMDID,
1318 WMI_10_2_ADDBA_SEND_CMDID,
1319 WMI_10_2_ADDBA_STATUS_CMDID,
1320 WMI_10_2_DELBA_SEND_CMDID,
1321 WMI_10_2_ADDBA_SET_RESP_CMDID,
1322 WMI_10_2_SEND_SINGLEAMSDU_CMDID,
1323 WMI_10_2_STA_POWERSAVE_MODE_CMDID,
1324 WMI_10_2_STA_POWERSAVE_PARAM_CMDID,
1325 WMI_10_2_STA_MIMO_PS_MODE_CMDID,
1326 WMI_10_2_DBGLOG_CFG_CMDID,
1327 WMI_10_2_PDEV_DFS_ENABLE_CMDID,
1328 WMI_10_2_PDEV_DFS_DISABLE_CMDID,
1329 WMI_10_2_PDEV_QVIT_CMDID,
1330 WMI_10_2_ROAM_SCAN_MODE,
1331 WMI_10_2_ROAM_SCAN_RSSI_THRESHOLD,
1332 WMI_10_2_ROAM_SCAN_PERIOD,
1333 WMI_10_2_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
1334 WMI_10_2_ROAM_AP_PROFILE,
1335 WMI_10_2_OFL_SCAN_ADD_AP_PROFILE,
1336 WMI_10_2_OFL_SCAN_REMOVE_AP_PROFILE,
1337 WMI_10_2_OFL_SCAN_PERIOD,
1338 WMI_10_2_P2P_DEV_SET_DEVICE_INFO,
1339 WMI_10_2_P2P_DEV_SET_DISCOVERABILITY,
1340 WMI_10_2_P2P_GO_SET_BEACON_IE,
1341 WMI_10_2_P2P_GO_SET_PROBE_RESP_IE,
1342 WMI_10_2_AP_PS_PEER_PARAM_CMDID,
1343 WMI_10_2_AP_PS_PEER_UAPSD_COEX_CMDID,
1344 WMI_10_2_PEER_RATE_RETRY_SCHED_CMDID,
1345 WMI_10_2_WLAN_PROFILE_TRIGGER_CMDID,
1346 WMI_10_2_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
1347 WMI_10_2_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
1348 WMI_10_2_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
1349 WMI_10_2_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
1350 WMI_10_2_PDEV_SUSPEND_CMDID,
1351 WMI_10_2_PDEV_RESUME_CMDID,
1352 WMI_10_2_ADD_BCN_FILTER_CMDID,
1353 WMI_10_2_RMV_BCN_FILTER_CMDID,
1354 WMI_10_2_WOW_ADD_WAKE_PATTERN_CMDID,
1355 WMI_10_2_WOW_DEL_WAKE_PATTERN_CMDID,
1356 WMI_10_2_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
1357 WMI_10_2_WOW_ENABLE_CMDID,
1358 WMI_10_2_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
1359 WMI_10_2_RTT_MEASREQ_CMDID,
1360 WMI_10_2_RTT_TSF_CMDID,
1361 WMI_10_2_RTT_KEEPALIVE_CMDID,
1362 WMI_10_2_PDEV_SEND_BCN_CMDID,
1363 WMI_10_2_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID,
1364 WMI_10_2_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
1365 WMI_10_2_REQUEST_STATS_CMDID,
1366 WMI_10_2_GPIO_CONFIG_CMDID,
1367 WMI_10_2_GPIO_OUTPUT_CMDID,
1368 WMI_10_2_VDEV_RATEMASK_CMDID,
1369 WMI_10_2_PDEV_SMART_ANT_ENABLE_CMDID,
1370 WMI_10_2_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID,
1371 WMI_10_2_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID,
1372 WMI_10_2_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID,
1373 WMI_10_2_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID,
1374 WMI_10_2_FORCE_FW_HANG_CMDID,
1375 WMI_10_2_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID,
1376 WMI_10_2_PDEV_SET_CTL_TABLE_CMDID,
1377 WMI_10_2_PDEV_SET_MIMOGAIN_TABLE_CMDID,
1378 WMI_10_2_PDEV_RATEPWR_TABLE_CMDID,
1379 WMI_10_2_PDEV_RATEPWR_CHAINMSK_TABLE_CMDID,
1380 WMI_10_2_PDEV_GET_INFO,
1381 WMI_10_2_VDEV_GET_INFO,
1382 WMI_10_2_VDEV_ATF_REQUEST_CMDID,
1383 WMI_10_2_PEER_ATF_REQUEST_CMDID,
1384 WMI_10_2_PDEV_GET_TEMPERATURE_CMDID,
1385 WMI_10_2_MU_CAL_START_CMDID,
1386 WMI_10_2_SET_LTEU_CONFIG_CMDID,
1387 WMI_10_2_SET_CCA_PARAMS,
1388 WMI_10_2_PDEV_UTF_CMDID = WMI_10_2_END_CMDID - 1,
1391 enum wmi_10_2_event_id {
1392 WMI_10_2_SERVICE_READY_EVENTID = 0x8000,
1393 WMI_10_2_READY_EVENTID,
1394 WMI_10_2_DEBUG_MESG_EVENTID,
1395 WMI_10_2_START_EVENTID = 0x9000,
1396 WMI_10_2_END_EVENTID = 0x9FFF,
1397 WMI_10_2_SCAN_EVENTID = WMI_10_2_START_EVENTID,
1398 WMI_10_2_ECHO_EVENTID,
1399 WMI_10_2_UPDATE_STATS_EVENTID,
1400 WMI_10_2_INST_RSSI_STATS_EVENTID,
1401 WMI_10_2_VDEV_START_RESP_EVENTID,
1402 WMI_10_2_VDEV_STANDBY_REQ_EVENTID,
1403 WMI_10_2_VDEV_RESUME_REQ_EVENTID,
1404 WMI_10_2_VDEV_STOPPED_EVENTID,
1405 WMI_10_2_PEER_STA_KICKOUT_EVENTID,
1406 WMI_10_2_HOST_SWBA_EVENTID,
1407 WMI_10_2_TBTTOFFSET_UPDATE_EVENTID,
1408 WMI_10_2_MGMT_RX_EVENTID,
1409 WMI_10_2_CHAN_INFO_EVENTID,
1410 WMI_10_2_PHYERR_EVENTID,
1411 WMI_10_2_ROAM_EVENTID,
1412 WMI_10_2_PROFILE_MATCH,
1413 WMI_10_2_DEBUG_PRINT_EVENTID,
1414 WMI_10_2_PDEV_QVIT_EVENTID,
1415 WMI_10_2_WLAN_PROFILE_DATA_EVENTID,
1416 WMI_10_2_RTT_MEASUREMENT_REPORT_EVENTID,
1417 WMI_10_2_TSF_MEASUREMENT_REPORT_EVENTID,
1418 WMI_10_2_RTT_ERROR_REPORT_EVENTID,
1419 WMI_10_2_RTT_KEEPALIVE_EVENTID,
1420 WMI_10_2_WOW_WAKEUP_HOST_EVENTID,
1421 WMI_10_2_DCS_INTERFERENCE_EVENTID,
1422 WMI_10_2_PDEV_TPC_CONFIG_EVENTID,
1423 WMI_10_2_GPIO_INPUT_EVENTID,
1424 WMI_10_2_PEER_RATECODE_LIST_EVENTID,
1425 WMI_10_2_GENERIC_BUFFER_EVENTID,
1426 WMI_10_2_MCAST_BUF_RELEASE_EVENTID,
1427 WMI_10_2_MCAST_LIST_AGEOUT_EVENTID,
1428 WMI_10_2_WDS_PEER_EVENTID,
1429 WMI_10_2_PEER_STA_PS_STATECHG_EVENTID,
1430 WMI_10_2_PDEV_TEMPERATURE_EVENTID,
1431 WMI_10_2_PDEV_UTF_EVENTID = WMI_10_2_END_EVENTID - 1,
1434 enum wmi_10_4_cmd_id {
1435 WMI_10_4_START_CMDID = 0x9000,
1436 WMI_10_4_END_CMDID = 0x9FFF,
1437 WMI_10_4_INIT_CMDID,
1438 WMI_10_4_START_SCAN_CMDID = WMI_10_4_START_CMDID,
1439 WMI_10_4_STOP_SCAN_CMDID,
1440 WMI_10_4_SCAN_CHAN_LIST_CMDID,
1441 WMI_10_4_SCAN_SCH_PRIO_TBL_CMDID,
1442 WMI_10_4_SCAN_UPDATE_REQUEST_CMDID,
1443 WMI_10_4_ECHO_CMDID,
1444 WMI_10_4_PDEV_SET_REGDOMAIN_CMDID,
1445 WMI_10_4_PDEV_SET_CHANNEL_CMDID,
1446 WMI_10_4_PDEV_SET_PARAM_CMDID,
1447 WMI_10_4_PDEV_PKTLOG_ENABLE_CMDID,
1448 WMI_10_4_PDEV_PKTLOG_DISABLE_CMDID,
1449 WMI_10_4_PDEV_SET_WMM_PARAMS_CMDID,
1450 WMI_10_4_PDEV_SET_HT_CAP_IE_CMDID,
1451 WMI_10_4_PDEV_SET_VHT_CAP_IE_CMDID,
1452 WMI_10_4_PDEV_SET_BASE_MACADDR_CMDID,
1453 WMI_10_4_PDEV_SET_DSCP_TID_MAP_CMDID,
1454 WMI_10_4_PDEV_SET_QUIET_MODE_CMDID,
1455 WMI_10_4_PDEV_GREEN_AP_PS_ENABLE_CMDID,
1456 WMI_10_4_PDEV_GET_TPC_CONFIG_CMDID,
1457 WMI_10_4_VDEV_CREATE_CMDID,
1458 WMI_10_4_VDEV_DELETE_CMDID,
1459 WMI_10_4_VDEV_START_REQUEST_CMDID,
1460 WMI_10_4_VDEV_RESTART_REQUEST_CMDID,
1461 WMI_10_4_VDEV_UP_CMDID,
1462 WMI_10_4_VDEV_STOP_CMDID,
1463 WMI_10_4_VDEV_DOWN_CMDID,
1464 WMI_10_4_VDEV_STANDBY_RESPONSE_CMDID,
1465 WMI_10_4_VDEV_RESUME_RESPONSE_CMDID,
1466 WMI_10_4_VDEV_SET_PARAM_CMDID,
1467 WMI_10_4_VDEV_INSTALL_KEY_CMDID,
1468 WMI_10_4_WLAN_PEER_CACHING_ADD_PEER_CMDID,
1469 WMI_10_4_WLAN_PEER_CACHING_EVICT_PEER_CMDID,
1470 WMI_10_4_WLAN_PEER_CACHING_RESTORE_PEER_CMDID,
1471 WMI_10_4_WLAN_PEER_CACHING_PRINT_ALL_PEERS_INFO_CMDID,
1472 WMI_10_4_PEER_CREATE_CMDID,
1473 WMI_10_4_PEER_DELETE_CMDID,
1474 WMI_10_4_PEER_FLUSH_TIDS_CMDID,
1475 WMI_10_4_PEER_SET_PARAM_CMDID,
1476 WMI_10_4_PEER_ASSOC_CMDID,
1477 WMI_10_4_PEER_ADD_WDS_ENTRY_CMDID,
1478 WMI_10_4_PEER_UPDATE_WDS_ENTRY_CMDID,
1479 WMI_10_4_PEER_REMOVE_WDS_ENTRY_CMDID,
1480 WMI_10_4_PEER_ADD_PROXY_STA_ENTRY_CMDID,
1481 WMI_10_4_PEER_MCAST_GROUP_CMDID,
1482 WMI_10_4_BCN_TX_CMDID,
1483 WMI_10_4_PDEV_SEND_BCN_CMDID,
1484 WMI_10_4_BCN_PRB_TMPL_CMDID,
1485 WMI_10_4_BCN_FILTER_RX_CMDID,
1486 WMI_10_4_PRB_REQ_FILTER_RX_CMDID,
1487 WMI_10_4_MGMT_TX_CMDID,
1488 WMI_10_4_PRB_TMPL_CMDID,
1489 WMI_10_4_ADDBA_CLEAR_RESP_CMDID,
1490 WMI_10_4_ADDBA_SEND_CMDID,
1491 WMI_10_4_ADDBA_STATUS_CMDID,
1492 WMI_10_4_DELBA_SEND_CMDID,
1493 WMI_10_4_ADDBA_SET_RESP_CMDID,
1494 WMI_10_4_SEND_SINGLEAMSDU_CMDID,
1495 WMI_10_4_STA_POWERSAVE_MODE_CMDID,
1496 WMI_10_4_STA_POWERSAVE_PARAM_CMDID,
1497 WMI_10_4_STA_MIMO_PS_MODE_CMDID,
1498 WMI_10_4_DBGLOG_CFG_CMDID,
1499 WMI_10_4_PDEV_DFS_ENABLE_CMDID,
1500 WMI_10_4_PDEV_DFS_DISABLE_CMDID,
1501 WMI_10_4_PDEV_QVIT_CMDID,
1502 WMI_10_4_ROAM_SCAN_MODE,
1503 WMI_10_4_ROAM_SCAN_RSSI_THRESHOLD,
1504 WMI_10_4_ROAM_SCAN_PERIOD,
1505 WMI_10_4_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
1506 WMI_10_4_ROAM_AP_PROFILE,
1507 WMI_10_4_OFL_SCAN_ADD_AP_PROFILE,
1508 WMI_10_4_OFL_SCAN_REMOVE_AP_PROFILE,
1509 WMI_10_4_OFL_SCAN_PERIOD,
1510 WMI_10_4_P2P_DEV_SET_DEVICE_INFO,
1511 WMI_10_4_P2P_DEV_SET_DISCOVERABILITY,
1512 WMI_10_4_P2P_GO_SET_BEACON_IE,
1513 WMI_10_4_P2P_GO_SET_PROBE_RESP_IE,
1514 WMI_10_4_P2P_SET_VENDOR_IE_DATA_CMDID,
1515 WMI_10_4_AP_PS_PEER_PARAM_CMDID,
1516 WMI_10_4_AP_PS_PEER_UAPSD_COEX_CMDID,
1517 WMI_10_4_PEER_RATE_RETRY_SCHED_CMDID,
1518 WMI_10_4_WLAN_PROFILE_TRIGGER_CMDID,
1519 WMI_10_4_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
1520 WMI_10_4_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
1521 WMI_10_4_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
1522 WMI_10_4_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
1523 WMI_10_4_PDEV_SUSPEND_CMDID,
1524 WMI_10_4_PDEV_RESUME_CMDID,
1525 WMI_10_4_ADD_BCN_FILTER_CMDID,
1526 WMI_10_4_RMV_BCN_FILTER_CMDID,
1527 WMI_10_4_WOW_ADD_WAKE_PATTERN_CMDID,
1528 WMI_10_4_WOW_DEL_WAKE_PATTERN_CMDID,
1529 WMI_10_4_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
1530 WMI_10_4_WOW_ENABLE_CMDID,
1531 WMI_10_4_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
1532 WMI_10_4_RTT_MEASREQ_CMDID,
1533 WMI_10_4_RTT_TSF_CMDID,
1534 WMI_10_4_RTT_KEEPALIVE_CMDID,
1535 WMI_10_4_OEM_REQ_CMDID,
1537 WMI_10_4_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID,
1538 WMI_10_4_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
1539 WMI_10_4_REQUEST_STATS_CMDID,
1540 WMI_10_4_GPIO_CONFIG_CMDID,
1541 WMI_10_4_GPIO_OUTPUT_CMDID,
1542 WMI_10_4_VDEV_RATEMASK_CMDID,
1543 WMI_10_4_CSA_OFFLOAD_ENABLE_CMDID,
1544 WMI_10_4_GTK_OFFLOAD_CMDID,
1545 WMI_10_4_QBOOST_CFG_CMDID,
1546 WMI_10_4_CSA_OFFLOAD_CHANSWITCH_CMDID,
1547 WMI_10_4_PDEV_SMART_ANT_ENABLE_CMDID,
1548 WMI_10_4_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID,
1549 WMI_10_4_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID,
1550 WMI_10_4_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID,
1551 WMI_10_4_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID,
1552 WMI_10_4_VDEV_SET_KEEPALIVE_CMDID,
1553 WMI_10_4_VDEV_GET_KEEPALIVE_CMDID,
1554 WMI_10_4_FORCE_FW_HANG_CMDID,
1555 WMI_10_4_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID,
1556 WMI_10_4_PDEV_SET_CTL_TABLE_CMDID,
1557 WMI_10_4_PDEV_SET_MIMOGAIN_TABLE_CMDID,
1558 WMI_10_4_PDEV_RATEPWR_TABLE_CMDID,
1559 WMI_10_4_PDEV_RATEPWR_CHAINMSK_TABLE_CMDID,
1560 WMI_10_4_PDEV_FIPS_CMDID,
1561 WMI_10_4_TT_SET_CONF_CMDID,
1562 WMI_10_4_FWTEST_CMDID,
1563 WMI_10_4_VDEV_ATF_REQUEST_CMDID,
1564 WMI_10_4_PEER_ATF_REQUEST_CMDID,
1565 WMI_10_4_PDEV_GET_ANI_CCK_CONFIG_CMDID,
1566 WMI_10_4_PDEV_GET_ANI_OFDM_CONFIG_CMDID,
1567 WMI_10_4_PDEV_RESERVE_AST_ENTRY_CMDID,
1568 WMI_10_4_PDEV_GET_NFCAL_POWER_CMDID,
1569 WMI_10_4_PDEV_GET_TPC_CMDID,
1570 WMI_10_4_PDEV_GET_AST_INFO_CMDID,
1571 WMI_10_4_VDEV_SET_DSCP_TID_MAP_CMDID,
1572 WMI_10_4_PDEV_GET_TEMPERATURE_CMDID,
1573 WMI_10_4_PDEV_GET_INFO_CMDID,
1574 WMI_10_4_VDEV_GET_INFO_CMDID,
1575 WMI_10_4_VDEV_FILTER_NEIGHBOR_RX_PACKETS_CMDID,
1576 WMI_10_4_MU_CAL_START_CMDID,
1577 WMI_10_4_SET_CCA_PARAMS_CMDID,
1578 WMI_10_4_PDEV_BSS_CHAN_INFO_REQUEST_CMDID,
1579 WMI_10_4_PDEV_UTF_CMDID = WMI_10_4_END_CMDID - 1,
1582 enum wmi_10_4_event_id {
1583 WMI_10_4_SERVICE_READY_EVENTID = 0x8000,
1584 WMI_10_4_READY_EVENTID,
1585 WMI_10_4_DEBUG_MESG_EVENTID,
1586 WMI_10_4_START_EVENTID = 0x9000,
1587 WMI_10_4_END_EVENTID = 0x9FFF,
1588 WMI_10_4_SCAN_EVENTID = WMI_10_4_START_EVENTID,
1589 WMI_10_4_ECHO_EVENTID,
1590 WMI_10_4_UPDATE_STATS_EVENTID,
1591 WMI_10_4_INST_RSSI_STATS_EVENTID,
1592 WMI_10_4_VDEV_START_RESP_EVENTID,
1593 WMI_10_4_VDEV_STANDBY_REQ_EVENTID,
1594 WMI_10_4_VDEV_RESUME_REQ_EVENTID,
1595 WMI_10_4_VDEV_STOPPED_EVENTID,
1596 WMI_10_4_PEER_STA_KICKOUT_EVENTID,
1597 WMI_10_4_HOST_SWBA_EVENTID,
1598 WMI_10_4_TBTTOFFSET_UPDATE_EVENTID,
1599 WMI_10_4_MGMT_RX_EVENTID,
1600 WMI_10_4_CHAN_INFO_EVENTID,
1601 WMI_10_4_PHYERR_EVENTID,
1602 WMI_10_4_ROAM_EVENTID,
1603 WMI_10_4_PROFILE_MATCH,
1604 WMI_10_4_DEBUG_PRINT_EVENTID,
1605 WMI_10_4_PDEV_QVIT_EVENTID,
1606 WMI_10_4_WLAN_PROFILE_DATA_EVENTID,
1607 WMI_10_4_RTT_MEASUREMENT_REPORT_EVENTID,
1608 WMI_10_4_TSF_MEASUREMENT_REPORT_EVENTID,
1609 WMI_10_4_RTT_ERROR_REPORT_EVENTID,
1610 WMI_10_4_RTT_KEEPALIVE_EVENTID,
1611 WMI_10_4_OEM_CAPABILITY_EVENTID,
1612 WMI_10_4_OEM_MEASUREMENT_REPORT_EVENTID,
1613 WMI_10_4_OEM_ERROR_REPORT_EVENTID,
1614 WMI_10_4_NAN_EVENTID,
1615 WMI_10_4_WOW_WAKEUP_HOST_EVENTID,
1616 WMI_10_4_GTK_OFFLOAD_STATUS_EVENTID,
1617 WMI_10_4_GTK_REKEY_FAIL_EVENTID,
1618 WMI_10_4_DCS_INTERFERENCE_EVENTID,
1619 WMI_10_4_PDEV_TPC_CONFIG_EVENTID,
1620 WMI_10_4_CSA_HANDLING_EVENTID,
1621 WMI_10_4_GPIO_INPUT_EVENTID,
1622 WMI_10_4_PEER_RATECODE_LIST_EVENTID,
1623 WMI_10_4_GENERIC_BUFFER_EVENTID,
1624 WMI_10_4_MCAST_BUF_RELEASE_EVENTID,
1625 WMI_10_4_MCAST_LIST_AGEOUT_EVENTID,
1626 WMI_10_4_VDEV_GET_KEEPALIVE_EVENTID,
1627 WMI_10_4_WDS_PEER_EVENTID,
1628 WMI_10_4_PEER_STA_PS_STATECHG_EVENTID,
1629 WMI_10_4_PDEV_FIPS_EVENTID,
1630 WMI_10_4_TT_STATS_EVENTID,
1631 WMI_10_4_PDEV_CHANNEL_HOPPING_EVENTID,
1632 WMI_10_4_PDEV_ANI_CCK_LEVEL_EVENTID,
1633 WMI_10_4_PDEV_ANI_OFDM_LEVEL_EVENTID,
1634 WMI_10_4_PDEV_RESERVE_AST_ENTRY_EVENTID,
1635 WMI_10_4_PDEV_NFCAL_POWER_EVENTID,
1636 WMI_10_4_PDEV_TPC_EVENTID,
1637 WMI_10_4_PDEV_GET_AST_INFO_EVENTID,
1638 WMI_10_4_PDEV_TEMPERATURE_EVENTID,
1639 WMI_10_4_PDEV_NFCAL_POWER_ALL_CHANNELS_EVENTID,
1640 WMI_10_4_PDEV_BSS_CHAN_INFO_EVENTID,
1641 WMI_10_4_PDEV_UTF_EVENTID = WMI_10_4_END_EVENTID - 1,
1645 MODE_11A = 0, /* 11a Mode */
1646 MODE_11G = 1, /* 11b/g Mode */
1647 MODE_11B = 2, /* 11b Mode */
1648 MODE_11GONLY = 3, /* 11g only Mode */
1649 MODE_11NA_HT20 = 4, /* 11a HT20 mode */
1650 MODE_11NG_HT20 = 5, /* 11g HT20 mode */
1651 MODE_11NA_HT40 = 6, /* 11a HT40 mode */
1652 MODE_11NG_HT40 = 7, /* 11g HT40 mode */
1653 MODE_11AC_VHT20 = 8,
1654 MODE_11AC_VHT40 = 9,
1655 MODE_11AC_VHT80 = 10,
1656 /* MODE_11AC_VHT160 = 11, */
1657 MODE_11AC_VHT20_2G = 11,
1658 MODE_11AC_VHT40_2G = 12,
1659 MODE_11AC_VHT80_2G = 13,
1664 static inline const char *ath10k_wmi_phymode_str(enum wmi_phy_mode mode)
1675 case MODE_11NA_HT20:
1677 case MODE_11NG_HT20:
1679 case MODE_11NA_HT40:
1681 case MODE_11NG_HT40:
1683 case MODE_11AC_VHT20:
1684 return "11ac-vht20";
1685 case MODE_11AC_VHT40:
1686 return "11ac-vht40";
1687 case MODE_11AC_VHT80:
1688 return "11ac-vht80";
1689 case MODE_11AC_VHT20_2G:
1690 return "11ac-vht20-2g";
1691 case MODE_11AC_VHT40_2G:
1692 return "11ac-vht40-2g";
1693 case MODE_11AC_VHT80_2G:
1694 return "11ac-vht80-2g";
1699 /* no default handler to allow compiler to check that the
1700 * enum is fully handled */
1706 #define WMI_CHAN_LIST_TAG 0x1
1707 #define WMI_SSID_LIST_TAG 0x2
1708 #define WMI_BSSID_LIST_TAG 0x3
1709 #define WMI_IE_TAG 0x4
1711 struct wmi_channel {
1713 __le32 band_center_freq1;
1714 __le32 band_center_freq2; /* valid for 11ac, 80plus80 */
1716 __le32 flags; /* WMI_CHAN_FLAG_ */
1718 u8 mode; /* only 6 LSBs */
1724 /* note: power unit is 0.5 dBm */
1739 struct wmi_channel_arg {
1741 u32 band_center_freq1;
1748 /* note: power unit is 0.5 dBm */
1752 u32 max_antenna_gain;
1754 enum wmi_phy_mode mode;
1757 enum wmi_channel_change_cause {
1758 WMI_CHANNEL_CHANGE_CAUSE_NONE = 0,
1759 WMI_CHANNEL_CHANGE_CAUSE_CSA,
1762 #define WMI_CHAN_FLAG_HT40_PLUS (1 << 6)
1763 #define WMI_CHAN_FLAG_PASSIVE (1 << 7)
1764 #define WMI_CHAN_FLAG_ADHOC_ALLOWED (1 << 8)
1765 #define WMI_CHAN_FLAG_AP_DISABLED (1 << 9)
1766 #define WMI_CHAN_FLAG_DFS (1 << 10)
1767 #define WMI_CHAN_FLAG_ALLOW_HT (1 << 11)
1768 #define WMI_CHAN_FLAG_ALLOW_VHT (1 << 12)
1770 /* Indicate reason for channel switch */
1771 #define WMI_CHANNEL_CHANGE_CAUSE_CSA (1 << 13)
1773 #define WMI_MAX_SPATIAL_STREAM 3 /* default max ss */
1774 #define WMI_10_4_MAX_SPATIAL_STREAM 4
1776 /* HT Capabilities*/
1777 #define WMI_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */
1778 #define WMI_HT_CAP_HT20_SGI 0x0002 /* Short Guard Interval with HT20 */
1779 #define WMI_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */
1780 #define WMI_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */
1781 #define WMI_HT_CAP_TX_STBC_MASK_SHIFT 3
1782 #define WMI_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */
1783 #define WMI_HT_CAP_RX_STBC_MASK_SHIFT 4
1784 #define WMI_HT_CAP_LDPC 0x0040 /* LDPC supported */
1785 #define WMI_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */
1786 #define WMI_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */
1787 #define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
1788 #define WMI_HT_CAP_HT40_SGI 0x0800
1790 #define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED | \
1791 WMI_HT_CAP_HT20_SGI | \
1792 WMI_HT_CAP_HT40_SGI | \
1793 WMI_HT_CAP_TX_STBC | \
1794 WMI_HT_CAP_RX_STBC | \
1798 * WMI_VHT_CAP_* these maps to ieee 802.11ac vht capability information
1799 * field. The fields not defined here are not supported, or reserved.
1800 * Do not change these masks and if you have to add new one follow the
1801 * bitmask as specified by 802.11ac draft.
1804 #define WMI_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003
1805 #define WMI_VHT_CAP_RX_LDPC 0x00000010
1806 #define WMI_VHT_CAP_SGI_80MHZ 0x00000020
1807 #define WMI_VHT_CAP_TX_STBC 0x00000080
1808 #define WMI_VHT_CAP_RX_STBC_MASK 0x00000300
1809 #define WMI_VHT_CAP_RX_STBC_MASK_SHIFT 8
1810 #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000
1811 #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT 23
1812 #define WMI_VHT_CAP_RX_FIXED_ANT 0x10000000
1813 #define WMI_VHT_CAP_TX_FIXED_ANT 0x20000000
1815 /* The following also refer for max HT AMSDU */
1816 #define WMI_VHT_CAP_MAX_MPDU_LEN_3839 0x00000000
1817 #define WMI_VHT_CAP_MAX_MPDU_LEN_7935 0x00000001
1818 #define WMI_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002
1820 #define WMI_VHT_CAP_DEFAULT_ALL (WMI_VHT_CAP_MAX_MPDU_LEN_11454 | \
1821 WMI_VHT_CAP_RX_LDPC | \
1822 WMI_VHT_CAP_SGI_80MHZ | \
1823 WMI_VHT_CAP_TX_STBC | \
1824 WMI_VHT_CAP_RX_STBC_MASK | \
1825 WMI_VHT_CAP_MAX_AMPDU_LEN_EXP | \
1826 WMI_VHT_CAP_RX_FIXED_ANT | \
1827 WMI_VHT_CAP_TX_FIXED_ANT)
1830 * Interested readers refer to Rx/Tx MCS Map definition as defined in
1833 #define WMI_VHT_MAX_MCS_4_SS_MASK(r, ss) ((3 & (r)) << (((ss) - 1) << 1))
1834 #define WMI_VHT_MAX_SUPP_RATE_MASK 0x1fff0000
1835 #define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT 16
1838 REGDMN_MODE_11A = 0x00001, /* 11a channels */
1839 REGDMN_MODE_TURBO = 0x00002, /* 11a turbo-only channels */
1840 REGDMN_MODE_11B = 0x00004, /* 11b channels */
1841 REGDMN_MODE_PUREG = 0x00008, /* 11g channels (OFDM only) */
1842 REGDMN_MODE_11G = 0x00008, /* XXX historical */
1843 REGDMN_MODE_108G = 0x00020, /* 11a+Turbo channels */
1844 REGDMN_MODE_108A = 0x00040, /* 11g+Turbo channels */
1845 REGDMN_MODE_XR = 0x00100, /* XR channels */
1846 REGDMN_MODE_11A_HALF_RATE = 0x00200, /* 11A half rate channels */
1847 REGDMN_MODE_11A_QUARTER_RATE = 0x00400, /* 11A quarter rate channels */
1848 REGDMN_MODE_11NG_HT20 = 0x00800, /* 11N-G HT20 channels */
1849 REGDMN_MODE_11NA_HT20 = 0x01000, /* 11N-A HT20 channels */
1850 REGDMN_MODE_11NG_HT40PLUS = 0x02000, /* 11N-G HT40 + channels */
1851 REGDMN_MODE_11NG_HT40MINUS = 0x04000, /* 11N-G HT40 - channels */
1852 REGDMN_MODE_11NA_HT40PLUS = 0x08000, /* 11N-A HT40 + channels */
1853 REGDMN_MODE_11NA_HT40MINUS = 0x10000, /* 11N-A HT40 - channels */
1854 REGDMN_MODE_11AC_VHT20 = 0x20000, /* 5Ghz, VHT20 */
1855 REGDMN_MODE_11AC_VHT40PLUS = 0x40000, /* 5Ghz, VHT40 + channels */
1856 REGDMN_MODE_11AC_VHT40MINUS = 0x80000, /* 5Ghz VHT40 - channels */
1857 REGDMN_MODE_11AC_VHT80 = 0x100000, /* 5Ghz, VHT80 channels */
1858 REGDMN_MODE_ALL = 0xffffffff
1861 #define REGDMN_CAP1_CHAN_HALF_RATE 0x00000001
1862 #define REGDMN_CAP1_CHAN_QUARTER_RATE 0x00000002
1863 #define REGDMN_CAP1_CHAN_HAL49GHZ 0x00000004
1865 /* regulatory capabilities */
1866 #define REGDMN_EEPROM_EEREGCAP_EN_FCC_MIDBAND 0x0040
1867 #define REGDMN_EEPROM_EEREGCAP_EN_KK_U1_EVEN 0x0080
1868 #define REGDMN_EEPROM_EEREGCAP_EN_KK_U2 0x0100
1869 #define REGDMN_EEPROM_EEREGCAP_EN_KK_MIDBAND 0x0200
1870 #define REGDMN_EEPROM_EEREGCAP_EN_KK_U1_ODD 0x0400
1871 #define REGDMN_EEPROM_EEREGCAP_EN_KK_NEW_11A 0x0800
1873 struct hal_reg_capabilities {
1874 /* regdomain value specified in EEPROM */
1877 __le32 eeprom_rd_ext;
1878 /* CAP1 capabilities bit map. */
1880 /* REGDMN EEPROM CAP. */
1883 __le32 wireless_modes;
1884 __le32 low_2ghz_chan;
1885 __le32 high_2ghz_chan;
1886 __le32 low_5ghz_chan;
1887 __le32 high_5ghz_chan;
1890 enum wlan_mode_capability {
1891 WHAL_WLAN_11A_CAPABILITY = 0x1,
1892 WHAL_WLAN_11G_CAPABILITY = 0x2,
1893 WHAL_WLAN_11AG_CAPABILITY = 0x3,
1896 /* structure used by FW for requesting host memory */
1897 struct wlan_host_mem_req {
1898 /* ID of the request */
1900 /* size of the of each unit */
1902 /* flags to indicate that
1903 * the number units is dependent
1904 * on number of resources(num vdevs num peers .. etc)
1906 __le32 num_unit_info;
1908 * actual number of units to allocate . if flags in the num_unit_info
1909 * indicate that number of units is tied to number of a particular
1910 * resource to allocate then num_units filed is set to 0 and host
1911 * will derive the number units from number of the resources it is
1918 * The following struct holds optional payload for
1919 * wmi_service_ready_event,e.g., 11ac pass some of the
1920 * device capability to the host.
1922 struct wmi_service_ready_event {
1924 __le32 sw_version_1;
1926 /* WMI_PHY_CAPABILITY */
1927 __le32 phy_capability;
1928 /* Maximum number of frag table entries that SW will populate less 1 */
1929 __le32 max_frag_entry;
1930 __le32 wmi_service_bitmap[16];
1931 __le32 num_rf_chains;
1933 * The following field is only valid for service type
1936 __le32 ht_cap_info; /* WMI HT Capability */
1937 __le32 vht_cap_info; /* VHT capability info field of 802.11ac */
1938 __le32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
1939 __le32 hw_min_tx_power;
1940 __le32 hw_max_tx_power;
1941 struct hal_reg_capabilities hal_reg_capabilities;
1942 __le32 sys_cap_info;
1943 __le32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
1945 * Max beacon and Probe Response IE offload size
1946 * (includes optional P2P IEs)
1948 __le32 max_bcn_ie_size;
1950 * request to host to allocate a chuck of memory and pss it down to FW
1951 * via WM_INIT. FW uses this as FW extesnsion memory for saving its
1952 * data structures. Only valid for low latency interfaces like PCIE
1953 * where FW can access this memory directly (or) by DMA.
1955 __le32 num_mem_reqs;
1956 struct wlan_host_mem_req mem_reqs[0];
1959 /* This is the definition from 10.X firmware branch */
1960 struct wmi_10x_service_ready_event {
1964 /* WMI_PHY_CAPABILITY */
1965 __le32 phy_capability;
1967 /* Maximum number of frag table entries that SW will populate less 1 */
1968 __le32 max_frag_entry;
1969 __le32 wmi_service_bitmap[16];
1970 __le32 num_rf_chains;
1973 * The following field is only valid for service type
1976 __le32 ht_cap_info; /* WMI HT Capability */
1977 __le32 vht_cap_info; /* VHT capability info field of 802.11ac */
1978 __le32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
1979 __le32 hw_min_tx_power;
1980 __le32 hw_max_tx_power;
1982 struct hal_reg_capabilities hal_reg_capabilities;
1984 __le32 sys_cap_info;
1985 __le32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
1988 * request to host to allocate a chuck of memory and pss it down to FW
1989 * via WM_INIT. FW uses this as FW extesnsion memory for saving its
1990 * data structures. Only valid for low latency interfaces like PCIE
1991 * where FW can access this memory directly (or) by DMA.
1993 __le32 num_mem_reqs;
1995 struct wlan_host_mem_req mem_reqs[0];
1998 #define WMI_SERVICE_READY_TIMEOUT_HZ (5*HZ)
1999 #define WMI_UNIFIED_READY_TIMEOUT_HZ (5*HZ)
2001 struct wmi_ready_event {
2004 struct wmi_mac_addr mac_addr;
2008 struct wmi_resource_config {
2009 /* number of virtual devices (VAPs) to support */
2012 /* number of peer nodes to support */
2016 * In offload mode target supports features like WOW, chatter and
2017 * other protocol offloads. In order to support them some
2018 * functionalities like reorder buffering, PN checking need to be
2019 * done in target. This determines maximum number of peers suported
2020 * by target in offload mode
2022 __le32 num_offload_peers;
2024 /* For target-based RX reordering */
2025 __le32 num_offload_reorder_bufs;
2027 /* number of keys per peer */
2028 __le32 num_peer_keys;
2030 /* total number of TX/RX data TIDs */
2034 * max skid for resolving hash collisions
2036 * The address search table is sparse, so that if two MAC addresses
2037 * result in the same hash value, the second of these conflicting
2038 * entries can slide to the next index in the address search table,
2039 * and use it, if it is unoccupied. This ast_skid_limit parameter
2040 * specifies the upper bound on how many subsequent indices to search
2041 * over to find an unoccupied space.
2043 __le32 ast_skid_limit;
2046 * the nominal chain mask for transmit
2048 * The chain mask may be modified dynamically, e.g. to operate AP
2049 * tx with a reduced number of chains if no clients are associated.
2050 * This configuration parameter specifies the nominal chain-mask that
2051 * should be used when not operating with a reduced set of tx chains.
2053 __le32 tx_chain_mask;
2056 * the nominal chain mask for receive
2058 * The chain mask may be modified dynamically, e.g. for a client
2059 * to use a reduced number of chains for receive if the traffic to
2060 * the client is low enough that it doesn't require downlink MIMO
2061 * or antenna diversity.
2062 * This configuration parameter specifies the nominal chain-mask that
2063 * should be used when not operating with a reduced set of rx chains.
2065 __le32 rx_chain_mask;
2068 * what rx reorder timeout (ms) to use for the AC
2070 * Each WMM access class (voice, video, best-effort, background) will
2071 * have its own timeout value to dictate how long to wait for missing
2072 * rx MPDUs to arrive before flushing subsequent MPDUs that have
2073 * already been received.
2074 * This parameter specifies the timeout in milliseconds for each
2077 __le32 rx_timeout_pri_vi;
2078 __le32 rx_timeout_pri_vo;
2079 __le32 rx_timeout_pri_be;
2080 __le32 rx_timeout_pri_bk;
2083 * what mode the rx should decap packets to
2085 * MAC can decap to RAW (no decap), native wifi or Ethernet types
2086 * THis setting also determines the default TX behavior, however TX
2087 * behavior can be modified on a per VAP basis during VAP init
2089 __le32 rx_decap_mode;
2091 /* what is the maximum number of scan requests that can be queued */
2092 __le32 scan_max_pending_reqs;
2094 /* maximum VDEV that could use BMISS offload */
2095 __le32 bmiss_offload_max_vdev;
2097 /* maximum VDEV that could use offload roaming */
2098 __le32 roam_offload_max_vdev;
2100 /* maximum AP profiles that would push to offload roaming */
2101 __le32 roam_offload_max_ap_profiles;
2104 * how many groups to use for mcast->ucast conversion
2106 * The target's WAL maintains a table to hold information regarding
2107 * which peers belong to a given multicast group, so that if
2108 * multicast->unicast conversion is enabled, the target can convert
2109 * multicast tx frames to a series of unicast tx frames, to each
2110 * peer within the multicast group.
2111 This num_mcast_groups configuration parameter tells the target how
2112 * many multicast groups to provide storage for within its multicast
2113 * group membership table.
2115 __le32 num_mcast_groups;
2118 * size to alloc for the mcast membership table
2120 * This num_mcast_table_elems configuration parameter tells the
2121 * target how many peer elements it needs to provide storage for in
2122 * its multicast group membership table.
2123 * These multicast group membership table elements are shared by the
2124 * multicast groups stored within the table.
2126 __le32 num_mcast_table_elems;
2129 * whether/how to do multicast->unicast conversion
2131 * This configuration parameter specifies whether the target should
2132 * perform multicast --> unicast conversion on transmit, and if so,
2133 * what to do if it finds no entries in its multicast group
2134 * membership table for the multicast IP address in the tx frame.
2135 * Configuration value:
2136 * 0 -> Do not perform multicast to unicast conversion.
2137 * 1 -> Convert multicast frames to unicast, if the IP multicast
2138 * address from the tx frame is found in the multicast group
2139 * membership table. If the IP multicast address is not found,
2141 * 2 -> Convert multicast frames to unicast, if the IP multicast
2142 * address from the tx frame is found in the multicast group
2143 * membership table. If the IP multicast address is not found,
2144 * transmit the frame as multicast.
2146 __le32 mcast2ucast_mode;
2149 * how much memory to allocate for a tx PPDU dbg log
2151 * This parameter controls how much memory the target will allocate
2152 * to store a log of tx PPDU meta-information (how large the PPDU
2153 * was, when it was sent, whether it was successful, etc.)
2155 __le32 tx_dbg_log_size;
2157 /* how many AST entries to be allocated for WDS */
2158 __le32 num_wds_entries;
2161 * MAC DMA burst size, e.g., For target PCI limit can be
2162 * 0 -default, 1 256B
2164 __le32 dma_burst_size;
2167 * Fixed delimiters to be inserted after every MPDU to
2168 * account for interface latency to avoid underrun.
2170 __le32 mac_aggr_delim;
2173 * determine whether target is responsible for detecting duplicate
2174 * non-aggregate MPDU and timing out stale fragments.
2176 * A-MPDU reordering is always performed on the target.
2178 * 0: target responsible for frag timeout and dup checking
2179 * 1: host responsible for frag timeout and dup checking
2181 __le32 rx_skip_defrag_timeout_dup_detection_check;
2184 * Configuration for VoW :
2185 * No of Video Nodes to be supported
2186 * and Max no of descriptors for each Video link (node).
2190 /* maximum VDEV that could use GTK offload */
2191 __le32 gtk_offload_max_vdev;
2193 /* Number of msdu descriptors target should use */
2194 __le32 num_msdu_desc;
2197 * Max. number of Tx fragments per MSDU
2198 * This parameter controls the max number of Tx fragments per MSDU.
2199 * This is sent by the target as part of the WMI_SERVICE_READY event
2200 * and is overriden by the OS shim as required.
2202 __le32 max_frag_entries;
2205 struct wmi_resource_config_10x {
2206 /* number of virtual devices (VAPs) to support */
2209 /* number of peer nodes to support */
2212 /* number of keys per peer */
2213 __le32 num_peer_keys;
2215 /* total number of TX/RX data TIDs */
2219 * max skid for resolving hash collisions
2221 * The address search table is sparse, so that if two MAC addresses
2222 * result in the same hash value, the second of these conflicting
2223 * entries can slide to the next index in the address search table,
2224 * and use it, if it is unoccupied. This ast_skid_limit parameter
2225 * specifies the upper bound on how many subsequent indices to search
2226 * over to find an unoccupied space.
2228 __le32 ast_skid_limit;
2231 * the nominal chain mask for transmit
2233 * The chain mask may be modified dynamically, e.g. to operate AP
2234 * tx with a reduced number of chains if no clients are associated.
2235 * This configuration parameter specifies the nominal chain-mask that
2236 * should be used when not operating with a reduced set of tx chains.
2238 __le32 tx_chain_mask;
2241 * the nominal chain mask for receive
2243 * The chain mask may be modified dynamically, e.g. for a client
2244 * to use a reduced number of chains for receive if the traffic to
2245 * the client is low enough that it doesn't require downlink MIMO
2246 * or antenna diversity.
2247 * This configuration parameter specifies the nominal chain-mask that
2248 * should be used when not operating with a reduced set of rx chains.
2250 __le32 rx_chain_mask;
2253 * what rx reorder timeout (ms) to use for the AC
2255 * Each WMM access class (voice, video, best-effort, background) will
2256 * have its own timeout value to dictate how long to wait for missing
2257 * rx MPDUs to arrive before flushing subsequent MPDUs that have
2258 * already been received.
2259 * This parameter specifies the timeout in milliseconds for each
2262 __le32 rx_timeout_pri_vi;
2263 __le32 rx_timeout_pri_vo;
2264 __le32 rx_timeout_pri_be;
2265 __le32 rx_timeout_pri_bk;
2268 * what mode the rx should decap packets to
2270 * MAC can decap to RAW (no decap), native wifi or Ethernet types
2271 * THis setting also determines the default TX behavior, however TX
2272 * behavior can be modified on a per VAP basis during VAP init
2274 __le32 rx_decap_mode;
2276 /* what is the maximum number of scan requests that can be queued */
2277 __le32 scan_max_pending_reqs;
2279 /* maximum VDEV that could use BMISS offload */
2280 __le32 bmiss_offload_max_vdev;
2282 /* maximum VDEV that could use offload roaming */
2283 __le32 roam_offload_max_vdev;
2285 /* maximum AP profiles that would push to offload roaming */
2286 __le32 roam_offload_max_ap_profiles;
2289 * how many groups to use for mcast->ucast conversion
2291 * The target's WAL maintains a table to hold information regarding
2292 * which peers belong to a given multicast group, so that if
2293 * multicast->unicast conversion is enabled, the target can convert
2294 * multicast tx frames to a series of unicast tx frames, to each
2295 * peer within the multicast group.
2296 This num_mcast_groups configuration parameter tells the target how
2297 * many multicast groups to provide storage for within its multicast
2298 * group membership table.
2300 __le32 num_mcast_groups;
2303 * size to alloc for the mcast membership table
2305 * This num_mcast_table_elems configuration parameter tells the
2306 * target how many peer elements it needs to provide storage for in
2307 * its multicast group membership table.
2308 * These multicast group membership table elements are shared by the
2309 * multicast groups stored within the table.
2311 __le32 num_mcast_table_elems;
2314 * whether/how to do multicast->unicast conversion
2316 * This configuration parameter specifies whether the target should
2317 * perform multicast --> unicast conversion on transmit, and if so,
2318 * what to do if it finds no entries in its multicast group
2319 * membership table for the multicast IP address in the tx frame.
2320 * Configuration value:
2321 * 0 -> Do not perform multicast to unicast conversion.
2322 * 1 -> Convert multicast frames to unicast, if the IP multicast
2323 * address from the tx frame is found in the multicast group
2324 * membership table. If the IP multicast address is not found,
2326 * 2 -> Convert multicast frames to unicast, if the IP multicast
2327 * address from the tx frame is found in the multicast group
2328 * membership table. If the IP multicast address is not found,
2329 * transmit the frame as multicast.
2331 __le32 mcast2ucast_mode;
2334 * how much memory to allocate for a tx PPDU dbg log
2336 * This parameter controls how much memory the target will allocate
2337 * to store a log of tx PPDU meta-information (how large the PPDU
2338 * was, when it was sent, whether it was successful, etc.)
2340 __le32 tx_dbg_log_size;
2342 /* how many AST entries to be allocated for WDS */
2343 __le32 num_wds_entries;
2346 * MAC DMA burst size, e.g., For target PCI limit can be
2347 * 0 -default, 1 256B
2349 __le32 dma_burst_size;
2352 * Fixed delimiters to be inserted after every MPDU to
2353 * account for interface latency to avoid underrun.
2355 __le32 mac_aggr_delim;
2358 * determine whether target is responsible for detecting duplicate
2359 * non-aggregate MPDU and timing out stale fragments.
2361 * A-MPDU reordering is always performed on the target.
2363 * 0: target responsible for frag timeout and dup checking
2364 * 1: host responsible for frag timeout and dup checking
2366 __le32 rx_skip_defrag_timeout_dup_detection_check;
2369 * Configuration for VoW :
2370 * No of Video Nodes to be supported
2371 * and Max no of descriptors for each Video link (node).
2375 /* Number of msdu descriptors target should use */
2376 __le32 num_msdu_desc;
2379 * Max. number of Tx fragments per MSDU
2380 * This parameter controls the max number of Tx fragments per MSDU.
2381 * This is sent by the target as part of the WMI_SERVICE_READY event
2382 * and is overriden by the OS shim as required.
2384 __le32 max_frag_entries;
2387 enum wmi_10_2_feature_mask {
2388 WMI_10_2_RX_BATCH_MODE = BIT(0),
2389 WMI_10_2_ATF_CONFIG = BIT(1),
2390 WMI_10_2_COEX_GPIO = BIT(3),
2393 struct wmi_resource_config_10_2 {
2394 struct wmi_resource_config_10x common;
2395 __le32 max_peer_ext_stats;
2396 __le32 smart_ant_cap; /* 0-disable, 1-enable */
2401 __le32 feature_mask;
2404 #define NUM_UNITS_IS_NUM_VDEVS BIT(0)
2405 #define NUM_UNITS_IS_NUM_PEERS BIT(1)
2406 #define NUM_UNITS_IS_NUM_ACTIVE_PEERS BIT(2)
2408 struct wmi_resource_config_10_4 {
2409 /* Number of virtual devices (VAPs) to support */
2412 /* Number of peer nodes to support */
2415 /* Number of active peer nodes to support */
2416 __le32 num_active_peers;
2418 /* In offload mode, target supports features like WOW, chatter and other
2419 * protocol offloads. In order to support them some functionalities like
2420 * reorder buffering, PN checking need to be done in target.
2421 * This determines maximum number of peers supported by target in
2424 __le32 num_offload_peers;
2426 /* Number of reorder buffers available for doing target based reorder
2427 * Rx reorder buffering
2429 __le32 num_offload_reorder_buffs;
2431 /* Number of keys per peer */
2432 __le32 num_peer_keys;
2434 /* Total number of TX/RX data TIDs */
2437 /* Max skid for resolving hash collisions.
2438 * The address search table is sparse, so that if two MAC addresses
2439 * result in the same hash value, the second of these conflicting
2440 * entries can slide to the next index in the address search table,
2441 * and use it, if it is unoccupied. This ast_skid_limit parameter
2442 * specifies the upper bound on how many subsequent indices to search
2443 * over to find an unoccupied space.
2445 __le32 ast_skid_limit;
2447 /* The nominal chain mask for transmit.
2448 * The chain mask may be modified dynamically, e.g. to operate AP tx
2449 * with a reduced number of chains if no clients are associated.
2450 * This configuration parameter specifies the nominal chain-mask that
2451 * should be used when not operating with a reduced set of tx chains.
2453 __le32 tx_chain_mask;
2455 /* The nominal chain mask for receive.
2456 * The chain mask may be modified dynamically, e.g. for a client to use
2457 * a reduced number of chains for receive if the traffic to the client
2458 * is low enough that it doesn't require downlink MIMO or antenna
2459 * diversity. This configuration parameter specifies the nominal
2460 * chain-mask that should be used when not operating with a reduced
2463 __le32 rx_chain_mask;
2465 /* What rx reorder timeout (ms) to use for the AC.
2466 * Each WMM access class (voice, video, best-effort, background) will
2467 * have its own timeout value to dictate how long to wait for missing
2468 * rx MPDUs to arrive before flushing subsequent MPDUs that have already
2469 * been received. This parameter specifies the timeout in milliseconds
2472 __le32 rx_timeout_pri[4];
2474 /* What mode the rx should decap packets to.
2475 * MAC can decap to RAW (no decap), native wifi or Ethernet types.
2476 * This setting also determines the default TX behavior, however TX
2477 * behavior can be modified on a per VAP basis during VAP init
2479 __le32 rx_decap_mode;
2481 __le32 scan_max_pending_req;
2483 __le32 bmiss_offload_max_vdev;
2485 __le32 roam_offload_max_vdev;
2487 __le32 roam_offload_max_ap_profiles;
2489 /* How many groups to use for mcast->ucast conversion.
2490 * The target's WAL maintains a table to hold information regarding
2491 * which peers belong to a given multicast group, so that if
2492 * multicast->unicast conversion is enabled, the target can convert
2493 * multicast tx frames to a series of unicast tx frames, to each peer
2494 * within the multicast group. This num_mcast_groups configuration
2495 * parameter tells the target how many multicast groups to provide
2496 * storage for within its multicast group membership table.
2498 __le32 num_mcast_groups;
2500 /* Size to alloc for the mcast membership table.
2501 * This num_mcast_table_elems configuration parameter tells the target
2502 * how many peer elements it needs to provide storage for in its
2503 * multicast group membership table. These multicast group membership
2504 * table elements are shared by the multicast groups stored within
2507 __le32 num_mcast_table_elems;
2509 /* Whether/how to do multicast->unicast conversion.
2510 * This configuration parameter specifies whether the target should
2511 * perform multicast --> unicast conversion on transmit, and if so,
2512 * what to do if it finds no entries in its multicast group membership
2513 * table for the multicast IP address in the tx frame.
2514 * Configuration value:
2515 * 0 -> Do not perform multicast to unicast conversion.
2516 * 1 -> Convert multicast frames to unicast, if the IP multicast address
2517 * from the tx frame is found in the multicast group membership
2518 * table. If the IP multicast address is not found, drop the frame
2519 * 2 -> Convert multicast frames to unicast, if the IP multicast address
2520 * from the tx frame is found in the multicast group membership
2521 * table. If the IP multicast address is not found, transmit the
2522 * frame as multicast.
2524 __le32 mcast2ucast_mode;
2526 /* How much memory to allocate for a tx PPDU dbg log.
2527 * This parameter controls how much memory the target will allocate to
2528 * store a log of tx PPDU meta-information (how large the PPDU was,
2529 * when it was sent, whether it was successful, etc.)
2531 __le32 tx_dbg_log_size;
2533 /* How many AST entries to be allocated for WDS */
2534 __le32 num_wds_entries;
2536 /* MAC DMA burst size. 0 -default, 1 -256B */
2537 __le32 dma_burst_size;
2539 /* Fixed delimiters to be inserted after every MPDU to account for
2540 * interface latency to avoid underrun.
2542 __le32 mac_aggr_delim;
2544 /* Determine whether target is responsible for detecting duplicate
2545 * non-aggregate MPDU and timing out stale fragments. A-MPDU reordering
2546 * is always performed on the target.
2548 * 0: target responsible for frag timeout and dup checking
2549 * 1: host responsible for frag timeout and dup checking
2551 __le32 rx_skip_defrag_timeout_dup_detection_check;
2553 /* Configuration for VoW : No of Video nodes to be supported and max
2554 * no of descriptors for each video link (node).
2558 /* Maximum vdev that could use gtk offload */
2559 __le32 gtk_offload_max_vdev;
2561 /* Number of msdu descriptors target should use */
2562 __le32 num_msdu_desc;
2564 /* Max number of tx fragments per MSDU.
2565 * This parameter controls the max number of tx fragments per MSDU.
2566 * This will passed by target as part of the WMI_SERVICE_READY event
2567 * and is overridden by the OS shim as required.
2569 __le32 max_frag_entries;
2571 /* Max number of extended peer stats.
2572 * This parameter controls the max number of peers for which extended
2573 * statistics are supported by target
2575 __le32 max_peer_ext_stats;
2577 /* Smart antenna capabilities information.
2578 * 1 - Smart antenna is enabled
2579 * 0 - Smart antenna is disabled
2580 * In future this can contain smart antenna specific capabilities.
2582 __le32 smart_ant_cap;
2584 /* User can configure the buffers allocated for each AC (BE, BK, VI, VO)
2592 /* Rx batch mode capability.
2593 * 1 - Rx batch mode enabled
2594 * 0 - Rx batch mode disabled
2596 __le32 rx_batchmode;
2598 /* Thermal throttling capability.
2599 * 1 - Capable of thermal throttling
2600 * 0 - Not capable of thermal throttling
2604 /* ATF configuration.
2610 /* Configure padding to manage IP header un-alignment
2611 * 1 - Enable padding
2612 * 0 - Disable padding
2614 __le32 iphdr_pad_config;
2616 /* qwrap configuration
2617 * 1 - This is qwrap configuration
2618 * 0 - This is not qwrap
2620 __le32 qwrap_config;
2623 /* strucutre describing host memory chunk. */
2624 struct host_memory_chunk {
2625 /* id of the request that is passed up in service ready */
2627 /* the physical address the memory chunk */
2629 /* size of the chunk */
2633 struct wmi_host_mem_chunks {
2635 /* some fw revisions require at least 1 chunk regardless of count */
2636 struct host_memory_chunk items[1];
2639 struct wmi_init_cmd {
2640 struct wmi_resource_config resource_config;
2641 struct wmi_host_mem_chunks mem_chunks;
2644 /* _10x stucture is from 10.X FW API */
2645 struct wmi_init_cmd_10x {
2646 struct wmi_resource_config_10x resource_config;
2647 struct wmi_host_mem_chunks mem_chunks;
2650 struct wmi_init_cmd_10_2 {
2651 struct wmi_resource_config_10_2 resource_config;
2652 struct wmi_host_mem_chunks mem_chunks;
2655 struct wmi_init_cmd_10_4 {
2656 struct wmi_resource_config_10_4 resource_config;
2657 struct wmi_host_mem_chunks mem_chunks;
2660 struct wmi_chan_list_entry {
2662 u8 phy_mode; /* valid for 10.2 only */
2666 /* TLV for channel list */
2667 struct wmi_chan_list {
2668 __le32 tag; /* WMI_CHAN_LIST_TAG */
2670 struct wmi_chan_list_entry channel_list[0];
2673 struct wmi_bssid_list {
2674 __le32 tag; /* WMI_BSSID_LIST_TAG */
2676 struct wmi_mac_addr bssid_list[0];
2679 struct wmi_ie_data {
2680 __le32 tag; /* WMI_IE_TAG */
2690 struct wmi_ssid_list {
2691 __le32 tag; /* WMI_SSID_LIST_TAG */
2693 struct wmi_ssid ssids[0];
2696 /* prefix used by scan requestor ids on the host */
2697 #define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
2699 /* prefix used by scan request ids generated on the host */
2700 /* host cycles through the lower 12 bits to generate ids */
2701 #define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000
2703 #define WLAN_SCAN_PARAMS_MAX_SSID 16
2704 #define WLAN_SCAN_PARAMS_MAX_BSSID 4
2705 #define WLAN_SCAN_PARAMS_MAX_IE_LEN 256
2707 /* Values lower than this may be refused by some firmware revisions with a scan
2708 * completion with a timedout reason.
2710 #define WMI_SCAN_CHAN_MIN_TIME_MSEC 40
2712 /* Scan priority numbers must be sequential, starting with 0 */
2713 enum wmi_scan_priority {
2714 WMI_SCAN_PRIORITY_VERY_LOW = 0,
2715 WMI_SCAN_PRIORITY_LOW,
2716 WMI_SCAN_PRIORITY_MEDIUM,
2717 WMI_SCAN_PRIORITY_HIGH,
2718 WMI_SCAN_PRIORITY_VERY_HIGH,
2719 WMI_SCAN_PRIORITY_COUNT /* number of priorities supported */
2722 struct wmi_start_scan_common {
2725 /* Scan requestor ID */
2727 /* VDEV id(interface) that is requesting scan */
2729 /* Scan Priority, input to scan scheduler */
2730 __le32 scan_priority;
2731 /* Scan events subscription */
2732 __le32 notify_scan_events;
2733 /* dwell time in msec on active channels */
2734 __le32 dwell_time_active;
2735 /* dwell time in msec on passive channels */
2736 __le32 dwell_time_passive;
2738 * min time in msec on the BSS channel,only valid if atleast one
2741 __le32 min_rest_time;
2743 * max rest time in msec on the BSS channel,only valid if at least
2744 * one VDEV is active
2747 * the scanner will rest on the bss channel at least min_rest_time
2748 * after min_rest_time the scanner will start checking for tx/rx
2749 * activity on all VDEVs. if there is no activity the scanner will
2750 * switch to off channel. if there is activity the scanner will let
2751 * the radio on the bss channel until max_rest_time expires.at
2752 * max_rest_time scanner will switch to off channel irrespective of
2753 * activity. activity is determined by the idle_time parameter.
2755 __le32 max_rest_time;
2757 * time before sending next set of probe requests.
2758 * The scanner keeps repeating probe requests transmission with
2759 * period specified by repeat_probe_time.
2760 * The number of probe requests specified depends on the ssid_list
2763 __le32 repeat_probe_time;
2764 /* time in msec between 2 consequetive probe requests with in a set. */
2765 __le32 probe_spacing_time;
2767 * data inactivity time in msec on bss channel that will be used by
2768 * scanner for measuring the inactivity.
2771 /* maximum time in msec allowed for scan */
2772 __le32 max_scan_time;
2774 * delay in msec before sending first probe request after switching
2778 /* Scan control flags */
2779 __le32 scan_ctrl_flags;
2782 struct wmi_start_scan_tlvs {
2783 /* TLV parameters. These includes channel list, ssid list, bssid list,
2789 struct wmi_start_scan_cmd {
2790 struct wmi_start_scan_common common;
2791 __le32 burst_duration_ms;
2792 struct wmi_start_scan_tlvs tlvs;
2795 /* This is the definition from 10.X firmware branch */
2796 struct wmi_10x_start_scan_cmd {
2797 struct wmi_start_scan_common common;
2798 struct wmi_start_scan_tlvs tlvs;
2801 struct wmi_ssid_arg {
2806 struct wmi_bssid_arg {
2810 struct wmi_start_scan_arg {
2815 u32 notify_scan_events;
2816 u32 dwell_time_active;
2817 u32 dwell_time_passive;
2820 u32 repeat_probe_time;
2821 u32 probe_spacing_time;
2825 u32 scan_ctrl_flags;
2826 u32 burst_duration_ms;
2833 u8 ie[WLAN_SCAN_PARAMS_MAX_IE_LEN];
2835 struct wmi_ssid_arg ssids[WLAN_SCAN_PARAMS_MAX_SSID];
2836 struct wmi_bssid_arg bssids[WLAN_SCAN_PARAMS_MAX_BSSID];
2839 /* scan control flags */
2841 /* passively scan all channels including active channels */
2842 #define WMI_SCAN_FLAG_PASSIVE 0x1
2843 /* add wild card ssid probe request even though ssid_list is specified. */
2844 #define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2
2845 /* add cck rates to rates/xrate ie for the generated probe request */
2846 #define WMI_SCAN_ADD_CCK_RATES 0x4
2847 /* add ofdm rates to rates/xrate ie for the generated probe request */
2848 #define WMI_SCAN_ADD_OFDM_RATES 0x8
2849 /* To enable indication of Chan load and Noise floor to host */
2850 #define WMI_SCAN_CHAN_STAT_EVENT 0x10
2851 /* Filter Probe request frames */
2852 #define WMI_SCAN_FILTER_PROBE_REQ 0x20
2853 /* When set, DFS channels will not be scanned */
2854 #define WMI_SCAN_BYPASS_DFS_CHN 0x40
2855 /* Different FW scan engine may choose to bail out on errors.
2856 * Allow the driver to have influence over that. */
2857 #define WMI_SCAN_CONTINUE_ON_ERROR 0x80
2859 /* WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */
2860 #define WMI_SCAN_CLASS_MASK 0xFF000000
2862 enum wmi_stop_scan_type {
2863 WMI_SCAN_STOP_ONE = 0x00000000, /* stop by scan_id */
2864 WMI_SCAN_STOP_VDEV_ALL = 0x01000000, /* stop by vdev_id */
2865 WMI_SCAN_STOP_ALL = 0x04000000, /* stop all scans */
2868 struct wmi_stop_scan_cmd {
2875 struct wmi_stop_scan_arg {
2877 enum wmi_stop_scan_type req_type;
2884 struct wmi_scan_chan_list_cmd {
2885 __le32 num_scan_chans;
2886 struct wmi_channel chan_info[0];
2889 struct wmi_scan_chan_list_arg {
2891 struct wmi_channel_arg *channels;
2894 enum wmi_bss_filter {
2895 WMI_BSS_FILTER_NONE = 0, /* no beacons forwarded */
2896 WMI_BSS_FILTER_ALL, /* all beacons forwarded */
2897 WMI_BSS_FILTER_PROFILE, /* only beacons matching profile */
2898 WMI_BSS_FILTER_ALL_BUT_PROFILE, /* all but beacons matching profile */
2899 WMI_BSS_FILTER_CURRENT_BSS, /* only beacons matching current BSS */
2900 WMI_BSS_FILTER_ALL_BUT_BSS, /* all but beacons matching BSS */
2901 WMI_BSS_FILTER_PROBED_SSID, /* beacons matching probed ssid */
2902 WMI_BSS_FILTER_LAST_BSS, /* marker only */
2905 enum wmi_scan_event_type {
2906 WMI_SCAN_EVENT_STARTED = BIT(0),
2907 WMI_SCAN_EVENT_COMPLETED = BIT(1),
2908 WMI_SCAN_EVENT_BSS_CHANNEL = BIT(2),
2909 WMI_SCAN_EVENT_FOREIGN_CHANNEL = BIT(3),
2910 WMI_SCAN_EVENT_DEQUEUED = BIT(4),
2911 /* possibly by high-prio scan */
2912 WMI_SCAN_EVENT_PREEMPTED = BIT(5),
2913 WMI_SCAN_EVENT_START_FAILED = BIT(6),
2914 WMI_SCAN_EVENT_RESTARTED = BIT(7),
2915 WMI_SCAN_EVENT_FOREIGN_CHANNEL_EXIT = BIT(8),
2916 WMI_SCAN_EVENT_MAX = BIT(15),
2919 enum wmi_scan_completion_reason {
2920 WMI_SCAN_REASON_COMPLETED,
2921 WMI_SCAN_REASON_CANCELLED,
2922 WMI_SCAN_REASON_PREEMPTED,
2923 WMI_SCAN_REASON_TIMEDOUT,
2924 WMI_SCAN_REASON_INTERNAL_FAILURE,
2925 WMI_SCAN_REASON_MAX,
2928 struct wmi_scan_event {
2929 __le32 event_type; /* %WMI_SCAN_EVENT_ */
2930 __le32 reason; /* %WMI_SCAN_REASON_ */
2931 __le32 channel_freq; /* only valid for WMI_SCAN_EVENT_FOREIGN_CHANNEL */
2938 * This defines how much headroom is kept in the
2939 * receive frame between the descriptor and the
2940 * payload, in order for the WMI PHY error and
2941 * management handler to insert header contents.
2945 #define WMI_MGMT_RX_HDR_HEADROOM 52
2948 * This event will be used for sending scan results
2949 * as well as rx mgmt frames to the host. The rx buffer
2950 * will be sent as part of this WMI event. It would be a
2951 * good idea to pass all the fields in the RX status
2952 * descriptor up to the host.
2954 struct wmi_mgmt_rx_hdr_v1 {
2960 __le32 status; /* %WMI_RX_STATUS_ */
2963 struct wmi_mgmt_rx_hdr_v2 {
2964 struct wmi_mgmt_rx_hdr_v1 v1;
2968 struct wmi_mgmt_rx_event_v1 {
2969 struct wmi_mgmt_rx_hdr_v1 hdr;
2973 struct wmi_mgmt_rx_event_v2 {
2974 struct wmi_mgmt_rx_hdr_v2 hdr;
2978 struct wmi_10_4_mgmt_rx_hdr {
2988 struct wmi_10_4_mgmt_rx_event {
2989 struct wmi_10_4_mgmt_rx_hdr hdr;
2993 #define WMI_RX_STATUS_OK 0x00
2994 #define WMI_RX_STATUS_ERR_CRC 0x01
2995 #define WMI_RX_STATUS_ERR_DECRYPT 0x08
2996 #define WMI_RX_STATUS_ERR_MIC 0x10
2997 #define WMI_RX_STATUS_ERR_KEY_CACHE_MISS 0x20
2999 #define PHY_ERROR_GEN_SPECTRAL_SCAN 0x26
3000 #define PHY_ERROR_GEN_FALSE_RADAR_EXT 0x24
3001 #define PHY_ERROR_GEN_RADAR 0x05
3003 #define PHY_ERROR_10_4_RADAR_MASK 0x4
3004 #define PHY_ERROR_10_4_SPECTRAL_SCAN_MASK 0x4000000
3008 PHY_ERROR_SPECTRAL_SCAN,
3009 PHY_ERROR_FALSE_RADAR_EXT,
3014 __le32 tsf_timestamp;
3021 __le32 rssi_chains[4];
3022 __le16 nf_chains[4];
3027 struct wmi_phyerr_event {
3031 struct wmi_phyerr phyerrs[0];
3034 struct wmi_10_4_phyerr_event {
3043 __le32 rssi_chains[4];
3044 __le16 nf_chains[4];
3045 __le32 phy_err_mask[2];
3046 __le32 tsf_timestamp;
3051 #define PHYERR_TLV_SIG 0xBB
3052 #define PHYERR_TLV_TAG_SEARCH_FFT_REPORT 0xFB
3053 #define PHYERR_TLV_TAG_RADAR_PULSE_SUMMARY 0xF8
3054 #define PHYERR_TLV_TAG_SPECTRAL_SUMMARY_REPORT 0xF9
3056 struct phyerr_radar_report {
3057 __le32 reg0; /* RADAR_REPORT_REG0_* */
3058 __le32 reg1; /* REDAR_REPORT_REG1_* */
3061 #define RADAR_REPORT_REG0_PULSE_IS_CHIRP_MASK 0x80000000
3062 #define RADAR_REPORT_REG0_PULSE_IS_CHIRP_LSB 31
3064 #define RADAR_REPORT_REG0_PULSE_IS_MAX_WIDTH_MASK 0x40000000
3065 #define RADAR_REPORT_REG0_PULSE_IS_MAX_WIDTH_LSB 30
3067 #define RADAR_REPORT_REG0_AGC_TOTAL_GAIN_MASK 0x3FF00000
3068 #define RADAR_REPORT_REG0_AGC_TOTAL_GAIN_LSB 20
3070 #define RADAR_REPORT_REG0_PULSE_DELTA_DIFF_MASK 0x000F0000
3071 #define RADAR_REPORT_REG0_PULSE_DELTA_DIFF_LSB 16
3073 #define RADAR_REPORT_REG0_PULSE_DELTA_PEAK_MASK 0x0000FC00
3074 #define RADAR_REPORT_REG0_PULSE_DELTA_PEAK_LSB 10
3076 #define RADAR_REPORT_REG0_PULSE_SIDX_MASK 0x000003FF
3077 #define RADAR_REPORT_REG0_PULSE_SIDX_LSB 0
3079 #define RADAR_REPORT_REG1_PULSE_SRCH_FFT_VALID_MASK 0x80000000
3080 #define RADAR_REPORT_REG1_PULSE_SRCH_FFT_VALID_LSB 31
3082 #define RADAR_REPORT_REG1_PULSE_AGC_MB_GAIN_MASK 0x7F000000
3083 #define RADAR_REPORT_REG1_PULSE_AGC_MB_GAIN_LSB 24
3085 #define RADAR_REPORT_REG1_PULSE_SUBCHAN_MASK_MASK 0x00FF0000
3086 #define RADAR_REPORT_REG1_PULSE_SUBCHAN_MASK_LSB 16
3088 #define RADAR_REPORT_REG1_PULSE_TSF_OFFSET_MASK 0x0000FF00
3089 #define RADAR_REPORT_REG1_PULSE_TSF_OFFSET_LSB 8
3091 #define RADAR_REPORT_REG1_PULSE_DUR_MASK 0x000000FF
3092 #define RADAR_REPORT_REG1_PULSE_DUR_LSB 0
3094 struct phyerr_fft_report {
3095 __le32 reg0; /* SEARCH_FFT_REPORT_REG0_ * */
3096 __le32 reg1; /* SEARCH_FFT_REPORT_REG1_ * */
3099 #define SEARCH_FFT_REPORT_REG0_TOTAL_GAIN_DB_MASK 0xFF800000
3100 #define SEARCH_FFT_REPORT_REG0_TOTAL_GAIN_DB_LSB 23
3102 #define SEARCH_FFT_REPORT_REG0_BASE_PWR_DB_MASK 0x007FC000
3103 #define SEARCH_FFT_REPORT_REG0_BASE_PWR_DB_LSB 14
3105 #define SEARCH_FFT_REPORT_REG0_FFT_CHN_IDX_MASK 0x00003000
3106 #define SEARCH_FFT_REPORT_REG0_FFT_CHN_IDX_LSB 12
3108 #define SEARCH_FFT_REPORT_REG0_PEAK_SIDX_MASK 0x00000FFF
3109 #define SEARCH_FFT_REPORT_REG0_PEAK_SIDX_LSB 0
3111 #define SEARCH_FFT_REPORT_REG1_RELPWR_DB_MASK 0xFC000000
3112 #define SEARCH_FFT_REPORT_REG1_RELPWR_DB_LSB 26
3114 #define SEARCH_FFT_REPORT_REG1_AVGPWR_DB_MASK 0x03FC0000
3115 #define SEARCH_FFT_REPORT_REG1_AVGPWR_DB_LSB 18
3117 #define SEARCH_FFT_REPORT_REG1_PEAK_MAG_MASK 0x0003FF00
3118 #define SEARCH_FFT_REPORT_REG1_PEAK_MAG_LSB 8
3120 #define SEARCH_FFT_REPORT_REG1_NUM_STR_BINS_IB_MASK 0x000000FF
3121 #define SEARCH_FFT_REPORT_REG1_NUM_STR_BINS_IB_LSB 0
3129 #define DFS_RSSI_POSSIBLY_FALSE 50
3130 #define DFS_PEAK_MAG_THOLD_POSSIBLY_FALSE 40
3132 struct wmi_mgmt_tx_hdr {
3134 struct wmi_mac_addr peer_macaddr;
3140 struct wmi_mgmt_tx_cmd {
3141 struct wmi_mgmt_tx_hdr hdr;
3145 struct wmi_echo_event {
3149 struct wmi_echo_cmd {
3153 struct wmi_pdev_set_regdomain_cmd {
3155 __le32 reg_domain_2G;
3156 __le32 reg_domain_5G;
3157 __le32 conformance_test_limit_2G;
3158 __le32 conformance_test_limit_5G;
3161 enum wmi_dfs_region {
3162 /* Uninitialized dfs domain */
3163 WMI_UNINIT_DFS_DOMAIN = 0,
3165 /* FCC3 dfs domain */
3166 WMI_FCC_DFS_DOMAIN = 1,
3168 /* ETSI dfs domain */
3169 WMI_ETSI_DFS_DOMAIN = 2,
3171 /*Japan dfs domain */
3172 WMI_MKK4_DFS_DOMAIN = 3,
3175 struct wmi_pdev_set_regdomain_cmd_10x {
3177 __le32 reg_domain_2G;
3178 __le32 reg_domain_5G;
3179 __le32 conformance_test_limit_2G;
3180 __le32 conformance_test_limit_5G;
3182 /* dfs domain from wmi_dfs_region */
3186 /* Command to set/unset chip in quiet mode */
3187 struct wmi_pdev_set_quiet_cmd {
3191 /* duration in TUs */
3197 /* enable/disable */
3202 * 802.11g protection mode.
3204 enum ath10k_protmode {
3205 ATH10K_PROT_NONE = 0, /* no protection */
3206 ATH10K_PROT_CTSONLY = 1, /* CTS to self */
3207 ATH10K_PROT_RTSCTS = 2, /* RTS-CTS */
3210 enum wmi_rtscts_profile {
3211 WMI_RTSCTS_FOR_NO_RATESERIES = 0,
3212 WMI_RTSCTS_FOR_SECOND_RATESERIES,
3213 WMI_RTSCTS_ACROSS_SW_RETRIES
3216 #define WMI_RTSCTS_ENABLED 1
3217 #define WMI_RTSCTS_SET_MASK 0x0f
3218 #define WMI_RTSCTS_SET_LSB 0
3220 #define WMI_RTSCTS_PROFILE_MASK 0xf0
3221 #define WMI_RTSCTS_PROFILE_LSB 4
3223 enum wmi_beacon_gen_mode {
3224 WMI_BEACON_STAGGERED_MODE = 0,
3225 WMI_BEACON_BURST_MODE = 1
3228 enum wmi_csa_event_ies_present_flag {
3229 WMI_CSA_IE_PRESENT = 0x00000001,
3230 WMI_XCSA_IE_PRESENT = 0x00000002,
3231 WMI_WBW_IE_PRESENT = 0x00000004,
3232 WMI_CSWARP_IE_PRESENT = 0x00000008,
3235 /* wmi CSA receive event from beacon frame */
3236 struct wmi_csa_event {
3239 /* Bit 16-31: DUR */
3240 struct wmi_mac_addr i_addr1;
3241 struct wmi_mac_addr i_addr2;
3246 __le32 ies_present_flag; /* wmi_csa_event_ies_present_flag */
3249 /* the definition of different PDEV parameters */
3250 #define PDEV_DEFAULT_STATS_UPDATE_PERIOD 500
3251 #define VDEV_DEFAULT_STATS_UPDATE_PERIOD 500
3252 #define PEER_DEFAULT_STATS_UPDATE_PERIOD 500
3254 struct wmi_pdev_param_map {
3257 u32 txpower_limit2g;
3258 u32 txpower_limit5g;
3260 u32 beacon_gen_mode;
3262 u32 resmgr_offchan_mode;
3263 u32 protection_mode;
3265 u32 non_agg_sw_retry_th;
3266 u32 agg_sw_retry_th;
3268 u32 ac_aggrsize_scaling;
3270 u32 ltr_ac_latency_be;
3271 u32 ltr_ac_latency_bk;
3272 u32 ltr_ac_latency_vi;
3273 u32 ltr_ac_latency_vo;
3274 u32 ltr_ac_latency_timeout;
3275 u32 ltr_sleep_override;
3276 u32 ltr_rx_override;
3277 u32 ltr_tx_activity_timeout;
3280 u32 pcielp_txbuf_flush;
3281 u32 pcielp_txbuf_watermark;
3282 u32 pcielp_txbuf_tmo_en;
3283 u32 pcielp_txbuf_tmo_value;
3284 u32 pdev_stats_update_period;
3285 u32 vdev_stats_update_period;
3286 u32 peer_stats_update_period;
3287 u32 bcnflt_stats_update_period;
3289 u32 arp_ac_override;
3292 u32 ani_poll_period;
3293 u32 ani_listen_period;
3299 u32 power_gating_sleep;
3300 u32 fast_channel_reset;
3306 u32 smart_antenna_default_antenna;
3307 u32 igmpmld_override;
3311 u32 set_mcast_to_ucast_tid;
3313 u32 set_mcast2ucast_mode;
3314 u32 set_mcast2ucast_buffer;
3315 u32 remove_mcast2ucast_buffer;
3316 u32 peer_sta_ps_statechg_enable;
3317 u32 igmpmld_ac_override;
3319 u32 set_disable_reset_cmdid;
3320 u32 set_msdu_ttl_cmdid;
3321 u32 set_ppdu_duration_cmdid;
3322 u32 txbf_sound_period_cmdid;
3323 u32 set_promisc_mode_cmdid;
3324 u32 set_burst_mode_cmdid;
3326 u32 mu_group_policy;
3327 u32 noise_detection;
3328 u32 noise_threshold;
3330 u32 set_mcast_bcast_echo;
3332 u32 atf_sched_duration;
3334 u32 mgmt_retry_limit;
3335 u32 sensitivity_level;
3336 u32 signed_txpower_2g;
3337 u32 signed_txpower_5g;
3338 u32 enable_per_tid_amsdu;
3339 u32 enable_per_tid_ampdu;
3343 u32 wapi_mbssid_offset;
3348 #define WMI_PDEV_PARAM_UNSUPPORTED 0
3350 enum wmi_pdev_param {
3352 WMI_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
3354 WMI_PDEV_PARAM_RX_CHAIN_MASK,
3355 /* TX power limit for 2G Radio */
3356 WMI_PDEV_PARAM_TXPOWER_LIMIT2G,
3357 /* TX power limit for 5G Radio */
3358 WMI_PDEV_PARAM_TXPOWER_LIMIT5G,
3359 /* TX power scale */
3360 WMI_PDEV_PARAM_TXPOWER_SCALE,
3361 /* Beacon generation mode . 0: host, 1: target */
3362 WMI_PDEV_PARAM_BEACON_GEN_MODE,
3363 /* Beacon generation mode . 0: staggered 1: bursted */
3364 WMI_PDEV_PARAM_BEACON_TX_MODE,
3366 * Resource manager off chan mode .
3367 * 0: turn off off chan mode. 1: turn on offchan mode
3369 WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE,
3372 * 0: no protection 1:use CTS-to-self 2: use RTS/CTS
3374 WMI_PDEV_PARAM_PROTECTION_MODE,
3376 * Dynamic bandwidth - 0: disable, 1: enable
3378 * When enabled HW rate control tries different bandwidths when
3379 * retransmitting frames.
3381 WMI_PDEV_PARAM_DYNAMIC_BW,
3382 /* Non aggregrate/ 11g sw retry threshold.0-disable */
3383 WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH,
3384 /* aggregrate sw retry threshold. 0-disable*/
3385 WMI_PDEV_PARAM_AGG_SW_RETRY_TH,
3386 /* Station kickout threshold (non of consecutive failures).0-disable */
3387 WMI_PDEV_PARAM_STA_KICKOUT_TH,
3388 /* Aggerate size scaling configuration per AC */
3389 WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING,
3391 WMI_PDEV_PARAM_LTR_ENABLE,
3392 /* LTR latency for BE, in us */
3393 WMI_PDEV_PARAM_LTR_AC_LATENCY_BE,
3394 /* LTR latency for BK, in us */
3395 WMI_PDEV_PARAM_LTR_AC_LATENCY_BK,
3396 /* LTR latency for VI, in us */
3397 WMI_PDEV_PARAM_LTR_AC_LATENCY_VI,
3398 /* LTR latency for VO, in us */
3399 WMI_PDEV_PARAM_LTR_AC_LATENCY_VO,
3400 /* LTR AC latency timeout, in ms */
3401 WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT,
3402 /* LTR platform latency override, in us */
3403 WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE,
3404 /* LTR-RX override, in us */
3405 WMI_PDEV_PARAM_LTR_RX_OVERRIDE,
3406 /* Tx activity timeout for LTR, in us */
3407 WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT,
3408 /* L1SS state machine enable */
3409 WMI_PDEV_PARAM_L1SS_ENABLE,
3410 /* Deep sleep state machine enable */
3411 WMI_PDEV_PARAM_DSLEEP_ENABLE,
3412 /* RX buffering flush enable */
3413 WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH,
3414 /* RX buffering matermark */
3415 WMI_PDEV_PARAM_PCIELP_TXBUF_WATERMARK,
3416 /* RX buffering timeout enable */
3417 WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN,
3418 /* RX buffering timeout value */
3419 WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE,
3420 /* pdev level stats update period in ms */
3421 WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD,
3422 /* vdev level stats update period in ms */
3423 WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD,
3424 /* peer level stats update period in ms */
3425 WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD,
3426 /* beacon filter status update period */
3427 WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD,
3428 /* QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
3429 WMI_PDEV_PARAM_PMF_QOS,
3430 /* Access category on which ARP frames are sent */
3431 WMI_PDEV_PARAM_ARP_AC_OVERRIDE,
3432 /* DCS configuration */
3434 /* Enable/Disable ANI on target */
3435 WMI_PDEV_PARAM_ANI_ENABLE,
3436 /* configure the ANI polling period */
3437 WMI_PDEV_PARAM_ANI_POLL_PERIOD,
3438 /* configure the ANI listening period */
3439 WMI_PDEV_PARAM_ANI_LISTEN_PERIOD,
3440 /* configure OFDM immunity level */
3441 WMI_PDEV_PARAM_ANI_OFDM_LEVEL,
3442 /* configure CCK immunity level */
3443 WMI_PDEV_PARAM_ANI_CCK_LEVEL,
3444 /* Enable/Disable CDD for 1x1 STAs in rate control module */
3445 WMI_PDEV_PARAM_DYNTXCHAIN,
3446 /* Enable/Disable proxy STA */
3447 WMI_PDEV_PARAM_PROXY_STA,
3448 /* Enable/Disable low power state when all VDEVs are inactive/idle. */
3449 WMI_PDEV_PARAM_IDLE_PS_CONFIG,
3450 /* Enable/Disable power gating sleep */
3451 WMI_PDEV_PARAM_POWER_GATING_SLEEP,
3454 enum wmi_10x_pdev_param {
3456 WMI_10X_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
3458 WMI_10X_PDEV_PARAM_RX_CHAIN_MASK,
3459 /* TX power limit for 2G Radio */
3460 WMI_10X_PDEV_PARAM_TXPOWER_LIMIT2G,
3461 /* TX power limit for 5G Radio */
3462 WMI_10X_PDEV_PARAM_TXPOWER_LIMIT5G,
3463 /* TX power scale */
3464 WMI_10X_PDEV_PARAM_TXPOWER_SCALE,
3465 /* Beacon generation mode . 0: host, 1: target */
3466 WMI_10X_PDEV_PARAM_BEACON_GEN_MODE,
3467 /* Beacon generation mode . 0: staggered 1: bursted */
3468 WMI_10X_PDEV_PARAM_BEACON_TX_MODE,
3470 * Resource manager off chan mode .
3471 * 0: turn off off chan mode. 1: turn on offchan mode
3473 WMI_10X_PDEV_PARAM_RESMGR_OFFCHAN_MODE,
3476 * 0: no protection 1:use CTS-to-self 2: use RTS/CTS
3478 WMI_10X_PDEV_PARAM_PROTECTION_MODE,
3479 /* Dynamic bandwidth 0: disable 1: enable */
3480 WMI_10X_PDEV_PARAM_DYNAMIC_BW,
3481 /* Non aggregrate/ 11g sw retry threshold.0-disable */
3482 WMI_10X_PDEV_PARAM_NON_AGG_SW_RETRY_TH,
3483 /* aggregrate sw retry threshold. 0-disable*/
3484 WMI_10X_PDEV_PARAM_AGG_SW_RETRY_TH,
3485 /* Station kickout threshold (non of consecutive failures).0-disable */
3486 WMI_10X_PDEV_PARAM_STA_KICKOUT_TH,
3487 /* Aggerate size scaling configuration per AC */
3488 WMI_10X_PDEV_PARAM_AC_AGGRSIZE_SCALING,
3490 WMI_10X_PDEV_PARAM_LTR_ENABLE,
3491 /* LTR latency for BE, in us */
3492 WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_BE,
3493 /* LTR latency for BK, in us */
3494 WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_BK,
3495 /* LTR latency for VI, in us */
3496 WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_VI,
3497 /* LTR latency for VO, in us */
3498 WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_VO,
3499 /* LTR AC latency timeout, in ms */
3500 WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT,
3501 /* LTR platform latency override, in us */
3502 WMI_10X_PDEV_PARAM_LTR_SLEEP_OVERRIDE,
3503 /* LTR-RX override, in us */
3504 WMI_10X_PDEV_PARAM_LTR_RX_OVERRIDE,
3505 /* Tx activity timeout for LTR, in us */
3506 WMI_10X_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT,
3507 /* L1SS state machine enable */
3508 WMI_10X_PDEV_PARAM_L1SS_ENABLE,
3509 /* Deep sleep state machine enable */
3510 WMI_10X_PDEV_PARAM_DSLEEP_ENABLE,
3511 /* pdev level stats update period in ms */
3512 WMI_10X_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD,
3513 /* vdev level stats update period in ms */
3514 WMI_10X_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD,
3515 /* peer level stats update period in ms */
3516 WMI_10X_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD,
3517 /* beacon filter status update period */
3518 WMI_10X_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD,
3519 /* QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
3520 WMI_10X_PDEV_PARAM_PMF_QOS,
3521 /* Access category on which ARP and DHCP frames are sent */
3522 WMI_10X_PDEV_PARAM_ARPDHCP_AC_OVERRIDE,
3523 /* DCS configuration */
3524 WMI_10X_PDEV_PARAM_DCS,
3525 /* Enable/Disable ANI on target */
3526 WMI_10X_PDEV_PARAM_ANI_ENABLE,
3527 /* configure the ANI polling period */
3528 WMI_10X_PDEV_PARAM_ANI_POLL_PERIOD,
3529 /* configure the ANI listening period */
3530 WMI_10X_PDEV_PARAM_ANI_LISTEN_PERIOD,
3531 /* configure OFDM immunity level */
3532 WMI_10X_PDEV_PARAM_ANI_OFDM_LEVEL,
3533 /* configure CCK immunity level */
3534 WMI_10X_PDEV_PARAM_ANI_CCK_LEVEL,
3535 /* Enable/Disable CDD for 1x1 STAs in rate control module */
3536 WMI_10X_PDEV_PARAM_DYNTXCHAIN,
3537 /* Enable/Disable Fast channel reset*/
3538 WMI_10X_PDEV_PARAM_FAST_CHANNEL_RESET,
3539 /* Set Bursting DUR */
3540 WMI_10X_PDEV_PARAM_BURST_DUR,
3541 /* Set Bursting Enable*/
3542 WMI_10X_PDEV_PARAM_BURST_ENABLE,
3544 /* following are available as of firmware 10.2 */
3545 WMI_10X_PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA,
3546 WMI_10X_PDEV_PARAM_IGMPMLD_OVERRIDE,
3547 WMI_10X_PDEV_PARAM_IGMPMLD_TID,
3548 WMI_10X_PDEV_PARAM_ANTENNA_GAIN,
3549 WMI_10X_PDEV_PARAM_RX_DECAP_MODE,
3550 WMI_10X_PDEV_PARAM_RX_FILTER,
3551 WMI_10X_PDEV_PARAM_SET_MCAST_TO_UCAST_TID,
3552 WMI_10X_PDEV_PARAM_PROXY_STA_MODE,
3553 WMI_10X_PDEV_PARAM_SET_MCAST2UCAST_MODE,
3554 WMI_10X_PDEV_PARAM_SET_MCAST2UCAST_BUFFER,
3555 WMI_10X_PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER,
3556 WMI_10X_PDEV_PARAM_PEER_STA_PS_STATECHG_ENABLE,
3557 WMI_10X_PDEV_PARAM_RTS_FIXED_RATE,
3558 WMI_10X_PDEV_PARAM_CAL_PERIOD
3561 enum wmi_10_4_pdev_param {
3562 WMI_10_4_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
3563 WMI_10_4_PDEV_PARAM_RX_CHAIN_MASK,
3564 WMI_10_4_PDEV_PARAM_TXPOWER_LIMIT2G,
3565 WMI_10_4_PDEV_PARAM_TXPOWER_LIMIT5G,
3566 WMI_10_4_PDEV_PARAM_TXPOWER_SCALE,
3567 WMI_10_4_PDEV_PARAM_BEACON_GEN_MODE,
3568 WMI_10_4_PDEV_PARAM_BEACON_TX_MODE,
3569 WMI_10_4_PDEV_PARAM_RESMGR_OFFCHAN_MODE,
3570 WMI_10_4_PDEV_PARAM_PROTECTION_MODE,
3571 WMI_10_4_PDEV_PARAM_DYNAMIC_BW,
3572 WMI_10_4_PDEV_PARAM_NON_AGG_SW_RETRY_TH,
3573 WMI_10_4_PDEV_PARAM_AGG_SW_RETRY_TH,
3574 WMI_10_4_PDEV_PARAM_STA_KICKOUT_TH,
3575 WMI_10_4_PDEV_PARAM_AC_AGGRSIZE_SCALING,
3576 WMI_10_4_PDEV_PARAM_LTR_ENABLE,
3577 WMI_10_4_PDEV_PARAM_LTR_AC_LATENCY_BE,
3578 WMI_10_4_PDEV_PARAM_LTR_AC_LATENCY_BK,
3579 WMI_10_4_PDEV_PARAM_LTR_AC_LATENCY_VI,
3580 WMI_10_4_PDEV_PARAM_LTR_AC_LATENCY_VO,
3581 WMI_10_4_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT,
3582 WMI_10_4_PDEV_PARAM_LTR_SLEEP_OVERRIDE,
3583 WMI_10_4_PDEV_PARAM_LTR_RX_OVERRIDE,
3584 WMI_10_4_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT,
3585 WMI_10_4_PDEV_PARAM_L1SS_ENABLE,
3586 WMI_10_4_PDEV_PARAM_DSLEEP_ENABLE,
3587 WMI_10_4_PDEV_PARAM_PCIELP_TXBUF_FLUSH,
3588 WMI_10_4_PDEV_PARAM_PCIELP_TXBUF_WATERMARK,
3589 WMI_10_4_PDEV_PARAM_PCIELP_TXBUF_TMO_EN,
3590 WMI_10_4_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE,
3591 WMI_10_4_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD,
3592 WMI_10_4_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD,
3593 WMI_10_4_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD,
3594 WMI_10_4_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD,
3595 WMI_10_4_PDEV_PARAM_PMF_QOS,
3596 WMI_10_4_PDEV_PARAM_ARP_AC_OVERRIDE,
3597 WMI_10_4_PDEV_PARAM_DCS,
3598 WMI_10_4_PDEV_PARAM_ANI_ENABLE,
3599 WMI_10_4_PDEV_PARAM_ANI_POLL_PERIOD,
3600 WMI_10_4_PDEV_PARAM_ANI_LISTEN_PERIOD,
3601 WMI_10_4_PDEV_PARAM_ANI_OFDM_LEVEL,
3602 WMI_10_4_PDEV_PARAM_ANI_CCK_LEVEL,
3603 WMI_10_4_PDEV_PARAM_DYNTXCHAIN,
3604 WMI_10_4_PDEV_PARAM_PROXY_STA,
3605 WMI_10_4_PDEV_PARAM_IDLE_PS_CONFIG,
3606 WMI_10_4_PDEV_PARAM_POWER_GATING_SLEEP,
3607 WMI_10_4_PDEV_PARAM_AGGR_BURST,
3608 WMI_10_4_PDEV_PARAM_RX_DECAP_MODE,
3609 WMI_10_4_PDEV_PARAM_FAST_CHANNEL_RESET,
3610 WMI_10_4_PDEV_PARAM_BURST_DUR,
3611 WMI_10_4_PDEV_PARAM_BURST_ENABLE,
3612 WMI_10_4_PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA,
3613 WMI_10_4_PDEV_PARAM_IGMPMLD_OVERRIDE,
3614 WMI_10_4_PDEV_PARAM_IGMPMLD_TID,
3615 WMI_10_4_PDEV_PARAM_ANTENNA_GAIN,
3616 WMI_10_4_PDEV_PARAM_RX_FILTER,
3617 WMI_10_4_PDEV_SET_MCAST_TO_UCAST_TID,
3618 WMI_10_4_PDEV_PARAM_PROXY_STA_MODE,
3619 WMI_10_4_PDEV_PARAM_SET_MCAST2UCAST_MODE,
3620 WMI_10_4_PDEV_PARAM_SET_MCAST2UCAST_BUFFER,
3621 WMI_10_4_PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER,
3622 WMI_10_4_PDEV_PEER_STA_PS_STATECHG_ENABLE,
3623 WMI_10_4_PDEV_PARAM_IGMPMLD_AC_OVERRIDE,
3624 WMI_10_4_PDEV_PARAM_BLOCK_INTERBSS,
3625 WMI_10_4_PDEV_PARAM_SET_DISABLE_RESET_CMDID,
3626 WMI_10_4_PDEV_PARAM_SET_MSDU_TTL_CMDID,
3627 WMI_10_4_PDEV_PARAM_SET_PPDU_DURATION_CMDID,
3628 WMI_10_4_PDEV_PARAM_TXBF_SOUND_PERIOD_CMDID,
3629 WMI_10_4_PDEV_PARAM_SET_PROMISC_MODE_CMDID,
3630 WMI_10_4_PDEV_PARAM_SET_BURST_MODE_CMDID,
3631 WMI_10_4_PDEV_PARAM_EN_STATS,
3632 WMI_10_4_PDEV_PARAM_MU_GROUP_POLICY,
3633 WMI_10_4_PDEV_PARAM_NOISE_DETECTION,
3634 WMI_10_4_PDEV_PARAM_NOISE_THRESHOLD,
3635 WMI_10_4_PDEV_PARAM_DPD_ENABLE,
3636 WMI_10_4_PDEV_PARAM_SET_MCAST_BCAST_ECHO,
3637 WMI_10_4_PDEV_PARAM_ATF_STRICT_SCH,
3638 WMI_10_4_PDEV_PARAM_ATF_SCHED_DURATION,
3639 WMI_10_4_PDEV_PARAM_ANT_PLZN,
3640 WMI_10_4_PDEV_PARAM_MGMT_RETRY_LIMIT,
3641 WMI_10_4_PDEV_PARAM_SENSITIVITY_LEVEL,
3642 WMI_10_4_PDEV_PARAM_SIGNED_TXPOWER_2G,
3643 WMI_10_4_PDEV_PARAM_SIGNED_TXPOWER_5G,
3644 WMI_10_4_PDEV_PARAM_ENABLE_PER_TID_AMSDU,
3645 WMI_10_4_PDEV_PARAM_ENABLE_PER_TID_AMPDU,
3646 WMI_10_4_PDEV_PARAM_CCA_THRESHOLD,
3647 WMI_10_4_PDEV_PARAM_RTS_FIXED_RATE,
3648 WMI_10_4_PDEV_PARAM_CAL_PERIOD,
3649 WMI_10_4_PDEV_PARAM_PDEV_RESET,
3650 WMI_10_4_PDEV_PARAM_WAPI_MBSSID_OFFSET,
3651 WMI_10_4_PDEV_PARAM_ARP_SRCADDR,
3652 WMI_10_4_PDEV_PARAM_ARP_DSTADDR,
3655 struct wmi_pdev_set_param_cmd {
3660 /* valid period is 1 ~ 60000ms, unit in millisecond */
3661 #define WMI_PDEV_PARAM_CAL_PERIOD_MAX 60000
3663 struct wmi_pdev_get_tpc_config_cmd {
3668 #define WMI_TPC_CONFIG_PARAM 1
3669 #define WMI_TPC_RATE_MAX 160
3670 #define WMI_TPC_TX_N_CHAIN 4
3671 #define WMI_TPC_PREAM_TABLE_MAX 10
3672 #define WMI_TPC_FLAG 3
3673 #define WMI_TPC_BUF_SIZE 10
3675 enum wmi_tpc_table_type {
3676 WMI_TPC_TABLE_TYPE_CDD = 0,
3677 WMI_TPC_TABLE_TYPE_STBC = 1,
3678 WMI_TPC_TABLE_TYPE_TXBF = 2,
3681 enum wmi_tpc_config_event_flag {
3682 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1,
3683 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
3684 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
3687 struct wmi_pdev_tpc_config_event {
3691 __le32 twice_antenna_reduction;
3692 __le32 twice_max_rd_power;
3693 a_sle32 twice_antenna_gain;
3696 __le32 num_tx_chain;
3699 s8 max_reg_allow_pow[WMI_TPC_TX_N_CHAIN];
3700 s8 max_reg_allow_pow_agcdd[WMI_TPC_TX_N_CHAIN][WMI_TPC_TX_N_CHAIN];
3701 s8 max_reg_allow_pow_agstbc[WMI_TPC_TX_N_CHAIN][WMI_TPC_TX_N_CHAIN];
3702 s8 max_reg_allow_pow_agtxbf[WMI_TPC_TX_N_CHAIN][WMI_TPC_TX_N_CHAIN];
3703 u8 rates_array[WMI_TPC_RATE_MAX];
3706 /* Transmit power scale factor. */
3708 WMI_TP_SCALE_MAX = 0, /* no scaling (default) */
3709 WMI_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
3710 WMI_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
3711 WMI_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
3712 WMI_TP_SCALE_MIN = 4, /* min, but still on */
3713 WMI_TP_SCALE_SIZE = 5, /* max num of enum */
3716 struct wmi_pdev_chanlist_update_event {
3717 /* number of channels */
3719 /* array of channels */
3720 struct wmi_channel channel_list[1];
3723 #define WMI_MAX_DEBUG_MESG (sizeof(u32) * 32)
3725 struct wmi_debug_mesg_event {
3726 /* message buffer, NULL terminated */
3727 char bufp[WMI_MAX_DEBUG_MESG];
3732 VDEV_SUBTYPE_P2PDEV = 0,
3734 VDEV_SUBTYPE_P2PCLI,
3741 struct wmi_pdev_set_channel_cmd {
3742 /* idnore power , only use flags , mode and freq */
3743 struct wmi_channel chan;
3746 struct wmi_pdev_pktlog_enable_cmd {
3750 /* Customize the DSCP (bit) to TID (0-7) mapping for QOS */
3751 #define WMI_DSCP_MAP_MAX (64)
3752 struct wmi_pdev_set_dscp_tid_map_cmd {
3753 /* map indicating DSCP to TID conversion */
3754 __le32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
3757 enum mcast_bcast_rate_id {
3762 struct mcast_bcast_rate {
3763 enum mcast_bcast_rate_id rate_id;
3767 struct wmi_wmm_params {
3776 struct wmi_pdev_set_wmm_params {
3777 struct wmi_wmm_params ac_be;
3778 struct wmi_wmm_params ac_bk;
3779 struct wmi_wmm_params ac_vi;
3780 struct wmi_wmm_params ac_vo;
3783 struct wmi_wmm_params_arg {
3792 struct wmi_wmm_params_all_arg {
3793 struct wmi_wmm_params_arg ac_be;
3794 struct wmi_wmm_params_arg ac_bk;
3795 struct wmi_wmm_params_arg ac_vi;
3796 struct wmi_wmm_params_arg ac_vo;
3799 struct wmi_pdev_stats_tx {
3800 /* Num HTT cookies queued to dispatch list */
3803 /* Num HTT cookies dispatched */
3804 __le32 comp_delivered;
3806 /* Num MSDU queued to WAL */
3809 /* Num MPDU queue to WAL */
3812 /* Num MSDUs dropped by WMM limit */
3815 /* Num Local frames queued */
3816 __le32 local_enqued;
3818 /* Num Local frames done */
3821 /* Num queued to HW */
3824 /* Num PPDU reaped from HW */
3830 /* Num PPDUs cleaned up in TX abort */
3833 /* Num MPDUs requed by SW */
3834 __le32 mpdus_requed;
3836 /* excessive retries */
3839 /* data hw rate code */
3842 /* Scheduler self triggers */
3843 __le32 self_triggers;
3845 /* frames dropped due to excessive sw retries */
3846 __le32 sw_retry_failure;
3848 /* illegal rate phy errors */
3849 __le32 illgl_rate_phy_err;
3851 /* wal pdev continous xretry */
3852 __le32 pdev_cont_xretry;
3854 /* wal pdev continous xretry */
3855 __le32 pdev_tx_timeout;
3857 /* wal pdev resets */
3860 /* frames dropped due to non-availability of stateless TIDs */
3861 __le32 stateless_tid_alloc_failure;
3863 __le32 phy_underrun;
3865 /* MPDU is more than txop limit */
3869 struct wmi_10_4_pdev_stats_tx {
3870 /* Num HTT cookies queued to dispatch list */
3873 /* Num HTT cookies dispatched */
3874 __le32 comp_delivered;
3876 /* Num MSDU queued to WAL */
3879 /* Num MPDU queue to WAL */
3882 /* Num MSDUs dropped by WMM limit */
3885 /* Num Local frames queued */
3886 __le32 local_enqued;
3888 /* Num Local frames done */
3891 /* Num queued to HW */
3894 /* Num PPDU reaped from HW */
3903 /* Num PPDUs cleaned up in TX abort */
3906 /* Num MPDUs requed by SW */
3907 __le32 mpdus_requed;
3909 /* excessive retries */
3912 /* data hw rate code */
3915 /* Scheduler self triggers */
3916 __le32 self_triggers;
3918 /* frames dropped due to excessive sw retries */
3919 __le32 sw_retry_failure;
3921 /* illegal rate phy errors */
3922 __le32 illgl_rate_phy_err;
3924 /* wal pdev continuous xretry */
3925 __le32 pdev_cont_xretry;
3927 /* wal pdev tx timeouts */
3928 __le32 pdev_tx_timeout;
3930 /* wal pdev resets */
3933 /* frames dropped due to non-availability of stateless TIDs */
3934 __le32 stateless_tid_alloc_failure;
3936 __le32 phy_underrun;
3938 /* MPDU is more than txop limit */
3941 /* Number of Sequences posted */
3944 /* Number of Sequences failed queueing */
3945 __le32 seq_failed_queueing;
3947 /* Number of Sequences completed */
3948 __le32 seq_completed;
3950 /* Number of Sequences restarted */
3951 __le32 seq_restarted;
3953 /* Number of MU Sequences posted */
3954 __le32 mu_seq_posted;
3956 /* Num MPDUs flushed by SW, HWPAUSED,SW TXABORT(Reset,channel change) */
3957 __le32 mpdus_sw_flush;
3959 /* Num MPDUs filtered by HW, all filter condition (TTL expired) */
3960 __le32 mpdus_hw_filter;
3962 /* Num MPDUs truncated by PDG
3963 * (TXOP, TBTT, PPDU_duration based on rate, dyn_bw)
3965 __le32 mpdus_truncated;
3967 /* Num MPDUs that was tried but didn't receive ACK or BA */
3968 __le32 mpdus_ack_failed;
3970 /* Num MPDUs that was dropped due to expiry. */
3971 __le32 mpdus_expired;
3974 struct wmi_pdev_stats_rx {
3975 /* Cnts any change in ring routing mid-ppdu */
3976 __le32 mid_ppdu_route_change;
3978 /* Total number of statuses processed */
3981 /* Extra frags on rings 0-3 */
3987 /* MSDUs / MPDUs delivered to HTT */
3991 /* MSDUs / MPDUs delivered to local stack */
3995 /* AMSDUs that have more MSDUs than the status ring size */
3996 __le32 oversize_amsdu;
3998 /* Number of PHY errors */
4001 /* Number of PHY errors drops */
4002 __le32 phy_err_drop;
4004 /* Number of mpdu errors - FCS, MIC, ENC etc. */
4008 struct wmi_pdev_stats_peer {
4009 /* REMOVE THIS ONCE REAL PEER STAT COUNTERS ARE ADDED */
4014 WMI_STAT_PEER = BIT(0),
4015 WMI_STAT_AP = BIT(1),
4016 WMI_STAT_PDEV = BIT(2),
4017 WMI_STAT_VDEV = BIT(3),
4018 WMI_STAT_BCNFLT = BIT(4),
4019 WMI_STAT_VDEV_RATE = BIT(5),
4022 struct wlan_inst_rssi_args {
4023 __le16 cfg_retry_count;
4027 struct wmi_request_stats_cmd {
4032 /* peer MAC address */
4033 struct wmi_mac_addr peer_macaddr;
4035 /* Instantaneous RSSI arguments */
4036 struct wlan_inst_rssi_args inst_rssi_args;
4039 /* Suspend option */
4044 /* suspend and disable all interrupts */
4045 WMI_PDEV_SUSPEND_AND_DISABLE_INTR,
4048 struct wmi_pdev_suspend_cmd {
4049 /* suspend option sent to target */
4053 struct wmi_stats_event {
4054 __le32 stats_id; /* WMI_STAT_ */
4056 * number of pdev stats event structures
4057 * (wmi_pdev_stats) 0 or 1
4059 __le32 num_pdev_stats;
4061 * number of vdev stats event structures
4062 * (wmi_vdev_stats) 0 or max vdevs
4064 __le32 num_vdev_stats;
4066 * number of peer stats event structures
4067 * (wmi_peer_stats) 0 or max peers
4069 __le32 num_peer_stats;
4070 __le32 num_bcnflt_stats;
4073 * num_pdev_stats * size of(struct wmi_pdev_stats)
4074 * num_vdev_stats * size of(struct wmi_vdev_stats)
4075 * num_peer_stats * size of(struct wmi_peer_stats)
4077 * By having a zero sized array, the pointer to data area
4078 * becomes available without increasing the struct size
4083 struct wmi_10_2_stats_event {
4084 __le32 stats_id; /* %WMI_REQUEST_ */
4085 __le32 num_pdev_stats;
4086 __le32 num_pdev_ext_stats;
4087 __le32 num_vdev_stats;
4088 __le32 num_peer_stats;
4089 __le32 num_bcnflt_stats;
4095 * TODO: add all PDEV stats here
4097 struct wmi_pdev_stats_base {
4099 __le32 tx_frame_count;
4100 __le32 rx_frame_count;
4101 __le32 rx_clear_count;
4103 __le32 phy_err_count;
4107 struct wmi_pdev_stats {
4108 struct wmi_pdev_stats_base base;
4109 struct wmi_pdev_stats_tx tx;
4110 struct wmi_pdev_stats_rx rx;
4111 struct wmi_pdev_stats_peer peer;
4114 struct wmi_pdev_stats_extra {
4120 __le32 mib_int_count;
4123 struct wmi_10x_pdev_stats {
4124 struct wmi_pdev_stats_base base;
4125 struct wmi_pdev_stats_tx tx;
4126 struct wmi_pdev_stats_rx rx;
4127 struct wmi_pdev_stats_peer peer;
4128 struct wmi_pdev_stats_extra extra;
4131 struct wmi_pdev_stats_mem {
4136 struct wmi_10_2_pdev_stats {
4137 struct wmi_pdev_stats_base base;
4138 struct wmi_pdev_stats_tx tx;
4140 struct wmi_pdev_stats_rx rx;
4141 __le32 pdev_rx_timeout;
4142 struct wmi_pdev_stats_mem mem;
4143 struct wmi_pdev_stats_peer peer;
4144 struct wmi_pdev_stats_extra extra;
4147 struct wmi_10_4_pdev_stats {
4148 struct wmi_pdev_stats_base base;
4149 struct wmi_10_4_pdev_stats_tx tx;
4150 struct wmi_pdev_stats_rx rx;
4151 __le32 rx_ovfl_errs;
4152 struct wmi_pdev_stats_mem mem;
4153 __le32 sram_free_size;
4154 struct wmi_pdev_stats_extra extra;
4159 * TODO: add all VDEV stats here
4161 struct wmi_vdev_stats {
4167 * TODO: add more stats
4169 struct wmi_peer_stats {
4170 struct wmi_mac_addr peer_macaddr;
4172 __le32 peer_tx_rate;
4175 struct wmi_10x_peer_stats {
4176 struct wmi_peer_stats old;
4177 __le32 peer_rx_rate;
4180 struct wmi_10_2_peer_stats {
4181 struct wmi_peer_stats old;
4182 __le32 peer_rx_rate;
4185 __le32 tx_rate_count;
4186 __le32 max_4ms_frame_len;
4187 __le32 total_sub_frames;
4189 __le32 num_pkt_loss_overflow[4];
4190 __le32 num_pkt_loss_excess_retry[4];
4193 struct wmi_10_2_4_peer_stats {
4194 struct wmi_10_2_peer_stats common;
4195 __le32 unknown_value; /* FIXME: what is this word? */
4198 struct wmi_10_4_peer_stats {
4199 struct wmi_mac_addr peer_macaddr;
4201 __le32 peer_rssi_seq_num;
4202 __le32 peer_tx_rate;
4203 __le32 peer_rx_rate;
4206 __le32 tx_rate_count;
4207 __le32 max_4ms_frame_len;
4208 __le32 total_sub_frames;
4210 __le32 num_pkt_loss_overflow[4];
4211 __le32 num_pkt_loss_excess_retry[4];
4212 __le32 peer_rssi_changed;
4215 struct wmi_10_2_pdev_ext_stats {
4216 __le32 rx_rssi_comb;
4223 struct wmi_vdev_create_cmd {
4226 __le32 vdev_subtype;
4227 struct wmi_mac_addr vdev_macaddr;
4230 enum wmi_vdev_type {
4231 WMI_VDEV_TYPE_AP = 1,
4232 WMI_VDEV_TYPE_STA = 2,
4233 WMI_VDEV_TYPE_IBSS = 3,
4234 WMI_VDEV_TYPE_MONITOR = 4,
4237 enum wmi_vdev_subtype {
4238 WMI_VDEV_SUBTYPE_NONE = 0,
4239 WMI_VDEV_SUBTYPE_P2P_DEVICE = 1,
4240 WMI_VDEV_SUBTYPE_P2P_CLIENT = 2,
4241 WMI_VDEV_SUBTYPE_P2P_GO = 3,
4244 /* values for vdev_subtype */
4246 /* values for vdev_start_request flags */
4248 * Indicates that AP VDEV uses hidden ssid. only valid for
4250 #define WMI_VDEV_START_HIDDEN_SSID (1<<0)
4252 * Indicates if robust management frame/management frame
4253 * protection is enabled. For GO/AP vdevs, it indicates that
4254 * it may support station/client associations with RMF enabled.
4255 * For STA/client vdevs, it indicates that sta will
4256 * associate with AP with RMF enabled. */
4257 #define WMI_VDEV_START_PMF_ENABLED (1<<1)
4259 struct wmi_p2p_noa_descriptor {
4260 __le32 type_count; /* 255: continuous schedule, 0: reserved */
4261 __le32 duration; /* Absent period duration in micro seconds */
4262 __le32 interval; /* Absent period interval in micro seconds */
4263 __le32 start_time; /* 32 bit tsf time when in starts */
4266 struct wmi_vdev_start_request_cmd {
4268 struct wmi_channel chan;
4269 /* unique id identifying the VDEV, generated by the caller */
4271 /* requestor id identifying the caller module */
4272 __le32 requestor_id;
4273 /* beacon interval from received beacon */
4274 __le32 beacon_interval;
4275 /* DTIM Period from the received beacon */
4279 /* ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */
4280 struct wmi_ssid ssid;
4281 /* beacon/probe reponse xmit rate. Applicable for SoftAP. */
4283 /* beacon/probe reponse xmit power. Applicable for SoftAP. */
4284 __le32 bcn_tx_power;
4285 /* number of p2p NOA descriptor(s) from scan entry */
4286 __le32 num_noa_descriptors;
4288 * Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID.
4289 * During CAC, Our HW shouldn't ack ditected frames
4291 __le32 disable_hw_ack;
4292 /* actual p2p NOA descriptor from scan entry */
4293 struct wmi_p2p_noa_descriptor noa_descriptors[2];
4296 struct wmi_vdev_restart_request_cmd {
4297 struct wmi_vdev_start_request_cmd vdev_start_request_cmd;
4300 struct wmi_vdev_start_request_arg {
4302 struct wmi_channel_arg channel;
4309 bool disable_hw_ack;
4314 struct wmi_vdev_delete_cmd {
4315 /* unique id identifying the VDEV, generated by the caller */
4319 struct wmi_vdev_up_cmd {
4321 __le32 vdev_assoc_id;
4322 struct wmi_mac_addr vdev_bssid;
4325 struct wmi_vdev_stop_cmd {
4329 struct wmi_vdev_down_cmd {
4333 struct wmi_vdev_standby_response_cmd {
4334 /* unique id identifying the VDEV, generated by the caller */
4338 struct wmi_vdev_resume_response_cmd {
4339 /* unique id identifying the VDEV, generated by the caller */
4343 struct wmi_vdev_set_param_cmd {
4349 #define WMI_MAX_KEY_INDEX 3
4350 #define WMI_MAX_KEY_LEN 32
4352 #define WMI_KEY_PAIRWISE 0x00
4353 #define WMI_KEY_GROUP 0x01
4354 #define WMI_KEY_TX_USAGE 0x02 /* default tx key - static wep */
4356 struct wmi_key_seq_counter {
4357 __le32 key_seq_counter_l;
4358 __le32 key_seq_counter_h;
4361 #define WMI_CIPHER_NONE 0x0 /* clear key */
4362 #define WMI_CIPHER_WEP 0x1
4363 #define WMI_CIPHER_TKIP 0x2
4364 #define WMI_CIPHER_AES_OCB 0x3
4365 #define WMI_CIPHER_AES_CCM 0x4
4366 #define WMI_CIPHER_WAPI 0x5
4367 #define WMI_CIPHER_CKIP 0x6
4368 #define WMI_CIPHER_AES_CMAC 0x7
4370 struct wmi_vdev_install_key_cmd {
4372 struct wmi_mac_addr peer_macaddr;
4375 __le32 key_cipher; /* %WMI_CIPHER_ */
4376 struct wmi_key_seq_counter key_rsc_counter;
4377 struct wmi_key_seq_counter key_global_rsc_counter;
4378 struct wmi_key_seq_counter key_tsc_counter;
4379 u8 wpi_key_rsc_counter[16];
4380 u8 wpi_key_tsc_counter[16];
4382 __le32 key_txmic_len;
4383 __le32 key_rxmic_len;
4385 /* contains key followed by tx mic followed by rx mic */
4389 struct wmi_vdev_install_key_arg {
4398 const void *key_data;
4402 * vdev fixed rate format:
4403 * - preamble - b7:b6 - see WMI_RATE_PREMABLE_
4404 * - nss - b5:b4 - ss number (0 mean 1ss)
4405 * - rate_mcs - b3:b0 - as below
4406 * CCK: 0 - 11Mbps, 1 - 5,5Mbps, 2 - 2Mbps, 3 - 1Mbps,
4407 * 4 - 11Mbps (s), 5 - 5,5Mbps (s), 6 - 2Mbps (s)
4408 * OFDM: 0 - 48Mbps, 1 - 24Mbps, 2 - 12Mbps, 3 - 6Mbps,
4409 * 4 - 54Mbps, 5 - 36Mbps, 6 - 18Mbps, 7 - 9Mbps
4413 /* Preamble types to be used with VDEV fixed rate configuration */
4414 enum wmi_rate_preamble {
4415 WMI_RATE_PREAMBLE_OFDM,
4416 WMI_RATE_PREAMBLE_CCK,
4417 WMI_RATE_PREAMBLE_HT,
4418 WMI_RATE_PREAMBLE_VHT,
4421 #define ATH10K_HW_NSS(rate) (1 + (((rate) >> 4) & 0x3))
4422 #define ATH10K_HW_PREAMBLE(rate) (((rate) >> 6) & 0x3)
4423 #define ATH10K_HW_RATECODE(rate, nss, preamble) \
4424 (((preamble) << 6) | ((nss) << 4) | (rate))
4426 /* Value to disable fixed rate setting */
4427 #define WMI_FIXED_RATE_NONE (0xff)
4429 struct wmi_vdev_param_map {
4431 u32 fragmentation_threshold;
4432 u32 beacon_interval;
4433 u32 listen_interval;
4439 u32 wmi_vdev_stats_update_period;
4440 u32 wmi_vdev_pwrsave_ageout_time;
4441 u32 wmi_vdev_host_swba_interval;
4443 u32 wmi_vdev_oc_scheduler_air_time_limit;
4446 u32 bmiss_count_max;
4447 u32 bmiss_first_bcnt;
4448 u32 bmiss_final_bcnt;
4452 u32 disable_htprotection;
4453 u32 sta_quickkickout;
4455 u32 protection_mode;
4464 u32 bcast_data_rate;
4465 u32 mcast_data_rate;
4468 u32 unknown_dest_indicate;
4469 u32 ap_keepalive_min_idle_inactive_time_secs;
4470 u32 ap_keepalive_max_idle_inactive_time_secs;
4471 u32 ap_keepalive_max_unresponsive_time_secs;
4472 u32 ap_enable_nawds;
4473 u32 mcast2ucast_set;
4476 u32 packet_powersave;
4479 u32 ap_detect_out_of_sync_sleeping_sta_time_secs;
4486 u32 early_rx_adjust_enable;
4487 u32 early_rx_tgt_bmiss_num;
4488 u32 early_rx_bmiss_sample_cycle;
4489 u32 early_rx_slop_step;
4490 u32 early_rx_init_slop;
4491 u32 early_rx_adjust_pause;
4495 u32 bw_nss_ratemask;
4498 #define WMI_VDEV_PARAM_UNSUPPORTED 0
4500 /* the definition of different VDEV parameters */
4501 enum wmi_vdev_param {
4503 WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1,
4504 /* Fragmentation threshold */
4505 WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
4506 /* beacon interval in TUs */
4507 WMI_VDEV_PARAM_BEACON_INTERVAL,
4508 /* Listen interval in TUs */
4509 WMI_VDEV_PARAM_LISTEN_INTERVAL,
4510 /* muticast rate in Mbps */
4511 WMI_VDEV_PARAM_MULTICAST_RATE,
4512 /* management frame rate in Mbps */
4513 WMI_VDEV_PARAM_MGMT_TX_RATE,
4514 /* slot time (long vs short) */
4515 WMI_VDEV_PARAM_SLOT_TIME,
4516 /* preamble (long vs short) */
4517 WMI_VDEV_PARAM_PREAMBLE,
4518 /* SWBA time (time before tbtt in msec) */
4519 WMI_VDEV_PARAM_SWBA_TIME,
4520 /* time period for updating VDEV stats */
4521 WMI_VDEV_STATS_UPDATE_PERIOD,
4522 /* age out time in msec for frames queued for station in power save */
4523 WMI_VDEV_PWRSAVE_AGEOUT_TIME,
4525 * Host SWBA interval (time in msec before tbtt for SWBA event
4528 WMI_VDEV_HOST_SWBA_INTERVAL,
4529 /* DTIM period (specified in units of num beacon intervals) */
4530 WMI_VDEV_PARAM_DTIM_PERIOD,
4532 * scheduler air time limit for this VDEV. used by off chan
4535 WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT,
4536 /* enable/dsiable WDS for this VDEV */
4539 WMI_VDEV_PARAM_ATIM_WINDOW,
4541 WMI_VDEV_PARAM_BMISS_COUNT_MAX,
4542 /* BMISS first time */
4543 WMI_VDEV_PARAM_BMISS_FIRST_BCNT,
4544 /* BMISS final time */
4545 WMI_VDEV_PARAM_BMISS_FINAL_BCNT,
4546 /* WMM enables/disabled */
4547 WMI_VDEV_PARAM_FEATURE_WMM,
4549 WMI_VDEV_PARAM_CHWIDTH,
4550 /* Channel Offset */
4551 WMI_VDEV_PARAM_CHEXTOFFSET,
4552 /* Disable HT Protection */
4553 WMI_VDEV_PARAM_DISABLE_HTPROTECTION,
4554 /* Quick STA Kickout */
4555 WMI_VDEV_PARAM_STA_QUICKKICKOUT,
4556 /* Rate to be used with Management frames */
4557 WMI_VDEV_PARAM_MGMT_RATE,
4558 /* Protection Mode */
4559 WMI_VDEV_PARAM_PROTECTION_MODE,
4560 /* Fixed rate setting */
4561 WMI_VDEV_PARAM_FIXED_RATE,
4562 /* Short GI Enable/Disable */
4565 WMI_VDEV_PARAM_LDPC,
4566 /* Enable Tx STBC */
4567 WMI_VDEV_PARAM_TX_STBC,
4568 /* Enable Rx STBC */
4569 WMI_VDEV_PARAM_RX_STBC,
4570 /* Intra BSS forwarding */
4571 WMI_VDEV_PARAM_INTRA_BSS_FWD,
4572 /* Setting Default xmit key for Vdev */
4573 WMI_VDEV_PARAM_DEF_KEYID,
4576 /* Set the custom rate for the broadcast data frames */
4577 WMI_VDEV_PARAM_BCAST_DATA_RATE,
4578 /* Set the custom rate (rate-code) for multicast data frames */
4579 WMI_VDEV_PARAM_MCAST_DATA_RATE,
4580 /* Tx multicast packet indicate Enable/Disable */
4581 WMI_VDEV_PARAM_MCAST_INDICATE,
4582 /* Tx DHCP packet indicate Enable/Disable */
4583 WMI_VDEV_PARAM_DHCP_INDICATE,
4584 /* Enable host inspection of Tx unicast packet to unknown destination */
4585 WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE,
4587 /* The minimum amount of time AP begins to consider STA inactive */
4588 WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,
4591 * An associated STA is considered inactive when there is no recent
4592 * TX/RX activity and no downlink frames are buffered for it. Once a
4593 * STA exceeds the maximum idle inactive time, the AP will send an
4594 * 802.11 data-null as a keep alive to verify the STA is still
4595 * associated. If the STA does ACK the data-null, or if the data-null
4596 * is buffered and the STA does not retrieve it, the STA will be
4597 * considered unresponsive
4598 * (see WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS).
4600 WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,
4603 * An associated STA is considered unresponsive if there is no recent
4604 * TX/RX activity and downlink frames are buffered for it. Once a STA
4605 * exceeds the maximum unresponsive time, the AP will send a
4606 * WMI_STA_KICKOUT event to the host so the STA can be deleted. */
4607 WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,
4609 /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
4610 WMI_VDEV_PARAM_AP_ENABLE_NAWDS,
4611 /* Enable/Disable RTS-CTS */
4612 WMI_VDEV_PARAM_ENABLE_RTSCTS,
4613 /* Enable TXBFee/er */
4614 WMI_VDEV_PARAM_TXBF,
4616 /* Set packet power save */
4617 WMI_VDEV_PARAM_PACKET_POWERSAVE,
4620 * Drops un-encrypted packets if eceived in an encrypted connection
4621 * otherwise forwards to host.
4623 WMI_VDEV_PARAM_DROP_UNENCRY,
4626 * Set the encapsulation type for frames.
4628 WMI_VDEV_PARAM_TX_ENCAP_TYPE,
4631 /* the definition of different VDEV parameters */
4632 enum wmi_10x_vdev_param {
4634 WMI_10X_VDEV_PARAM_RTS_THRESHOLD = 0x1,
4635 /* Fragmentation threshold */
4636 WMI_10X_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
4637 /* beacon interval in TUs */
4638 WMI_10X_VDEV_PARAM_BEACON_INTERVAL,
4639 /* Listen interval in TUs */
4640 WMI_10X_VDEV_PARAM_LISTEN_INTERVAL,
4641 /* muticast rate in Mbps */
4642 WMI_10X_VDEV_PARAM_MULTICAST_RATE,
4643 /* management frame rate in Mbps */
4644 WMI_10X_VDEV_PARAM_MGMT_TX_RATE,
4645 /* slot time (long vs short) */
4646 WMI_10X_VDEV_PARAM_SLOT_TIME,
4647 /* preamble (long vs short) */
4648 WMI_10X_VDEV_PARAM_PREAMBLE,
4649 /* SWBA time (time before tbtt in msec) */
4650 WMI_10X_VDEV_PARAM_SWBA_TIME,
4651 /* time period for updating VDEV stats */
4652 WMI_10X_VDEV_STATS_UPDATE_PERIOD,
4653 /* age out time in msec for frames queued for station in power save */
4654 WMI_10X_VDEV_PWRSAVE_AGEOUT_TIME,
4656 * Host SWBA interval (time in msec before tbtt for SWBA event
4659 WMI_10X_VDEV_HOST_SWBA_INTERVAL,
4660 /* DTIM period (specified in units of num beacon intervals) */
4661 WMI_10X_VDEV_PARAM_DTIM_PERIOD,
4663 * scheduler air time limit for this VDEV. used by off chan
4666 WMI_10X_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT,
4667 /* enable/dsiable WDS for this VDEV */
4668 WMI_10X_VDEV_PARAM_WDS,
4670 WMI_10X_VDEV_PARAM_ATIM_WINDOW,
4672 WMI_10X_VDEV_PARAM_BMISS_COUNT_MAX,
4673 /* WMM enables/disabled */
4674 WMI_10X_VDEV_PARAM_FEATURE_WMM,
4676 WMI_10X_VDEV_PARAM_CHWIDTH,
4677 /* Channel Offset */
4678 WMI_10X_VDEV_PARAM_CHEXTOFFSET,
4679 /* Disable HT Protection */
4680 WMI_10X_VDEV_PARAM_DISABLE_HTPROTECTION,
4681 /* Quick STA Kickout */
4682 WMI_10X_VDEV_PARAM_STA_QUICKKICKOUT,
4683 /* Rate to be used with Management frames */
4684 WMI_10X_VDEV_PARAM_MGMT_RATE,
4685 /* Protection Mode */
4686 WMI_10X_VDEV_PARAM_PROTECTION_MODE,
4687 /* Fixed rate setting */
4688 WMI_10X_VDEV_PARAM_FIXED_RATE,
4689 /* Short GI Enable/Disable */
4690 WMI_10X_VDEV_PARAM_SGI,
4692 WMI_10X_VDEV_PARAM_LDPC,
4693 /* Enable Tx STBC */
4694 WMI_10X_VDEV_PARAM_TX_STBC,
4695 /* Enable Rx STBC */
4696 WMI_10X_VDEV_PARAM_RX_STBC,
4697 /* Intra BSS forwarding */
4698 WMI_10X_VDEV_PARAM_INTRA_BSS_FWD,
4699 /* Setting Default xmit key for Vdev */
4700 WMI_10X_VDEV_PARAM_DEF_KEYID,
4702 WMI_10X_VDEV_PARAM_NSS,
4703 /* Set the custom rate for the broadcast data frames */
4704 WMI_10X_VDEV_PARAM_BCAST_DATA_RATE,
4705 /* Set the custom rate (rate-code) for multicast data frames */
4706 WMI_10X_VDEV_PARAM_MCAST_DATA_RATE,
4707 /* Tx multicast packet indicate Enable/Disable */
4708 WMI_10X_VDEV_PARAM_MCAST_INDICATE,
4709 /* Tx DHCP packet indicate Enable/Disable */
4710 WMI_10X_VDEV_PARAM_DHCP_INDICATE,
4711 /* Enable host inspection of Tx unicast packet to unknown destination */
4712 WMI_10X_VDEV_PARAM_UNKNOWN_DEST_INDICATE,
4714 /* The minimum amount of time AP begins to consider STA inactive */
4715 WMI_10X_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,
4718 * An associated STA is considered inactive when there is no recent
4719 * TX/RX activity and no downlink frames are buffered for it. Once a
4720 * STA exceeds the maximum idle inactive time, the AP will send an
4721 * 802.11 data-null as a keep alive to verify the STA is still
4722 * associated. If the STA does ACK the data-null, or if the data-null
4723 * is buffered and the STA does not retrieve it, the STA will be
4724 * considered unresponsive
4725 * (see WMI_10X_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS).
4727 WMI_10X_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,
4730 * An associated STA is considered unresponsive if there is no recent
4731 * TX/RX activity and downlink frames are buffered for it. Once a STA
4732 * exceeds the maximum unresponsive time, the AP will send a
4733 * WMI_10X_STA_KICKOUT event to the host so the STA can be deleted. */
4734 WMI_10X_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,
4736 /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
4737 WMI_10X_VDEV_PARAM_AP_ENABLE_NAWDS,
4739 WMI_10X_VDEV_PARAM_MCAST2UCAST_SET,
4740 /* Enable/Disable RTS-CTS */
4741 WMI_10X_VDEV_PARAM_ENABLE_RTSCTS,
4743 WMI_10X_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS,
4745 /* following are available as of firmware 10.2 */
4746 WMI_10X_VDEV_PARAM_TX_ENCAP_TYPE,
4747 WMI_10X_VDEV_PARAM_CABQ_MAXDUR,
4748 WMI_10X_VDEV_PARAM_MFPTEST_SET,
4749 WMI_10X_VDEV_PARAM_RTS_FIXED_RATE,
4750 WMI_10X_VDEV_PARAM_VHT_SGIMASK,
4751 WMI_10X_VDEV_PARAM_VHT80_RATEMASK,
4754 enum wmi_10_4_vdev_param {
4755 WMI_10_4_VDEV_PARAM_RTS_THRESHOLD = 0x1,
4756 WMI_10_4_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
4757 WMI_10_4_VDEV_PARAM_BEACON_INTERVAL,
4758 WMI_10_4_VDEV_PARAM_LISTEN_INTERVAL,
4759 WMI_10_4_VDEV_PARAM_MULTICAST_RATE,
4760 WMI_10_4_VDEV_PARAM_MGMT_TX_RATE,
4761 WMI_10_4_VDEV_PARAM_SLOT_TIME,
4762 WMI_10_4_VDEV_PARAM_PREAMBLE,
4763 WMI_10_4_VDEV_PARAM_SWBA_TIME,
4764 WMI_10_4_VDEV_STATS_UPDATE_PERIOD,
4765 WMI_10_4_VDEV_PWRSAVE_AGEOUT_TIME,
4766 WMI_10_4_VDEV_HOST_SWBA_INTERVAL,
4767 WMI_10_4_VDEV_PARAM_DTIM_PERIOD,
4768 WMI_10_4_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT,
4769 WMI_10_4_VDEV_PARAM_WDS,
4770 WMI_10_4_VDEV_PARAM_ATIM_WINDOW,
4771 WMI_10_4_VDEV_PARAM_BMISS_COUNT_MAX,
4772 WMI_10_4_VDEV_PARAM_BMISS_FIRST_BCNT,
4773 WMI_10_4_VDEV_PARAM_BMISS_FINAL_BCNT,
4774 WMI_10_4_VDEV_PARAM_FEATURE_WMM,
4775 WMI_10_4_VDEV_PARAM_CHWIDTH,
4776 WMI_10_4_VDEV_PARAM_CHEXTOFFSET,
4777 WMI_10_4_VDEV_PARAM_DISABLE_HTPROTECTION,
4778 WMI_10_4_VDEV_PARAM_STA_QUICKKICKOUT,
4779 WMI_10_4_VDEV_PARAM_MGMT_RATE,
4780 WMI_10_4_VDEV_PARAM_PROTECTION_MODE,
4781 WMI_10_4_VDEV_PARAM_FIXED_RATE,
4782 WMI_10_4_VDEV_PARAM_SGI,
4783 WMI_10_4_VDEV_PARAM_LDPC,
4784 WMI_10_4_VDEV_PARAM_TX_STBC,
4785 WMI_10_4_VDEV_PARAM_RX_STBC,
4786 WMI_10_4_VDEV_PARAM_INTRA_BSS_FWD,
4787 WMI_10_4_VDEV_PARAM_DEF_KEYID,
4788 WMI_10_4_VDEV_PARAM_NSS,
4789 WMI_10_4_VDEV_PARAM_BCAST_DATA_RATE,
4790 WMI_10_4_VDEV_PARAM_MCAST_DATA_RATE,
4791 WMI_10_4_VDEV_PARAM_MCAST_INDICATE,
4792 WMI_10_4_VDEV_PARAM_DHCP_INDICATE,
4793 WMI_10_4_VDEV_PARAM_UNKNOWN_DEST_INDICATE,
4794 WMI_10_4_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,
4795 WMI_10_4_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,
4796 WMI_10_4_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,
4797 WMI_10_4_VDEV_PARAM_AP_ENABLE_NAWDS,
4798 WMI_10_4_VDEV_PARAM_MCAST2UCAST_SET,
4799 WMI_10_4_VDEV_PARAM_ENABLE_RTSCTS,
4800 WMI_10_4_VDEV_PARAM_RC_NUM_RETRIES,
4801 WMI_10_4_VDEV_PARAM_TXBF,
4802 WMI_10_4_VDEV_PARAM_PACKET_POWERSAVE,
4803 WMI_10_4_VDEV_PARAM_DROP_UNENCRY,
4804 WMI_10_4_VDEV_PARAM_TX_ENCAP_TYPE,
4805 WMI_10_4_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS,
4806 WMI_10_4_VDEV_PARAM_CABQ_MAXDUR,
4807 WMI_10_4_VDEV_PARAM_MFPTEST_SET,
4808 WMI_10_4_VDEV_PARAM_RTS_FIXED_RATE,
4809 WMI_10_4_VDEV_PARAM_VHT_SGIMASK,
4810 WMI_10_4_VDEV_PARAM_VHT80_RATEMASK,
4811 WMI_10_4_VDEV_PARAM_EARLY_RX_ADJUST_ENABLE,
4812 WMI_10_4_VDEV_PARAM_EARLY_RX_TGT_BMISS_NUM,
4813 WMI_10_4_VDEV_PARAM_EARLY_RX_BMISS_SAMPLE_CYCLE,
4814 WMI_10_4_VDEV_PARAM_EARLY_RX_SLOP_STEP,
4815 WMI_10_4_VDEV_PARAM_EARLY_RX_INIT_SLOP,
4816 WMI_10_4_VDEV_PARAM_EARLY_RX_ADJUST_PAUSE,
4817 WMI_10_4_VDEV_PARAM_PROXY_STA,
4818 WMI_10_4_VDEV_PARAM_MERU_VC,
4819 WMI_10_4_VDEV_PARAM_RX_DECAP_TYPE,
4820 WMI_10_4_VDEV_PARAM_BW_NSS_RATEMASK,
4823 #define WMI_VDEV_PARAM_TXBF_SU_TX_BFEE BIT(0)
4824 #define WMI_VDEV_PARAM_TXBF_MU_TX_BFEE BIT(1)
4825 #define WMI_VDEV_PARAM_TXBF_SU_TX_BFER BIT(2)
4826 #define WMI_VDEV_PARAM_TXBF_MU_TX_BFER BIT(3)
4828 #define WMI_TXBF_STS_CAP_OFFSET_LSB 4
4829 #define WMI_TXBF_STS_CAP_OFFSET_MASK 0x70
4830 #define WMI_TXBF_CONF_IMPLICIT_BF BIT(7)
4831 #define WMI_BF_SOUND_DIM_OFFSET_LSB 8
4832 #define WMI_BF_SOUND_DIM_OFFSET_MASK 0xf00
4834 /* slot time long */
4835 #define WMI_VDEV_SLOT_TIME_LONG 0x1
4836 /* slot time short */
4837 #define WMI_VDEV_SLOT_TIME_SHORT 0x2
4839 #define WMI_VDEV_PREAMBLE_LONG 0x1
4840 /* preablbe short */
4841 #define WMI_VDEV_PREAMBLE_SHORT 0x2
4843 enum wmi_start_event_param {
4844 WMI_VDEV_RESP_START_EVENT = 0,
4845 WMI_VDEV_RESP_RESTART_EVENT,
4848 struct wmi_vdev_start_response_event {
4851 __le32 resp_type; /* %WMI_VDEV_RESP_ */
4855 struct wmi_vdev_standby_req_event {
4856 /* unique id identifying the VDEV, generated by the caller */
4860 struct wmi_vdev_resume_req_event {
4861 /* unique id identifying the VDEV, generated by the caller */
4865 struct wmi_vdev_stopped_event {
4866 /* unique id identifying the VDEV, generated by the caller */
4871 * common structure used for simple events
4872 * (stopped, resume_req, standby response)
4874 struct wmi_vdev_simple_event {
4875 /* unique id identifying the VDEV, generated by the caller */
4879 /* VDEV start response status codes */
4880 /* VDEV succesfully started */
4881 #define WMI_INIFIED_VDEV_START_RESPONSE_STATUS_SUCCESS 0x0
4883 /* requested VDEV not found */
4884 #define WMI_INIFIED_VDEV_START_RESPONSE_INVALID_VDEVID 0x1
4886 /* unsupported VDEV combination */
4887 #define WMI_INIFIED_VDEV_START_RESPONSE_NOT_SUPPORTED 0x2
4889 /* TODO: please add more comments if you have in-depth information */
4890 struct wmi_vdev_spectral_conf_cmd {
4893 /* number of fft samples to send (0 for infinite) */
4896 __le32 scan_priority;
4898 /* number of bins in the FFT: 2^(fft_size - bin_scale) */
4899 __le32 scan_fft_size;
4901 __le32 scan_restart_ena;
4902 __le32 scan_noise_floor_ref;
4903 __le32 scan_init_delay;
4904 __le32 scan_nb_tone_thr;
4905 __le32 scan_str_bin_thr;
4906 __le32 scan_wb_rpt_mode;
4907 __le32 scan_rssi_rpt_mode;
4908 __le32 scan_rssi_thr;
4909 __le32 scan_pwr_format;
4911 /* rpt_mode: Format of FFT report to software for spectral scan
4913 * 0: No FFT report (only spectral scan summary report)
4914 * 1: 2-dword summary of metrics for each completed FFT + spectral
4915 * scan summary report
4916 * 2: 2-dword summary of metrics for each completed FFT +
4917 * 1x- oversampled bins(in-band) per FFT + spectral scan summary
4919 * 3: 2-dword summary of metrics for each completed FFT +
4920 * 2x- oversampled bins (all) per FFT + spectral scan summary
4922 __le32 scan_rpt_mode;
4923 __le32 scan_bin_scale;
4924 __le32 scan_dbm_adj;
4925 __le32 scan_chn_mask;
4928 struct wmi_vdev_spectral_conf_arg {
4935 u32 scan_restart_ena;
4936 u32 scan_noise_floor_ref;
4937 u32 scan_init_delay;
4938 u32 scan_nb_tone_thr;
4939 u32 scan_str_bin_thr;
4940 u32 scan_wb_rpt_mode;
4941 u32 scan_rssi_rpt_mode;
4943 u32 scan_pwr_format;
4950 #define WMI_SPECTRAL_ENABLE_DEFAULT 0
4951 #define WMI_SPECTRAL_COUNT_DEFAULT 0
4952 #define WMI_SPECTRAL_PERIOD_DEFAULT 35
4953 #define WMI_SPECTRAL_PRIORITY_DEFAULT 1
4954 #define WMI_SPECTRAL_FFT_SIZE_DEFAULT 7
4955 #define WMI_SPECTRAL_GC_ENA_DEFAULT 1
4956 #define WMI_SPECTRAL_RESTART_ENA_DEFAULT 0
4957 #define WMI_SPECTRAL_NOISE_FLOOR_REF_DEFAULT -96
4958 #define WMI_SPECTRAL_INIT_DELAY_DEFAULT 80
4959 #define WMI_SPECTRAL_NB_TONE_THR_DEFAULT 12
4960 #define WMI_SPECTRAL_STR_BIN_THR_DEFAULT 8
4961 #define WMI_SPECTRAL_WB_RPT_MODE_DEFAULT 0
4962 #define WMI_SPECTRAL_RSSI_RPT_MODE_DEFAULT 0
4963 #define WMI_SPECTRAL_RSSI_THR_DEFAULT 0xf0
4964 #define WMI_SPECTRAL_PWR_FORMAT_DEFAULT 0
4965 #define WMI_SPECTRAL_RPT_MODE_DEFAULT 2
4966 #define WMI_SPECTRAL_BIN_SCALE_DEFAULT 1
4967 #define WMI_SPECTRAL_DBM_ADJ_DEFAULT 1
4968 #define WMI_SPECTRAL_CHN_MASK_DEFAULT 1
4970 struct wmi_vdev_spectral_enable_cmd {
4976 #define WMI_SPECTRAL_TRIGGER_CMD_TRIGGER 1
4977 #define WMI_SPECTRAL_TRIGGER_CMD_CLEAR 2
4978 #define WMI_SPECTRAL_ENABLE_CMD_ENABLE 1
4979 #define WMI_SPECTRAL_ENABLE_CMD_DISABLE 2
4981 /* Beacon processing related command and event structures */
4982 struct wmi_bcn_tx_hdr {
4989 struct wmi_bcn_tx_cmd {
4990 struct wmi_bcn_tx_hdr hdr;
4994 struct wmi_bcn_tx_arg {
5002 enum wmi_bcn_tx_ref_flags {
5003 WMI_BCN_TX_REF_FLAG_DTIM_ZERO = 0x1,
5004 WMI_BCN_TX_REF_FLAG_DELIVER_CAB = 0x2,
5007 /* TODO: It is unclear why "no antenna" works while any other seemingly valid
5008 * chainmask yields no beacons on the air at all.
5010 #define WMI_BCN_TX_REF_DEF_ANTENNA 0
5012 struct wmi_bcn_tx_ref_cmd {
5015 /* physical address of the frame - dma pointer */
5017 /* id for host to track */
5019 /* frame ctrl to setup PPDU desc */
5020 __le32 frame_control;
5021 /* to control CABQ traffic: WMI_BCN_TX_REF_FLAG_ */
5023 /* introduced in 10.2 */
5024 __le32 antenna_mask;
5028 #define WMI_BCN_FILTER_ALL 0 /* Filter all beacons */
5029 #define WMI_BCN_FILTER_NONE 1 /* Pass all beacons */
5030 #define WMI_BCN_FILTER_RSSI 2 /* Pass Beacons RSSI >= RSSI threshold */
5031 #define WMI_BCN_FILTER_BSSID 3 /* Pass Beacons with matching BSSID */
5032 #define WMI_BCN_FILTER_SSID 4 /* Pass Beacons with matching SSID */
5034 struct wmi_bcn_filter_rx_cmd {
5036 __le32 bcn_filter_id;
5037 /* Filter type - wmi_bcn_filter */
5040 __le32 bcn_filter_len;
5041 /* Filter info (threshold, BSSID, RSSI) */
5045 /* Capabilities and IEs to be passed to firmware */
5046 struct wmi_bcn_prb_info {
5051 /* Advanced capabilities */
5052 /* HT capabilities */
5062 struct wmi_bcn_tmpl_cmd {
5063 /* unique id identifying the VDEV, generated by the caller */
5065 /* TIM IE offset from the beginning of the template. */
5066 __le32 tim_ie_offset;
5067 /* beacon probe capabilities and IEs */
5068 struct wmi_bcn_prb_info bcn_prb_info;
5069 /* beacon buffer length */
5071 /* variable length data */
5075 struct wmi_prb_tmpl_cmd {
5076 /* unique id identifying the VDEV, generated by the caller */
5078 /* beacon probe capabilities and IEs */
5079 struct wmi_bcn_prb_info bcn_prb_info;
5080 /* beacon buffer length */
5082 /* Variable length data */
5086 enum wmi_sta_ps_mode {
5087 /* enable power save for the given STA VDEV */
5088 WMI_STA_PS_MODE_DISABLED = 0,
5089 /* disable power save for a given STA VDEV */
5090 WMI_STA_PS_MODE_ENABLED = 1,
5093 struct wmi_sta_powersave_mode_cmd {
5094 /* unique id identifying the VDEV, generated by the caller */
5099 * (see enum wmi_sta_ps_mode)
5104 enum wmi_csa_offload_en {
5105 WMI_CSA_OFFLOAD_DISABLE = 0,
5106 WMI_CSA_OFFLOAD_ENABLE = 1,
5109 struct wmi_csa_offload_enable_cmd {
5111 __le32 csa_offload_enable;
5114 struct wmi_csa_offload_chanswitch_cmd {
5116 struct wmi_channel chan;
5120 * This parameter controls the policy for retrieving frames from AP while the
5121 * STA is in sleep state.
5123 * Only takes affect if the sta_ps_mode is enabled
5125 enum wmi_sta_ps_param_rx_wake_policy {
5127 * Wake up when ever there is an RX activity on the VDEV. In this mode
5128 * the Power save SM(state machine) will come out of sleep by either
5129 * sending null frame (or) a data frame (with PS==0) in response to TIM
5130 * bit set in the received beacon frame from AP.
5132 WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0,
5135 * Here the power save state machine will not wakeup in response to TIM
5136 * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
5137 * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all
5138 * access categories are delivery-enabled, the station will send a
5139 * UAPSD trigger frame, otherwise it will send a PS-Poll.
5141 WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
5145 * Number of tx frames/beacon that cause the power save SM to wake up.
5147 * Value 1 causes the SM to wake up for every TX. Value 0 has a special
5148 * meaning, It will cause the SM to never wake up. This is useful if you want
5149 * to keep the system to sleep all the time for some kind of test mode . host
5150 * can change this parameter any time. It will affect at the next tx frame.
5152 enum wmi_sta_ps_param_tx_wake_threshold {
5153 WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
5154 WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
5157 * Values greater than one indicate that many TX attempts per beacon
5158 * interval before the STA will wake up
5163 * The maximum number of PS-Poll frames the FW will send in response to
5164 * traffic advertised in TIM before waking up (by sending a null frame with PS
5165 * = 0). Value 0 has a special meaning: there is no maximum count and the FW
5166 * will send as many PS-Poll as are necessary to retrieve buffered BU. This
5167 * parameter is used when the RX wake policy is
5168 * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake
5169 * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE.
5171 enum wmi_sta_ps_param_pspoll_count {
5172 WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
5174 * Values greater than 0 indicate the maximum numer of PS-Poll frames
5175 * FW will send before waking up.
5178 /* When u-APSD is enabled the firmware will be very reluctant to exit
5179 * STA PS. This could result in very poor Rx performance with STA doing
5180 * PS-Poll for each and every buffered frame. This value is a bit
5183 WMI_STA_PS_PSPOLL_COUNT_UAPSD = 3,
5187 * This will include the delivery and trigger enabled state for every AC.
5188 * This is the negotiated state with AP. The host MLME needs to set this based
5189 * on AP capability and the state Set in the association request by the
5190 * station MLME.Lower 8 bits of the value specify the UAPSD configuration.
5192 #define WMI_UAPSD_AC_TYPE_DELI 0
5193 #define WMI_UAPSD_AC_TYPE_TRIG 1
5195 #define WMI_UAPSD_AC_BIT_MASK(ac, type) \
5196 ((type == WMI_UAPSD_AC_TYPE_DELI) ? (1<<(ac<<1)) : (1<<((ac<<1)+1)))
5198 enum wmi_sta_ps_param_uapsd {
5199 WMI_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
5200 WMI_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
5201 WMI_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
5202 WMI_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
5203 WMI_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
5204 WMI_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
5205 WMI_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
5206 WMI_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
5209 #define WMI_STA_UAPSD_MAX_INTERVAL_MSEC UINT_MAX
5211 struct wmi_sta_uapsd_auto_trig_param {
5213 __le32 user_priority;
5214 __le32 service_interval;
5215 __le32 suspend_interval;
5216 __le32 delay_interval;
5219 struct wmi_sta_uapsd_auto_trig_cmd_fixed_param {
5221 struct wmi_mac_addr peer_macaddr;
5225 struct wmi_sta_uapsd_auto_trig_arg {
5228 u32 service_interval;
5229 u32 suspend_interval;
5233 enum wmi_sta_powersave_param {
5235 * Controls how frames are retrievd from AP while STA is sleeping
5237 * (see enum wmi_sta_ps_param_rx_wake_policy)
5239 WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0,
5242 * The STA will go active after this many TX
5244 * (see enum wmi_sta_ps_param_tx_wake_threshold)
5246 WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
5249 * Number of PS-Poll to send before STA wakes up
5251 * (see enum wmi_sta_ps_param_pspoll_count)
5254 WMI_STA_PS_PARAM_PSPOLL_COUNT = 2,
5257 * TX/RX inactivity time in msec before going to sleep.
5259 * The power save SM will monitor tx/rx activity on the VDEV, if no
5260 * activity for the specified msec of the parameter the Power save
5261 * SM will go to sleep.
5263 WMI_STA_PS_PARAM_INACTIVITY_TIME = 3,
5266 * Set uapsd configuration.
5268 * (see enum wmi_sta_ps_param_uapsd)
5270 WMI_STA_PS_PARAM_UAPSD = 4,
5273 struct wmi_sta_powersave_param_cmd {
5275 __le32 param_id; /* %WMI_STA_PS_PARAM_ */
5279 /* No MIMO power save */
5280 #define WMI_STA_MIMO_PS_MODE_DISABLE
5281 /* mimo powersave mode static*/
5282 #define WMI_STA_MIMO_PS_MODE_STATIC
5283 /* mimo powersave mode dynamic */
5284 #define WMI_STA_MIMO_PS_MODE_DYNAMIC
5286 struct wmi_sta_mimo_ps_mode_cmd {
5287 /* unique id identifying the VDEV, generated by the caller */
5289 /* mimo powersave mode as defined above */
5290 __le32 mimo_pwrsave_mode;
5293 /* U-APSD configuration of peer station from (re)assoc request and TSPECs */
5294 enum wmi_ap_ps_param_uapsd {
5295 WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
5296 WMI_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
5297 WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
5298 WMI_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
5299 WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
5300 WMI_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
5301 WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
5302 WMI_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
5305 /* U-APSD maximum service period of peer station */
5306 enum wmi_ap_ps_peer_param_max_sp {
5307 WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
5308 WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
5309 WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
5310 WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
5311 MAX_WMI_AP_PS_PEER_PARAM_MAX_SP,
5315 * AP power save parameter
5316 * Set a power save specific parameter for a peer station
5318 enum wmi_ap_ps_peer_param {
5319 /* Set uapsd configuration for a given peer.
5321 * Include the delivery and trigger enabled state for every AC.
5322 * The host MLME needs to set this based on AP capability and stations
5323 * request Set in the association request received from the station.
5325 * Lower 8 bits of the value specify the UAPSD configuration.
5327 * (see enum wmi_ap_ps_param_uapsd)
5328 * The default value is 0.
5330 WMI_AP_PS_PEER_PARAM_UAPSD = 0,
5333 * Set the service period for a UAPSD capable station
5335 * The service period from wme ie in the (re)assoc request frame.
5337 * (see enum wmi_ap_ps_peer_param_max_sp)
5339 WMI_AP_PS_PEER_PARAM_MAX_SP = 1,
5341 /* Time in seconds for aging out buffered frames for STA in PS */
5342 WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
5345 struct wmi_ap_ps_peer_cmd {
5346 /* unique id identifying the VDEV, generated by the caller */
5349 /* peer MAC address */
5350 struct wmi_mac_addr peer_macaddr;
5352 /* AP powersave param (see enum wmi_ap_ps_peer_param) */
5355 /* AP powersave param value */
5359 /* 128 clients = 4 words */
5360 #define WMI_TIM_BITMAP_ARRAY_SIZE 4
5362 struct wmi_tim_info {
5365 __le32 tim_bitmap[WMI_TIM_BITMAP_ARRAY_SIZE];
5367 __le32 tim_num_ps_pending;
5370 struct wmi_tim_info_arg {
5373 const __le32 *tim_bitmap;
5375 __le32 tim_num_ps_pending;
5378 /* Maximum number of NOA Descriptors supported */
5379 #define WMI_P2P_MAX_NOA_DESCRIPTORS 4
5380 #define WMI_P2P_OPPPS_ENABLE_BIT BIT(0)
5381 #define WMI_P2P_OPPPS_CTWINDOW_OFFSET 1
5382 #define WMI_P2P_NOA_CHANGED_BIT BIT(0)
5384 struct wmi_p2p_noa_info {
5385 /* Bit 0 - Flag to indicate an update in NOA schedule
5386 Bits 7-1 - Reserved */
5390 /* Bit 0 - Opp PS state of the AP
5391 Bits 1-7 - Ctwindow in TUs */
5393 /* Number of NOA descriptors */
5396 struct wmi_p2p_noa_descriptor descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS];
5399 struct wmi_bcn_info {
5400 struct wmi_tim_info tim_info;
5401 struct wmi_p2p_noa_info p2p_noa_info;
5404 struct wmi_host_swba_event {
5406 struct wmi_bcn_info bcn_info[0];
5409 /* 16 words = 512 client + 1 word = for guard */
5410 #define WMI_10_4_TIM_BITMAP_ARRAY_SIZE 17
5412 struct wmi_10_4_tim_info {
5415 __le32 tim_bitmap[WMI_10_4_TIM_BITMAP_ARRAY_SIZE];
5417 __le32 tim_num_ps_pending;
5420 #define WMI_10_4_P2P_MAX_NOA_DESCRIPTORS 1
5422 struct wmi_10_4_p2p_noa_info {
5423 /* Bit 0 - Flag to indicate an update in NOA schedule
5424 * Bits 7-1 - Reserved
5429 /* Bit 0 - Opp PS state of the AP
5430 * Bits 1-7 - Ctwindow in TUs
5433 /* Number of NOA descriptors */
5436 struct wmi_p2p_noa_descriptor
5437 noa_descriptors[WMI_10_4_P2P_MAX_NOA_DESCRIPTORS];
5440 struct wmi_10_4_bcn_info {
5441 struct wmi_10_4_tim_info tim_info;
5442 struct wmi_10_4_p2p_noa_info p2p_noa_info;
5445 struct wmi_10_4_host_swba_event {
5447 struct wmi_10_4_bcn_info bcn_info[0];
5450 #define WMI_MAX_AP_VDEV 16
5452 struct wmi_tbtt_offset_event {
5454 __le32 tbttoffset_list[WMI_MAX_AP_VDEV];
5457 struct wmi_peer_create_cmd {
5459 struct wmi_mac_addr peer_macaddr;
5462 enum wmi_peer_type {
5463 WMI_PEER_TYPE_DEFAULT = 0,
5464 WMI_PEER_TYPE_BSS = 1,
5465 WMI_PEER_TYPE_TDLS = 2,
5468 struct wmi_peer_delete_cmd {
5470 struct wmi_mac_addr peer_macaddr;
5473 struct wmi_peer_flush_tids_cmd {
5475 struct wmi_mac_addr peer_macaddr;
5476 __le32 peer_tid_bitmap;
5479 struct wmi_fixed_rate {
5481 * rate mode . 0: disable fixed rate (auto rate)
5482 * 1: legacy (non 11n) rate specified as ieee rate 2*Mbps
5483 * 2: ht20 11n rate specified as mcs index
5484 * 3: ht40 11n rate specified as mcs index
5488 * 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB)
5489 * and series 3 is stored at byte 3 (MSB)
5493 * 4 retry counts for 4 rate series. retry count for rate 0 is stored
5494 * in byte 0 (LSB) and retry count for rate 3 is stored at byte 3
5497 __le32 rate_retries;
5500 struct wmi_peer_fixed_rate_cmd {
5501 /* unique id identifying the VDEV, generated by the caller */
5503 /* peer MAC address */
5504 struct wmi_mac_addr peer_macaddr;
5506 struct wmi_fixed_rate peer_fixed_rate;
5509 #define WMI_MGMT_TID 17
5511 struct wmi_addba_clear_resp_cmd {
5512 /* unique id identifying the VDEV, generated by the caller */
5514 /* peer MAC address */
5515 struct wmi_mac_addr peer_macaddr;
5518 struct wmi_addba_send_cmd {
5519 /* unique id identifying the VDEV, generated by the caller */
5521 /* peer MAC address */
5522 struct wmi_mac_addr peer_macaddr;
5525 /* Buffer/Window size*/
5529 struct wmi_delba_send_cmd {
5530 /* unique id identifying the VDEV, generated by the caller */
5532 /* peer MAC address */
5533 struct wmi_mac_addr peer_macaddr;
5542 struct wmi_addba_setresponse_cmd {
5543 /* unique id identifying the vdev, generated by the caller */
5545 /* peer mac address */
5546 struct wmi_mac_addr peer_macaddr;
5553 struct wmi_send_singleamsdu_cmd {
5554 /* unique id identifying the vdev, generated by the caller */
5556 /* peer mac address */
5557 struct wmi_mac_addr peer_macaddr;
5562 enum wmi_peer_smps_state {
5563 WMI_PEER_SMPS_PS_NONE = 0x0,
5564 WMI_PEER_SMPS_STATIC = 0x1,
5565 WMI_PEER_SMPS_DYNAMIC = 0x2
5568 enum wmi_peer_chwidth {
5569 WMI_PEER_CHWIDTH_20MHZ = 0,
5570 WMI_PEER_CHWIDTH_40MHZ = 1,
5571 WMI_PEER_CHWIDTH_80MHZ = 2,
5574 enum wmi_peer_param {
5575 WMI_PEER_SMPS_STATE = 0x1, /* see %wmi_peer_smps_state */
5576 WMI_PEER_AMPDU = 0x2,
5577 WMI_PEER_AUTHORIZE = 0x3,
5578 WMI_PEER_CHAN_WIDTH = 0x4,
5580 WMI_PEER_USE_4ADDR = 0x6,
5581 WMI_PEER_DUMMY_VAR = 0xff, /* dummy parameter for STA PS workaround */
5584 struct wmi_peer_set_param_cmd {
5586 struct wmi_mac_addr peer_macaddr;
5591 #define MAX_SUPPORTED_RATES 128
5593 struct wmi_rate_set {
5594 /* total number of rates */
5597 * rates (each 8bit value) packed into a 32 bit word.
5598 * the rates are filled from least significant byte to most
5601 __le32 rates[(MAX_SUPPORTED_RATES/4)+1];
5604 struct wmi_rate_set_arg {
5605 unsigned int num_rates;
5606 u8 rates[MAX_SUPPORTED_RATES];
5610 * NOTE: It would bea good idea to represent the Tx MCS
5611 * info in one word and Rx in another word. This is split
5612 * into multiple words for convenience
5614 struct wmi_vht_rate_set {
5615 __le32 rx_max_rate; /* Max Rx data rate */
5616 __le32 rx_mcs_set; /* Negotiated RX VHT rates */
5617 __le32 tx_max_rate; /* Max Tx data rate */
5618 __le32 tx_mcs_set; /* Negotiated TX VHT rates */
5621 struct wmi_vht_rate_set_arg {
5628 struct wmi_peer_set_rates_cmd {
5629 /* peer MAC address */
5630 struct wmi_mac_addr peer_macaddr;
5631 /* legacy rate set */
5632 struct wmi_rate_set peer_legacy_rates;
5634 struct wmi_rate_set peer_ht_rates;
5637 struct wmi_peer_set_q_empty_callback_cmd {
5638 /* unique id identifying the VDEV, generated by the caller */
5640 /* peer MAC address */
5641 struct wmi_mac_addr peer_macaddr;
5642 __le32 callback_enable;
5645 #define WMI_PEER_AUTH 0x00000001
5646 #define WMI_PEER_QOS 0x00000002
5647 #define WMI_PEER_NEED_PTK_4_WAY 0x00000004
5648 #define WMI_PEER_NEED_GTK_2_WAY 0x00000010
5649 #define WMI_PEER_APSD 0x00000800
5650 #define WMI_PEER_HT 0x00001000
5651 #define WMI_PEER_40MHZ 0x00002000
5652 #define WMI_PEER_STBC 0x00008000
5653 #define WMI_PEER_LDPC 0x00010000
5654 #define WMI_PEER_DYN_MIMOPS 0x00020000
5655 #define WMI_PEER_STATIC_MIMOPS 0x00040000
5656 #define WMI_PEER_SPATIAL_MUX 0x00200000
5657 #define WMI_PEER_VHT 0x02000000
5658 #define WMI_PEER_80MHZ 0x04000000
5659 #define WMI_PEER_VHT_2G 0x08000000
5662 * Peer rate capabilities.
5664 * This is of interest to the ratecontrol
5665 * module which resides in the firmware. The bit definitions are
5666 * consistent with that defined in if_athrate.c.
5668 #define WMI_RC_DS_FLAG 0x01
5669 #define WMI_RC_CW40_FLAG 0x02
5670 #define WMI_RC_SGI_FLAG 0x04
5671 #define WMI_RC_HT_FLAG 0x08
5672 #define WMI_RC_RTSCTS_FLAG 0x10
5673 #define WMI_RC_TX_STBC_FLAG 0x20
5674 #define WMI_RC_RX_STBC_FLAG 0xC0
5675 #define WMI_RC_RX_STBC_FLAG_S 6
5676 #define WMI_RC_WEP_TKIP_FLAG 0x100
5677 #define WMI_RC_TS_FLAG 0x200
5678 #define WMI_RC_UAPSD_FLAG 0x400
5680 /* Maximum listen interval supported by hw in units of beacon interval */
5681 #define ATH10K_MAX_HW_LISTEN_INTERVAL 5
5683 struct wmi_common_peer_assoc_complete_cmd {
5684 struct wmi_mac_addr peer_macaddr;
5686 __le32 peer_new_assoc; /* 1=assoc, 0=reassoc */
5687 __le32 peer_associd; /* 16 LSBs */
5689 __le32 peer_caps; /* 16 LSBs */
5690 __le32 peer_listen_intval;
5691 __le32 peer_ht_caps;
5692 __le32 peer_max_mpdu;
5693 __le32 peer_mpdu_density; /* 0..16 */
5694 __le32 peer_rate_caps;
5695 struct wmi_rate_set peer_legacy_rates;
5696 struct wmi_rate_set peer_ht_rates;
5697 __le32 peer_nss; /* num of spatial streams */
5698 __le32 peer_vht_caps;
5699 __le32 peer_phymode;
5700 struct wmi_vht_rate_set peer_vht_rates;
5703 struct wmi_main_peer_assoc_complete_cmd {
5704 struct wmi_common_peer_assoc_complete_cmd cmd;
5706 /* HT Operation Element of the peer. Five bytes packed in 2
5707 * INT32 array and filled from lsb to msb. */
5708 __le32 peer_ht_info[2];
5711 struct wmi_10_1_peer_assoc_complete_cmd {
5712 struct wmi_common_peer_assoc_complete_cmd cmd;
5715 #define WMI_PEER_ASSOC_INFO0_MAX_MCS_IDX_LSB 0
5716 #define WMI_PEER_ASSOC_INFO0_MAX_MCS_IDX_MASK 0x0f
5717 #define WMI_PEER_ASSOC_INFO0_MAX_NSS_LSB 4
5718 #define WMI_PEER_ASSOC_INFO0_MAX_NSS_MASK 0xf0
5720 struct wmi_10_2_peer_assoc_complete_cmd {
5721 struct wmi_common_peer_assoc_complete_cmd cmd;
5722 __le32 info0; /* WMI_PEER_ASSOC_INFO0_ */
5725 struct wmi_peer_assoc_complete_arg {
5730 u32 peer_flags; /* see %WMI_PEER_ */
5732 u32 peer_listen_intval;
5735 u32 peer_mpdu_density; /* 0..16 */
5736 u32 peer_rate_caps; /* see %WMI_RC_ */
5737 struct wmi_rate_set_arg peer_legacy_rates;
5738 struct wmi_rate_set_arg peer_ht_rates;
5739 u32 peer_num_spatial_streams;
5741 enum wmi_phy_mode peer_phymode;
5742 struct wmi_vht_rate_set_arg peer_vht_rates;
5745 struct wmi_peer_add_wds_entry_cmd {
5746 /* peer MAC address */
5747 struct wmi_mac_addr peer_macaddr;
5749 struct wmi_mac_addr wds_macaddr;
5752 struct wmi_peer_remove_wds_entry_cmd {
5754 struct wmi_mac_addr wds_macaddr;
5757 struct wmi_peer_q_empty_callback_event {
5758 /* peer MAC address */
5759 struct wmi_mac_addr peer_macaddr;
5763 * Channel info WMI event
5765 struct wmi_chan_info_event {
5770 __le32 rx_clear_count;
5774 struct wmi_10_4_chan_info_event {
5779 __le32 rx_clear_count;
5781 __le32 chan_tx_pwr_range;
5782 __le32 chan_tx_pwr_tp;
5783 __le32 rx_frame_count;
5786 struct wmi_peer_sta_kickout_event {
5787 struct wmi_mac_addr peer_macaddr;
5790 #define WMI_CHAN_INFO_FLAG_COMPLETE BIT(0)
5791 #define WMI_CHAN_INFO_FLAG_PRE_COMPLETE BIT(1)
5793 /* Beacon filter wmi command info */
5794 #define BCN_FLT_MAX_SUPPORTED_IES 256
5795 #define BCN_FLT_MAX_ELEMS_IE_LIST (BCN_FLT_MAX_SUPPORTED_IES / 32)
5797 struct bss_bcn_stats {
5799 __le32 bss_bcnsdropped;
5800 __le32 bss_bcnsdelivered;
5803 struct bcn_filter_stats {
5804 __le32 bcns_dropped;
5805 __le32 bcns_delivered;
5806 __le32 activefilters;
5807 struct bss_bcn_stats bss_stats;
5810 struct wmi_add_bcn_filter_cmd {
5812 u32 ie_map[BCN_FLT_MAX_ELEMS_IE_LIST];
5815 enum wmi_sta_keepalive_method {
5816 WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1,
5817 WMI_STA_KEEPALIVE_METHOD_UNSOLICITATED_ARP_RESPONSE = 2,
5820 #define WMI_STA_KEEPALIVE_INTERVAL_DISABLE 0
5822 /* Firmware crashes if keepalive interval exceeds this limit */
5823 #define WMI_STA_KEEPALIVE_INTERVAL_MAX_SECONDS 0xffff
5825 /* note: ip4 addresses are in network byte order, i.e. big endian */
5826 struct wmi_sta_keepalive_arp_resp {
5827 __be32 src_ip4_addr;
5828 __be32 dest_ip4_addr;
5829 struct wmi_mac_addr dest_mac_addr;
5832 struct wmi_sta_keepalive_cmd {
5835 __le32 method; /* WMI_STA_KEEPALIVE_METHOD_ */
5836 __le32 interval; /* in seconds */
5837 struct wmi_sta_keepalive_arp_resp arp_resp;
5840 struct wmi_sta_keepalive_arg {
5845 __be32 src_ip4_addr;
5846 __be32 dest_ip4_addr;
5847 const u8 dest_mac_addr[ETH_ALEN];
5850 enum wmi_force_fw_hang_type {
5851 WMI_FORCE_FW_HANG_ASSERT = 1,
5852 WMI_FORCE_FW_HANG_NO_DETECT,
5853 WMI_FORCE_FW_HANG_CTRL_EP_FULL,
5854 WMI_FORCE_FW_HANG_EMPTY_POINT,
5855 WMI_FORCE_FW_HANG_STACK_OVERFLOW,
5856 WMI_FORCE_FW_HANG_INFINITE_LOOP,
5859 #define WMI_FORCE_FW_HANG_RANDOM_TIME 0xFFFFFFFF
5861 struct wmi_force_fw_hang_cmd {
5866 enum ath10k_dbglog_level {
5867 ATH10K_DBGLOG_LEVEL_VERBOSE = 0,
5868 ATH10K_DBGLOG_LEVEL_INFO = 1,
5869 ATH10K_DBGLOG_LEVEL_WARN = 2,
5870 ATH10K_DBGLOG_LEVEL_ERR = 3,
5873 /* VAP ids to enable dbglog */
5874 #define ATH10K_DBGLOG_CFG_VAP_LOG_LSB 0
5875 #define ATH10K_DBGLOG_CFG_VAP_LOG_MASK 0x0000ffff
5877 /* to enable dbglog in the firmware */
5878 #define ATH10K_DBGLOG_CFG_REPORTING_ENABLE_LSB 16
5879 #define ATH10K_DBGLOG_CFG_REPORTING_ENABLE_MASK 0x00010000
5881 /* timestamp resolution */
5882 #define ATH10K_DBGLOG_CFG_RESOLUTION_LSB 17
5883 #define ATH10K_DBGLOG_CFG_RESOLUTION_MASK 0x000E0000
5885 /* number of queued messages before sending them to the host */
5886 #define ATH10K_DBGLOG_CFG_REPORT_SIZE_LSB 20
5887 #define ATH10K_DBGLOG_CFG_REPORT_SIZE_MASK 0x0ff00000
5890 * Log levels to enable. This defines the minimum level to enable, this is
5891 * not a bitmask. See enum ath10k_dbglog_level for the values.
5893 #define ATH10K_DBGLOG_CFG_LOG_LVL_LSB 28
5894 #define ATH10K_DBGLOG_CFG_LOG_LVL_MASK 0x70000000
5897 * Note: this is a cleaned up version of a struct firmware uses. For
5898 * example, config_valid was hidden inside an array.
5900 struct wmi_dbglog_cfg_cmd {
5901 /* bitmask to hold mod id config*/
5902 __le32 module_enable;
5904 /* see ATH10K_DBGLOG_CFG_ */
5905 __le32 config_enable;
5907 /* mask of module id bits to be changed */
5908 __le32 module_valid;
5910 /* mask of config bits to be changed, see ATH10K_DBGLOG_CFG_ */
5911 __le32 config_valid;
5914 enum wmi_roam_reason {
5915 WMI_ROAM_REASON_BETTER_AP = 1,
5916 WMI_ROAM_REASON_BEACON_MISS = 2,
5917 WMI_ROAM_REASON_LOW_RSSI = 3,
5918 WMI_ROAM_REASON_SUITABLE_AP_FOUND = 4,
5919 WMI_ROAM_REASON_HO_FAILED = 5,
5922 WMI_ROAM_REASON_MAX,
5925 struct wmi_roam_ev {
5930 #define ATH10K_FRAGMT_THRESHOLD_MIN 540
5931 #define ATH10K_FRAGMT_THRESHOLD_MAX 2346
5933 #define WMI_MAX_EVENT 0x1000
5934 /* Maximum number of pending TXed WMI packets */
5935 #define WMI_SKB_HEADROOM sizeof(struct wmi_cmd_hdr)
5937 /* By default disable power save for IBSS */
5938 #define ATH10K_DEFAULT_ATIM 0
5940 #define WMI_MAX_MEM_REQS 16
5942 struct wmi_scan_ev_arg {
5943 __le32 event_type; /* %WMI_SCAN_EVENT_ */
5944 __le32 reason; /* %WMI_SCAN_REASON_ */
5945 __le32 channel_freq; /* only valid for WMI_SCAN_EVENT_FOREIGN_CHANNEL */
5951 struct wmi_mgmt_rx_ev_arg {
5957 __le32 status; /* %WMI_RX_STATUS_ */
5960 struct wmi_ch_info_ev_arg {
5965 __le32 rx_clear_count;
5967 __le32 chan_tx_pwr_range;
5968 __le32 chan_tx_pwr_tp;
5969 __le32 rx_frame_count;
5972 /* From 10.4 firmware, not sure all have the same values. */
5973 enum wmi_vdev_start_status {
5974 WMI_VDEV_START_OK = 0,
5975 WMI_VDEV_START_CHAN_INVALID,
5978 struct wmi_vdev_start_ev_arg {
5981 __le32 resp_type; /* %WMI_VDEV_RESP_ */
5982 __le32 status; /* See wmi_vdev_start_status enum above */
5985 struct wmi_peer_kick_ev_arg {
5989 struct wmi_swba_ev_arg {
5991 struct wmi_tim_info_arg tim_info[WMI_MAX_AP_VDEV];
5992 const struct wmi_p2p_noa_info *noa_info[WMI_MAX_AP_VDEV];
5995 struct wmi_phyerr_ev_arg {
6008 struct wmi_phyerr_hdr_arg {
6013 const void *phyerrs;
6016 struct wmi_svc_rdy_ev_arg {
6017 __le32 min_tx_power;
6018 __le32 max_tx_power;
6025 __le32 num_rf_chains;
6027 __le32 num_mem_reqs;
6028 const __le32 *service_map;
6029 size_t service_map_len;
6030 const struct wlan_host_mem_req *mem_reqs[WMI_MAX_MEM_REQS];
6033 struct wmi_rdy_ev_arg {
6040 struct wmi_roam_ev_arg {
6046 struct wmi_pdev_temperature_event {
6047 /* temperature value in Celcius degree */
6051 /* WOW structures */
6052 enum wmi_wow_wakeup_event {
6053 WOW_BMISS_EVENT = 0,
6054 WOW_BETTER_AP_EVENT,
6055 WOW_DEAUTH_RECVD_EVENT,
6056 WOW_MAGIC_PKT_RECVD_EVENT,
6058 WOW_FOURWAY_HSHAKE_EVENT,
6059 WOW_EAPOL_RECVD_EVENT,
6060 WOW_NLO_DETECTED_EVENT,
6061 WOW_DISASSOC_RECVD_EVENT,
6062 WOW_PATTERN_MATCH_EVENT,
6064 WOW_PROBE_REQ_WPS_IE_EVENT,
6066 WOW_ASSOC_REQ_EVENT,
6069 WOW_HOST_AUTO_SHUTDOWN_EVENT,
6070 WOW_IOAC_MAGIC_EVENT,
6071 WOW_IOAC_SHORT_EVENT,
6072 WOW_IOAC_EXTEND_EVENT,
6073 WOW_IOAC_TIMER_EVENT,
6074 WOW_DFS_PHYERR_RADAR_EVENT,
6076 WOW_CLIENT_KICKOUT_EVENT,
6080 #define C2S(x) case x: return #x
6082 static inline const char *wow_wakeup_event(enum wmi_wow_wakeup_event ev)
6085 C2S(WOW_BMISS_EVENT);
6086 C2S(WOW_BETTER_AP_EVENT);
6087 C2S(WOW_DEAUTH_RECVD_EVENT);
6088 C2S(WOW_MAGIC_PKT_RECVD_EVENT);
6089 C2S(WOW_GTK_ERR_EVENT);
6090 C2S(WOW_FOURWAY_HSHAKE_EVENT);
6091 C2S(WOW_EAPOL_RECVD_EVENT);
6092 C2S(WOW_NLO_DETECTED_EVENT);
6093 C2S(WOW_DISASSOC_RECVD_EVENT);
6094 C2S(WOW_PATTERN_MATCH_EVENT);
6095 C2S(WOW_CSA_IE_EVENT);
6096 C2S(WOW_PROBE_REQ_WPS_IE_EVENT);
6097 C2S(WOW_AUTH_REQ_EVENT);
6098 C2S(WOW_ASSOC_REQ_EVENT);
6100 C2S(WOW_RA_MATCH_EVENT);
6101 C2S(WOW_HOST_AUTO_SHUTDOWN_EVENT);
6102 C2S(WOW_IOAC_MAGIC_EVENT);
6103 C2S(WOW_IOAC_SHORT_EVENT);
6104 C2S(WOW_IOAC_EXTEND_EVENT);
6105 C2S(WOW_IOAC_TIMER_EVENT);
6106 C2S(WOW_DFS_PHYERR_RADAR_EVENT);
6107 C2S(WOW_BEACON_EVENT);
6108 C2S(WOW_CLIENT_KICKOUT_EVENT);
6115 enum wmi_wow_wake_reason {
6116 WOW_REASON_UNSPECIFIED = -1,
6117 WOW_REASON_NLOD = 0,
6118 WOW_REASON_AP_ASSOC_LOST,
6119 WOW_REASON_LOW_RSSI,
6120 WOW_REASON_DEAUTH_RECVD,
6121 WOW_REASON_DISASSOC_RECVD,
6122 WOW_REASON_GTK_HS_ERR,
6124 WOW_REASON_FOURWAY_HS_RECV,
6125 WOW_REASON_TIMER_INTR_RECV,
6126 WOW_REASON_PATTERN_MATCH_FOUND,
6127 WOW_REASON_RECV_MAGIC_PATTERN,
6128 WOW_REASON_P2P_DISC,
6130 WOW_REASON_CSA_EVENT,
6131 WOW_REASON_PROBE_REQ_WPS_IE_RECV,
6132 WOW_REASON_AUTH_REQ_RECV,
6133 WOW_REASON_ASSOC_REQ_RECV,
6134 WOW_REASON_HTT_EVENT,
6135 WOW_REASON_RA_MATCH,
6136 WOW_REASON_HOST_AUTO_SHUTDOWN,
6137 WOW_REASON_IOAC_MAGIC_EVENT,
6138 WOW_REASON_IOAC_SHORT_EVENT,
6139 WOW_REASON_IOAC_EXTEND_EVENT,
6140 WOW_REASON_IOAC_TIMER_EVENT,
6142 WOW_REASON_DFS_PHYERR_RADADR_EVENT,
6143 WOW_REASON_BEACON_RECV,
6144 WOW_REASON_CLIENT_KICKOUT_EVENT,
6145 WOW_REASON_DEBUG_TEST = 0xFF,
6148 static inline const char *wow_reason(enum wmi_wow_wake_reason reason)
6151 C2S(WOW_REASON_UNSPECIFIED);
6152 C2S(WOW_REASON_NLOD);
6153 C2S(WOW_REASON_AP_ASSOC_LOST);
6154 C2S(WOW_REASON_LOW_RSSI);
6155 C2S(WOW_REASON_DEAUTH_RECVD);
6156 C2S(WOW_REASON_DISASSOC_RECVD);
6157 C2S(WOW_REASON_GTK_HS_ERR);
6158 C2S(WOW_REASON_EAP_REQ);
6159 C2S(WOW_REASON_FOURWAY_HS_RECV);
6160 C2S(WOW_REASON_TIMER_INTR_RECV);
6161 C2S(WOW_REASON_PATTERN_MATCH_FOUND);
6162 C2S(WOW_REASON_RECV_MAGIC_PATTERN);
6163 C2S(WOW_REASON_P2P_DISC);
6164 C2S(WOW_REASON_WLAN_HB);
6165 C2S(WOW_REASON_CSA_EVENT);
6166 C2S(WOW_REASON_PROBE_REQ_WPS_IE_RECV);
6167 C2S(WOW_REASON_AUTH_REQ_RECV);
6168 C2S(WOW_REASON_ASSOC_REQ_RECV);
6169 C2S(WOW_REASON_HTT_EVENT);
6170 C2S(WOW_REASON_RA_MATCH);
6171 C2S(WOW_REASON_HOST_AUTO_SHUTDOWN);
6172 C2S(WOW_REASON_IOAC_MAGIC_EVENT);
6173 C2S(WOW_REASON_IOAC_SHORT_EVENT);
6174 C2S(WOW_REASON_IOAC_EXTEND_EVENT);
6175 C2S(WOW_REASON_IOAC_TIMER_EVENT);
6176 C2S(WOW_REASON_ROAM_HO);
6177 C2S(WOW_REASON_DFS_PHYERR_RADADR_EVENT);
6178 C2S(WOW_REASON_BEACON_RECV);
6179 C2S(WOW_REASON_CLIENT_KICKOUT_EVENT);
6180 C2S(WOW_REASON_DEBUG_TEST);
6188 struct wmi_wow_ev_arg {
6191 enum wmi_wow_wake_reason wake_reason;
6195 #define WOW_MIN_PATTERN_SIZE 1
6196 #define WOW_MAX_PATTERN_SIZE 148
6197 #define WOW_MAX_PKT_OFFSET 128
6199 enum wmi_tdls_state {
6201 WMI_TDLS_ENABLE_PASSIVE,
6202 WMI_TDLS_ENABLE_ACTIVE,
6205 enum wmi_tdls_peer_state {
6206 WMI_TDLS_PEER_STATE_PEERING,
6207 WMI_TDLS_PEER_STATE_CONNECTED,
6208 WMI_TDLS_PEER_STATE_TEARDOWN,
6211 struct wmi_tdls_peer_update_cmd_arg {
6213 enum wmi_tdls_peer_state peer_state;
6217 #define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32
6219 struct wmi_tdls_peer_capab_arg {
6220 u8 peer_uapsd_queues;
6222 u32 buff_sta_support;
6223 u32 off_chan_support;
6224 u32 peer_curr_operclass;
6225 u32 self_curr_operclass;
6227 u32 peer_operclass_len;
6228 u8 peer_operclass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
6229 u32 is_peer_responder;
6230 u32 pref_offchan_num;
6231 u32 pref_offchan_bw;
6234 enum wmi_txbf_conf {
6235 WMI_TXBF_CONF_UNSUPPORTED,
6236 WMI_TXBF_CONF_BEFORE_ASSOC,
6237 WMI_TXBF_CONF_AFTER_ASSOC,
6240 #define WMI_CCA_DETECT_LEVEL_AUTO 0
6241 #define WMI_CCA_DETECT_MARGIN_AUTO 0
6243 struct wmi_pdev_set_adaptive_cca_params {
6245 __le32 cca_detect_level;
6246 __le32 cca_detect_margin;
6251 struct ath10k_fw_stats_pdev;
6252 struct ath10k_fw_stats_peer;
6253 struct ath10k_fw_stats;
6255 int ath10k_wmi_attach(struct ath10k *ar);
6256 void ath10k_wmi_detach(struct ath10k *ar);
6257 void ath10k_wmi_free_host_mem(struct ath10k *ar);
6258 int ath10k_wmi_wait_for_service_ready(struct ath10k *ar);
6259 int ath10k_wmi_wait_for_unified_ready(struct ath10k *ar);
6261 struct sk_buff *ath10k_wmi_alloc_skb(struct ath10k *ar, u32 len);
6262 int ath10k_wmi_connect(struct ath10k *ar);
6264 struct sk_buff *ath10k_wmi_alloc_skb(struct ath10k *ar, u32 len);
6265 int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id);
6266 int ath10k_wmi_cmd_send_nowait(struct ath10k *ar, struct sk_buff *skb,
6268 void ath10k_wmi_start_scan_init(struct ath10k *ar, struct wmi_start_scan_arg *);
6270 void ath10k_wmi_pull_pdev_stats_base(const struct wmi_pdev_stats_base *src,
6271 struct ath10k_fw_stats_pdev *dst);
6272 void ath10k_wmi_pull_pdev_stats_tx(const struct wmi_pdev_stats_tx *src,
6273 struct ath10k_fw_stats_pdev *dst);
6274 void ath10k_wmi_pull_pdev_stats_rx(const struct wmi_pdev_stats_rx *src,
6275 struct ath10k_fw_stats_pdev *dst);
6276 void ath10k_wmi_pull_pdev_stats_extra(const struct wmi_pdev_stats_extra *src,
6277 struct ath10k_fw_stats_pdev *dst);
6278 void ath10k_wmi_pull_peer_stats(const struct wmi_peer_stats *src,
6279 struct ath10k_fw_stats_peer *dst);
6280 void ath10k_wmi_put_host_mem_chunks(struct ath10k *ar,
6281 struct wmi_host_mem_chunks *chunks);
6282 void ath10k_wmi_put_start_scan_common(struct wmi_start_scan_common *cmn,
6283 const struct wmi_start_scan_arg *arg);
6284 void ath10k_wmi_set_wmm_param(struct wmi_wmm_params *params,
6285 const struct wmi_wmm_params_arg *arg);
6286 void ath10k_wmi_put_wmi_channel(struct wmi_channel *ch,
6287 const struct wmi_channel_arg *arg);
6288 int ath10k_wmi_start_scan_verify(const struct wmi_start_scan_arg *arg);
6290 int ath10k_wmi_event_scan(struct ath10k *ar, struct sk_buff *skb);
6291 int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb);
6292 void ath10k_wmi_event_chan_info(struct ath10k *ar, struct sk_buff *skb);
6293 void ath10k_wmi_event_echo(struct ath10k *ar, struct sk_buff *skb);
6294 int ath10k_wmi_event_debug_mesg(struct ath10k *ar, struct sk_buff *skb);
6295 void ath10k_wmi_event_update_stats(struct ath10k *ar, struct sk_buff *skb);
6296 void ath10k_wmi_event_vdev_start_resp(struct ath10k *ar, struct sk_buff *skb);
6297 void ath10k_wmi_event_vdev_stopped(struct ath10k *ar, struct sk_buff *skb);
6298 void ath10k_wmi_event_peer_sta_kickout(struct ath10k *ar, struct sk_buff *skb);
6299 void ath10k_wmi_event_host_swba(struct ath10k *ar, struct sk_buff *skb);
6300 void ath10k_wmi_event_tbttoffset_update(struct ath10k *ar, struct sk_buff *skb);
6301 void ath10k_wmi_event_dfs(struct ath10k *ar,
6302 struct wmi_phyerr_ev_arg *phyerr, u64 tsf);
6303 void ath10k_wmi_event_spectral_scan(struct ath10k *ar,
6304 struct wmi_phyerr_ev_arg *phyerr,
6306 void ath10k_wmi_event_phyerr(struct ath10k *ar, struct sk_buff *skb);
6307 void ath10k_wmi_event_roam(struct ath10k *ar, struct sk_buff *skb);
6308 void ath10k_wmi_event_profile_match(struct ath10k *ar, struct sk_buff *skb);
6309 void ath10k_wmi_event_debug_print(struct ath10k *ar, struct sk_buff *skb);
6310 void ath10k_wmi_event_pdev_qvit(struct ath10k *ar, struct sk_buff *skb);
6311 void ath10k_wmi_event_wlan_profile_data(struct ath10k *ar, struct sk_buff *skb);
6312 void ath10k_wmi_event_rtt_measurement_report(struct ath10k *ar,
6313 struct sk_buff *skb);
6314 void ath10k_wmi_event_tsf_measurement_report(struct ath10k *ar,
6315 struct sk_buff *skb);
6316 void ath10k_wmi_event_rtt_error_report(struct ath10k *ar, struct sk_buff *skb);
6317 void ath10k_wmi_event_wow_wakeup_host(struct ath10k *ar, struct sk_buff *skb);
6318 void ath10k_wmi_event_dcs_interference(struct ath10k *ar, struct sk_buff *skb);
6319 void ath10k_wmi_event_pdev_tpc_config(struct ath10k *ar, struct sk_buff *skb);
6320 void ath10k_wmi_event_pdev_ftm_intg(struct ath10k *ar, struct sk_buff *skb);
6321 void ath10k_wmi_event_gtk_offload_status(struct ath10k *ar,
6322 struct sk_buff *skb);
6323 void ath10k_wmi_event_gtk_rekey_fail(struct ath10k *ar, struct sk_buff *skb);
6324 void ath10k_wmi_event_delba_complete(struct ath10k *ar, struct sk_buff *skb);
6325 void ath10k_wmi_event_addba_complete(struct ath10k *ar, struct sk_buff *skb);
6326 void ath10k_wmi_event_vdev_install_key_complete(struct ath10k *ar,
6327 struct sk_buff *skb);
6328 void ath10k_wmi_event_inst_rssi_stats(struct ath10k *ar, struct sk_buff *skb);
6329 void ath10k_wmi_event_vdev_standby_req(struct ath10k *ar, struct sk_buff *skb);
6330 void ath10k_wmi_event_vdev_resume_req(struct ath10k *ar, struct sk_buff *skb);
6331 void ath10k_wmi_event_service_ready(struct ath10k *ar, struct sk_buff *skb);
6332 int ath10k_wmi_event_ready(struct ath10k *ar, struct sk_buff *skb);
6333 int ath10k_wmi_op_pull_phyerr_ev(struct ath10k *ar, const void *phyerr_buf,
6334 int left_len, struct wmi_phyerr_ev_arg *arg);
6335 void ath10k_wmi_main_op_fw_stats_fill(struct ath10k *ar,
6336 struct ath10k_fw_stats *fw_stats,
6338 void ath10k_wmi_10x_op_fw_stats_fill(struct ath10k *ar,
6339 struct ath10k_fw_stats *fw_stats,
6341 size_t ath10k_wmi_fw_stats_num_peers(struct list_head *head);
6342 size_t ath10k_wmi_fw_stats_num_vdevs(struct list_head *head);
6343 void ath10k_wmi_10_4_op_fw_stats_fill(struct ath10k *ar,
6344 struct ath10k_fw_stats *fw_stats,
6347 #endif /* _WMI_H_ */