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 WMI_SERVICE_BEACON_OFFLOAD = 0,
78 WMI_SERVICE_SCAN_OFFLOAD,
79 WMI_SERVICE_ROAM_OFFLOAD,
80 WMI_SERVICE_BCN_MISS_OFFLOAD,
81 WMI_SERVICE_STA_PWRSAVE,
82 WMI_SERVICE_STA_ADVANCED_PWRSAVE,
88 WMI_SERVICE_BCN_FILTER,
92 WMI_SERVICE_RATECTRL_CACHE,
93 WMI_SERVICE_IRAM_TIDS,
94 WMI_SERVICE_ARPNS_OFFLOAD,
96 WMI_SERVICE_GTK_OFFLOAD,
98 WMI_SERVICE_CSA_OFFLOAD,
100 WMI_SERVICE_COEX_FREQAVOID,
101 WMI_SERVICE_PACKET_POWER_SAVE,
102 WMI_SERVICE_FORCE_FW_HANG,
104 WMI_SERVICE_STA_DTIM_PS_MODULATED_DTIM,
105 WMI_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG,
106 WMI_SERVICE_STA_UAPSD_VAR_AUTO_TRIG,
107 WMI_SERVICE_STA_KEEP_ALIVE,
108 WMI_SERVICE_TX_ENCAP,
110 WMI_SERVICE_SMART_ANTENNA_SW_SUPPORT,
111 WMI_SERVICE_SMART_ANTENNA_HW_SUPPORT,
112 WMI_SERVICE_ROAM_SCAN_OFFLOAD,
113 WMI_SERVICE_AP_PS_DETECT_OUT_OF_SYNC,
114 WMI_SERVICE_EARLY_RX,
115 WMI_SERVICE_STA_SMPS,
117 WMI_SERVICE_STA_WMMAC,
119 WMI_SERVICE_MCC_BCN_INTERVAL_CHANGE,
120 WMI_SERVICE_ADAPTIVE_OCS,
121 WMI_SERVICE_BA_SSN_SUPPORT,
122 WMI_SERVICE_FILTER_IPSEC_NATKEEPALIVE,
124 WMI_SERVICE_LTE_ANT_SHARE_SUPPORT,
125 WMI_SERVICE_BATCH_SCAN,
128 WMI_SERVICE_THERMAL_MGMT,
130 WMI_SERVICE_MHF_OFFLOAD,
131 WMI_SERVICE_COEX_SAR,
132 WMI_SERVICE_BCN_TXRATE_OVERRIDE,
134 WMI_SERVICE_L1SS_STAT,
135 WMI_SERVICE_ESTIMATE_LINKSPEED,
136 WMI_SERVICE_OBSS_SCAN,
137 WMI_SERVICE_TDLS_OFFCHAN,
138 WMI_SERVICE_TDLS_UAPSD_BUFFER_STA,
139 WMI_SERVICE_TDLS_UAPSD_SLEEP_STA,
140 WMI_SERVICE_IBSS_PWRSAVE,
144 WMI_SERVICE_HSOFFLOAD,
145 WMI_SERVICE_ROAM_HO_OFFLOAD,
146 WMI_SERVICE_RX_FULL_REORDER,
147 WMI_SERVICE_DHCP_OFFLOAD,
148 WMI_SERVICE_STA_RX_IPA_OFFLOAD_SUPPORT,
149 WMI_SERVICE_MDNS_OFFLOAD,
150 WMI_SERVICE_SAP_AUTH_OFFLOAD,
156 enum wmi_10x_service {
157 WMI_10X_SERVICE_BEACON_OFFLOAD = 0,
158 WMI_10X_SERVICE_SCAN_OFFLOAD,
159 WMI_10X_SERVICE_ROAM_OFFLOAD,
160 WMI_10X_SERVICE_BCN_MISS_OFFLOAD,
161 WMI_10X_SERVICE_STA_PWRSAVE,
162 WMI_10X_SERVICE_STA_ADVANCED_PWRSAVE,
163 WMI_10X_SERVICE_AP_UAPSD,
164 WMI_10X_SERVICE_AP_DFS,
165 WMI_10X_SERVICE_11AC,
166 WMI_10X_SERVICE_BLOCKACK,
167 WMI_10X_SERVICE_PHYERR,
168 WMI_10X_SERVICE_BCN_FILTER,
170 WMI_10X_SERVICE_RATECTRL,
172 WMI_10X_SERVICE_RATECTRL_CACHE,
173 WMI_10X_SERVICE_IRAM_TIDS,
174 WMI_10X_SERVICE_BURST,
176 /* introduced in 10.2 */
177 WMI_10X_SERVICE_SMART_ANTENNA_SW_SUPPORT,
178 WMI_10X_SERVICE_FORCE_FW_HANG,
179 WMI_10X_SERVICE_SMART_ANTENNA_HW_SUPPORT,
182 enum wmi_main_service {
183 WMI_MAIN_SERVICE_BEACON_OFFLOAD = 0,
184 WMI_MAIN_SERVICE_SCAN_OFFLOAD,
185 WMI_MAIN_SERVICE_ROAM_OFFLOAD,
186 WMI_MAIN_SERVICE_BCN_MISS_OFFLOAD,
187 WMI_MAIN_SERVICE_STA_PWRSAVE,
188 WMI_MAIN_SERVICE_STA_ADVANCED_PWRSAVE,
189 WMI_MAIN_SERVICE_AP_UAPSD,
190 WMI_MAIN_SERVICE_AP_DFS,
191 WMI_MAIN_SERVICE_11AC,
192 WMI_MAIN_SERVICE_BLOCKACK,
193 WMI_MAIN_SERVICE_PHYERR,
194 WMI_MAIN_SERVICE_BCN_FILTER,
195 WMI_MAIN_SERVICE_RTT,
196 WMI_MAIN_SERVICE_RATECTRL,
197 WMI_MAIN_SERVICE_WOW,
198 WMI_MAIN_SERVICE_RATECTRL_CACHE,
199 WMI_MAIN_SERVICE_IRAM_TIDS,
200 WMI_MAIN_SERVICE_ARPNS_OFFLOAD,
201 WMI_MAIN_SERVICE_NLO,
202 WMI_MAIN_SERVICE_GTK_OFFLOAD,
203 WMI_MAIN_SERVICE_SCAN_SCH,
204 WMI_MAIN_SERVICE_CSA_OFFLOAD,
205 WMI_MAIN_SERVICE_CHATTER,
206 WMI_MAIN_SERVICE_COEX_FREQAVOID,
207 WMI_MAIN_SERVICE_PACKET_POWER_SAVE,
208 WMI_MAIN_SERVICE_FORCE_FW_HANG,
209 WMI_MAIN_SERVICE_GPIO,
210 WMI_MAIN_SERVICE_STA_DTIM_PS_MODULATED_DTIM,
211 WMI_MAIN_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG,
212 WMI_MAIN_SERVICE_STA_UAPSD_VAR_AUTO_TRIG,
213 WMI_MAIN_SERVICE_STA_KEEP_ALIVE,
214 WMI_MAIN_SERVICE_TX_ENCAP,
217 static inline char *wmi_service_name(int service_id)
219 #define SVCSTR(x) case x: return #x
221 switch (service_id) {
222 SVCSTR(WMI_SERVICE_BEACON_OFFLOAD);
223 SVCSTR(WMI_SERVICE_SCAN_OFFLOAD);
224 SVCSTR(WMI_SERVICE_ROAM_OFFLOAD);
225 SVCSTR(WMI_SERVICE_BCN_MISS_OFFLOAD);
226 SVCSTR(WMI_SERVICE_STA_PWRSAVE);
227 SVCSTR(WMI_SERVICE_STA_ADVANCED_PWRSAVE);
228 SVCSTR(WMI_SERVICE_AP_UAPSD);
229 SVCSTR(WMI_SERVICE_AP_DFS);
230 SVCSTR(WMI_SERVICE_11AC);
231 SVCSTR(WMI_SERVICE_BLOCKACK);
232 SVCSTR(WMI_SERVICE_PHYERR);
233 SVCSTR(WMI_SERVICE_BCN_FILTER);
234 SVCSTR(WMI_SERVICE_RTT);
235 SVCSTR(WMI_SERVICE_RATECTRL);
236 SVCSTR(WMI_SERVICE_WOW);
237 SVCSTR(WMI_SERVICE_RATECTRL_CACHE);
238 SVCSTR(WMI_SERVICE_IRAM_TIDS);
239 SVCSTR(WMI_SERVICE_ARPNS_OFFLOAD);
240 SVCSTR(WMI_SERVICE_NLO);
241 SVCSTR(WMI_SERVICE_GTK_OFFLOAD);
242 SVCSTR(WMI_SERVICE_SCAN_SCH);
243 SVCSTR(WMI_SERVICE_CSA_OFFLOAD);
244 SVCSTR(WMI_SERVICE_CHATTER);
245 SVCSTR(WMI_SERVICE_COEX_FREQAVOID);
246 SVCSTR(WMI_SERVICE_PACKET_POWER_SAVE);
247 SVCSTR(WMI_SERVICE_FORCE_FW_HANG);
248 SVCSTR(WMI_SERVICE_GPIO);
249 SVCSTR(WMI_SERVICE_STA_DTIM_PS_MODULATED_DTIM);
250 SVCSTR(WMI_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG);
251 SVCSTR(WMI_SERVICE_STA_UAPSD_VAR_AUTO_TRIG);
252 SVCSTR(WMI_SERVICE_STA_KEEP_ALIVE);
253 SVCSTR(WMI_SERVICE_TX_ENCAP);
254 SVCSTR(WMI_SERVICE_BURST);
255 SVCSTR(WMI_SERVICE_SMART_ANTENNA_SW_SUPPORT);
256 SVCSTR(WMI_SERVICE_SMART_ANTENNA_HW_SUPPORT);
257 SVCSTR(WMI_SERVICE_ROAM_SCAN_OFFLOAD);
258 SVCSTR(WMI_SERVICE_AP_PS_DETECT_OUT_OF_SYNC);
259 SVCSTR(WMI_SERVICE_EARLY_RX);
260 SVCSTR(WMI_SERVICE_STA_SMPS);
261 SVCSTR(WMI_SERVICE_FWTEST);
262 SVCSTR(WMI_SERVICE_STA_WMMAC);
263 SVCSTR(WMI_SERVICE_TDLS);
264 SVCSTR(WMI_SERVICE_MCC_BCN_INTERVAL_CHANGE);
265 SVCSTR(WMI_SERVICE_ADAPTIVE_OCS);
266 SVCSTR(WMI_SERVICE_BA_SSN_SUPPORT);
267 SVCSTR(WMI_SERVICE_FILTER_IPSEC_NATKEEPALIVE);
268 SVCSTR(WMI_SERVICE_WLAN_HB);
269 SVCSTR(WMI_SERVICE_LTE_ANT_SHARE_SUPPORT);
270 SVCSTR(WMI_SERVICE_BATCH_SCAN);
271 SVCSTR(WMI_SERVICE_QPOWER);
272 SVCSTR(WMI_SERVICE_PLMREQ);
273 SVCSTR(WMI_SERVICE_THERMAL_MGMT);
274 SVCSTR(WMI_SERVICE_RMC);
275 SVCSTR(WMI_SERVICE_MHF_OFFLOAD);
276 SVCSTR(WMI_SERVICE_COEX_SAR);
277 SVCSTR(WMI_SERVICE_BCN_TXRATE_OVERRIDE);
278 SVCSTR(WMI_SERVICE_NAN);
279 SVCSTR(WMI_SERVICE_L1SS_STAT);
280 SVCSTR(WMI_SERVICE_ESTIMATE_LINKSPEED);
281 SVCSTR(WMI_SERVICE_OBSS_SCAN);
282 SVCSTR(WMI_SERVICE_TDLS_OFFCHAN);
283 SVCSTR(WMI_SERVICE_TDLS_UAPSD_BUFFER_STA);
284 SVCSTR(WMI_SERVICE_TDLS_UAPSD_SLEEP_STA);
285 SVCSTR(WMI_SERVICE_IBSS_PWRSAVE);
286 SVCSTR(WMI_SERVICE_LPASS);
287 SVCSTR(WMI_SERVICE_EXTSCAN);
288 SVCSTR(WMI_SERVICE_D0WOW);
289 SVCSTR(WMI_SERVICE_HSOFFLOAD);
290 SVCSTR(WMI_SERVICE_ROAM_HO_OFFLOAD);
291 SVCSTR(WMI_SERVICE_RX_FULL_REORDER);
292 SVCSTR(WMI_SERVICE_DHCP_OFFLOAD);
293 SVCSTR(WMI_SERVICE_STA_RX_IPA_OFFLOAD_SUPPORT);
294 SVCSTR(WMI_SERVICE_MDNS_OFFLOAD);
295 SVCSTR(WMI_SERVICE_SAP_AUTH_OFFLOAD);
303 #define WMI_SERVICE_IS_ENABLED(wmi_svc_bmap, svc_id, len) \
304 ((svc_id) < (len) && \
305 __le32_to_cpu((wmi_svc_bmap)[(svc_id)/(sizeof(u32))]) & \
306 BIT((svc_id)%(sizeof(u32))))
308 #define SVCMAP(x, y, len) \
310 if (WMI_SERVICE_IS_ENABLED((in), (x), (len))) \
314 static inline void wmi_10x_svc_map(const __le32 *in, unsigned long *out,
317 SVCMAP(WMI_10X_SERVICE_BEACON_OFFLOAD,
318 WMI_SERVICE_BEACON_OFFLOAD, len);
319 SVCMAP(WMI_10X_SERVICE_SCAN_OFFLOAD,
320 WMI_SERVICE_SCAN_OFFLOAD, len);
321 SVCMAP(WMI_10X_SERVICE_ROAM_OFFLOAD,
322 WMI_SERVICE_ROAM_OFFLOAD, len);
323 SVCMAP(WMI_10X_SERVICE_BCN_MISS_OFFLOAD,
324 WMI_SERVICE_BCN_MISS_OFFLOAD, len);
325 SVCMAP(WMI_10X_SERVICE_STA_PWRSAVE,
326 WMI_SERVICE_STA_PWRSAVE, len);
327 SVCMAP(WMI_10X_SERVICE_STA_ADVANCED_PWRSAVE,
328 WMI_SERVICE_STA_ADVANCED_PWRSAVE, len);
329 SVCMAP(WMI_10X_SERVICE_AP_UAPSD,
330 WMI_SERVICE_AP_UAPSD, len);
331 SVCMAP(WMI_10X_SERVICE_AP_DFS,
332 WMI_SERVICE_AP_DFS, len);
333 SVCMAP(WMI_10X_SERVICE_11AC,
334 WMI_SERVICE_11AC, len);
335 SVCMAP(WMI_10X_SERVICE_BLOCKACK,
336 WMI_SERVICE_BLOCKACK, len);
337 SVCMAP(WMI_10X_SERVICE_PHYERR,
338 WMI_SERVICE_PHYERR, len);
339 SVCMAP(WMI_10X_SERVICE_BCN_FILTER,
340 WMI_SERVICE_BCN_FILTER, len);
341 SVCMAP(WMI_10X_SERVICE_RTT,
342 WMI_SERVICE_RTT, len);
343 SVCMAP(WMI_10X_SERVICE_RATECTRL,
344 WMI_SERVICE_RATECTRL, len);
345 SVCMAP(WMI_10X_SERVICE_WOW,
346 WMI_SERVICE_WOW, len);
347 SVCMAP(WMI_10X_SERVICE_RATECTRL_CACHE,
348 WMI_SERVICE_RATECTRL_CACHE, len);
349 SVCMAP(WMI_10X_SERVICE_IRAM_TIDS,
350 WMI_SERVICE_IRAM_TIDS, len);
351 SVCMAP(WMI_10X_SERVICE_BURST,
352 WMI_SERVICE_BURST, len);
353 SVCMAP(WMI_10X_SERVICE_SMART_ANTENNA_SW_SUPPORT,
354 WMI_SERVICE_SMART_ANTENNA_SW_SUPPORT, len);
355 SVCMAP(WMI_10X_SERVICE_FORCE_FW_HANG,
356 WMI_SERVICE_FORCE_FW_HANG, len);
357 SVCMAP(WMI_10X_SERVICE_SMART_ANTENNA_HW_SUPPORT,
358 WMI_SERVICE_SMART_ANTENNA_HW_SUPPORT, len);
361 static inline void wmi_main_svc_map(const __le32 *in, unsigned long *out,
364 SVCMAP(WMI_MAIN_SERVICE_BEACON_OFFLOAD,
365 WMI_SERVICE_BEACON_OFFLOAD, len);
366 SVCMAP(WMI_MAIN_SERVICE_SCAN_OFFLOAD,
367 WMI_SERVICE_SCAN_OFFLOAD, len);
368 SVCMAP(WMI_MAIN_SERVICE_ROAM_OFFLOAD,
369 WMI_SERVICE_ROAM_OFFLOAD, len);
370 SVCMAP(WMI_MAIN_SERVICE_BCN_MISS_OFFLOAD,
371 WMI_SERVICE_BCN_MISS_OFFLOAD, len);
372 SVCMAP(WMI_MAIN_SERVICE_STA_PWRSAVE,
373 WMI_SERVICE_STA_PWRSAVE, len);
374 SVCMAP(WMI_MAIN_SERVICE_STA_ADVANCED_PWRSAVE,
375 WMI_SERVICE_STA_ADVANCED_PWRSAVE, len);
376 SVCMAP(WMI_MAIN_SERVICE_AP_UAPSD,
377 WMI_SERVICE_AP_UAPSD, len);
378 SVCMAP(WMI_MAIN_SERVICE_AP_DFS,
379 WMI_SERVICE_AP_DFS, len);
380 SVCMAP(WMI_MAIN_SERVICE_11AC,
381 WMI_SERVICE_11AC, len);
382 SVCMAP(WMI_MAIN_SERVICE_BLOCKACK,
383 WMI_SERVICE_BLOCKACK, len);
384 SVCMAP(WMI_MAIN_SERVICE_PHYERR,
385 WMI_SERVICE_PHYERR, len);
386 SVCMAP(WMI_MAIN_SERVICE_BCN_FILTER,
387 WMI_SERVICE_BCN_FILTER, len);
388 SVCMAP(WMI_MAIN_SERVICE_RTT,
389 WMI_SERVICE_RTT, len);
390 SVCMAP(WMI_MAIN_SERVICE_RATECTRL,
391 WMI_SERVICE_RATECTRL, len);
392 SVCMAP(WMI_MAIN_SERVICE_WOW,
393 WMI_SERVICE_WOW, len);
394 SVCMAP(WMI_MAIN_SERVICE_RATECTRL_CACHE,
395 WMI_SERVICE_RATECTRL_CACHE, len);
396 SVCMAP(WMI_MAIN_SERVICE_IRAM_TIDS,
397 WMI_SERVICE_IRAM_TIDS, len);
398 SVCMAP(WMI_MAIN_SERVICE_ARPNS_OFFLOAD,
399 WMI_SERVICE_ARPNS_OFFLOAD, len);
400 SVCMAP(WMI_MAIN_SERVICE_NLO,
401 WMI_SERVICE_NLO, len);
402 SVCMAP(WMI_MAIN_SERVICE_GTK_OFFLOAD,
403 WMI_SERVICE_GTK_OFFLOAD, len);
404 SVCMAP(WMI_MAIN_SERVICE_SCAN_SCH,
405 WMI_SERVICE_SCAN_SCH, len);
406 SVCMAP(WMI_MAIN_SERVICE_CSA_OFFLOAD,
407 WMI_SERVICE_CSA_OFFLOAD, len);
408 SVCMAP(WMI_MAIN_SERVICE_CHATTER,
409 WMI_SERVICE_CHATTER, len);
410 SVCMAP(WMI_MAIN_SERVICE_COEX_FREQAVOID,
411 WMI_SERVICE_COEX_FREQAVOID, len);
412 SVCMAP(WMI_MAIN_SERVICE_PACKET_POWER_SAVE,
413 WMI_SERVICE_PACKET_POWER_SAVE, len);
414 SVCMAP(WMI_MAIN_SERVICE_FORCE_FW_HANG,
415 WMI_SERVICE_FORCE_FW_HANG, len);
416 SVCMAP(WMI_MAIN_SERVICE_GPIO,
417 WMI_SERVICE_GPIO, len);
418 SVCMAP(WMI_MAIN_SERVICE_STA_DTIM_PS_MODULATED_DTIM,
419 WMI_SERVICE_STA_DTIM_PS_MODULATED_DTIM, len);
420 SVCMAP(WMI_MAIN_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG,
421 WMI_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG, len);
422 SVCMAP(WMI_MAIN_SERVICE_STA_UAPSD_VAR_AUTO_TRIG,
423 WMI_SERVICE_STA_UAPSD_VAR_AUTO_TRIG, len);
424 SVCMAP(WMI_MAIN_SERVICE_STA_KEEP_ALIVE,
425 WMI_SERVICE_STA_KEEP_ALIVE, len);
426 SVCMAP(WMI_MAIN_SERVICE_TX_ENCAP,
427 WMI_SERVICE_TX_ENCAP, len);
432 /* 2 word representation of MAC addr */
433 struct wmi_mac_addr {
445 u32 start_scan_cmdid;
447 u32 scan_chan_list_cmdid;
448 u32 scan_sch_prio_tbl_cmdid;
449 u32 pdev_set_regdomain_cmdid;
450 u32 pdev_set_channel_cmdid;
451 u32 pdev_set_param_cmdid;
452 u32 pdev_pktlog_enable_cmdid;
453 u32 pdev_pktlog_disable_cmdid;
454 u32 pdev_set_wmm_params_cmdid;
455 u32 pdev_set_ht_cap_ie_cmdid;
456 u32 pdev_set_vht_cap_ie_cmdid;
457 u32 pdev_set_dscp_tid_map_cmdid;
458 u32 pdev_set_quiet_mode_cmdid;
459 u32 pdev_green_ap_ps_enable_cmdid;
460 u32 pdev_get_tpc_config_cmdid;
461 u32 pdev_set_base_macaddr_cmdid;
462 u32 vdev_create_cmdid;
463 u32 vdev_delete_cmdid;
464 u32 vdev_start_request_cmdid;
465 u32 vdev_restart_request_cmdid;
469 u32 vdev_set_param_cmdid;
470 u32 vdev_install_key_cmdid;
471 u32 peer_create_cmdid;
472 u32 peer_delete_cmdid;
473 u32 peer_flush_tids_cmdid;
474 u32 peer_set_param_cmdid;
475 u32 peer_assoc_cmdid;
476 u32 peer_add_wds_entry_cmdid;
477 u32 peer_remove_wds_entry_cmdid;
478 u32 peer_mcast_group_cmdid;
480 u32 pdev_send_bcn_cmdid;
482 u32 bcn_filter_rx_cmdid;
483 u32 prb_req_filter_rx_cmdid;
486 u32 addba_clear_resp_cmdid;
487 u32 addba_send_cmdid;
488 u32 addba_status_cmdid;
489 u32 delba_send_cmdid;
490 u32 addba_set_resp_cmdid;
491 u32 send_singleamsdu_cmdid;
492 u32 sta_powersave_mode_cmdid;
493 u32 sta_powersave_param_cmdid;
494 u32 sta_mimo_ps_mode_cmdid;
495 u32 pdev_dfs_enable_cmdid;
496 u32 pdev_dfs_disable_cmdid;
498 u32 roam_scan_rssi_threshold;
499 u32 roam_scan_period;
500 u32 roam_scan_rssi_change_threshold;
502 u32 ofl_scan_add_ap_profile;
503 u32 ofl_scan_remove_ap_profile;
505 u32 p2p_dev_set_device_info;
506 u32 p2p_dev_set_discoverability;
507 u32 p2p_go_set_beacon_ie;
508 u32 p2p_go_set_probe_resp_ie;
509 u32 p2p_set_vendor_ie_data_cmdid;
510 u32 ap_ps_peer_param_cmdid;
511 u32 ap_ps_peer_uapsd_coex_cmdid;
512 u32 peer_rate_retry_sched_cmdid;
513 u32 wlan_profile_trigger_cmdid;
514 u32 wlan_profile_set_hist_intvl_cmdid;
515 u32 wlan_profile_get_profile_data_cmdid;
516 u32 wlan_profile_enable_profile_id_cmdid;
517 u32 wlan_profile_list_profile_id_cmdid;
518 u32 pdev_suspend_cmdid;
519 u32 pdev_resume_cmdid;
520 u32 add_bcn_filter_cmdid;
521 u32 rmv_bcn_filter_cmdid;
522 u32 wow_add_wake_pattern_cmdid;
523 u32 wow_del_wake_pattern_cmdid;
524 u32 wow_enable_disable_wake_event_cmdid;
525 u32 wow_enable_cmdid;
526 u32 wow_hostwakeup_from_sleep_cmdid;
527 u32 rtt_measreq_cmdid;
529 u32 vdev_spectral_scan_configure_cmdid;
530 u32 vdev_spectral_scan_enable_cmdid;
531 u32 request_stats_cmdid;
532 u32 set_arp_ns_offload_cmdid;
533 u32 network_list_offload_config_cmdid;
534 u32 gtk_offload_cmdid;
535 u32 csa_offload_enable_cmdid;
536 u32 csa_offload_chanswitch_cmdid;
537 u32 chatter_set_mode_cmdid;
538 u32 peer_tid_addba_cmdid;
539 u32 peer_tid_delba_cmdid;
540 u32 sta_dtim_ps_method_cmdid;
541 u32 sta_uapsd_auto_trig_cmdid;
542 u32 sta_keepalive_cmd;
545 u32 dbglog_cfg_cmdid;
547 u32 pdev_ftm_intg_cmdid;
548 u32 vdev_set_keepalive_cmdid;
549 u32 vdev_get_keepalive_cmdid;
550 u32 force_fw_hang_cmdid;
551 u32 gpio_config_cmdid;
552 u32 gpio_output_cmdid;
553 u32 pdev_get_temperature_cmdid;
554 u32 vdev_set_wmm_params_cmdid;
555 u32 tdls_set_state_cmdid;
556 u32 tdls_peer_update_cmdid;
560 * wmi command groups.
563 /* 0 to 2 are reserved */
565 WMI_GRP_SCAN = WMI_GRP_START,
595 #define WMI_CMD_GRP(grp_id) (((grp_id) << 12) | 0x1)
596 #define WMI_EVT_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
598 #define WMI_CMD_UNSUPPORTED 0
600 /* Command IDs and command events for MAIN FW. */
602 WMI_INIT_CMDID = 0x1,
604 /* Scan specific commands */
605 WMI_START_SCAN_CMDID = WMI_CMD_GRP(WMI_GRP_SCAN),
607 WMI_SCAN_CHAN_LIST_CMDID,
608 WMI_SCAN_SCH_PRIO_TBL_CMDID,
610 /* PDEV (physical device) specific commands */
611 WMI_PDEV_SET_REGDOMAIN_CMDID = WMI_CMD_GRP(WMI_GRP_PDEV),
612 WMI_PDEV_SET_CHANNEL_CMDID,
613 WMI_PDEV_SET_PARAM_CMDID,
614 WMI_PDEV_PKTLOG_ENABLE_CMDID,
615 WMI_PDEV_PKTLOG_DISABLE_CMDID,
616 WMI_PDEV_SET_WMM_PARAMS_CMDID,
617 WMI_PDEV_SET_HT_CAP_IE_CMDID,
618 WMI_PDEV_SET_VHT_CAP_IE_CMDID,
619 WMI_PDEV_SET_DSCP_TID_MAP_CMDID,
620 WMI_PDEV_SET_QUIET_MODE_CMDID,
621 WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID,
622 WMI_PDEV_GET_TPC_CONFIG_CMDID,
623 WMI_PDEV_SET_BASE_MACADDR_CMDID,
625 /* VDEV (virtual device) specific commands */
626 WMI_VDEV_CREATE_CMDID = WMI_CMD_GRP(WMI_GRP_VDEV),
627 WMI_VDEV_DELETE_CMDID,
628 WMI_VDEV_START_REQUEST_CMDID,
629 WMI_VDEV_RESTART_REQUEST_CMDID,
633 WMI_VDEV_SET_PARAM_CMDID,
634 WMI_VDEV_INSTALL_KEY_CMDID,
636 /* peer specific commands */
637 WMI_PEER_CREATE_CMDID = WMI_CMD_GRP(WMI_GRP_PEER),
638 WMI_PEER_DELETE_CMDID,
639 WMI_PEER_FLUSH_TIDS_CMDID,
640 WMI_PEER_SET_PARAM_CMDID,
641 WMI_PEER_ASSOC_CMDID,
642 WMI_PEER_ADD_WDS_ENTRY_CMDID,
643 WMI_PEER_REMOVE_WDS_ENTRY_CMDID,
644 WMI_PEER_MCAST_GROUP_CMDID,
646 /* beacon/management specific commands */
647 WMI_BCN_TX_CMDID = WMI_CMD_GRP(WMI_GRP_MGMT),
648 WMI_PDEV_SEND_BCN_CMDID,
650 WMI_BCN_FILTER_RX_CMDID,
651 WMI_PRB_REQ_FILTER_RX_CMDID,
655 /* commands to directly control BA negotiation directly from host. */
656 WMI_ADDBA_CLEAR_RESP_CMDID = WMI_CMD_GRP(WMI_GRP_BA_NEG),
657 WMI_ADDBA_SEND_CMDID,
658 WMI_ADDBA_STATUS_CMDID,
659 WMI_DELBA_SEND_CMDID,
660 WMI_ADDBA_SET_RESP_CMDID,
661 WMI_SEND_SINGLEAMSDU_CMDID,
663 /* Station power save specific config */
664 WMI_STA_POWERSAVE_MODE_CMDID = WMI_CMD_GRP(WMI_GRP_STA_PS),
665 WMI_STA_POWERSAVE_PARAM_CMDID,
666 WMI_STA_MIMO_PS_MODE_CMDID,
668 /** DFS-specific commands */
669 WMI_PDEV_DFS_ENABLE_CMDID = WMI_CMD_GRP(WMI_GRP_DFS),
670 WMI_PDEV_DFS_DISABLE_CMDID,
672 /* Roaming specific commands */
673 WMI_ROAM_SCAN_MODE = WMI_CMD_GRP(WMI_GRP_ROAM),
674 WMI_ROAM_SCAN_RSSI_THRESHOLD,
675 WMI_ROAM_SCAN_PERIOD,
676 WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
679 /* offload scan specific commands */
680 WMI_OFL_SCAN_ADD_AP_PROFILE = WMI_CMD_GRP(WMI_GRP_OFL_SCAN),
681 WMI_OFL_SCAN_REMOVE_AP_PROFILE,
684 /* P2P specific commands */
685 WMI_P2P_DEV_SET_DEVICE_INFO = WMI_CMD_GRP(WMI_GRP_P2P),
686 WMI_P2P_DEV_SET_DISCOVERABILITY,
687 WMI_P2P_GO_SET_BEACON_IE,
688 WMI_P2P_GO_SET_PROBE_RESP_IE,
689 WMI_P2P_SET_VENDOR_IE_DATA_CMDID,
691 /* AP power save specific config */
692 WMI_AP_PS_PEER_PARAM_CMDID = WMI_CMD_GRP(WMI_GRP_AP_PS),
693 WMI_AP_PS_PEER_UAPSD_COEX_CMDID,
695 /* Rate-control specific commands */
696 WMI_PEER_RATE_RETRY_SCHED_CMDID =
697 WMI_CMD_GRP(WMI_GRP_RATE_CTRL),
699 /* WLAN Profiling commands. */
700 WMI_WLAN_PROFILE_TRIGGER_CMDID = WMI_CMD_GRP(WMI_GRP_PROFILE),
701 WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
702 WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
703 WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
704 WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
706 /* Suspend resume command Ids */
707 WMI_PDEV_SUSPEND_CMDID = WMI_CMD_GRP(WMI_GRP_SUSPEND),
708 WMI_PDEV_RESUME_CMDID,
710 /* Beacon filter commands */
711 WMI_ADD_BCN_FILTER_CMDID = WMI_CMD_GRP(WMI_GRP_BCN_FILTER),
712 WMI_RMV_BCN_FILTER_CMDID,
714 /* WOW Specific WMI commands*/
715 WMI_WOW_ADD_WAKE_PATTERN_CMDID = WMI_CMD_GRP(WMI_GRP_WOW),
716 WMI_WOW_DEL_WAKE_PATTERN_CMDID,
717 WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
718 WMI_WOW_ENABLE_CMDID,
719 WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
721 /* RTT measurement related cmd */
722 WMI_RTT_MEASREQ_CMDID = WMI_CMD_GRP(WMI_GRP_RTT),
725 /* spectral scan commands */
726 WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID = WMI_CMD_GRP(WMI_GRP_SPECTRAL),
727 WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
730 WMI_REQUEST_STATS_CMDID = WMI_CMD_GRP(WMI_GRP_STATS),
732 /* ARP OFFLOAD REQUEST*/
733 WMI_SET_ARP_NS_OFFLOAD_CMDID = WMI_CMD_GRP(WMI_GRP_ARP_NS_OFL),
735 /* NS offload confid*/
736 WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID = WMI_CMD_GRP(WMI_GRP_NLO_OFL),
738 /* GTK offload Specific WMI commands*/
739 WMI_GTK_OFFLOAD_CMDID = WMI_CMD_GRP(WMI_GRP_GTK_OFL),
741 /* CSA offload Specific WMI commands*/
742 WMI_CSA_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP(WMI_GRP_CSA_OFL),
743 WMI_CSA_OFFLOAD_CHANSWITCH_CMDID,
745 /* Chatter commands*/
746 WMI_CHATTER_SET_MODE_CMDID = WMI_CMD_GRP(WMI_GRP_CHATTER),
748 /* addba specific commands */
749 WMI_PEER_TID_ADDBA_CMDID = WMI_CMD_GRP(WMI_GRP_TID_ADDBA),
750 WMI_PEER_TID_DELBA_CMDID,
752 /* set station mimo powersave method */
753 WMI_STA_DTIM_PS_METHOD_CMDID,
754 /* Configure the Station UAPSD AC Auto Trigger Parameters */
755 WMI_STA_UAPSD_AUTO_TRIG_CMDID,
757 /* STA Keep alive parameter configuration,
758 Requires WMI_SERVICE_STA_KEEP_ALIVE */
759 WMI_STA_KEEPALIVE_CMD,
761 /* misc command group */
762 WMI_ECHO_CMDID = WMI_CMD_GRP(WMI_GRP_MISC),
764 WMI_DBGLOG_CFG_CMDID,
766 WMI_PDEV_FTM_INTG_CMDID,
767 WMI_VDEV_SET_KEEPALIVE_CMDID,
768 WMI_VDEV_GET_KEEPALIVE_CMDID,
769 WMI_FORCE_FW_HANG_CMDID,
771 /* GPIO Configuration */
772 WMI_GPIO_CONFIG_CMDID = WMI_CMD_GRP(WMI_GRP_GPIO),
773 WMI_GPIO_OUTPUT_CMDID,
777 WMI_SERVICE_READY_EVENTID = 0x1,
780 /* Scan specific events */
781 WMI_SCAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SCAN),
783 /* PDEV specific events */
784 WMI_PDEV_TPC_CONFIG_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PDEV),
785 WMI_CHAN_INFO_EVENTID,
788 /* VDEV specific events */
789 WMI_VDEV_START_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_VDEV),
790 WMI_VDEV_STOPPED_EVENTID,
791 WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID,
793 /* peer specific events */
794 WMI_PEER_STA_KICKOUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PEER),
796 /* beacon/mgmt specific events */
797 WMI_MGMT_RX_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MGMT),
798 WMI_HOST_SWBA_EVENTID,
799 WMI_TBTTOFFSET_UPDATE_EVENTID,
801 /* ADDBA Related WMI Events*/
802 WMI_TX_DELBA_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BA_NEG),
803 WMI_TX_ADDBA_COMPLETE_EVENTID,
805 /* Roam event to trigger roaming on host */
806 WMI_ROAM_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ROAM),
810 WMI_WOW_WAKEUP_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_WOW),
813 WMI_RTT_MEASUREMENT_REPORT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RTT),
814 WMI_TSF_MEASUREMENT_REPORT_EVENTID,
815 WMI_RTT_ERROR_REPORT_EVENTID,
818 WMI_GTK_OFFLOAD_STATUS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GTK_OFL),
819 WMI_GTK_REKEY_FAIL_EVENTID,
821 /* CSA IE received event */
822 WMI_CSA_HANDLING_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_CSA_OFL),
825 WMI_ECHO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MISC),
826 WMI_PDEV_UTF_EVENTID,
827 WMI_DEBUG_MESG_EVENTID,
828 WMI_UPDATE_STATS_EVENTID,
829 WMI_DEBUG_PRINT_EVENTID,
830 WMI_DCS_INTERFERENCE_EVENTID,
831 WMI_PDEV_QVIT_EVENTID,
832 WMI_WLAN_PROFILE_DATA_EVENTID,
833 WMI_PDEV_FTM_INTG_EVENTID,
834 WMI_WLAN_FREQ_AVOID_EVENTID,
835 WMI_VDEV_GET_KEEPALIVE_EVENTID,
838 WMI_GPIO_INPUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GPIO),
841 /* Command IDs and command events for 10.X firmware */
842 enum wmi_10x_cmd_id {
843 WMI_10X_START_CMDID = 0x9000,
844 WMI_10X_END_CMDID = 0x9FFF,
846 /* initialize the wlan sub system */
849 /* Scan specific commands */
851 WMI_10X_START_SCAN_CMDID = WMI_10X_START_CMDID,
852 WMI_10X_STOP_SCAN_CMDID,
853 WMI_10X_SCAN_CHAN_LIST_CMDID,
856 /* PDEV(physical device) specific commands */
857 WMI_10X_PDEV_SET_REGDOMAIN_CMDID,
858 WMI_10X_PDEV_SET_CHANNEL_CMDID,
859 WMI_10X_PDEV_SET_PARAM_CMDID,
860 WMI_10X_PDEV_PKTLOG_ENABLE_CMDID,
861 WMI_10X_PDEV_PKTLOG_DISABLE_CMDID,
862 WMI_10X_PDEV_SET_WMM_PARAMS_CMDID,
863 WMI_10X_PDEV_SET_HT_CAP_IE_CMDID,
864 WMI_10X_PDEV_SET_VHT_CAP_IE_CMDID,
865 WMI_10X_PDEV_SET_BASE_MACADDR_CMDID,
866 WMI_10X_PDEV_SET_DSCP_TID_MAP_CMDID,
867 WMI_10X_PDEV_SET_QUIET_MODE_CMDID,
868 WMI_10X_PDEV_GREEN_AP_PS_ENABLE_CMDID,
869 WMI_10X_PDEV_GET_TPC_CONFIG_CMDID,
871 /* VDEV(virtual device) specific commands */
872 WMI_10X_VDEV_CREATE_CMDID,
873 WMI_10X_VDEV_DELETE_CMDID,
874 WMI_10X_VDEV_START_REQUEST_CMDID,
875 WMI_10X_VDEV_RESTART_REQUEST_CMDID,
876 WMI_10X_VDEV_UP_CMDID,
877 WMI_10X_VDEV_STOP_CMDID,
878 WMI_10X_VDEV_DOWN_CMDID,
879 WMI_10X_VDEV_STANDBY_RESPONSE_CMDID,
880 WMI_10X_VDEV_RESUME_RESPONSE_CMDID,
881 WMI_10X_VDEV_SET_PARAM_CMDID,
882 WMI_10X_VDEV_INSTALL_KEY_CMDID,
884 /* peer specific commands */
885 WMI_10X_PEER_CREATE_CMDID,
886 WMI_10X_PEER_DELETE_CMDID,
887 WMI_10X_PEER_FLUSH_TIDS_CMDID,
888 WMI_10X_PEER_SET_PARAM_CMDID,
889 WMI_10X_PEER_ASSOC_CMDID,
890 WMI_10X_PEER_ADD_WDS_ENTRY_CMDID,
891 WMI_10X_PEER_REMOVE_WDS_ENTRY_CMDID,
892 WMI_10X_PEER_MCAST_GROUP_CMDID,
894 /* beacon/management specific commands */
896 WMI_10X_BCN_TX_CMDID,
897 WMI_10X_BCN_PRB_TMPL_CMDID,
898 WMI_10X_BCN_FILTER_RX_CMDID,
899 WMI_10X_PRB_REQ_FILTER_RX_CMDID,
900 WMI_10X_MGMT_TX_CMDID,
902 /* commands to directly control ba negotiation directly from host. */
903 WMI_10X_ADDBA_CLEAR_RESP_CMDID,
904 WMI_10X_ADDBA_SEND_CMDID,
905 WMI_10X_ADDBA_STATUS_CMDID,
906 WMI_10X_DELBA_SEND_CMDID,
907 WMI_10X_ADDBA_SET_RESP_CMDID,
908 WMI_10X_SEND_SINGLEAMSDU_CMDID,
910 /* Station power save specific config */
911 WMI_10X_STA_POWERSAVE_MODE_CMDID,
912 WMI_10X_STA_POWERSAVE_PARAM_CMDID,
913 WMI_10X_STA_MIMO_PS_MODE_CMDID,
915 /* set debug log config */
916 WMI_10X_DBGLOG_CFG_CMDID,
918 /* DFS-specific commands */
919 WMI_10X_PDEV_DFS_ENABLE_CMDID,
920 WMI_10X_PDEV_DFS_DISABLE_CMDID,
922 /* QVIT specific command id */
923 WMI_10X_PDEV_QVIT_CMDID,
925 /* Offload Scan and Roaming related commands */
926 WMI_10X_ROAM_SCAN_MODE,
927 WMI_10X_ROAM_SCAN_RSSI_THRESHOLD,
928 WMI_10X_ROAM_SCAN_PERIOD,
929 WMI_10X_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
930 WMI_10X_ROAM_AP_PROFILE,
931 WMI_10X_OFL_SCAN_ADD_AP_PROFILE,
932 WMI_10X_OFL_SCAN_REMOVE_AP_PROFILE,
933 WMI_10X_OFL_SCAN_PERIOD,
935 /* P2P specific commands */
936 WMI_10X_P2P_DEV_SET_DEVICE_INFO,
937 WMI_10X_P2P_DEV_SET_DISCOVERABILITY,
938 WMI_10X_P2P_GO_SET_BEACON_IE,
939 WMI_10X_P2P_GO_SET_PROBE_RESP_IE,
941 /* AP power save specific config */
942 WMI_10X_AP_PS_PEER_PARAM_CMDID,
943 WMI_10X_AP_PS_PEER_UAPSD_COEX_CMDID,
945 /* Rate-control specific commands */
946 WMI_10X_PEER_RATE_RETRY_SCHED_CMDID,
948 /* WLAN Profiling commands. */
949 WMI_10X_WLAN_PROFILE_TRIGGER_CMDID,
950 WMI_10X_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
951 WMI_10X_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
952 WMI_10X_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
953 WMI_10X_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
955 /* Suspend resume command Ids */
956 WMI_10X_PDEV_SUSPEND_CMDID,
957 WMI_10X_PDEV_RESUME_CMDID,
959 /* Beacon filter commands */
960 WMI_10X_ADD_BCN_FILTER_CMDID,
961 WMI_10X_RMV_BCN_FILTER_CMDID,
963 /* WOW Specific WMI commands*/
964 WMI_10X_WOW_ADD_WAKE_PATTERN_CMDID,
965 WMI_10X_WOW_DEL_WAKE_PATTERN_CMDID,
966 WMI_10X_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
967 WMI_10X_WOW_ENABLE_CMDID,
968 WMI_10X_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
970 /* RTT measurement related cmd */
971 WMI_10X_RTT_MEASREQ_CMDID,
972 WMI_10X_RTT_TSF_CMDID,
974 /* transmit beacon by value */
975 WMI_10X_PDEV_SEND_BCN_CMDID,
978 WMI_10X_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID,
979 WMI_10X_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
980 WMI_10X_REQUEST_STATS_CMDID,
982 /* GPIO Configuration */
983 WMI_10X_GPIO_CONFIG_CMDID,
984 WMI_10X_GPIO_OUTPUT_CMDID,
986 WMI_10X_PDEV_UTF_CMDID = WMI_10X_END_CMDID - 1,
989 enum wmi_10x_event_id {
990 WMI_10X_SERVICE_READY_EVENTID = 0x8000,
991 WMI_10X_READY_EVENTID,
992 WMI_10X_START_EVENTID = 0x9000,
993 WMI_10X_END_EVENTID = 0x9FFF,
995 /* Scan specific events */
996 WMI_10X_SCAN_EVENTID = WMI_10X_START_EVENTID,
997 WMI_10X_ECHO_EVENTID,
998 WMI_10X_DEBUG_MESG_EVENTID,
999 WMI_10X_UPDATE_STATS_EVENTID,
1001 /* Instantaneous RSSI event */
1002 WMI_10X_INST_RSSI_STATS_EVENTID,
1004 /* VDEV specific events */
1005 WMI_10X_VDEV_START_RESP_EVENTID,
1006 WMI_10X_VDEV_STANDBY_REQ_EVENTID,
1007 WMI_10X_VDEV_RESUME_REQ_EVENTID,
1008 WMI_10X_VDEV_STOPPED_EVENTID,
1010 /* peer specific events */
1011 WMI_10X_PEER_STA_KICKOUT_EVENTID,
1013 /* beacon/mgmt specific events */
1014 WMI_10X_HOST_SWBA_EVENTID,
1015 WMI_10X_TBTTOFFSET_UPDATE_EVENTID,
1016 WMI_10X_MGMT_RX_EVENTID,
1018 /* Channel stats event */
1019 WMI_10X_CHAN_INFO_EVENTID,
1021 /* PHY Error specific WMI event */
1022 WMI_10X_PHYERR_EVENTID,
1024 /* Roam event to trigger roaming on host */
1025 WMI_10X_ROAM_EVENTID,
1027 /* matching AP found from list of profiles */
1028 WMI_10X_PROFILE_MATCH,
1030 /* debug print message used for tracing FW code while debugging */
1031 WMI_10X_DEBUG_PRINT_EVENTID,
1032 /* VI spoecific event */
1033 WMI_10X_PDEV_QVIT_EVENTID,
1034 /* FW code profile data in response to profile request */
1035 WMI_10X_WLAN_PROFILE_DATA_EVENTID,
1037 /*RTT related event ID*/
1038 WMI_10X_RTT_MEASUREMENT_REPORT_EVENTID,
1039 WMI_10X_TSF_MEASUREMENT_REPORT_EVENTID,
1040 WMI_10X_RTT_ERROR_REPORT_EVENTID,
1042 WMI_10X_WOW_WAKEUP_HOST_EVENTID,
1043 WMI_10X_DCS_INTERFERENCE_EVENTID,
1045 /* TPC config for the current operating channel */
1046 WMI_10X_PDEV_TPC_CONFIG_EVENTID,
1048 WMI_10X_GPIO_INPUT_EVENTID,
1049 WMI_10X_PDEV_UTF_EVENTID = WMI_10X_END_EVENTID-1,
1052 enum wmi_10_2_cmd_id {
1053 WMI_10_2_START_CMDID = 0x9000,
1054 WMI_10_2_END_CMDID = 0x9FFF,
1055 WMI_10_2_INIT_CMDID,
1056 WMI_10_2_START_SCAN_CMDID = WMI_10_2_START_CMDID,
1057 WMI_10_2_STOP_SCAN_CMDID,
1058 WMI_10_2_SCAN_CHAN_LIST_CMDID,
1059 WMI_10_2_ECHO_CMDID,
1060 WMI_10_2_PDEV_SET_REGDOMAIN_CMDID,
1061 WMI_10_2_PDEV_SET_CHANNEL_CMDID,
1062 WMI_10_2_PDEV_SET_PARAM_CMDID,
1063 WMI_10_2_PDEV_PKTLOG_ENABLE_CMDID,
1064 WMI_10_2_PDEV_PKTLOG_DISABLE_CMDID,
1065 WMI_10_2_PDEV_SET_WMM_PARAMS_CMDID,
1066 WMI_10_2_PDEV_SET_HT_CAP_IE_CMDID,
1067 WMI_10_2_PDEV_SET_VHT_CAP_IE_CMDID,
1068 WMI_10_2_PDEV_SET_BASE_MACADDR_CMDID,
1069 WMI_10_2_PDEV_SET_QUIET_MODE_CMDID,
1070 WMI_10_2_PDEV_GREEN_AP_PS_ENABLE_CMDID,
1071 WMI_10_2_PDEV_GET_TPC_CONFIG_CMDID,
1072 WMI_10_2_VDEV_CREATE_CMDID,
1073 WMI_10_2_VDEV_DELETE_CMDID,
1074 WMI_10_2_VDEV_START_REQUEST_CMDID,
1075 WMI_10_2_VDEV_RESTART_REQUEST_CMDID,
1076 WMI_10_2_VDEV_UP_CMDID,
1077 WMI_10_2_VDEV_STOP_CMDID,
1078 WMI_10_2_VDEV_DOWN_CMDID,
1079 WMI_10_2_VDEV_STANDBY_RESPONSE_CMDID,
1080 WMI_10_2_VDEV_RESUME_RESPONSE_CMDID,
1081 WMI_10_2_VDEV_SET_PARAM_CMDID,
1082 WMI_10_2_VDEV_INSTALL_KEY_CMDID,
1083 WMI_10_2_VDEV_SET_DSCP_TID_MAP_CMDID,
1084 WMI_10_2_PEER_CREATE_CMDID,
1085 WMI_10_2_PEER_DELETE_CMDID,
1086 WMI_10_2_PEER_FLUSH_TIDS_CMDID,
1087 WMI_10_2_PEER_SET_PARAM_CMDID,
1088 WMI_10_2_PEER_ASSOC_CMDID,
1089 WMI_10_2_PEER_ADD_WDS_ENTRY_CMDID,
1090 WMI_10_2_PEER_UPDATE_WDS_ENTRY_CMDID,
1091 WMI_10_2_PEER_REMOVE_WDS_ENTRY_CMDID,
1092 WMI_10_2_PEER_MCAST_GROUP_CMDID,
1093 WMI_10_2_BCN_TX_CMDID,
1094 WMI_10_2_BCN_PRB_TMPL_CMDID,
1095 WMI_10_2_BCN_FILTER_RX_CMDID,
1096 WMI_10_2_PRB_REQ_FILTER_RX_CMDID,
1097 WMI_10_2_MGMT_TX_CMDID,
1098 WMI_10_2_ADDBA_CLEAR_RESP_CMDID,
1099 WMI_10_2_ADDBA_SEND_CMDID,
1100 WMI_10_2_ADDBA_STATUS_CMDID,
1101 WMI_10_2_DELBA_SEND_CMDID,
1102 WMI_10_2_ADDBA_SET_RESP_CMDID,
1103 WMI_10_2_SEND_SINGLEAMSDU_CMDID,
1104 WMI_10_2_STA_POWERSAVE_MODE_CMDID,
1105 WMI_10_2_STA_POWERSAVE_PARAM_CMDID,
1106 WMI_10_2_STA_MIMO_PS_MODE_CMDID,
1107 WMI_10_2_DBGLOG_CFG_CMDID,
1108 WMI_10_2_PDEV_DFS_ENABLE_CMDID,
1109 WMI_10_2_PDEV_DFS_DISABLE_CMDID,
1110 WMI_10_2_PDEV_QVIT_CMDID,
1111 WMI_10_2_ROAM_SCAN_MODE,
1112 WMI_10_2_ROAM_SCAN_RSSI_THRESHOLD,
1113 WMI_10_2_ROAM_SCAN_PERIOD,
1114 WMI_10_2_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
1115 WMI_10_2_ROAM_AP_PROFILE,
1116 WMI_10_2_OFL_SCAN_ADD_AP_PROFILE,
1117 WMI_10_2_OFL_SCAN_REMOVE_AP_PROFILE,
1118 WMI_10_2_OFL_SCAN_PERIOD,
1119 WMI_10_2_P2P_DEV_SET_DEVICE_INFO,
1120 WMI_10_2_P2P_DEV_SET_DISCOVERABILITY,
1121 WMI_10_2_P2P_GO_SET_BEACON_IE,
1122 WMI_10_2_P2P_GO_SET_PROBE_RESP_IE,
1123 WMI_10_2_AP_PS_PEER_PARAM_CMDID,
1124 WMI_10_2_AP_PS_PEER_UAPSD_COEX_CMDID,
1125 WMI_10_2_PEER_RATE_RETRY_SCHED_CMDID,
1126 WMI_10_2_WLAN_PROFILE_TRIGGER_CMDID,
1127 WMI_10_2_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
1128 WMI_10_2_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
1129 WMI_10_2_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
1130 WMI_10_2_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
1131 WMI_10_2_PDEV_SUSPEND_CMDID,
1132 WMI_10_2_PDEV_RESUME_CMDID,
1133 WMI_10_2_ADD_BCN_FILTER_CMDID,
1134 WMI_10_2_RMV_BCN_FILTER_CMDID,
1135 WMI_10_2_WOW_ADD_WAKE_PATTERN_CMDID,
1136 WMI_10_2_WOW_DEL_WAKE_PATTERN_CMDID,
1137 WMI_10_2_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
1138 WMI_10_2_WOW_ENABLE_CMDID,
1139 WMI_10_2_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
1140 WMI_10_2_RTT_MEASREQ_CMDID,
1141 WMI_10_2_RTT_TSF_CMDID,
1142 WMI_10_2_RTT_KEEPALIVE_CMDID,
1143 WMI_10_2_PDEV_SEND_BCN_CMDID,
1144 WMI_10_2_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID,
1145 WMI_10_2_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
1146 WMI_10_2_REQUEST_STATS_CMDID,
1147 WMI_10_2_GPIO_CONFIG_CMDID,
1148 WMI_10_2_GPIO_OUTPUT_CMDID,
1149 WMI_10_2_VDEV_RATEMASK_CMDID,
1150 WMI_10_2_PDEV_SMART_ANT_ENABLE_CMDID,
1151 WMI_10_2_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID,
1152 WMI_10_2_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID,
1153 WMI_10_2_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID,
1154 WMI_10_2_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID,
1155 WMI_10_2_FORCE_FW_HANG_CMDID,
1156 WMI_10_2_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID,
1157 WMI_10_2_PDEV_SET_CTL_TABLE_CMDID,
1158 WMI_10_2_PDEV_SET_MIMOGAIN_TABLE_CMDID,
1159 WMI_10_2_PDEV_RATEPWR_TABLE_CMDID,
1160 WMI_10_2_PDEV_RATEPWR_CHAINMSK_TABLE_CMDID,
1161 WMI_10_2_PDEV_GET_INFO,
1162 WMI_10_2_VDEV_GET_INFO,
1163 WMI_10_2_VDEV_ATF_REQUEST_CMDID,
1164 WMI_10_2_PEER_ATF_REQUEST_CMDID,
1165 WMI_10_2_PDEV_GET_TEMPERATURE_CMDID,
1166 WMI_10_2_PDEV_UTF_CMDID = WMI_10_2_END_CMDID - 1,
1169 enum wmi_10_2_event_id {
1170 WMI_10_2_SERVICE_READY_EVENTID = 0x8000,
1171 WMI_10_2_READY_EVENTID,
1172 WMI_10_2_DEBUG_MESG_EVENTID,
1173 WMI_10_2_START_EVENTID = 0x9000,
1174 WMI_10_2_END_EVENTID = 0x9FFF,
1175 WMI_10_2_SCAN_EVENTID = WMI_10_2_START_EVENTID,
1176 WMI_10_2_ECHO_EVENTID,
1177 WMI_10_2_UPDATE_STATS_EVENTID,
1178 WMI_10_2_INST_RSSI_STATS_EVENTID,
1179 WMI_10_2_VDEV_START_RESP_EVENTID,
1180 WMI_10_2_VDEV_STANDBY_REQ_EVENTID,
1181 WMI_10_2_VDEV_RESUME_REQ_EVENTID,
1182 WMI_10_2_VDEV_STOPPED_EVENTID,
1183 WMI_10_2_PEER_STA_KICKOUT_EVENTID,
1184 WMI_10_2_HOST_SWBA_EVENTID,
1185 WMI_10_2_TBTTOFFSET_UPDATE_EVENTID,
1186 WMI_10_2_MGMT_RX_EVENTID,
1187 WMI_10_2_CHAN_INFO_EVENTID,
1188 WMI_10_2_PHYERR_EVENTID,
1189 WMI_10_2_ROAM_EVENTID,
1190 WMI_10_2_PROFILE_MATCH,
1191 WMI_10_2_DEBUG_PRINT_EVENTID,
1192 WMI_10_2_PDEV_QVIT_EVENTID,
1193 WMI_10_2_WLAN_PROFILE_DATA_EVENTID,
1194 WMI_10_2_RTT_MEASUREMENT_REPORT_EVENTID,
1195 WMI_10_2_TSF_MEASUREMENT_REPORT_EVENTID,
1196 WMI_10_2_RTT_ERROR_REPORT_EVENTID,
1197 WMI_10_2_RTT_KEEPALIVE_EVENTID,
1198 WMI_10_2_WOW_WAKEUP_HOST_EVENTID,
1199 WMI_10_2_DCS_INTERFERENCE_EVENTID,
1200 WMI_10_2_PDEV_TPC_CONFIG_EVENTID,
1201 WMI_10_2_GPIO_INPUT_EVENTID,
1202 WMI_10_2_PEER_RATECODE_LIST_EVENTID,
1203 WMI_10_2_GENERIC_BUFFER_EVENTID,
1204 WMI_10_2_MCAST_BUF_RELEASE_EVENTID,
1205 WMI_10_2_MCAST_LIST_AGEOUT_EVENTID,
1206 WMI_10_2_WDS_PEER_EVENTID,
1207 WMI_10_2_PEER_STA_PS_STATECHG_EVENTID,
1208 WMI_10_2_PDEV_TEMPERATURE_EVENTID,
1209 WMI_10_2_PDEV_UTF_EVENTID = WMI_10_2_END_EVENTID - 1,
1213 MODE_11A = 0, /* 11a Mode */
1214 MODE_11G = 1, /* 11b/g Mode */
1215 MODE_11B = 2, /* 11b Mode */
1216 MODE_11GONLY = 3, /* 11g only Mode */
1217 MODE_11NA_HT20 = 4, /* 11a HT20 mode */
1218 MODE_11NG_HT20 = 5, /* 11g HT20 mode */
1219 MODE_11NA_HT40 = 6, /* 11a HT40 mode */
1220 MODE_11NG_HT40 = 7, /* 11g HT40 mode */
1221 MODE_11AC_VHT20 = 8,
1222 MODE_11AC_VHT40 = 9,
1223 MODE_11AC_VHT80 = 10,
1224 /* MODE_11AC_VHT160 = 11, */
1225 MODE_11AC_VHT20_2G = 11,
1226 MODE_11AC_VHT40_2G = 12,
1227 MODE_11AC_VHT80_2G = 13,
1232 static inline const char *ath10k_wmi_phymode_str(enum wmi_phy_mode mode)
1243 case MODE_11NA_HT20:
1245 case MODE_11NG_HT20:
1247 case MODE_11NA_HT40:
1249 case MODE_11NG_HT40:
1251 case MODE_11AC_VHT20:
1252 return "11ac-vht20";
1253 case MODE_11AC_VHT40:
1254 return "11ac-vht40";
1255 case MODE_11AC_VHT80:
1256 return "11ac-vht80";
1257 case MODE_11AC_VHT20_2G:
1258 return "11ac-vht20-2g";
1259 case MODE_11AC_VHT40_2G:
1260 return "11ac-vht40-2g";
1261 case MODE_11AC_VHT80_2G:
1262 return "11ac-vht80-2g";
1267 /* no default handler to allow compiler to check that the
1268 * enum is fully handled */
1274 #define WMI_CHAN_LIST_TAG 0x1
1275 #define WMI_SSID_LIST_TAG 0x2
1276 #define WMI_BSSID_LIST_TAG 0x3
1277 #define WMI_IE_TAG 0x4
1279 struct wmi_channel {
1281 __le32 band_center_freq1;
1282 __le32 band_center_freq2; /* valid for 11ac, 80plus80 */
1284 __le32 flags; /* WMI_CHAN_FLAG_ */
1286 u8 mode; /* only 6 LSBs */
1292 /* note: power unit is 0.5 dBm */
1307 struct wmi_channel_arg {
1309 u32 band_center_freq1;
1316 /* note: power unit is 0.5 dBm */
1320 u32 max_antenna_gain;
1322 enum wmi_phy_mode mode;
1325 enum wmi_channel_change_cause {
1326 WMI_CHANNEL_CHANGE_CAUSE_NONE = 0,
1327 WMI_CHANNEL_CHANGE_CAUSE_CSA,
1330 #define WMI_CHAN_FLAG_HT40_PLUS (1 << 6)
1331 #define WMI_CHAN_FLAG_PASSIVE (1 << 7)
1332 #define WMI_CHAN_FLAG_ADHOC_ALLOWED (1 << 8)
1333 #define WMI_CHAN_FLAG_AP_DISABLED (1 << 9)
1334 #define WMI_CHAN_FLAG_DFS (1 << 10)
1335 #define WMI_CHAN_FLAG_ALLOW_HT (1 << 11)
1336 #define WMI_CHAN_FLAG_ALLOW_VHT (1 << 12)
1338 /* Indicate reason for channel switch */
1339 #define WMI_CHANNEL_CHANGE_CAUSE_CSA (1 << 13)
1341 #define WMI_MAX_SPATIAL_STREAM 3
1343 /* HT Capabilities*/
1344 #define WMI_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */
1345 #define WMI_HT_CAP_HT20_SGI 0x0002 /* Short Guard Interval with HT20 */
1346 #define WMI_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */
1347 #define WMI_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */
1348 #define WMI_HT_CAP_TX_STBC_MASK_SHIFT 3
1349 #define WMI_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */
1350 #define WMI_HT_CAP_RX_STBC_MASK_SHIFT 4
1351 #define WMI_HT_CAP_LDPC 0x0040 /* LDPC supported */
1352 #define WMI_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */
1353 #define WMI_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */
1354 #define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
1355 #define WMI_HT_CAP_HT40_SGI 0x0800
1357 #define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED | \
1358 WMI_HT_CAP_HT20_SGI | \
1359 WMI_HT_CAP_HT40_SGI | \
1360 WMI_HT_CAP_TX_STBC | \
1361 WMI_HT_CAP_RX_STBC | \
1365 * WMI_VHT_CAP_* these maps to ieee 802.11ac vht capability information
1366 * field. The fields not defined here are not supported, or reserved.
1367 * Do not change these masks and if you have to add new one follow the
1368 * bitmask as specified by 802.11ac draft.
1371 #define WMI_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003
1372 #define WMI_VHT_CAP_RX_LDPC 0x00000010
1373 #define WMI_VHT_CAP_SGI_80MHZ 0x00000020
1374 #define WMI_VHT_CAP_TX_STBC 0x00000080
1375 #define WMI_VHT_CAP_RX_STBC_MASK 0x00000300
1376 #define WMI_VHT_CAP_RX_STBC_MASK_SHIFT 8
1377 #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000
1378 #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT 23
1379 #define WMI_VHT_CAP_RX_FIXED_ANT 0x10000000
1380 #define WMI_VHT_CAP_TX_FIXED_ANT 0x20000000
1382 /* The following also refer for max HT AMSDU */
1383 #define WMI_VHT_CAP_MAX_MPDU_LEN_3839 0x00000000
1384 #define WMI_VHT_CAP_MAX_MPDU_LEN_7935 0x00000001
1385 #define WMI_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002
1387 #define WMI_VHT_CAP_DEFAULT_ALL (WMI_VHT_CAP_MAX_MPDU_LEN_11454 | \
1388 WMI_VHT_CAP_RX_LDPC | \
1389 WMI_VHT_CAP_SGI_80MHZ | \
1390 WMI_VHT_CAP_TX_STBC | \
1391 WMI_VHT_CAP_RX_STBC_MASK | \
1392 WMI_VHT_CAP_MAX_AMPDU_LEN_EXP | \
1393 WMI_VHT_CAP_RX_FIXED_ANT | \
1394 WMI_VHT_CAP_TX_FIXED_ANT)
1397 * Interested readers refer to Rx/Tx MCS Map definition as defined in
1400 #define WMI_VHT_MAX_MCS_4_SS_MASK(r, ss) ((3 & (r)) << (((ss) - 1) << 1))
1401 #define WMI_VHT_MAX_SUPP_RATE_MASK 0x1fff0000
1402 #define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT 16
1405 REGDMN_MODE_11A = 0x00001, /* 11a channels */
1406 REGDMN_MODE_TURBO = 0x00002, /* 11a turbo-only channels */
1407 REGDMN_MODE_11B = 0x00004, /* 11b channels */
1408 REGDMN_MODE_PUREG = 0x00008, /* 11g channels (OFDM only) */
1409 REGDMN_MODE_11G = 0x00008, /* XXX historical */
1410 REGDMN_MODE_108G = 0x00020, /* 11a+Turbo channels */
1411 REGDMN_MODE_108A = 0x00040, /* 11g+Turbo channels */
1412 REGDMN_MODE_XR = 0x00100, /* XR channels */
1413 REGDMN_MODE_11A_HALF_RATE = 0x00200, /* 11A half rate channels */
1414 REGDMN_MODE_11A_QUARTER_RATE = 0x00400, /* 11A quarter rate channels */
1415 REGDMN_MODE_11NG_HT20 = 0x00800, /* 11N-G HT20 channels */
1416 REGDMN_MODE_11NA_HT20 = 0x01000, /* 11N-A HT20 channels */
1417 REGDMN_MODE_11NG_HT40PLUS = 0x02000, /* 11N-G HT40 + channels */
1418 REGDMN_MODE_11NG_HT40MINUS = 0x04000, /* 11N-G HT40 - channels */
1419 REGDMN_MODE_11NA_HT40PLUS = 0x08000, /* 11N-A HT40 + channels */
1420 REGDMN_MODE_11NA_HT40MINUS = 0x10000, /* 11N-A HT40 - channels */
1421 REGDMN_MODE_11AC_VHT20 = 0x20000, /* 5Ghz, VHT20 */
1422 REGDMN_MODE_11AC_VHT40PLUS = 0x40000, /* 5Ghz, VHT40 + channels */
1423 REGDMN_MODE_11AC_VHT40MINUS = 0x80000, /* 5Ghz VHT40 - channels */
1424 REGDMN_MODE_11AC_VHT80 = 0x100000, /* 5Ghz, VHT80 channels */
1425 REGDMN_MODE_ALL = 0xffffffff
1428 #define REGDMN_CAP1_CHAN_HALF_RATE 0x00000001
1429 #define REGDMN_CAP1_CHAN_QUARTER_RATE 0x00000002
1430 #define REGDMN_CAP1_CHAN_HAL49GHZ 0x00000004
1432 /* regulatory capabilities */
1433 #define REGDMN_EEPROM_EEREGCAP_EN_FCC_MIDBAND 0x0040
1434 #define REGDMN_EEPROM_EEREGCAP_EN_KK_U1_EVEN 0x0080
1435 #define REGDMN_EEPROM_EEREGCAP_EN_KK_U2 0x0100
1436 #define REGDMN_EEPROM_EEREGCAP_EN_KK_MIDBAND 0x0200
1437 #define REGDMN_EEPROM_EEREGCAP_EN_KK_U1_ODD 0x0400
1438 #define REGDMN_EEPROM_EEREGCAP_EN_KK_NEW_11A 0x0800
1440 struct hal_reg_capabilities {
1441 /* regdomain value specified in EEPROM */
1444 __le32 eeprom_rd_ext;
1445 /* CAP1 capabilities bit map. */
1447 /* REGDMN EEPROM CAP. */
1450 __le32 wireless_modes;
1451 __le32 low_2ghz_chan;
1452 __le32 high_2ghz_chan;
1453 __le32 low_5ghz_chan;
1454 __le32 high_5ghz_chan;
1457 enum wlan_mode_capability {
1458 WHAL_WLAN_11A_CAPABILITY = 0x1,
1459 WHAL_WLAN_11G_CAPABILITY = 0x2,
1460 WHAL_WLAN_11AG_CAPABILITY = 0x3,
1463 /* structure used by FW for requesting host memory */
1464 struct wlan_host_mem_req {
1465 /* ID of the request */
1467 /* size of the of each unit */
1469 /* flags to indicate that
1470 * the number units is dependent
1471 * on number of resources(num vdevs num peers .. etc)
1473 __le32 num_unit_info;
1475 * actual number of units to allocate . if flags in the num_unit_info
1476 * indicate that number of units is tied to number of a particular
1477 * resource to allocate then num_units filed is set to 0 and host
1478 * will derive the number units from number of the resources it is
1485 * The following struct holds optional payload for
1486 * wmi_service_ready_event,e.g., 11ac pass some of the
1487 * device capability to the host.
1489 struct wmi_service_ready_event {
1491 __le32 sw_version_1;
1493 /* WMI_PHY_CAPABILITY */
1494 __le32 phy_capability;
1495 /* Maximum number of frag table entries that SW will populate less 1 */
1496 __le32 max_frag_entry;
1497 __le32 wmi_service_bitmap[16];
1498 __le32 num_rf_chains;
1500 * The following field is only valid for service type
1503 __le32 ht_cap_info; /* WMI HT Capability */
1504 __le32 vht_cap_info; /* VHT capability info field of 802.11ac */
1505 __le32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
1506 __le32 hw_min_tx_power;
1507 __le32 hw_max_tx_power;
1508 struct hal_reg_capabilities hal_reg_capabilities;
1509 __le32 sys_cap_info;
1510 __le32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
1512 * Max beacon and Probe Response IE offload size
1513 * (includes optional P2P IEs)
1515 __le32 max_bcn_ie_size;
1517 * request to host to allocate a chuck of memory and pss it down to FW
1518 * via WM_INIT. FW uses this as FW extesnsion memory for saving its
1519 * data structures. Only valid for low latency interfaces like PCIE
1520 * where FW can access this memory directly (or) by DMA.
1522 __le32 num_mem_reqs;
1523 struct wlan_host_mem_req mem_reqs[0];
1526 /* This is the definition from 10.X firmware branch */
1527 struct wmi_10x_service_ready_event {
1531 /* WMI_PHY_CAPABILITY */
1532 __le32 phy_capability;
1534 /* Maximum number of frag table entries that SW will populate less 1 */
1535 __le32 max_frag_entry;
1536 __le32 wmi_service_bitmap[16];
1537 __le32 num_rf_chains;
1540 * The following field is only valid for service type
1543 __le32 ht_cap_info; /* WMI HT Capability */
1544 __le32 vht_cap_info; /* VHT capability info field of 802.11ac */
1545 __le32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
1546 __le32 hw_min_tx_power;
1547 __le32 hw_max_tx_power;
1549 struct hal_reg_capabilities hal_reg_capabilities;
1551 __le32 sys_cap_info;
1552 __le32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
1555 * request to host to allocate a chuck of memory and pss it down to FW
1556 * via WM_INIT. FW uses this as FW extesnsion memory for saving its
1557 * data structures. Only valid for low latency interfaces like PCIE
1558 * where FW can access this memory directly (or) by DMA.
1560 __le32 num_mem_reqs;
1562 struct wlan_host_mem_req mem_reqs[0];
1565 #define WMI_SERVICE_READY_TIMEOUT_HZ (5*HZ)
1566 #define WMI_UNIFIED_READY_TIMEOUT_HZ (5*HZ)
1568 struct wmi_ready_event {
1571 struct wmi_mac_addr mac_addr;
1575 struct wmi_resource_config {
1576 /* number of virtual devices (VAPs) to support */
1579 /* number of peer nodes to support */
1583 * In offload mode target supports features like WOW, chatter and
1584 * other protocol offloads. In order to support them some
1585 * functionalities like reorder buffering, PN checking need to be
1586 * done in target. This determines maximum number of peers suported
1587 * by target in offload mode
1589 __le32 num_offload_peers;
1591 /* For target-based RX reordering */
1592 __le32 num_offload_reorder_bufs;
1594 /* number of keys per peer */
1595 __le32 num_peer_keys;
1597 /* total number of TX/RX data TIDs */
1601 * max skid for resolving hash collisions
1603 * The address search table is sparse, so that if two MAC addresses
1604 * result in the same hash value, the second of these conflicting
1605 * entries can slide to the next index in the address search table,
1606 * and use it, if it is unoccupied. This ast_skid_limit parameter
1607 * specifies the upper bound on how many subsequent indices to search
1608 * over to find an unoccupied space.
1610 __le32 ast_skid_limit;
1613 * the nominal chain mask for transmit
1615 * The chain mask may be modified dynamically, e.g. to operate AP
1616 * tx with a reduced number of chains if no clients are associated.
1617 * This configuration parameter specifies the nominal chain-mask that
1618 * should be used when not operating with a reduced set of tx chains.
1620 __le32 tx_chain_mask;
1623 * the nominal chain mask for receive
1625 * The chain mask may be modified dynamically, e.g. for a client
1626 * to use a reduced number of chains for receive if the traffic to
1627 * the client is low enough that it doesn't require downlink MIMO
1628 * or antenna diversity.
1629 * This configuration parameter specifies the nominal chain-mask that
1630 * should be used when not operating with a reduced set of rx chains.
1632 __le32 rx_chain_mask;
1635 * what rx reorder timeout (ms) to use for the AC
1637 * Each WMM access class (voice, video, best-effort, background) will
1638 * have its own timeout value to dictate how long to wait for missing
1639 * rx MPDUs to arrive before flushing subsequent MPDUs that have
1640 * already been received.
1641 * This parameter specifies the timeout in milliseconds for each
1644 __le32 rx_timeout_pri_vi;
1645 __le32 rx_timeout_pri_vo;
1646 __le32 rx_timeout_pri_be;
1647 __le32 rx_timeout_pri_bk;
1650 * what mode the rx should decap packets to
1652 * MAC can decap to RAW (no decap), native wifi or Ethernet types
1653 * THis setting also determines the default TX behavior, however TX
1654 * behavior can be modified on a per VAP basis during VAP init
1656 __le32 rx_decap_mode;
1658 /* what is the maximum number of scan requests that can be queued */
1659 __le32 scan_max_pending_reqs;
1661 /* maximum VDEV that could use BMISS offload */
1662 __le32 bmiss_offload_max_vdev;
1664 /* maximum VDEV that could use offload roaming */
1665 __le32 roam_offload_max_vdev;
1667 /* maximum AP profiles that would push to offload roaming */
1668 __le32 roam_offload_max_ap_profiles;
1671 * how many groups to use for mcast->ucast conversion
1673 * The target's WAL maintains a table to hold information regarding
1674 * which peers belong to a given multicast group, so that if
1675 * multicast->unicast conversion is enabled, the target can convert
1676 * multicast tx frames to a series of unicast tx frames, to each
1677 * peer within the multicast group.
1678 This num_mcast_groups configuration parameter tells the target how
1679 * many multicast groups to provide storage for within its multicast
1680 * group membership table.
1682 __le32 num_mcast_groups;
1685 * size to alloc for the mcast membership table
1687 * This num_mcast_table_elems configuration parameter tells the
1688 * target how many peer elements it needs to provide storage for in
1689 * its multicast group membership table.
1690 * These multicast group membership table elements are shared by the
1691 * multicast groups stored within the table.
1693 __le32 num_mcast_table_elems;
1696 * whether/how to do multicast->unicast conversion
1698 * This configuration parameter specifies whether the target should
1699 * perform multicast --> unicast conversion on transmit, and if so,
1700 * what to do if it finds no entries in its multicast group
1701 * membership table for the multicast IP address in the tx frame.
1702 * Configuration value:
1703 * 0 -> Do not perform multicast to unicast conversion.
1704 * 1 -> Convert multicast frames to unicast, if the IP multicast
1705 * address from the tx frame is found in the multicast group
1706 * membership table. If the IP multicast address is not found,
1708 * 2 -> Convert multicast frames to unicast, if the IP multicast
1709 * address from the tx frame is found in the multicast group
1710 * membership table. If the IP multicast address is not found,
1711 * transmit the frame as multicast.
1713 __le32 mcast2ucast_mode;
1716 * how much memory to allocate for a tx PPDU dbg log
1718 * This parameter controls how much memory the target will allocate
1719 * to store a log of tx PPDU meta-information (how large the PPDU
1720 * was, when it was sent, whether it was successful, etc.)
1722 __le32 tx_dbg_log_size;
1724 /* how many AST entries to be allocated for WDS */
1725 __le32 num_wds_entries;
1728 * MAC DMA burst size, e.g., For target PCI limit can be
1729 * 0 -default, 1 256B
1731 __le32 dma_burst_size;
1734 * Fixed delimiters to be inserted after every MPDU to
1735 * account for interface latency to avoid underrun.
1737 __le32 mac_aggr_delim;
1740 * determine whether target is responsible for detecting duplicate
1741 * non-aggregate MPDU and timing out stale fragments.
1743 * A-MPDU reordering is always performed on the target.
1745 * 0: target responsible for frag timeout and dup checking
1746 * 1: host responsible for frag timeout and dup checking
1748 __le32 rx_skip_defrag_timeout_dup_detection_check;
1751 * Configuration for VoW :
1752 * No of Video Nodes to be supported
1753 * and Max no of descriptors for each Video link (node).
1757 /* maximum VDEV that could use GTK offload */
1758 __le32 gtk_offload_max_vdev;
1760 /* Number of msdu descriptors target should use */
1761 __le32 num_msdu_desc;
1764 * Max. number of Tx fragments per MSDU
1765 * This parameter controls the max number of Tx fragments per MSDU.
1766 * This is sent by the target as part of the WMI_SERVICE_READY event
1767 * and is overriden by the OS shim as required.
1769 __le32 max_frag_entries;
1772 struct wmi_resource_config_10x {
1773 /* number of virtual devices (VAPs) to support */
1776 /* number of peer nodes to support */
1779 /* number of keys per peer */
1780 __le32 num_peer_keys;
1782 /* total number of TX/RX data TIDs */
1786 * max skid for resolving hash collisions
1788 * The address search table is sparse, so that if two MAC addresses
1789 * result in the same hash value, the second of these conflicting
1790 * entries can slide to the next index in the address search table,
1791 * and use it, if it is unoccupied. This ast_skid_limit parameter
1792 * specifies the upper bound on how many subsequent indices to search
1793 * over to find an unoccupied space.
1795 __le32 ast_skid_limit;
1798 * the nominal chain mask for transmit
1800 * The chain mask may be modified dynamically, e.g. to operate AP
1801 * tx with a reduced number of chains if no clients are associated.
1802 * This configuration parameter specifies the nominal chain-mask that
1803 * should be used when not operating with a reduced set of tx chains.
1805 __le32 tx_chain_mask;
1808 * the nominal chain mask for receive
1810 * The chain mask may be modified dynamically, e.g. for a client
1811 * to use a reduced number of chains for receive if the traffic to
1812 * the client is low enough that it doesn't require downlink MIMO
1813 * or antenna diversity.
1814 * This configuration parameter specifies the nominal chain-mask that
1815 * should be used when not operating with a reduced set of rx chains.
1817 __le32 rx_chain_mask;
1820 * what rx reorder timeout (ms) to use for the AC
1822 * Each WMM access class (voice, video, best-effort, background) will
1823 * have its own timeout value to dictate how long to wait for missing
1824 * rx MPDUs to arrive before flushing subsequent MPDUs that have
1825 * already been received.
1826 * This parameter specifies the timeout in milliseconds for each
1829 __le32 rx_timeout_pri_vi;
1830 __le32 rx_timeout_pri_vo;
1831 __le32 rx_timeout_pri_be;
1832 __le32 rx_timeout_pri_bk;
1835 * what mode the rx should decap packets to
1837 * MAC can decap to RAW (no decap), native wifi or Ethernet types
1838 * THis setting also determines the default TX behavior, however TX
1839 * behavior can be modified on a per VAP basis during VAP init
1841 __le32 rx_decap_mode;
1843 /* what is the maximum number of scan requests that can be queued */
1844 __le32 scan_max_pending_reqs;
1846 /* maximum VDEV that could use BMISS offload */
1847 __le32 bmiss_offload_max_vdev;
1849 /* maximum VDEV that could use offload roaming */
1850 __le32 roam_offload_max_vdev;
1852 /* maximum AP profiles that would push to offload roaming */
1853 __le32 roam_offload_max_ap_profiles;
1856 * how many groups to use for mcast->ucast conversion
1858 * The target's WAL maintains a table to hold information regarding
1859 * which peers belong to a given multicast group, so that if
1860 * multicast->unicast conversion is enabled, the target can convert
1861 * multicast tx frames to a series of unicast tx frames, to each
1862 * peer within the multicast group.
1863 This num_mcast_groups configuration parameter tells the target how
1864 * many multicast groups to provide storage for within its multicast
1865 * group membership table.
1867 __le32 num_mcast_groups;
1870 * size to alloc for the mcast membership table
1872 * This num_mcast_table_elems configuration parameter tells the
1873 * target how many peer elements it needs to provide storage for in
1874 * its multicast group membership table.
1875 * These multicast group membership table elements are shared by the
1876 * multicast groups stored within the table.
1878 __le32 num_mcast_table_elems;
1881 * whether/how to do multicast->unicast conversion
1883 * This configuration parameter specifies whether the target should
1884 * perform multicast --> unicast conversion on transmit, and if so,
1885 * what to do if it finds no entries in its multicast group
1886 * membership table for the multicast IP address in the tx frame.
1887 * Configuration value:
1888 * 0 -> Do not perform multicast to unicast conversion.
1889 * 1 -> Convert multicast frames to unicast, if the IP multicast
1890 * address from the tx frame is found in the multicast group
1891 * membership table. If the IP multicast address is not found,
1893 * 2 -> Convert multicast frames to unicast, if the IP multicast
1894 * address from the tx frame is found in the multicast group
1895 * membership table. If the IP multicast address is not found,
1896 * transmit the frame as multicast.
1898 __le32 mcast2ucast_mode;
1901 * how much memory to allocate for a tx PPDU dbg log
1903 * This parameter controls how much memory the target will allocate
1904 * to store a log of tx PPDU meta-information (how large the PPDU
1905 * was, when it was sent, whether it was successful, etc.)
1907 __le32 tx_dbg_log_size;
1909 /* how many AST entries to be allocated for WDS */
1910 __le32 num_wds_entries;
1913 * MAC DMA burst size, e.g., For target PCI limit can be
1914 * 0 -default, 1 256B
1916 __le32 dma_burst_size;
1919 * Fixed delimiters to be inserted after every MPDU to
1920 * account for interface latency to avoid underrun.
1922 __le32 mac_aggr_delim;
1925 * determine whether target is responsible for detecting duplicate
1926 * non-aggregate MPDU and timing out stale fragments.
1928 * A-MPDU reordering is always performed on the target.
1930 * 0: target responsible for frag timeout and dup checking
1931 * 1: host responsible for frag timeout and dup checking
1933 __le32 rx_skip_defrag_timeout_dup_detection_check;
1936 * Configuration for VoW :
1937 * No of Video Nodes to be supported
1938 * and Max no of descriptors for each Video link (node).
1942 /* Number of msdu descriptors target should use */
1943 __le32 num_msdu_desc;
1946 * Max. number of Tx fragments per MSDU
1947 * This parameter controls the max number of Tx fragments per MSDU.
1948 * This is sent by the target as part of the WMI_SERVICE_READY event
1949 * and is overriden by the OS shim as required.
1951 __le32 max_frag_entries;
1954 enum wmi_10_2_feature_mask {
1955 WMI_10_2_RX_BATCH_MODE = BIT(0),
1956 WMI_10_2_ATF_CONFIG = BIT(1),
1959 struct wmi_resource_config_10_2 {
1960 struct wmi_resource_config_10x common;
1961 __le32 max_peer_ext_stats;
1962 __le32 smart_ant_cap; /* 0-disable, 1-enable */
1967 __le32 feature_mask;
1970 #define NUM_UNITS_IS_NUM_VDEVS 0x1
1971 #define NUM_UNITS_IS_NUM_PEERS 0x2
1973 /* strucutre describing host memory chunk. */
1974 struct host_memory_chunk {
1975 /* id of the request that is passed up in service ready */
1977 /* the physical address the memory chunk */
1979 /* size of the chunk */
1983 struct wmi_host_mem_chunks {
1985 /* some fw revisions require at least 1 chunk regardless of count */
1986 struct host_memory_chunk items[1];
1989 struct wmi_init_cmd {
1990 struct wmi_resource_config resource_config;
1991 struct wmi_host_mem_chunks mem_chunks;
1994 /* _10x stucture is from 10.X FW API */
1995 struct wmi_init_cmd_10x {
1996 struct wmi_resource_config_10x resource_config;
1997 struct wmi_host_mem_chunks mem_chunks;
2000 struct wmi_init_cmd_10_2 {
2001 struct wmi_resource_config_10_2 resource_config;
2002 struct wmi_host_mem_chunks mem_chunks;
2005 struct wmi_chan_list_entry {
2007 u8 phy_mode; /* valid for 10.2 only */
2011 /* TLV for channel list */
2012 struct wmi_chan_list {
2013 __le32 tag; /* WMI_CHAN_LIST_TAG */
2015 struct wmi_chan_list_entry channel_list[0];
2018 struct wmi_bssid_list {
2019 __le32 tag; /* WMI_BSSID_LIST_TAG */
2021 struct wmi_mac_addr bssid_list[0];
2024 struct wmi_ie_data {
2025 __le32 tag; /* WMI_IE_TAG */
2035 struct wmi_ssid_list {
2036 __le32 tag; /* WMI_SSID_LIST_TAG */
2038 struct wmi_ssid ssids[0];
2041 /* prefix used by scan requestor ids on the host */
2042 #define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
2044 /* prefix used by scan request ids generated on the host */
2045 /* host cycles through the lower 12 bits to generate ids */
2046 #define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000
2048 #define WLAN_SCAN_PARAMS_MAX_SSID 16
2049 #define WLAN_SCAN_PARAMS_MAX_BSSID 4
2050 #define WLAN_SCAN_PARAMS_MAX_IE_LEN 256
2052 /* Values lower than this may be refused by some firmware revisions with a scan
2053 * completion with a timedout reason.
2055 #define WMI_SCAN_CHAN_MIN_TIME_MSEC 40
2057 /* Scan priority numbers must be sequential, starting with 0 */
2058 enum wmi_scan_priority {
2059 WMI_SCAN_PRIORITY_VERY_LOW = 0,
2060 WMI_SCAN_PRIORITY_LOW,
2061 WMI_SCAN_PRIORITY_MEDIUM,
2062 WMI_SCAN_PRIORITY_HIGH,
2063 WMI_SCAN_PRIORITY_VERY_HIGH,
2064 WMI_SCAN_PRIORITY_COUNT /* number of priorities supported */
2067 struct wmi_start_scan_common {
2070 /* Scan requestor ID */
2072 /* VDEV id(interface) that is requesting scan */
2074 /* Scan Priority, input to scan scheduler */
2075 __le32 scan_priority;
2076 /* Scan events subscription */
2077 __le32 notify_scan_events;
2078 /* dwell time in msec on active channels */
2079 __le32 dwell_time_active;
2080 /* dwell time in msec on passive channels */
2081 __le32 dwell_time_passive;
2083 * min time in msec on the BSS channel,only valid if atleast one
2086 __le32 min_rest_time;
2088 * max rest time in msec on the BSS channel,only valid if at least
2089 * one VDEV is active
2092 * the scanner will rest on the bss channel at least min_rest_time
2093 * after min_rest_time the scanner will start checking for tx/rx
2094 * activity on all VDEVs. if there is no activity the scanner will
2095 * switch to off channel. if there is activity the scanner will let
2096 * the radio on the bss channel until max_rest_time expires.at
2097 * max_rest_time scanner will switch to off channel irrespective of
2098 * activity. activity is determined by the idle_time parameter.
2100 __le32 max_rest_time;
2102 * time before sending next set of probe requests.
2103 * The scanner keeps repeating probe requests transmission with
2104 * period specified by repeat_probe_time.
2105 * The number of probe requests specified depends on the ssid_list
2108 __le32 repeat_probe_time;
2109 /* time in msec between 2 consequetive probe requests with in a set. */
2110 __le32 probe_spacing_time;
2112 * data inactivity time in msec on bss channel that will be used by
2113 * scanner for measuring the inactivity.
2116 /* maximum time in msec allowed for scan */
2117 __le32 max_scan_time;
2119 * delay in msec before sending first probe request after switching
2123 /* Scan control flags */
2124 __le32 scan_ctrl_flags;
2127 struct wmi_start_scan_tlvs {
2128 /* TLV parameters. These includes channel list, ssid list, bssid list,
2134 struct wmi_start_scan_cmd {
2135 struct wmi_start_scan_common common;
2136 __le32 burst_duration_ms;
2137 struct wmi_start_scan_tlvs tlvs;
2140 /* This is the definition from 10.X firmware branch */
2141 struct wmi_10x_start_scan_cmd {
2142 struct wmi_start_scan_common common;
2143 struct wmi_start_scan_tlvs tlvs;
2146 struct wmi_ssid_arg {
2151 struct wmi_bssid_arg {
2155 struct wmi_start_scan_arg {
2160 u32 notify_scan_events;
2161 u32 dwell_time_active;
2162 u32 dwell_time_passive;
2165 u32 repeat_probe_time;
2166 u32 probe_spacing_time;
2170 u32 scan_ctrl_flags;
2177 u8 ie[WLAN_SCAN_PARAMS_MAX_IE_LEN];
2179 struct wmi_ssid_arg ssids[WLAN_SCAN_PARAMS_MAX_SSID];
2180 struct wmi_bssid_arg bssids[WLAN_SCAN_PARAMS_MAX_BSSID];
2183 /* scan control flags */
2185 /* passively scan all channels including active channels */
2186 #define WMI_SCAN_FLAG_PASSIVE 0x1
2187 /* add wild card ssid probe request even though ssid_list is specified. */
2188 #define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2
2189 /* add cck rates to rates/xrate ie for the generated probe request */
2190 #define WMI_SCAN_ADD_CCK_RATES 0x4
2191 /* add ofdm rates to rates/xrate ie for the generated probe request */
2192 #define WMI_SCAN_ADD_OFDM_RATES 0x8
2193 /* To enable indication of Chan load and Noise floor to host */
2194 #define WMI_SCAN_CHAN_STAT_EVENT 0x10
2195 /* Filter Probe request frames */
2196 #define WMI_SCAN_FILTER_PROBE_REQ 0x20
2197 /* When set, DFS channels will not be scanned */
2198 #define WMI_SCAN_BYPASS_DFS_CHN 0x40
2199 /* Different FW scan engine may choose to bail out on errors.
2200 * Allow the driver to have influence over that. */
2201 #define WMI_SCAN_CONTINUE_ON_ERROR 0x80
2203 /* WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */
2204 #define WMI_SCAN_CLASS_MASK 0xFF000000
2206 enum wmi_stop_scan_type {
2207 WMI_SCAN_STOP_ONE = 0x00000000, /* stop by scan_id */
2208 WMI_SCAN_STOP_VDEV_ALL = 0x01000000, /* stop by vdev_id */
2209 WMI_SCAN_STOP_ALL = 0x04000000, /* stop all scans */
2212 struct wmi_stop_scan_cmd {
2219 struct wmi_stop_scan_arg {
2221 enum wmi_stop_scan_type req_type;
2228 struct wmi_scan_chan_list_cmd {
2229 __le32 num_scan_chans;
2230 struct wmi_channel chan_info[0];
2233 struct wmi_scan_chan_list_arg {
2235 struct wmi_channel_arg *channels;
2238 enum wmi_bss_filter {
2239 WMI_BSS_FILTER_NONE = 0, /* no beacons forwarded */
2240 WMI_BSS_FILTER_ALL, /* all beacons forwarded */
2241 WMI_BSS_FILTER_PROFILE, /* only beacons matching profile */
2242 WMI_BSS_FILTER_ALL_BUT_PROFILE, /* all but beacons matching profile */
2243 WMI_BSS_FILTER_CURRENT_BSS, /* only beacons matching current BSS */
2244 WMI_BSS_FILTER_ALL_BUT_BSS, /* all but beacons matching BSS */
2245 WMI_BSS_FILTER_PROBED_SSID, /* beacons matching probed ssid */
2246 WMI_BSS_FILTER_LAST_BSS, /* marker only */
2249 enum wmi_scan_event_type {
2250 WMI_SCAN_EVENT_STARTED = 0x1,
2251 WMI_SCAN_EVENT_COMPLETED = 0x2,
2252 WMI_SCAN_EVENT_BSS_CHANNEL = 0x4,
2253 WMI_SCAN_EVENT_FOREIGN_CHANNEL = 0x8,
2254 WMI_SCAN_EVENT_DEQUEUED = 0x10,
2255 WMI_SCAN_EVENT_PREEMPTED = 0x20, /* possibly by high-prio scan */
2256 WMI_SCAN_EVENT_START_FAILED = 0x40,
2257 WMI_SCAN_EVENT_RESTARTED = 0x80,
2258 WMI_SCAN_EVENT_MAX = 0x8000
2261 enum wmi_scan_completion_reason {
2262 WMI_SCAN_REASON_COMPLETED,
2263 WMI_SCAN_REASON_CANCELLED,
2264 WMI_SCAN_REASON_PREEMPTED,
2265 WMI_SCAN_REASON_TIMEDOUT,
2266 WMI_SCAN_REASON_MAX,
2269 struct wmi_scan_event {
2270 __le32 event_type; /* %WMI_SCAN_EVENT_ */
2271 __le32 reason; /* %WMI_SCAN_REASON_ */
2272 __le32 channel_freq; /* only valid for WMI_SCAN_EVENT_FOREIGN_CHANNEL */
2279 * This defines how much headroom is kept in the
2280 * receive frame between the descriptor and the
2281 * payload, in order for the WMI PHY error and
2282 * management handler to insert header contents.
2286 #define WMI_MGMT_RX_HDR_HEADROOM 52
2289 * This event will be used for sending scan results
2290 * as well as rx mgmt frames to the host. The rx buffer
2291 * will be sent as part of this WMI event. It would be a
2292 * good idea to pass all the fields in the RX status
2293 * descriptor up to the host.
2295 struct wmi_mgmt_rx_hdr_v1 {
2301 __le32 status; /* %WMI_RX_STATUS_ */
2304 struct wmi_mgmt_rx_hdr_v2 {
2305 struct wmi_mgmt_rx_hdr_v1 v1;
2309 struct wmi_mgmt_rx_event_v1 {
2310 struct wmi_mgmt_rx_hdr_v1 hdr;
2314 struct wmi_mgmt_rx_event_v2 {
2315 struct wmi_mgmt_rx_hdr_v2 hdr;
2319 #define WMI_RX_STATUS_OK 0x00
2320 #define WMI_RX_STATUS_ERR_CRC 0x01
2321 #define WMI_RX_STATUS_ERR_DECRYPT 0x08
2322 #define WMI_RX_STATUS_ERR_MIC 0x10
2323 #define WMI_RX_STATUS_ERR_KEY_CACHE_MISS 0x20
2325 #define PHY_ERROR_SPECTRAL_SCAN 0x26
2326 #define PHY_ERROR_FALSE_RADAR_EXT 0x24
2327 #define PHY_ERROR_RADAR 0x05
2330 __le32 tsf_timestamp;
2337 __le32 rssi_chains[4];
2338 __le16 nf_chains[4];
2343 struct wmi_phyerr_event {
2347 struct wmi_phyerr phyerrs[0];
2350 #define PHYERR_TLV_SIG 0xBB
2351 #define PHYERR_TLV_TAG_SEARCH_FFT_REPORT 0xFB
2352 #define PHYERR_TLV_TAG_RADAR_PULSE_SUMMARY 0xF8
2353 #define PHYERR_TLV_TAG_SPECTRAL_SUMMARY_REPORT 0xF9
2355 struct phyerr_radar_report {
2356 __le32 reg0; /* RADAR_REPORT_REG0_* */
2357 __le32 reg1; /* REDAR_REPORT_REG1_* */
2360 #define RADAR_REPORT_REG0_PULSE_IS_CHIRP_MASK 0x80000000
2361 #define RADAR_REPORT_REG0_PULSE_IS_CHIRP_LSB 31
2363 #define RADAR_REPORT_REG0_PULSE_IS_MAX_WIDTH_MASK 0x40000000
2364 #define RADAR_REPORT_REG0_PULSE_IS_MAX_WIDTH_LSB 30
2366 #define RADAR_REPORT_REG0_AGC_TOTAL_GAIN_MASK 0x3FF00000
2367 #define RADAR_REPORT_REG0_AGC_TOTAL_GAIN_LSB 20
2369 #define RADAR_REPORT_REG0_PULSE_DELTA_DIFF_MASK 0x000F0000
2370 #define RADAR_REPORT_REG0_PULSE_DELTA_DIFF_LSB 16
2372 #define RADAR_REPORT_REG0_PULSE_DELTA_PEAK_MASK 0x0000FC00
2373 #define RADAR_REPORT_REG0_PULSE_DELTA_PEAK_LSB 10
2375 #define RADAR_REPORT_REG0_PULSE_SIDX_MASK 0x000003FF
2376 #define RADAR_REPORT_REG0_PULSE_SIDX_LSB 0
2378 #define RADAR_REPORT_REG1_PULSE_SRCH_FFT_VALID_MASK 0x80000000
2379 #define RADAR_REPORT_REG1_PULSE_SRCH_FFT_VALID_LSB 31
2381 #define RADAR_REPORT_REG1_PULSE_AGC_MB_GAIN_MASK 0x7F000000
2382 #define RADAR_REPORT_REG1_PULSE_AGC_MB_GAIN_LSB 24
2384 #define RADAR_REPORT_REG1_PULSE_SUBCHAN_MASK_MASK 0x00FF0000
2385 #define RADAR_REPORT_REG1_PULSE_SUBCHAN_MASK_LSB 16
2387 #define RADAR_REPORT_REG1_PULSE_TSF_OFFSET_MASK 0x0000FF00
2388 #define RADAR_REPORT_REG1_PULSE_TSF_OFFSET_LSB 8
2390 #define RADAR_REPORT_REG1_PULSE_DUR_MASK 0x000000FF
2391 #define RADAR_REPORT_REG1_PULSE_DUR_LSB 0
2393 struct phyerr_fft_report {
2394 __le32 reg0; /* SEARCH_FFT_REPORT_REG0_ * */
2395 __le32 reg1; /* SEARCH_FFT_REPORT_REG1_ * */
2398 #define SEARCH_FFT_REPORT_REG0_TOTAL_GAIN_DB_MASK 0xFF800000
2399 #define SEARCH_FFT_REPORT_REG0_TOTAL_GAIN_DB_LSB 23
2401 #define SEARCH_FFT_REPORT_REG0_BASE_PWR_DB_MASK 0x007FC000
2402 #define SEARCH_FFT_REPORT_REG0_BASE_PWR_DB_LSB 14
2404 #define SEARCH_FFT_REPORT_REG0_FFT_CHN_IDX_MASK 0x00003000
2405 #define SEARCH_FFT_REPORT_REG0_FFT_CHN_IDX_LSB 12
2407 #define SEARCH_FFT_REPORT_REG0_PEAK_SIDX_MASK 0x00000FFF
2408 #define SEARCH_FFT_REPORT_REG0_PEAK_SIDX_LSB 0
2410 #define SEARCH_FFT_REPORT_REG1_RELPWR_DB_MASK 0xFC000000
2411 #define SEARCH_FFT_REPORT_REG1_RELPWR_DB_LSB 26
2413 #define SEARCH_FFT_REPORT_REG1_AVGPWR_DB_MASK 0x03FC0000
2414 #define SEARCH_FFT_REPORT_REG1_AVGPWR_DB_LSB 18
2416 #define SEARCH_FFT_REPORT_REG1_PEAK_MAG_MASK 0x0003FF00
2417 #define SEARCH_FFT_REPORT_REG1_PEAK_MAG_LSB 8
2419 #define SEARCH_FFT_REPORT_REG1_NUM_STR_BINS_IB_MASK 0x000000FF
2420 #define SEARCH_FFT_REPORT_REG1_NUM_STR_BINS_IB_LSB 0
2428 #define DFS_RSSI_POSSIBLY_FALSE 50
2429 #define DFS_PEAK_MAG_THOLD_POSSIBLY_FALSE 40
2431 struct wmi_mgmt_tx_hdr {
2433 struct wmi_mac_addr peer_macaddr;
2439 struct wmi_mgmt_tx_cmd {
2440 struct wmi_mgmt_tx_hdr hdr;
2444 struct wmi_echo_event {
2448 struct wmi_echo_cmd {
2452 struct wmi_pdev_set_regdomain_cmd {
2454 __le32 reg_domain_2G;
2455 __le32 reg_domain_5G;
2456 __le32 conformance_test_limit_2G;
2457 __le32 conformance_test_limit_5G;
2460 enum wmi_dfs_region {
2461 /* Uninitialized dfs domain */
2462 WMI_UNINIT_DFS_DOMAIN = 0,
2464 /* FCC3 dfs domain */
2465 WMI_FCC_DFS_DOMAIN = 1,
2467 /* ETSI dfs domain */
2468 WMI_ETSI_DFS_DOMAIN = 2,
2470 /*Japan dfs domain */
2471 WMI_MKK4_DFS_DOMAIN = 3,
2474 struct wmi_pdev_set_regdomain_cmd_10x {
2476 __le32 reg_domain_2G;
2477 __le32 reg_domain_5G;
2478 __le32 conformance_test_limit_2G;
2479 __le32 conformance_test_limit_5G;
2481 /* dfs domain from wmi_dfs_region */
2485 /* Command to set/unset chip in quiet mode */
2486 struct wmi_pdev_set_quiet_cmd {
2490 /* duration in TUs */
2496 /* enable/disable */
2501 * 802.11g protection mode.
2503 enum ath10k_protmode {
2504 ATH10K_PROT_NONE = 0, /* no protection */
2505 ATH10K_PROT_CTSONLY = 1, /* CTS to self */
2506 ATH10K_PROT_RTSCTS = 2, /* RTS-CTS */
2509 enum wmi_rtscts_profile {
2510 WMI_RTSCTS_FOR_NO_RATESERIES = 0,
2511 WMI_RTSCTS_FOR_SECOND_RATESERIES,
2512 WMI_RTSCTS_ACROSS_SW_RETRIES
2515 #define WMI_RTSCTS_ENABLED 1
2516 #define WMI_RTSCTS_SET_MASK 0x0f
2517 #define WMI_RTSCTS_SET_LSB 0
2519 #define WMI_RTSCTS_PROFILE_MASK 0xf0
2520 #define WMI_RTSCTS_PROFILE_LSB 4
2522 enum wmi_beacon_gen_mode {
2523 WMI_BEACON_STAGGERED_MODE = 0,
2524 WMI_BEACON_BURST_MODE = 1
2527 enum wmi_csa_event_ies_present_flag {
2528 WMI_CSA_IE_PRESENT = 0x00000001,
2529 WMI_XCSA_IE_PRESENT = 0x00000002,
2530 WMI_WBW_IE_PRESENT = 0x00000004,
2531 WMI_CSWARP_IE_PRESENT = 0x00000008,
2534 /* wmi CSA receive event from beacon frame */
2535 struct wmi_csa_event {
2538 /* Bit 16-31: DUR */
2539 struct wmi_mac_addr i_addr1;
2540 struct wmi_mac_addr i_addr2;
2545 __le32 ies_present_flag; /* wmi_csa_event_ies_present_flag */
2548 /* the definition of different PDEV parameters */
2549 #define PDEV_DEFAULT_STATS_UPDATE_PERIOD 500
2550 #define VDEV_DEFAULT_STATS_UPDATE_PERIOD 500
2551 #define PEER_DEFAULT_STATS_UPDATE_PERIOD 500
2553 struct wmi_pdev_param_map {
2556 u32 txpower_limit2g;
2557 u32 txpower_limit5g;
2559 u32 beacon_gen_mode;
2561 u32 resmgr_offchan_mode;
2562 u32 protection_mode;
2564 u32 non_agg_sw_retry_th;
2565 u32 agg_sw_retry_th;
2567 u32 ac_aggrsize_scaling;
2569 u32 ltr_ac_latency_be;
2570 u32 ltr_ac_latency_bk;
2571 u32 ltr_ac_latency_vi;
2572 u32 ltr_ac_latency_vo;
2573 u32 ltr_ac_latency_timeout;
2574 u32 ltr_sleep_override;
2575 u32 ltr_rx_override;
2576 u32 ltr_tx_activity_timeout;
2579 u32 pcielp_txbuf_flush;
2580 u32 pcielp_txbuf_watermark;
2581 u32 pcielp_txbuf_tmo_en;
2582 u32 pcielp_txbuf_tmo_value;
2583 u32 pdev_stats_update_period;
2584 u32 vdev_stats_update_period;
2585 u32 peer_stats_update_period;
2586 u32 bcnflt_stats_update_period;
2588 u32 arp_ac_override;
2591 u32 ani_poll_period;
2592 u32 ani_listen_period;
2598 u32 power_gating_sleep;
2599 u32 fast_channel_reset;
2605 #define WMI_PDEV_PARAM_UNSUPPORTED 0
2607 enum wmi_pdev_param {
2609 WMI_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
2611 WMI_PDEV_PARAM_RX_CHAIN_MASK,
2612 /* TX power limit for 2G Radio */
2613 WMI_PDEV_PARAM_TXPOWER_LIMIT2G,
2614 /* TX power limit for 5G Radio */
2615 WMI_PDEV_PARAM_TXPOWER_LIMIT5G,
2616 /* TX power scale */
2617 WMI_PDEV_PARAM_TXPOWER_SCALE,
2618 /* Beacon generation mode . 0: host, 1: target */
2619 WMI_PDEV_PARAM_BEACON_GEN_MODE,
2620 /* Beacon generation mode . 0: staggered 1: bursted */
2621 WMI_PDEV_PARAM_BEACON_TX_MODE,
2623 * Resource manager off chan mode .
2624 * 0: turn off off chan mode. 1: turn on offchan mode
2626 WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE,
2629 * 0: no protection 1:use CTS-to-self 2: use RTS/CTS
2631 WMI_PDEV_PARAM_PROTECTION_MODE,
2633 * Dynamic bandwidth - 0: disable, 1: enable
2635 * When enabled HW rate control tries different bandwidths when
2636 * retransmitting frames.
2638 WMI_PDEV_PARAM_DYNAMIC_BW,
2639 /* Non aggregrate/ 11g sw retry threshold.0-disable */
2640 WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH,
2641 /* aggregrate sw retry threshold. 0-disable*/
2642 WMI_PDEV_PARAM_AGG_SW_RETRY_TH,
2643 /* Station kickout threshold (non of consecutive failures).0-disable */
2644 WMI_PDEV_PARAM_STA_KICKOUT_TH,
2645 /* Aggerate size scaling configuration per AC */
2646 WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING,
2648 WMI_PDEV_PARAM_LTR_ENABLE,
2649 /* LTR latency for BE, in us */
2650 WMI_PDEV_PARAM_LTR_AC_LATENCY_BE,
2651 /* LTR latency for BK, in us */
2652 WMI_PDEV_PARAM_LTR_AC_LATENCY_BK,
2653 /* LTR latency for VI, in us */
2654 WMI_PDEV_PARAM_LTR_AC_LATENCY_VI,
2655 /* LTR latency for VO, in us */
2656 WMI_PDEV_PARAM_LTR_AC_LATENCY_VO,
2657 /* LTR AC latency timeout, in ms */
2658 WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT,
2659 /* LTR platform latency override, in us */
2660 WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE,
2661 /* LTR-RX override, in us */
2662 WMI_PDEV_PARAM_LTR_RX_OVERRIDE,
2663 /* Tx activity timeout for LTR, in us */
2664 WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT,
2665 /* L1SS state machine enable */
2666 WMI_PDEV_PARAM_L1SS_ENABLE,
2667 /* Deep sleep state machine enable */
2668 WMI_PDEV_PARAM_DSLEEP_ENABLE,
2669 /* RX buffering flush enable */
2670 WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH,
2671 /* RX buffering matermark */
2672 WMI_PDEV_PARAM_PCIELP_TXBUF_WATERMARK,
2673 /* RX buffering timeout enable */
2674 WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN,
2675 /* RX buffering timeout value */
2676 WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE,
2677 /* pdev level stats update period in ms */
2678 WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD,
2679 /* vdev level stats update period in ms */
2680 WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD,
2681 /* peer level stats update period in ms */
2682 WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD,
2683 /* beacon filter status update period */
2684 WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD,
2685 /* QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
2686 WMI_PDEV_PARAM_PMF_QOS,
2687 /* Access category on which ARP frames are sent */
2688 WMI_PDEV_PARAM_ARP_AC_OVERRIDE,
2689 /* DCS configuration */
2691 /* Enable/Disable ANI on target */
2692 WMI_PDEV_PARAM_ANI_ENABLE,
2693 /* configure the ANI polling period */
2694 WMI_PDEV_PARAM_ANI_POLL_PERIOD,
2695 /* configure the ANI listening period */
2696 WMI_PDEV_PARAM_ANI_LISTEN_PERIOD,
2697 /* configure OFDM immunity level */
2698 WMI_PDEV_PARAM_ANI_OFDM_LEVEL,
2699 /* configure CCK immunity level */
2700 WMI_PDEV_PARAM_ANI_CCK_LEVEL,
2701 /* Enable/Disable CDD for 1x1 STAs in rate control module */
2702 WMI_PDEV_PARAM_DYNTXCHAIN,
2703 /* Enable/Disable proxy STA */
2704 WMI_PDEV_PARAM_PROXY_STA,
2705 /* Enable/Disable low power state when all VDEVs are inactive/idle. */
2706 WMI_PDEV_PARAM_IDLE_PS_CONFIG,
2707 /* Enable/Disable power gating sleep */
2708 WMI_PDEV_PARAM_POWER_GATING_SLEEP,
2711 enum wmi_10x_pdev_param {
2713 WMI_10X_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
2715 WMI_10X_PDEV_PARAM_RX_CHAIN_MASK,
2716 /* TX power limit for 2G Radio */
2717 WMI_10X_PDEV_PARAM_TXPOWER_LIMIT2G,
2718 /* TX power limit for 5G Radio */
2719 WMI_10X_PDEV_PARAM_TXPOWER_LIMIT5G,
2720 /* TX power scale */
2721 WMI_10X_PDEV_PARAM_TXPOWER_SCALE,
2722 /* Beacon generation mode . 0: host, 1: target */
2723 WMI_10X_PDEV_PARAM_BEACON_GEN_MODE,
2724 /* Beacon generation mode . 0: staggered 1: bursted */
2725 WMI_10X_PDEV_PARAM_BEACON_TX_MODE,
2727 * Resource manager off chan mode .
2728 * 0: turn off off chan mode. 1: turn on offchan mode
2730 WMI_10X_PDEV_PARAM_RESMGR_OFFCHAN_MODE,
2733 * 0: no protection 1:use CTS-to-self 2: use RTS/CTS
2735 WMI_10X_PDEV_PARAM_PROTECTION_MODE,
2736 /* Dynamic bandwidth 0: disable 1: enable */
2737 WMI_10X_PDEV_PARAM_DYNAMIC_BW,
2738 /* Non aggregrate/ 11g sw retry threshold.0-disable */
2739 WMI_10X_PDEV_PARAM_NON_AGG_SW_RETRY_TH,
2740 /* aggregrate sw retry threshold. 0-disable*/
2741 WMI_10X_PDEV_PARAM_AGG_SW_RETRY_TH,
2742 /* Station kickout threshold (non of consecutive failures).0-disable */
2743 WMI_10X_PDEV_PARAM_STA_KICKOUT_TH,
2744 /* Aggerate size scaling configuration per AC */
2745 WMI_10X_PDEV_PARAM_AC_AGGRSIZE_SCALING,
2747 WMI_10X_PDEV_PARAM_LTR_ENABLE,
2748 /* LTR latency for BE, in us */
2749 WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_BE,
2750 /* LTR latency for BK, in us */
2751 WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_BK,
2752 /* LTR latency for VI, in us */
2753 WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_VI,
2754 /* LTR latency for VO, in us */
2755 WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_VO,
2756 /* LTR AC latency timeout, in ms */
2757 WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT,
2758 /* LTR platform latency override, in us */
2759 WMI_10X_PDEV_PARAM_LTR_SLEEP_OVERRIDE,
2760 /* LTR-RX override, in us */
2761 WMI_10X_PDEV_PARAM_LTR_RX_OVERRIDE,
2762 /* Tx activity timeout for LTR, in us */
2763 WMI_10X_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT,
2764 /* L1SS state machine enable */
2765 WMI_10X_PDEV_PARAM_L1SS_ENABLE,
2766 /* Deep sleep state machine enable */
2767 WMI_10X_PDEV_PARAM_DSLEEP_ENABLE,
2768 /* pdev level stats update period in ms */
2769 WMI_10X_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD,
2770 /* vdev level stats update period in ms */
2771 WMI_10X_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD,
2772 /* peer level stats update period in ms */
2773 WMI_10X_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD,
2774 /* beacon filter status update period */
2775 WMI_10X_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD,
2776 /* QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
2777 WMI_10X_PDEV_PARAM_PMF_QOS,
2778 /* Access category on which ARP and DHCP frames are sent */
2779 WMI_10X_PDEV_PARAM_ARPDHCP_AC_OVERRIDE,
2780 /* DCS configuration */
2781 WMI_10X_PDEV_PARAM_DCS,
2782 /* Enable/Disable ANI on target */
2783 WMI_10X_PDEV_PARAM_ANI_ENABLE,
2784 /* configure the ANI polling period */
2785 WMI_10X_PDEV_PARAM_ANI_POLL_PERIOD,
2786 /* configure the ANI listening period */
2787 WMI_10X_PDEV_PARAM_ANI_LISTEN_PERIOD,
2788 /* configure OFDM immunity level */
2789 WMI_10X_PDEV_PARAM_ANI_OFDM_LEVEL,
2790 /* configure CCK immunity level */
2791 WMI_10X_PDEV_PARAM_ANI_CCK_LEVEL,
2792 /* Enable/Disable CDD for 1x1 STAs in rate control module */
2793 WMI_10X_PDEV_PARAM_DYNTXCHAIN,
2794 /* Enable/Disable Fast channel reset*/
2795 WMI_10X_PDEV_PARAM_FAST_CHANNEL_RESET,
2796 /* Set Bursting DUR */
2797 WMI_10X_PDEV_PARAM_BURST_DUR,
2798 /* Set Bursting Enable*/
2799 WMI_10X_PDEV_PARAM_BURST_ENABLE,
2801 /* following are available as of firmware 10.2 */
2802 WMI_10X_PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA,
2803 WMI_10X_PDEV_PARAM_IGMPMLD_OVERRIDE,
2804 WMI_10X_PDEV_PARAM_IGMPMLD_TID,
2805 WMI_10X_PDEV_PARAM_ANTENNA_GAIN,
2806 WMI_10X_PDEV_PARAM_RX_DECAP_MODE,
2807 WMI_10X_PDEV_PARAM_RX_FILTER,
2808 WMI_10X_PDEV_PARAM_SET_MCAST_TO_UCAST_TID,
2809 WMI_10X_PDEV_PARAM_PROXY_STA_MODE,
2810 WMI_10X_PDEV_PARAM_SET_MCAST2UCAST_MODE,
2811 WMI_10X_PDEV_PARAM_SET_MCAST2UCAST_BUFFER,
2812 WMI_10X_PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER,
2813 WMI_10X_PDEV_PARAM_PEER_STA_PS_STATECHG_ENABLE,
2814 WMI_10X_PDEV_PARAM_RTS_FIXED_RATE,
2815 WMI_10X_PDEV_PARAM_CAL_PERIOD
2818 struct wmi_pdev_set_param_cmd {
2823 /* valid period is 1 ~ 60000ms, unit in millisecond */
2824 #define WMI_PDEV_PARAM_CAL_PERIOD_MAX 60000
2826 struct wmi_pdev_get_tpc_config_cmd {
2831 #define WMI_TPC_RATE_MAX 160
2832 #define WMI_TPC_TX_N_CHAIN 4
2834 enum wmi_tpc_config_event_flag {
2835 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1,
2836 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
2837 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
2840 struct wmi_pdev_tpc_config_event {
2844 __le32 twice_antenna_reduction;
2845 __le32 twice_max_rd_power;
2846 s32 twice_antenna_gain;
2849 __le32 num_tx_chain;
2852 s8 max_reg_allow_pow[WMI_TPC_TX_N_CHAIN];
2853 s8 max_reg_allow_pow_agcdd[WMI_TPC_TX_N_CHAIN][WMI_TPC_TX_N_CHAIN];
2854 s8 max_reg_allow_pow_agstbc[WMI_TPC_TX_N_CHAIN][WMI_TPC_TX_N_CHAIN];
2855 s8 max_reg_allow_pow_agtxbf[WMI_TPC_TX_N_CHAIN][WMI_TPC_TX_N_CHAIN];
2856 u8 rates_array[WMI_TPC_RATE_MAX];
2859 /* Transmit power scale factor. */
2861 WMI_TP_SCALE_MAX = 0, /* no scaling (default) */
2862 WMI_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
2863 WMI_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
2864 WMI_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
2865 WMI_TP_SCALE_MIN = 4, /* min, but still on */
2866 WMI_TP_SCALE_SIZE = 5, /* max num of enum */
2869 struct wmi_pdev_chanlist_update_event {
2870 /* number of channels */
2872 /* array of channels */
2873 struct wmi_channel channel_list[1];
2876 #define WMI_MAX_DEBUG_MESG (sizeof(u32) * 32)
2878 struct wmi_debug_mesg_event {
2879 /* message buffer, NULL terminated */
2880 char bufp[WMI_MAX_DEBUG_MESG];
2885 VDEV_SUBTYPE_P2PDEV = 0,
2887 VDEV_SUBTYPE_P2PCLI,
2894 struct wmi_pdev_set_channel_cmd {
2895 /* idnore power , only use flags , mode and freq */
2896 struct wmi_channel chan;
2899 struct wmi_pdev_pktlog_enable_cmd {
2903 /* Customize the DSCP (bit) to TID (0-7) mapping for QOS */
2904 #define WMI_DSCP_MAP_MAX (64)
2905 struct wmi_pdev_set_dscp_tid_map_cmd {
2906 /* map indicating DSCP to TID conversion */
2907 __le32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
2910 enum mcast_bcast_rate_id {
2915 struct mcast_bcast_rate {
2916 enum mcast_bcast_rate_id rate_id;
2920 struct wmi_wmm_params {
2929 struct wmi_pdev_set_wmm_params {
2930 struct wmi_wmm_params ac_be;
2931 struct wmi_wmm_params ac_bk;
2932 struct wmi_wmm_params ac_vi;
2933 struct wmi_wmm_params ac_vo;
2936 struct wmi_wmm_params_arg {
2945 struct wmi_wmm_params_all_arg {
2946 struct wmi_wmm_params_arg ac_be;
2947 struct wmi_wmm_params_arg ac_bk;
2948 struct wmi_wmm_params_arg ac_vi;
2949 struct wmi_wmm_params_arg ac_vo;
2952 struct wmi_pdev_stats_tx {
2953 /* Num HTT cookies queued to dispatch list */
2956 /* Num HTT cookies dispatched */
2957 __le32 comp_delivered;
2959 /* Num MSDU queued to WAL */
2962 /* Num MPDU queue to WAL */
2965 /* Num MSDUs dropped by WMM limit */
2968 /* Num Local frames queued */
2969 __le32 local_enqued;
2971 /* Num Local frames done */
2974 /* Num queued to HW */
2977 /* Num PPDU reaped from HW */
2983 /* Num PPDUs cleaned up in TX abort */
2986 /* Num MPDUs requed by SW */
2987 __le32 mpdus_requed;
2989 /* excessive retries */
2992 /* data hw rate code */
2995 /* Scheduler self triggers */
2996 __le32 self_triggers;
2998 /* frames dropped due to excessive sw retries */
2999 __le32 sw_retry_failure;
3001 /* illegal rate phy errors */
3002 __le32 illgl_rate_phy_err;
3004 /* wal pdev continous xretry */
3005 __le32 pdev_cont_xretry;
3007 /* wal pdev continous xretry */
3008 __le32 pdev_tx_timeout;
3010 /* wal pdev resets */
3013 /* frames dropped due to non-availability of stateless TIDs */
3014 __le32 stateless_tid_alloc_failure;
3016 __le32 phy_underrun;
3018 /* MPDU is more than txop limit */
3022 struct wmi_pdev_stats_rx {
3023 /* Cnts any change in ring routing mid-ppdu */
3024 __le32 mid_ppdu_route_change;
3026 /* Total number of statuses processed */
3029 /* Extra frags on rings 0-3 */
3035 /* MSDUs / MPDUs delivered to HTT */
3039 /* MSDUs / MPDUs delivered to local stack */
3043 /* AMSDUs that have more MSDUs than the status ring size */
3044 __le32 oversize_amsdu;
3046 /* Number of PHY errors */
3049 /* Number of PHY errors drops */
3050 __le32 phy_err_drop;
3052 /* Number of mpdu errors - FCS, MIC, ENC etc. */
3056 struct wmi_pdev_stats_peer {
3057 /* REMOVE THIS ONCE REAL PEER STAT COUNTERS ARE ADDED */
3062 WMI_STAT_PEER = BIT(0),
3063 WMI_STAT_AP = BIT(1),
3064 WMI_STAT_PDEV = BIT(2),
3065 WMI_STAT_VDEV = BIT(3),
3066 WMI_STAT_BCNFLT = BIT(4),
3067 WMI_STAT_VDEV_RATE = BIT(5),
3070 struct wlan_inst_rssi_args {
3071 __le16 cfg_retry_count;
3075 struct wmi_request_stats_cmd {
3080 /* peer MAC address */
3081 struct wmi_mac_addr peer_macaddr;
3083 /* Instantaneous RSSI arguments */
3084 struct wlan_inst_rssi_args inst_rssi_args;
3087 /* Suspend option */
3092 /* suspend and disable all interrupts */
3093 WMI_PDEV_SUSPEND_AND_DISABLE_INTR,
3096 struct wmi_pdev_suspend_cmd {
3097 /* suspend option sent to target */
3101 struct wmi_stats_event {
3102 __le32 stats_id; /* WMI_STAT_ */
3104 * number of pdev stats event structures
3105 * (wmi_pdev_stats) 0 or 1
3107 __le32 num_pdev_stats;
3109 * number of vdev stats event structures
3110 * (wmi_vdev_stats) 0 or max vdevs
3112 __le32 num_vdev_stats;
3114 * number of peer stats event structures
3115 * (wmi_peer_stats) 0 or max peers
3117 __le32 num_peer_stats;
3118 __le32 num_bcnflt_stats;
3121 * num_pdev_stats * size of(struct wmi_pdev_stats)
3122 * num_vdev_stats * size of(struct wmi_vdev_stats)
3123 * num_peer_stats * size of(struct wmi_peer_stats)
3125 * By having a zero sized array, the pointer to data area
3126 * becomes available without increasing the struct size
3131 struct wmi_10_2_stats_event {
3132 __le32 stats_id; /* %WMI_REQUEST_ */
3133 __le32 num_pdev_stats;
3134 __le32 num_pdev_ext_stats;
3135 __le32 num_vdev_stats;
3136 __le32 num_peer_stats;
3137 __le32 num_bcnflt_stats;
3143 * TODO: add all PDEV stats here
3145 struct wmi_pdev_stats_base {
3147 __le32 tx_frame_count;
3148 __le32 rx_frame_count;
3149 __le32 rx_clear_count;
3151 __le32 phy_err_count;
3155 struct wmi_pdev_stats {
3156 struct wmi_pdev_stats_base base;
3157 struct wmi_pdev_stats_tx tx;
3158 struct wmi_pdev_stats_rx rx;
3159 struct wmi_pdev_stats_peer peer;
3162 struct wmi_pdev_stats_extra {
3168 __le32 mib_int_count;
3171 struct wmi_10x_pdev_stats {
3172 struct wmi_pdev_stats_base base;
3173 struct wmi_pdev_stats_tx tx;
3174 struct wmi_pdev_stats_rx rx;
3175 struct wmi_pdev_stats_peer peer;
3176 struct wmi_pdev_stats_extra extra;
3179 struct wmi_pdev_stats_mem {
3184 struct wmi_10_2_pdev_stats {
3185 struct wmi_pdev_stats_base base;
3186 struct wmi_pdev_stats_tx tx;
3188 struct wmi_pdev_stats_rx rx;
3189 __le32 pdev_rx_timeout;
3190 struct wmi_pdev_stats_mem mem;
3191 struct wmi_pdev_stats_peer peer;
3192 struct wmi_pdev_stats_extra extra;
3197 * TODO: add all VDEV stats here
3199 struct wmi_vdev_stats {
3205 * TODO: add more stats
3207 struct wmi_peer_stats {
3208 struct wmi_mac_addr peer_macaddr;
3210 __le32 peer_tx_rate;
3213 struct wmi_10x_peer_stats {
3214 struct wmi_peer_stats old;
3215 __le32 peer_rx_rate;
3218 struct wmi_10_2_peer_stats {
3219 struct wmi_peer_stats old;
3220 __le32 peer_rx_rate;
3223 __le32 tx_rate_count;
3224 __le32 max_4ms_frame_len;
3225 __le32 total_sub_frames;
3227 __le32 num_pkt_loss_overflow[4];
3228 __le32 num_pkt_loss_excess_retry[4];
3231 struct wmi_10_2_4_peer_stats {
3232 struct wmi_10_2_peer_stats common;
3233 __le32 unknown_value; /* FIXME: what is this word? */
3236 struct wmi_10_2_pdev_ext_stats {
3237 __le32 rx_rssi_comb;
3244 struct wmi_vdev_create_cmd {
3247 __le32 vdev_subtype;
3248 struct wmi_mac_addr vdev_macaddr;
3251 enum wmi_vdev_type {
3252 WMI_VDEV_TYPE_AP = 1,
3253 WMI_VDEV_TYPE_STA = 2,
3254 WMI_VDEV_TYPE_IBSS = 3,
3255 WMI_VDEV_TYPE_MONITOR = 4,
3258 enum wmi_vdev_subtype {
3259 WMI_VDEV_SUBTYPE_NONE = 0,
3260 WMI_VDEV_SUBTYPE_P2P_DEVICE = 1,
3261 WMI_VDEV_SUBTYPE_P2P_CLIENT = 2,
3262 WMI_VDEV_SUBTYPE_P2P_GO = 3,
3265 /* values for vdev_subtype */
3267 /* values for vdev_start_request flags */
3269 * Indicates that AP VDEV uses hidden ssid. only valid for
3271 #define WMI_VDEV_START_HIDDEN_SSID (1<<0)
3273 * Indicates if robust management frame/management frame
3274 * protection is enabled. For GO/AP vdevs, it indicates that
3275 * it may support station/client associations with RMF enabled.
3276 * For STA/client vdevs, it indicates that sta will
3277 * associate with AP with RMF enabled. */
3278 #define WMI_VDEV_START_PMF_ENABLED (1<<1)
3280 struct wmi_p2p_noa_descriptor {
3281 __le32 type_count; /* 255: continuous schedule, 0: reserved */
3282 __le32 duration; /* Absent period duration in micro seconds */
3283 __le32 interval; /* Absent period interval in micro seconds */
3284 __le32 start_time; /* 32 bit tsf time when in starts */
3287 struct wmi_vdev_start_request_cmd {
3289 struct wmi_channel chan;
3290 /* unique id identifying the VDEV, generated by the caller */
3292 /* requestor id identifying the caller module */
3293 __le32 requestor_id;
3294 /* beacon interval from received beacon */
3295 __le32 beacon_interval;
3296 /* DTIM Period from the received beacon */
3300 /* ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */
3301 struct wmi_ssid ssid;
3302 /* beacon/probe reponse xmit rate. Applicable for SoftAP. */
3304 /* beacon/probe reponse xmit power. Applicable for SoftAP. */
3305 __le32 bcn_tx_power;
3306 /* number of p2p NOA descriptor(s) from scan entry */
3307 __le32 num_noa_descriptors;
3309 * Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID.
3310 * During CAC, Our HW shouldn't ack ditected frames
3312 __le32 disable_hw_ack;
3313 /* actual p2p NOA descriptor from scan entry */
3314 struct wmi_p2p_noa_descriptor noa_descriptors[2];
3317 struct wmi_vdev_restart_request_cmd {
3318 struct wmi_vdev_start_request_cmd vdev_start_request_cmd;
3321 struct wmi_vdev_start_request_arg {
3323 struct wmi_channel_arg channel;
3330 bool disable_hw_ack;
3335 struct wmi_vdev_delete_cmd {
3336 /* unique id identifying the VDEV, generated by the caller */
3340 struct wmi_vdev_up_cmd {
3342 __le32 vdev_assoc_id;
3343 struct wmi_mac_addr vdev_bssid;
3346 struct wmi_vdev_stop_cmd {
3350 struct wmi_vdev_down_cmd {
3354 struct wmi_vdev_standby_response_cmd {
3355 /* unique id identifying the VDEV, generated by the caller */
3359 struct wmi_vdev_resume_response_cmd {
3360 /* unique id identifying the VDEV, generated by the caller */
3364 struct wmi_vdev_set_param_cmd {
3370 #define WMI_MAX_KEY_INDEX 3
3371 #define WMI_MAX_KEY_LEN 32
3373 #define WMI_KEY_PAIRWISE 0x00
3374 #define WMI_KEY_GROUP 0x01
3375 #define WMI_KEY_TX_USAGE 0x02 /* default tx key - static wep */
3377 struct wmi_key_seq_counter {
3378 __le32 key_seq_counter_l;
3379 __le32 key_seq_counter_h;
3382 #define WMI_CIPHER_NONE 0x0 /* clear key */
3383 #define WMI_CIPHER_WEP 0x1
3384 #define WMI_CIPHER_TKIP 0x2
3385 #define WMI_CIPHER_AES_OCB 0x3
3386 #define WMI_CIPHER_AES_CCM 0x4
3387 #define WMI_CIPHER_WAPI 0x5
3388 #define WMI_CIPHER_CKIP 0x6
3389 #define WMI_CIPHER_AES_CMAC 0x7
3391 struct wmi_vdev_install_key_cmd {
3393 struct wmi_mac_addr peer_macaddr;
3396 __le32 key_cipher; /* %WMI_CIPHER_ */
3397 struct wmi_key_seq_counter key_rsc_counter;
3398 struct wmi_key_seq_counter key_global_rsc_counter;
3399 struct wmi_key_seq_counter key_tsc_counter;
3400 u8 wpi_key_rsc_counter[16];
3401 u8 wpi_key_tsc_counter[16];
3403 __le32 key_txmic_len;
3404 __le32 key_rxmic_len;
3406 /* contains key followed by tx mic followed by rx mic */
3410 struct wmi_vdev_install_key_arg {
3419 const void *key_data;
3423 * vdev fixed rate format:
3424 * - preamble - b7:b6 - see WMI_RATE_PREMABLE_
3425 * - nss - b5:b4 - ss number (0 mean 1ss)
3426 * - rate_mcs - b3:b0 - as below
3427 * CCK: 0 - 11Mbps, 1 - 5,5Mbps, 2 - 2Mbps, 3 - 1Mbps,
3428 * 4 - 11Mbps (s), 5 - 5,5Mbps (s), 6 - 2Mbps (s)
3429 * OFDM: 0 - 48Mbps, 1 - 24Mbps, 2 - 12Mbps, 3 - 6Mbps,
3430 * 4 - 54Mbps, 5 - 36Mbps, 6 - 18Mbps, 7 - 9Mbps
3434 /* Preamble types to be used with VDEV fixed rate configuration */
3435 enum wmi_rate_preamble {
3436 WMI_RATE_PREAMBLE_OFDM,
3437 WMI_RATE_PREAMBLE_CCK,
3438 WMI_RATE_PREAMBLE_HT,
3439 WMI_RATE_PREAMBLE_VHT,
3442 /* Value to disable fixed rate setting */
3443 #define WMI_FIXED_RATE_NONE (0xff)
3445 struct wmi_vdev_param_map {
3447 u32 fragmentation_threshold;
3448 u32 beacon_interval;
3449 u32 listen_interval;
3455 u32 wmi_vdev_stats_update_period;
3456 u32 wmi_vdev_pwrsave_ageout_time;
3457 u32 wmi_vdev_host_swba_interval;
3459 u32 wmi_vdev_oc_scheduler_air_time_limit;
3462 u32 bmiss_count_max;
3463 u32 bmiss_first_bcnt;
3464 u32 bmiss_final_bcnt;
3468 u32 disable_htprotection;
3469 u32 sta_quickkickout;
3471 u32 protection_mode;
3480 u32 bcast_data_rate;
3481 u32 mcast_data_rate;
3484 u32 unknown_dest_indicate;
3485 u32 ap_keepalive_min_idle_inactive_time_secs;
3486 u32 ap_keepalive_max_idle_inactive_time_secs;
3487 u32 ap_keepalive_max_unresponsive_time_secs;
3488 u32 ap_enable_nawds;
3489 u32 mcast2ucast_set;
3492 u32 packet_powersave;
3495 u32 ap_detect_out_of_sync_sleeping_sta_time_secs;
3498 #define WMI_VDEV_PARAM_UNSUPPORTED 0
3500 /* the definition of different VDEV parameters */
3501 enum wmi_vdev_param {
3503 WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1,
3504 /* Fragmentation threshold */
3505 WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
3506 /* beacon interval in TUs */
3507 WMI_VDEV_PARAM_BEACON_INTERVAL,
3508 /* Listen interval in TUs */
3509 WMI_VDEV_PARAM_LISTEN_INTERVAL,
3510 /* muticast rate in Mbps */
3511 WMI_VDEV_PARAM_MULTICAST_RATE,
3512 /* management frame rate in Mbps */
3513 WMI_VDEV_PARAM_MGMT_TX_RATE,
3514 /* slot time (long vs short) */
3515 WMI_VDEV_PARAM_SLOT_TIME,
3516 /* preamble (long vs short) */
3517 WMI_VDEV_PARAM_PREAMBLE,
3518 /* SWBA time (time before tbtt in msec) */
3519 WMI_VDEV_PARAM_SWBA_TIME,
3520 /* time period for updating VDEV stats */
3521 WMI_VDEV_STATS_UPDATE_PERIOD,
3522 /* age out time in msec for frames queued for station in power save */
3523 WMI_VDEV_PWRSAVE_AGEOUT_TIME,
3525 * Host SWBA interval (time in msec before tbtt for SWBA event
3528 WMI_VDEV_HOST_SWBA_INTERVAL,
3529 /* DTIM period (specified in units of num beacon intervals) */
3530 WMI_VDEV_PARAM_DTIM_PERIOD,
3532 * scheduler air time limit for this VDEV. used by off chan
3535 WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT,
3536 /* enable/dsiable WDS for this VDEV */
3539 WMI_VDEV_PARAM_ATIM_WINDOW,
3541 WMI_VDEV_PARAM_BMISS_COUNT_MAX,
3542 /* BMISS first time */
3543 WMI_VDEV_PARAM_BMISS_FIRST_BCNT,
3544 /* BMISS final time */
3545 WMI_VDEV_PARAM_BMISS_FINAL_BCNT,
3546 /* WMM enables/disabled */
3547 WMI_VDEV_PARAM_FEATURE_WMM,
3549 WMI_VDEV_PARAM_CHWIDTH,
3550 /* Channel Offset */
3551 WMI_VDEV_PARAM_CHEXTOFFSET,
3552 /* Disable HT Protection */
3553 WMI_VDEV_PARAM_DISABLE_HTPROTECTION,
3554 /* Quick STA Kickout */
3555 WMI_VDEV_PARAM_STA_QUICKKICKOUT,
3556 /* Rate to be used with Management frames */
3557 WMI_VDEV_PARAM_MGMT_RATE,
3558 /* Protection Mode */
3559 WMI_VDEV_PARAM_PROTECTION_MODE,
3560 /* Fixed rate setting */
3561 WMI_VDEV_PARAM_FIXED_RATE,
3562 /* Short GI Enable/Disable */
3565 WMI_VDEV_PARAM_LDPC,
3566 /* Enable Tx STBC */
3567 WMI_VDEV_PARAM_TX_STBC,
3568 /* Enable Rx STBC */
3569 WMI_VDEV_PARAM_RX_STBC,
3570 /* Intra BSS forwarding */
3571 WMI_VDEV_PARAM_INTRA_BSS_FWD,
3572 /* Setting Default xmit key for Vdev */
3573 WMI_VDEV_PARAM_DEF_KEYID,
3576 /* Set the custom rate for the broadcast data frames */
3577 WMI_VDEV_PARAM_BCAST_DATA_RATE,
3578 /* Set the custom rate (rate-code) for multicast data frames */
3579 WMI_VDEV_PARAM_MCAST_DATA_RATE,
3580 /* Tx multicast packet indicate Enable/Disable */
3581 WMI_VDEV_PARAM_MCAST_INDICATE,
3582 /* Tx DHCP packet indicate Enable/Disable */
3583 WMI_VDEV_PARAM_DHCP_INDICATE,
3584 /* Enable host inspection of Tx unicast packet to unknown destination */
3585 WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE,
3587 /* The minimum amount of time AP begins to consider STA inactive */
3588 WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,
3591 * An associated STA is considered inactive when there is no recent
3592 * TX/RX activity and no downlink frames are buffered for it. Once a
3593 * STA exceeds the maximum idle inactive time, the AP will send an
3594 * 802.11 data-null as a keep alive to verify the STA is still
3595 * associated. If the STA does ACK the data-null, or if the data-null
3596 * is buffered and the STA does not retrieve it, the STA will be
3597 * considered unresponsive
3598 * (see WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS).
3600 WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,
3603 * An associated STA is considered unresponsive if there is no recent
3604 * TX/RX activity and downlink frames are buffered for it. Once a STA
3605 * exceeds the maximum unresponsive time, the AP will send a
3606 * WMI_STA_KICKOUT event to the host so the STA can be deleted. */
3607 WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,
3609 /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
3610 WMI_VDEV_PARAM_AP_ENABLE_NAWDS,
3611 /* Enable/Disable RTS-CTS */
3612 WMI_VDEV_PARAM_ENABLE_RTSCTS,
3613 /* Enable TXBFee/er */
3614 WMI_VDEV_PARAM_TXBF,
3616 /* Set packet power save */
3617 WMI_VDEV_PARAM_PACKET_POWERSAVE,
3620 * Drops un-encrypted packets if eceived in an encrypted connection
3621 * otherwise forwards to host.
3623 WMI_VDEV_PARAM_DROP_UNENCRY,
3626 * Set the encapsulation type for frames.
3628 WMI_VDEV_PARAM_TX_ENCAP_TYPE,
3631 /* the definition of different VDEV parameters */
3632 enum wmi_10x_vdev_param {
3634 WMI_10X_VDEV_PARAM_RTS_THRESHOLD = 0x1,
3635 /* Fragmentation threshold */
3636 WMI_10X_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
3637 /* beacon interval in TUs */
3638 WMI_10X_VDEV_PARAM_BEACON_INTERVAL,
3639 /* Listen interval in TUs */
3640 WMI_10X_VDEV_PARAM_LISTEN_INTERVAL,
3641 /* muticast rate in Mbps */
3642 WMI_10X_VDEV_PARAM_MULTICAST_RATE,
3643 /* management frame rate in Mbps */
3644 WMI_10X_VDEV_PARAM_MGMT_TX_RATE,
3645 /* slot time (long vs short) */
3646 WMI_10X_VDEV_PARAM_SLOT_TIME,
3647 /* preamble (long vs short) */
3648 WMI_10X_VDEV_PARAM_PREAMBLE,
3649 /* SWBA time (time before tbtt in msec) */
3650 WMI_10X_VDEV_PARAM_SWBA_TIME,
3651 /* time period for updating VDEV stats */
3652 WMI_10X_VDEV_STATS_UPDATE_PERIOD,
3653 /* age out time in msec for frames queued for station in power save */
3654 WMI_10X_VDEV_PWRSAVE_AGEOUT_TIME,
3656 * Host SWBA interval (time in msec before tbtt for SWBA event
3659 WMI_10X_VDEV_HOST_SWBA_INTERVAL,
3660 /* DTIM period (specified in units of num beacon intervals) */
3661 WMI_10X_VDEV_PARAM_DTIM_PERIOD,
3663 * scheduler air time limit for this VDEV. used by off chan
3666 WMI_10X_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT,
3667 /* enable/dsiable WDS for this VDEV */
3668 WMI_10X_VDEV_PARAM_WDS,
3670 WMI_10X_VDEV_PARAM_ATIM_WINDOW,
3672 WMI_10X_VDEV_PARAM_BMISS_COUNT_MAX,
3673 /* WMM enables/disabled */
3674 WMI_10X_VDEV_PARAM_FEATURE_WMM,
3676 WMI_10X_VDEV_PARAM_CHWIDTH,
3677 /* Channel Offset */
3678 WMI_10X_VDEV_PARAM_CHEXTOFFSET,
3679 /* Disable HT Protection */
3680 WMI_10X_VDEV_PARAM_DISABLE_HTPROTECTION,
3681 /* Quick STA Kickout */
3682 WMI_10X_VDEV_PARAM_STA_QUICKKICKOUT,
3683 /* Rate to be used with Management frames */
3684 WMI_10X_VDEV_PARAM_MGMT_RATE,
3685 /* Protection Mode */
3686 WMI_10X_VDEV_PARAM_PROTECTION_MODE,
3687 /* Fixed rate setting */
3688 WMI_10X_VDEV_PARAM_FIXED_RATE,
3689 /* Short GI Enable/Disable */
3690 WMI_10X_VDEV_PARAM_SGI,
3692 WMI_10X_VDEV_PARAM_LDPC,
3693 /* Enable Tx STBC */
3694 WMI_10X_VDEV_PARAM_TX_STBC,
3695 /* Enable Rx STBC */
3696 WMI_10X_VDEV_PARAM_RX_STBC,
3697 /* Intra BSS forwarding */
3698 WMI_10X_VDEV_PARAM_INTRA_BSS_FWD,
3699 /* Setting Default xmit key for Vdev */
3700 WMI_10X_VDEV_PARAM_DEF_KEYID,
3702 WMI_10X_VDEV_PARAM_NSS,
3703 /* Set the custom rate for the broadcast data frames */
3704 WMI_10X_VDEV_PARAM_BCAST_DATA_RATE,
3705 /* Set the custom rate (rate-code) for multicast data frames */
3706 WMI_10X_VDEV_PARAM_MCAST_DATA_RATE,
3707 /* Tx multicast packet indicate Enable/Disable */
3708 WMI_10X_VDEV_PARAM_MCAST_INDICATE,
3709 /* Tx DHCP packet indicate Enable/Disable */
3710 WMI_10X_VDEV_PARAM_DHCP_INDICATE,
3711 /* Enable host inspection of Tx unicast packet to unknown destination */
3712 WMI_10X_VDEV_PARAM_UNKNOWN_DEST_INDICATE,
3714 /* The minimum amount of time AP begins to consider STA inactive */
3715 WMI_10X_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,
3718 * An associated STA is considered inactive when there is no recent
3719 * TX/RX activity and no downlink frames are buffered for it. Once a
3720 * STA exceeds the maximum idle inactive time, the AP will send an
3721 * 802.11 data-null as a keep alive to verify the STA is still
3722 * associated. If the STA does ACK the data-null, or if the data-null
3723 * is buffered and the STA does not retrieve it, the STA will be
3724 * considered unresponsive
3725 * (see WMI_10X_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS).
3727 WMI_10X_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,
3730 * An associated STA is considered unresponsive if there is no recent
3731 * TX/RX activity and downlink frames are buffered for it. Once a STA
3732 * exceeds the maximum unresponsive time, the AP will send a
3733 * WMI_10X_STA_KICKOUT event to the host so the STA can be deleted. */
3734 WMI_10X_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,
3736 /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
3737 WMI_10X_VDEV_PARAM_AP_ENABLE_NAWDS,
3739 WMI_10X_VDEV_PARAM_MCAST2UCAST_SET,
3740 /* Enable/Disable RTS-CTS */
3741 WMI_10X_VDEV_PARAM_ENABLE_RTSCTS,
3743 WMI_10X_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS,
3745 /* following are available as of firmware 10.2 */
3746 WMI_10X_VDEV_PARAM_TX_ENCAP_TYPE,
3747 WMI_10X_VDEV_PARAM_CABQ_MAXDUR,
3748 WMI_10X_VDEV_PARAM_MFPTEST_SET,
3749 WMI_10X_VDEV_PARAM_RTS_FIXED_RATE,
3750 WMI_10X_VDEV_PARAM_VHT_SGIMASK,
3751 WMI_10X_VDEV_PARAM_VHT80_RATEMASK,
3754 #define WMI_VDEV_PARAM_TXBF_SU_TX_BFEE BIT(0)
3755 #define WMI_VDEV_PARAM_TXBF_MU_TX_BFEE BIT(1)
3756 #define WMI_VDEV_PARAM_TXBF_SU_TX_BFER BIT(2)
3757 #define WMI_VDEV_PARAM_TXBF_MU_TX_BFER BIT(3)
3759 /* slot time long */
3760 #define WMI_VDEV_SLOT_TIME_LONG 0x1
3761 /* slot time short */
3762 #define WMI_VDEV_SLOT_TIME_SHORT 0x2
3764 #define WMI_VDEV_PREAMBLE_LONG 0x1
3765 /* preablbe short */
3766 #define WMI_VDEV_PREAMBLE_SHORT 0x2
3768 enum wmi_start_event_param {
3769 WMI_VDEV_RESP_START_EVENT = 0,
3770 WMI_VDEV_RESP_RESTART_EVENT,
3773 struct wmi_vdev_start_response_event {
3776 __le32 resp_type; /* %WMI_VDEV_RESP_ */
3780 struct wmi_vdev_standby_req_event {
3781 /* unique id identifying the VDEV, generated by the caller */
3785 struct wmi_vdev_resume_req_event {
3786 /* unique id identifying the VDEV, generated by the caller */
3790 struct wmi_vdev_stopped_event {
3791 /* unique id identifying the VDEV, generated by the caller */
3796 * common structure used for simple events
3797 * (stopped, resume_req, standby response)
3799 struct wmi_vdev_simple_event {
3800 /* unique id identifying the VDEV, generated by the caller */
3804 /* VDEV start response status codes */
3805 /* VDEV succesfully started */
3806 #define WMI_INIFIED_VDEV_START_RESPONSE_STATUS_SUCCESS 0x0
3808 /* requested VDEV not found */
3809 #define WMI_INIFIED_VDEV_START_RESPONSE_INVALID_VDEVID 0x1
3811 /* unsupported VDEV combination */
3812 #define WMI_INIFIED_VDEV_START_RESPONSE_NOT_SUPPORTED 0x2
3814 /* TODO: please add more comments if you have in-depth information */
3815 struct wmi_vdev_spectral_conf_cmd {
3818 /* number of fft samples to send (0 for infinite) */
3821 __le32 scan_priority;
3823 /* number of bins in the FFT: 2^(fft_size - bin_scale) */
3824 __le32 scan_fft_size;
3826 __le32 scan_restart_ena;
3827 __le32 scan_noise_floor_ref;
3828 __le32 scan_init_delay;
3829 __le32 scan_nb_tone_thr;
3830 __le32 scan_str_bin_thr;
3831 __le32 scan_wb_rpt_mode;
3832 __le32 scan_rssi_rpt_mode;
3833 __le32 scan_rssi_thr;
3834 __le32 scan_pwr_format;
3836 /* rpt_mode: Format of FFT report to software for spectral scan
3838 * 0: No FFT report (only spectral scan summary report)
3839 * 1: 2-dword summary of metrics for each completed FFT + spectral
3840 * scan summary report
3841 * 2: 2-dword summary of metrics for each completed FFT +
3842 * 1x- oversampled bins(in-band) per FFT + spectral scan summary
3844 * 3: 2-dword summary of metrics for each completed FFT +
3845 * 2x- oversampled bins (all) per FFT + spectral scan summary
3847 __le32 scan_rpt_mode;
3848 __le32 scan_bin_scale;
3849 __le32 scan_dbm_adj;
3850 __le32 scan_chn_mask;
3853 struct wmi_vdev_spectral_conf_arg {
3860 u32 scan_restart_ena;
3861 u32 scan_noise_floor_ref;
3862 u32 scan_init_delay;
3863 u32 scan_nb_tone_thr;
3864 u32 scan_str_bin_thr;
3865 u32 scan_wb_rpt_mode;
3866 u32 scan_rssi_rpt_mode;
3868 u32 scan_pwr_format;
3875 #define WMI_SPECTRAL_ENABLE_DEFAULT 0
3876 #define WMI_SPECTRAL_COUNT_DEFAULT 0
3877 #define WMI_SPECTRAL_PERIOD_DEFAULT 35
3878 #define WMI_SPECTRAL_PRIORITY_DEFAULT 1
3879 #define WMI_SPECTRAL_FFT_SIZE_DEFAULT 7
3880 #define WMI_SPECTRAL_GC_ENA_DEFAULT 1
3881 #define WMI_SPECTRAL_RESTART_ENA_DEFAULT 0
3882 #define WMI_SPECTRAL_NOISE_FLOOR_REF_DEFAULT -96
3883 #define WMI_SPECTRAL_INIT_DELAY_DEFAULT 80
3884 #define WMI_SPECTRAL_NB_TONE_THR_DEFAULT 12
3885 #define WMI_SPECTRAL_STR_BIN_THR_DEFAULT 8
3886 #define WMI_SPECTRAL_WB_RPT_MODE_DEFAULT 0
3887 #define WMI_SPECTRAL_RSSI_RPT_MODE_DEFAULT 0
3888 #define WMI_SPECTRAL_RSSI_THR_DEFAULT 0xf0
3889 #define WMI_SPECTRAL_PWR_FORMAT_DEFAULT 0
3890 #define WMI_SPECTRAL_RPT_MODE_DEFAULT 2
3891 #define WMI_SPECTRAL_BIN_SCALE_DEFAULT 1
3892 #define WMI_SPECTRAL_DBM_ADJ_DEFAULT 1
3893 #define WMI_SPECTRAL_CHN_MASK_DEFAULT 1
3895 struct wmi_vdev_spectral_enable_cmd {
3901 #define WMI_SPECTRAL_TRIGGER_CMD_TRIGGER 1
3902 #define WMI_SPECTRAL_TRIGGER_CMD_CLEAR 2
3903 #define WMI_SPECTRAL_ENABLE_CMD_ENABLE 1
3904 #define WMI_SPECTRAL_ENABLE_CMD_DISABLE 2
3906 /* Beacon processing related command and event structures */
3907 struct wmi_bcn_tx_hdr {
3914 struct wmi_bcn_tx_cmd {
3915 struct wmi_bcn_tx_hdr hdr;
3919 struct wmi_bcn_tx_arg {
3927 enum wmi_bcn_tx_ref_flags {
3928 WMI_BCN_TX_REF_FLAG_DTIM_ZERO = 0x1,
3929 WMI_BCN_TX_REF_FLAG_DELIVER_CAB = 0x2,
3932 /* TODO: It is unclear why "no antenna" works while any other seemingly valid
3933 * chainmask yields no beacons on the air at all.
3935 #define WMI_BCN_TX_REF_DEF_ANTENNA 0
3937 struct wmi_bcn_tx_ref_cmd {
3940 /* physical address of the frame - dma pointer */
3942 /* id for host to track */
3944 /* frame ctrl to setup PPDU desc */
3945 __le32 frame_control;
3946 /* to control CABQ traffic: WMI_BCN_TX_REF_FLAG_ */
3948 /* introduced in 10.2 */
3949 __le32 antenna_mask;
3953 #define WMI_BCN_FILTER_ALL 0 /* Filter all beacons */
3954 #define WMI_BCN_FILTER_NONE 1 /* Pass all beacons */
3955 #define WMI_BCN_FILTER_RSSI 2 /* Pass Beacons RSSI >= RSSI threshold */
3956 #define WMI_BCN_FILTER_BSSID 3 /* Pass Beacons with matching BSSID */
3957 #define WMI_BCN_FILTER_SSID 4 /* Pass Beacons with matching SSID */
3959 struct wmi_bcn_filter_rx_cmd {
3961 __le32 bcn_filter_id;
3962 /* Filter type - wmi_bcn_filter */
3965 __le32 bcn_filter_len;
3966 /* Filter info (threshold, BSSID, RSSI) */
3970 /* Capabilities and IEs to be passed to firmware */
3971 struct wmi_bcn_prb_info {
3976 /* Advanced capabilities */
3977 /* HT capabilities */
3987 struct wmi_bcn_tmpl_cmd {
3988 /* unique id identifying the VDEV, generated by the caller */
3990 /* TIM IE offset from the beginning of the template. */
3991 __le32 tim_ie_offset;
3992 /* beacon probe capabilities and IEs */
3993 struct wmi_bcn_prb_info bcn_prb_info;
3994 /* beacon buffer length */
3996 /* variable length data */
4000 struct wmi_prb_tmpl_cmd {
4001 /* unique id identifying the VDEV, generated by the caller */
4003 /* beacon probe capabilities and IEs */
4004 struct wmi_bcn_prb_info bcn_prb_info;
4005 /* beacon buffer length */
4007 /* Variable length data */
4011 enum wmi_sta_ps_mode {
4012 /* enable power save for the given STA VDEV */
4013 WMI_STA_PS_MODE_DISABLED = 0,
4014 /* disable power save for a given STA VDEV */
4015 WMI_STA_PS_MODE_ENABLED = 1,
4018 struct wmi_sta_powersave_mode_cmd {
4019 /* unique id identifying the VDEV, generated by the caller */
4024 * (see enum wmi_sta_ps_mode)
4029 enum wmi_csa_offload_en {
4030 WMI_CSA_OFFLOAD_DISABLE = 0,
4031 WMI_CSA_OFFLOAD_ENABLE = 1,
4034 struct wmi_csa_offload_enable_cmd {
4036 __le32 csa_offload_enable;
4039 struct wmi_csa_offload_chanswitch_cmd {
4041 struct wmi_channel chan;
4045 * This parameter controls the policy for retrieving frames from AP while the
4046 * STA is in sleep state.
4048 * Only takes affect if the sta_ps_mode is enabled
4050 enum wmi_sta_ps_param_rx_wake_policy {
4052 * Wake up when ever there is an RX activity on the VDEV. In this mode
4053 * the Power save SM(state machine) will come out of sleep by either
4054 * sending null frame (or) a data frame (with PS==0) in response to TIM
4055 * bit set in the received beacon frame from AP.
4057 WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0,
4060 * Here the power save state machine will not wakeup in response to TIM
4061 * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
4062 * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all
4063 * access categories are delivery-enabled, the station will send a
4064 * UAPSD trigger frame, otherwise it will send a PS-Poll.
4066 WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
4070 * Number of tx frames/beacon that cause the power save SM to wake up.
4072 * Value 1 causes the SM to wake up for every TX. Value 0 has a special
4073 * meaning, It will cause the SM to never wake up. This is useful if you want
4074 * to keep the system to sleep all the time for some kind of test mode . host
4075 * can change this parameter any time. It will affect at the next tx frame.
4077 enum wmi_sta_ps_param_tx_wake_threshold {
4078 WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
4079 WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
4082 * Values greater than one indicate that many TX attempts per beacon
4083 * interval before the STA will wake up
4088 * The maximum number of PS-Poll frames the FW will send in response to
4089 * traffic advertised in TIM before waking up (by sending a null frame with PS
4090 * = 0). Value 0 has a special meaning: there is no maximum count and the FW
4091 * will send as many PS-Poll as are necessary to retrieve buffered BU. This
4092 * parameter is used when the RX wake policy is
4093 * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake
4094 * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE.
4096 enum wmi_sta_ps_param_pspoll_count {
4097 WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
4099 * Values greater than 0 indicate the maximum numer of PS-Poll frames
4100 * FW will send before waking up.
4103 /* When u-APSD is enabled the firmware will be very reluctant to exit
4104 * STA PS. This could result in very poor Rx performance with STA doing
4105 * PS-Poll for each and every buffered frame. This value is a bit
4108 WMI_STA_PS_PSPOLL_COUNT_UAPSD = 3,
4112 * This will include the delivery and trigger enabled state for every AC.
4113 * This is the negotiated state with AP. The host MLME needs to set this based
4114 * on AP capability and the state Set in the association request by the
4115 * station MLME.Lower 8 bits of the value specify the UAPSD configuration.
4117 #define WMI_UAPSD_AC_TYPE_DELI 0
4118 #define WMI_UAPSD_AC_TYPE_TRIG 1
4120 #define WMI_UAPSD_AC_BIT_MASK(ac, type) \
4121 ((type == WMI_UAPSD_AC_TYPE_DELI) ? (1<<(ac<<1)) : (1<<((ac<<1)+1)))
4123 enum wmi_sta_ps_param_uapsd {
4124 WMI_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
4125 WMI_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
4126 WMI_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
4127 WMI_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
4128 WMI_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
4129 WMI_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
4130 WMI_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
4131 WMI_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
4134 #define WMI_STA_UAPSD_MAX_INTERVAL_MSEC UINT_MAX
4136 struct wmi_sta_uapsd_auto_trig_param {
4138 __le32 user_priority;
4139 __le32 service_interval;
4140 __le32 suspend_interval;
4141 __le32 delay_interval;
4144 struct wmi_sta_uapsd_auto_trig_cmd_fixed_param {
4146 struct wmi_mac_addr peer_macaddr;
4150 struct wmi_sta_uapsd_auto_trig_arg {
4153 u32 service_interval;
4154 u32 suspend_interval;
4158 enum wmi_sta_powersave_param {
4160 * Controls how frames are retrievd from AP while STA is sleeping
4162 * (see enum wmi_sta_ps_param_rx_wake_policy)
4164 WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0,
4167 * The STA will go active after this many TX
4169 * (see enum wmi_sta_ps_param_tx_wake_threshold)
4171 WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
4174 * Number of PS-Poll to send before STA wakes up
4176 * (see enum wmi_sta_ps_param_pspoll_count)
4179 WMI_STA_PS_PARAM_PSPOLL_COUNT = 2,
4182 * TX/RX inactivity time in msec before going to sleep.
4184 * The power save SM will monitor tx/rx activity on the VDEV, if no
4185 * activity for the specified msec of the parameter the Power save
4186 * SM will go to sleep.
4188 WMI_STA_PS_PARAM_INACTIVITY_TIME = 3,
4191 * Set uapsd configuration.
4193 * (see enum wmi_sta_ps_param_uapsd)
4195 WMI_STA_PS_PARAM_UAPSD = 4,
4198 struct wmi_sta_powersave_param_cmd {
4200 __le32 param_id; /* %WMI_STA_PS_PARAM_ */
4204 /* No MIMO power save */
4205 #define WMI_STA_MIMO_PS_MODE_DISABLE
4206 /* mimo powersave mode static*/
4207 #define WMI_STA_MIMO_PS_MODE_STATIC
4208 /* mimo powersave mode dynamic */
4209 #define WMI_STA_MIMO_PS_MODE_DYNAMIC
4211 struct wmi_sta_mimo_ps_mode_cmd {
4212 /* unique id identifying the VDEV, generated by the caller */
4214 /* mimo powersave mode as defined above */
4215 __le32 mimo_pwrsave_mode;
4218 /* U-APSD configuration of peer station from (re)assoc request and TSPECs */
4219 enum wmi_ap_ps_param_uapsd {
4220 WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
4221 WMI_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
4222 WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
4223 WMI_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
4224 WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
4225 WMI_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
4226 WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
4227 WMI_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
4230 /* U-APSD maximum service period of peer station */
4231 enum wmi_ap_ps_peer_param_max_sp {
4232 WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
4233 WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
4234 WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
4235 WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
4236 MAX_WMI_AP_PS_PEER_PARAM_MAX_SP,
4240 * AP power save parameter
4241 * Set a power save specific parameter for a peer station
4243 enum wmi_ap_ps_peer_param {
4244 /* Set uapsd configuration for a given peer.
4246 * Include the delivery and trigger enabled state for every AC.
4247 * The host MLME needs to set this based on AP capability and stations
4248 * request Set in the association request received from the station.
4250 * Lower 8 bits of the value specify the UAPSD configuration.
4252 * (see enum wmi_ap_ps_param_uapsd)
4253 * The default value is 0.
4255 WMI_AP_PS_PEER_PARAM_UAPSD = 0,
4258 * Set the service period for a UAPSD capable station
4260 * The service period from wme ie in the (re)assoc request frame.
4262 * (see enum wmi_ap_ps_peer_param_max_sp)
4264 WMI_AP_PS_PEER_PARAM_MAX_SP = 1,
4266 /* Time in seconds for aging out buffered frames for STA in PS */
4267 WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
4270 struct wmi_ap_ps_peer_cmd {
4271 /* unique id identifying the VDEV, generated by the caller */
4274 /* peer MAC address */
4275 struct wmi_mac_addr peer_macaddr;
4277 /* AP powersave param (see enum wmi_ap_ps_peer_param) */
4280 /* AP powersave param value */
4284 /* 128 clients = 4 words */
4285 #define WMI_TIM_BITMAP_ARRAY_SIZE 4
4287 struct wmi_tim_info {
4290 __le32 tim_bitmap[WMI_TIM_BITMAP_ARRAY_SIZE];
4292 __le32 tim_num_ps_pending;
4295 /* Maximum number of NOA Descriptors supported */
4296 #define WMI_P2P_MAX_NOA_DESCRIPTORS 4
4297 #define WMI_P2P_OPPPS_ENABLE_BIT BIT(0)
4298 #define WMI_P2P_OPPPS_CTWINDOW_OFFSET 1
4299 #define WMI_P2P_NOA_CHANGED_BIT BIT(0)
4301 struct wmi_p2p_noa_info {
4302 /* Bit 0 - Flag to indicate an update in NOA schedule
4303 Bits 7-1 - Reserved */
4307 /* Bit 0 - Opp PS state of the AP
4308 Bits 1-7 - Ctwindow in TUs */
4310 /* Number of NOA descriptors */
4313 struct wmi_p2p_noa_descriptor descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS];
4316 struct wmi_bcn_info {
4317 struct wmi_tim_info tim_info;
4318 struct wmi_p2p_noa_info p2p_noa_info;
4321 struct wmi_host_swba_event {
4323 struct wmi_bcn_info bcn_info[0];
4326 #define WMI_MAX_AP_VDEV 16
4328 struct wmi_tbtt_offset_event {
4330 __le32 tbttoffset_list[WMI_MAX_AP_VDEV];
4333 struct wmi_peer_create_cmd {
4335 struct wmi_mac_addr peer_macaddr;
4338 enum wmi_peer_type {
4339 WMI_PEER_TYPE_DEFAULT = 0,
4340 WMI_PEER_TYPE_BSS = 1,
4341 WMI_PEER_TYPE_TDLS = 2,
4344 struct wmi_peer_delete_cmd {
4346 struct wmi_mac_addr peer_macaddr;
4349 struct wmi_peer_flush_tids_cmd {
4351 struct wmi_mac_addr peer_macaddr;
4352 __le32 peer_tid_bitmap;
4355 struct wmi_fixed_rate {
4357 * rate mode . 0: disable fixed rate (auto rate)
4358 * 1: legacy (non 11n) rate specified as ieee rate 2*Mbps
4359 * 2: ht20 11n rate specified as mcs index
4360 * 3: ht40 11n rate specified as mcs index
4364 * 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB)
4365 * and series 3 is stored at byte 3 (MSB)
4369 * 4 retry counts for 4 rate series. retry count for rate 0 is stored
4370 * in byte 0 (LSB) and retry count for rate 3 is stored at byte 3
4373 __le32 rate_retries;
4376 struct wmi_peer_fixed_rate_cmd {
4377 /* unique id identifying the VDEV, generated by the caller */
4379 /* peer MAC address */
4380 struct wmi_mac_addr peer_macaddr;
4382 struct wmi_fixed_rate peer_fixed_rate;
4385 #define WMI_MGMT_TID 17
4387 struct wmi_addba_clear_resp_cmd {
4388 /* unique id identifying the VDEV, generated by the caller */
4390 /* peer MAC address */
4391 struct wmi_mac_addr peer_macaddr;
4394 struct wmi_addba_send_cmd {
4395 /* unique id identifying the VDEV, generated by the caller */
4397 /* peer MAC address */
4398 struct wmi_mac_addr peer_macaddr;
4401 /* Buffer/Window size*/
4405 struct wmi_delba_send_cmd {
4406 /* unique id identifying the VDEV, generated by the caller */
4408 /* peer MAC address */
4409 struct wmi_mac_addr peer_macaddr;
4418 struct wmi_addba_setresponse_cmd {
4419 /* unique id identifying the vdev, generated by the caller */
4421 /* peer mac address */
4422 struct wmi_mac_addr peer_macaddr;
4429 struct wmi_send_singleamsdu_cmd {
4430 /* unique id identifying the vdev, generated by the caller */
4432 /* peer mac address */
4433 struct wmi_mac_addr peer_macaddr;
4438 enum wmi_peer_smps_state {
4439 WMI_PEER_SMPS_PS_NONE = 0x0,
4440 WMI_PEER_SMPS_STATIC = 0x1,
4441 WMI_PEER_SMPS_DYNAMIC = 0x2
4444 enum wmi_peer_chwidth {
4445 WMI_PEER_CHWIDTH_20MHZ = 0,
4446 WMI_PEER_CHWIDTH_40MHZ = 1,
4447 WMI_PEER_CHWIDTH_80MHZ = 2,
4450 enum wmi_peer_param {
4451 WMI_PEER_SMPS_STATE = 0x1, /* see %wmi_peer_smps_state */
4452 WMI_PEER_AMPDU = 0x2,
4453 WMI_PEER_AUTHORIZE = 0x3,
4454 WMI_PEER_CHAN_WIDTH = 0x4,
4456 WMI_PEER_USE_4ADDR = 0x6,
4457 WMI_PEER_DUMMY_VAR = 0xff, /* dummy parameter for STA PS workaround */
4460 struct wmi_peer_set_param_cmd {
4462 struct wmi_mac_addr peer_macaddr;
4467 #define MAX_SUPPORTED_RATES 128
4469 struct wmi_rate_set {
4470 /* total number of rates */
4473 * rates (each 8bit value) packed into a 32 bit word.
4474 * the rates are filled from least significant byte to most
4477 __le32 rates[(MAX_SUPPORTED_RATES/4)+1];
4480 struct wmi_rate_set_arg {
4481 unsigned int num_rates;
4482 u8 rates[MAX_SUPPORTED_RATES];
4486 * NOTE: It would bea good idea to represent the Tx MCS
4487 * info in one word and Rx in another word. This is split
4488 * into multiple words for convenience
4490 struct wmi_vht_rate_set {
4491 __le32 rx_max_rate; /* Max Rx data rate */
4492 __le32 rx_mcs_set; /* Negotiated RX VHT rates */
4493 __le32 tx_max_rate; /* Max Tx data rate */
4494 __le32 tx_mcs_set; /* Negotiated TX VHT rates */
4497 struct wmi_vht_rate_set_arg {
4504 struct wmi_peer_set_rates_cmd {
4505 /* peer MAC address */
4506 struct wmi_mac_addr peer_macaddr;
4507 /* legacy rate set */
4508 struct wmi_rate_set peer_legacy_rates;
4510 struct wmi_rate_set peer_ht_rates;
4513 struct wmi_peer_set_q_empty_callback_cmd {
4514 /* unique id identifying the VDEV, generated by the caller */
4516 /* peer MAC address */
4517 struct wmi_mac_addr peer_macaddr;
4518 __le32 callback_enable;
4521 #define WMI_PEER_AUTH 0x00000001
4522 #define WMI_PEER_QOS 0x00000002
4523 #define WMI_PEER_NEED_PTK_4_WAY 0x00000004
4524 #define WMI_PEER_NEED_GTK_2_WAY 0x00000010
4525 #define WMI_PEER_APSD 0x00000800
4526 #define WMI_PEER_HT 0x00001000
4527 #define WMI_PEER_40MHZ 0x00002000
4528 #define WMI_PEER_STBC 0x00008000
4529 #define WMI_PEER_LDPC 0x00010000
4530 #define WMI_PEER_DYN_MIMOPS 0x00020000
4531 #define WMI_PEER_STATIC_MIMOPS 0x00040000
4532 #define WMI_PEER_SPATIAL_MUX 0x00200000
4533 #define WMI_PEER_VHT 0x02000000
4534 #define WMI_PEER_80MHZ 0x04000000
4535 #define WMI_PEER_VHT_2G 0x08000000
4538 * Peer rate capabilities.
4540 * This is of interest to the ratecontrol
4541 * module which resides in the firmware. The bit definitions are
4542 * consistent with that defined in if_athrate.c.
4544 #define WMI_RC_DS_FLAG 0x01
4545 #define WMI_RC_CW40_FLAG 0x02
4546 #define WMI_RC_SGI_FLAG 0x04
4547 #define WMI_RC_HT_FLAG 0x08
4548 #define WMI_RC_RTSCTS_FLAG 0x10
4549 #define WMI_RC_TX_STBC_FLAG 0x20
4550 #define WMI_RC_RX_STBC_FLAG 0xC0
4551 #define WMI_RC_RX_STBC_FLAG_S 6
4552 #define WMI_RC_WEP_TKIP_FLAG 0x100
4553 #define WMI_RC_TS_FLAG 0x200
4554 #define WMI_RC_UAPSD_FLAG 0x400
4556 /* Maximum listen interval supported by hw in units of beacon interval */
4557 #define ATH10K_MAX_HW_LISTEN_INTERVAL 5
4559 struct wmi_common_peer_assoc_complete_cmd {
4560 struct wmi_mac_addr peer_macaddr;
4562 __le32 peer_new_assoc; /* 1=assoc, 0=reassoc */
4563 __le32 peer_associd; /* 16 LSBs */
4565 __le32 peer_caps; /* 16 LSBs */
4566 __le32 peer_listen_intval;
4567 __le32 peer_ht_caps;
4568 __le32 peer_max_mpdu;
4569 __le32 peer_mpdu_density; /* 0..16 */
4570 __le32 peer_rate_caps;
4571 struct wmi_rate_set peer_legacy_rates;
4572 struct wmi_rate_set peer_ht_rates;
4573 __le32 peer_nss; /* num of spatial streams */
4574 __le32 peer_vht_caps;
4575 __le32 peer_phymode;
4576 struct wmi_vht_rate_set peer_vht_rates;
4579 struct wmi_main_peer_assoc_complete_cmd {
4580 struct wmi_common_peer_assoc_complete_cmd cmd;
4582 /* HT Operation Element of the peer. Five bytes packed in 2
4583 * INT32 array and filled from lsb to msb. */
4584 __le32 peer_ht_info[2];
4587 struct wmi_10_1_peer_assoc_complete_cmd {
4588 struct wmi_common_peer_assoc_complete_cmd cmd;
4591 #define WMI_PEER_ASSOC_INFO0_MAX_MCS_IDX_LSB 0
4592 #define WMI_PEER_ASSOC_INFO0_MAX_MCS_IDX_MASK 0x0f
4593 #define WMI_PEER_ASSOC_INFO0_MAX_NSS_LSB 4
4594 #define WMI_PEER_ASSOC_INFO0_MAX_NSS_MASK 0xf0
4596 struct wmi_10_2_peer_assoc_complete_cmd {
4597 struct wmi_common_peer_assoc_complete_cmd cmd;
4598 __le32 info0; /* WMI_PEER_ASSOC_INFO0_ */
4601 struct wmi_peer_assoc_complete_arg {
4606 u32 peer_flags; /* see %WMI_PEER_ */
4608 u32 peer_listen_intval;
4611 u32 peer_mpdu_density; /* 0..16 */
4612 u32 peer_rate_caps; /* see %WMI_RC_ */
4613 struct wmi_rate_set_arg peer_legacy_rates;
4614 struct wmi_rate_set_arg peer_ht_rates;
4615 u32 peer_num_spatial_streams;
4617 enum wmi_phy_mode peer_phymode;
4618 struct wmi_vht_rate_set_arg peer_vht_rates;
4621 struct wmi_peer_add_wds_entry_cmd {
4622 /* peer MAC address */
4623 struct wmi_mac_addr peer_macaddr;
4625 struct wmi_mac_addr wds_macaddr;
4628 struct wmi_peer_remove_wds_entry_cmd {
4630 struct wmi_mac_addr wds_macaddr;
4633 struct wmi_peer_q_empty_callback_event {
4634 /* peer MAC address */
4635 struct wmi_mac_addr peer_macaddr;
4639 * Channel info WMI event
4641 struct wmi_chan_info_event {
4646 __le32 rx_clear_count;
4650 struct wmi_peer_sta_kickout_event {
4651 struct wmi_mac_addr peer_macaddr;
4654 #define WMI_CHAN_INFO_FLAG_COMPLETE BIT(0)
4656 /* FIXME: empirically extrapolated */
4657 #define WMI_CHAN_INFO_MSEC(x) ((x) / 76595)
4659 /* Beacon filter wmi command info */
4660 #define BCN_FLT_MAX_SUPPORTED_IES 256
4661 #define BCN_FLT_MAX_ELEMS_IE_LIST (BCN_FLT_MAX_SUPPORTED_IES / 32)
4663 struct bss_bcn_stats {
4665 __le32 bss_bcnsdropped;
4666 __le32 bss_bcnsdelivered;
4669 struct bcn_filter_stats {
4670 __le32 bcns_dropped;
4671 __le32 bcns_delivered;
4672 __le32 activefilters;
4673 struct bss_bcn_stats bss_stats;
4676 struct wmi_add_bcn_filter_cmd {
4678 u32 ie_map[BCN_FLT_MAX_ELEMS_IE_LIST];
4681 enum wmi_sta_keepalive_method {
4682 WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1,
4683 WMI_STA_KEEPALIVE_METHOD_UNSOLICITATED_ARP_RESPONSE = 2,
4686 #define WMI_STA_KEEPALIVE_INTERVAL_DISABLE 0
4688 /* Firmware crashes if keepalive interval exceeds this limit */
4689 #define WMI_STA_KEEPALIVE_INTERVAL_MAX_SECONDS 0xffff
4691 /* note: ip4 addresses are in network byte order, i.e. big endian */
4692 struct wmi_sta_keepalive_arp_resp {
4693 __be32 src_ip4_addr;
4694 __be32 dest_ip4_addr;
4695 struct wmi_mac_addr dest_mac_addr;
4698 struct wmi_sta_keepalive_cmd {
4701 __le32 method; /* WMI_STA_KEEPALIVE_METHOD_ */
4702 __le32 interval; /* in seconds */
4703 struct wmi_sta_keepalive_arp_resp arp_resp;
4706 struct wmi_sta_keepalive_arg {
4711 __be32 src_ip4_addr;
4712 __be32 dest_ip4_addr;
4713 const u8 dest_mac_addr[ETH_ALEN];
4716 enum wmi_force_fw_hang_type {
4717 WMI_FORCE_FW_HANG_ASSERT = 1,
4718 WMI_FORCE_FW_HANG_NO_DETECT,
4719 WMI_FORCE_FW_HANG_CTRL_EP_FULL,
4720 WMI_FORCE_FW_HANG_EMPTY_POINT,
4721 WMI_FORCE_FW_HANG_STACK_OVERFLOW,
4722 WMI_FORCE_FW_HANG_INFINITE_LOOP,
4725 #define WMI_FORCE_FW_HANG_RANDOM_TIME 0xFFFFFFFF
4727 struct wmi_force_fw_hang_cmd {
4732 enum ath10k_dbglog_level {
4733 ATH10K_DBGLOG_LEVEL_VERBOSE = 0,
4734 ATH10K_DBGLOG_LEVEL_INFO = 1,
4735 ATH10K_DBGLOG_LEVEL_WARN = 2,
4736 ATH10K_DBGLOG_LEVEL_ERR = 3,
4739 /* VAP ids to enable dbglog */
4740 #define ATH10K_DBGLOG_CFG_VAP_LOG_LSB 0
4741 #define ATH10K_DBGLOG_CFG_VAP_LOG_MASK 0x0000ffff
4743 /* to enable dbglog in the firmware */
4744 #define ATH10K_DBGLOG_CFG_REPORTING_ENABLE_LSB 16
4745 #define ATH10K_DBGLOG_CFG_REPORTING_ENABLE_MASK 0x00010000
4747 /* timestamp resolution */
4748 #define ATH10K_DBGLOG_CFG_RESOLUTION_LSB 17
4749 #define ATH10K_DBGLOG_CFG_RESOLUTION_MASK 0x000E0000
4751 /* number of queued messages before sending them to the host */
4752 #define ATH10K_DBGLOG_CFG_REPORT_SIZE_LSB 20
4753 #define ATH10K_DBGLOG_CFG_REPORT_SIZE_MASK 0x0ff00000
4756 * Log levels to enable. This defines the minimum level to enable, this is
4757 * not a bitmask. See enum ath10k_dbglog_level for the values.
4759 #define ATH10K_DBGLOG_CFG_LOG_LVL_LSB 28
4760 #define ATH10K_DBGLOG_CFG_LOG_LVL_MASK 0x70000000
4763 * Note: this is a cleaned up version of a struct firmware uses. For
4764 * example, config_valid was hidden inside an array.
4766 struct wmi_dbglog_cfg_cmd {
4767 /* bitmask to hold mod id config*/
4768 __le32 module_enable;
4770 /* see ATH10K_DBGLOG_CFG_ */
4771 __le32 config_enable;
4773 /* mask of module id bits to be changed */
4774 __le32 module_valid;
4776 /* mask of config bits to be changed, see ATH10K_DBGLOG_CFG_ */
4777 __le32 config_valid;
4780 enum wmi_roam_reason {
4781 WMI_ROAM_REASON_BETTER_AP = 1,
4782 WMI_ROAM_REASON_BEACON_MISS = 2,
4783 WMI_ROAM_REASON_LOW_RSSI = 3,
4784 WMI_ROAM_REASON_SUITABLE_AP_FOUND = 4,
4785 WMI_ROAM_REASON_HO_FAILED = 5,
4788 WMI_ROAM_REASON_MAX,
4791 struct wmi_roam_ev {
4796 #define ATH10K_FRAGMT_THRESHOLD_MIN 540
4797 #define ATH10K_FRAGMT_THRESHOLD_MAX 2346
4799 #define WMI_MAX_EVENT 0x1000
4800 /* Maximum number of pending TXed WMI packets */
4801 #define WMI_SKB_HEADROOM sizeof(struct wmi_cmd_hdr)
4803 /* By default disable power save for IBSS */
4804 #define ATH10K_DEFAULT_ATIM 0
4806 #define WMI_MAX_MEM_REQS 16
4808 struct wmi_scan_ev_arg {
4809 __le32 event_type; /* %WMI_SCAN_EVENT_ */
4810 __le32 reason; /* %WMI_SCAN_REASON_ */
4811 __le32 channel_freq; /* only valid for WMI_SCAN_EVENT_FOREIGN_CHANNEL */
4817 struct wmi_mgmt_rx_ev_arg {
4823 __le32 status; /* %WMI_RX_STATUS_ */
4826 struct wmi_ch_info_ev_arg {
4831 __le32 rx_clear_count;
4835 struct wmi_vdev_start_ev_arg {
4838 __le32 resp_type; /* %WMI_VDEV_RESP_ */
4842 struct wmi_peer_kick_ev_arg {
4846 struct wmi_swba_ev_arg {
4848 const struct wmi_tim_info *tim_info[WMI_MAX_AP_VDEV];
4849 const struct wmi_p2p_noa_info *noa_info[WMI_MAX_AP_VDEV];
4852 struct wmi_phyerr_ev_arg {
4857 const struct wmi_phyerr *phyerrs;
4860 struct wmi_svc_rdy_ev_arg {
4861 __le32 min_tx_power;
4862 __le32 max_tx_power;
4869 __le32 num_rf_chains;
4871 __le32 num_mem_reqs;
4872 const __le32 *service_map;
4873 size_t service_map_len;
4874 const struct wlan_host_mem_req *mem_reqs[WMI_MAX_MEM_REQS];
4877 struct wmi_rdy_ev_arg {
4884 struct wmi_roam_ev_arg {
4890 struct wmi_pdev_temperature_event {
4891 /* temperature value in Celcius degree */
4895 /* WOW structures */
4896 enum wmi_wow_wakeup_event {
4897 WOW_BMISS_EVENT = 0,
4898 WOW_BETTER_AP_EVENT,
4899 WOW_DEAUTH_RECVD_EVENT,
4900 WOW_MAGIC_PKT_RECVD_EVENT,
4902 WOW_FOURWAY_HSHAKE_EVENT,
4903 WOW_EAPOL_RECVD_EVENT,
4904 WOW_NLO_DETECTED_EVENT,
4905 WOW_DISASSOC_RECVD_EVENT,
4906 WOW_PATTERN_MATCH_EVENT,
4908 WOW_PROBE_REQ_WPS_IE_EVENT,
4910 WOW_ASSOC_REQ_EVENT,
4913 WOW_HOST_AUTO_SHUTDOWN_EVENT,
4914 WOW_IOAC_MAGIC_EVENT,
4915 WOW_IOAC_SHORT_EVENT,
4916 WOW_IOAC_EXTEND_EVENT,
4917 WOW_IOAC_TIMER_EVENT,
4918 WOW_DFS_PHYERR_RADAR_EVENT,
4920 WOW_CLIENT_KICKOUT_EVENT,
4924 #define C2S(x) case x: return #x
4926 static inline const char *wow_wakeup_event(enum wmi_wow_wakeup_event ev)
4929 C2S(WOW_BMISS_EVENT);
4930 C2S(WOW_BETTER_AP_EVENT);
4931 C2S(WOW_DEAUTH_RECVD_EVENT);
4932 C2S(WOW_MAGIC_PKT_RECVD_EVENT);
4933 C2S(WOW_GTK_ERR_EVENT);
4934 C2S(WOW_FOURWAY_HSHAKE_EVENT);
4935 C2S(WOW_EAPOL_RECVD_EVENT);
4936 C2S(WOW_NLO_DETECTED_EVENT);
4937 C2S(WOW_DISASSOC_RECVD_EVENT);
4938 C2S(WOW_PATTERN_MATCH_EVENT);
4939 C2S(WOW_CSA_IE_EVENT);
4940 C2S(WOW_PROBE_REQ_WPS_IE_EVENT);
4941 C2S(WOW_AUTH_REQ_EVENT);
4942 C2S(WOW_ASSOC_REQ_EVENT);
4944 C2S(WOW_RA_MATCH_EVENT);
4945 C2S(WOW_HOST_AUTO_SHUTDOWN_EVENT);
4946 C2S(WOW_IOAC_MAGIC_EVENT);
4947 C2S(WOW_IOAC_SHORT_EVENT);
4948 C2S(WOW_IOAC_EXTEND_EVENT);
4949 C2S(WOW_IOAC_TIMER_EVENT);
4950 C2S(WOW_DFS_PHYERR_RADAR_EVENT);
4951 C2S(WOW_BEACON_EVENT);
4952 C2S(WOW_CLIENT_KICKOUT_EVENT);
4959 enum wmi_wow_wake_reason {
4960 WOW_REASON_UNSPECIFIED = -1,
4961 WOW_REASON_NLOD = 0,
4962 WOW_REASON_AP_ASSOC_LOST,
4963 WOW_REASON_LOW_RSSI,
4964 WOW_REASON_DEAUTH_RECVD,
4965 WOW_REASON_DISASSOC_RECVD,
4966 WOW_REASON_GTK_HS_ERR,
4968 WOW_REASON_FOURWAY_HS_RECV,
4969 WOW_REASON_TIMER_INTR_RECV,
4970 WOW_REASON_PATTERN_MATCH_FOUND,
4971 WOW_REASON_RECV_MAGIC_PATTERN,
4972 WOW_REASON_P2P_DISC,
4974 WOW_REASON_CSA_EVENT,
4975 WOW_REASON_PROBE_REQ_WPS_IE_RECV,
4976 WOW_REASON_AUTH_REQ_RECV,
4977 WOW_REASON_ASSOC_REQ_RECV,
4978 WOW_REASON_HTT_EVENT,
4979 WOW_REASON_RA_MATCH,
4980 WOW_REASON_HOST_AUTO_SHUTDOWN,
4981 WOW_REASON_IOAC_MAGIC_EVENT,
4982 WOW_REASON_IOAC_SHORT_EVENT,
4983 WOW_REASON_IOAC_EXTEND_EVENT,
4984 WOW_REASON_IOAC_TIMER_EVENT,
4986 WOW_REASON_DFS_PHYERR_RADADR_EVENT,
4987 WOW_REASON_BEACON_RECV,
4988 WOW_REASON_CLIENT_KICKOUT_EVENT,
4989 WOW_REASON_DEBUG_TEST = 0xFF,
4992 static inline const char *wow_reason(enum wmi_wow_wake_reason reason)
4995 C2S(WOW_REASON_UNSPECIFIED);
4996 C2S(WOW_REASON_NLOD);
4997 C2S(WOW_REASON_AP_ASSOC_LOST);
4998 C2S(WOW_REASON_LOW_RSSI);
4999 C2S(WOW_REASON_DEAUTH_RECVD);
5000 C2S(WOW_REASON_DISASSOC_RECVD);
5001 C2S(WOW_REASON_GTK_HS_ERR);
5002 C2S(WOW_REASON_EAP_REQ);
5003 C2S(WOW_REASON_FOURWAY_HS_RECV);
5004 C2S(WOW_REASON_TIMER_INTR_RECV);
5005 C2S(WOW_REASON_PATTERN_MATCH_FOUND);
5006 C2S(WOW_REASON_RECV_MAGIC_PATTERN);
5007 C2S(WOW_REASON_P2P_DISC);
5008 C2S(WOW_REASON_WLAN_HB);
5009 C2S(WOW_REASON_CSA_EVENT);
5010 C2S(WOW_REASON_PROBE_REQ_WPS_IE_RECV);
5011 C2S(WOW_REASON_AUTH_REQ_RECV);
5012 C2S(WOW_REASON_ASSOC_REQ_RECV);
5013 C2S(WOW_REASON_HTT_EVENT);
5014 C2S(WOW_REASON_RA_MATCH);
5015 C2S(WOW_REASON_HOST_AUTO_SHUTDOWN);
5016 C2S(WOW_REASON_IOAC_MAGIC_EVENT);
5017 C2S(WOW_REASON_IOAC_SHORT_EVENT);
5018 C2S(WOW_REASON_IOAC_EXTEND_EVENT);
5019 C2S(WOW_REASON_IOAC_TIMER_EVENT);
5020 C2S(WOW_REASON_ROAM_HO);
5021 C2S(WOW_REASON_DFS_PHYERR_RADADR_EVENT);
5022 C2S(WOW_REASON_BEACON_RECV);
5023 C2S(WOW_REASON_CLIENT_KICKOUT_EVENT);
5024 C2S(WOW_REASON_DEBUG_TEST);
5032 struct wmi_wow_ev_arg {
5035 enum wmi_wow_wake_reason wake_reason;
5039 #define WOW_MIN_PATTERN_SIZE 1
5040 #define WOW_MAX_PATTERN_SIZE 148
5041 #define WOW_MAX_PKT_OFFSET 128
5043 enum wmi_tdls_state {
5045 WMI_TDLS_ENABLE_PASSIVE,
5046 WMI_TDLS_ENABLE_ACTIVE,
5049 enum wmi_tdls_peer_state {
5050 WMI_TDLS_PEER_STATE_PEERING,
5051 WMI_TDLS_PEER_STATE_CONNECTED,
5052 WMI_TDLS_PEER_STATE_TEARDOWN,
5055 struct wmi_tdls_peer_update_cmd_arg {
5057 enum wmi_tdls_peer_state peer_state;
5061 #define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32
5063 struct wmi_tdls_peer_capab_arg {
5064 u8 peer_uapsd_queues;
5066 u32 buff_sta_support;
5067 u32 off_chan_support;
5068 u32 peer_curr_operclass;
5069 u32 self_curr_operclass;
5071 u32 peer_operclass_len;
5072 u8 peer_operclass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
5073 u32 is_peer_responder;
5074 u32 pref_offchan_num;
5075 u32 pref_offchan_bw;
5080 struct ath10k_fw_stats_pdev;
5081 struct ath10k_fw_stats_peer;
5083 int ath10k_wmi_attach(struct ath10k *ar);
5084 void ath10k_wmi_detach(struct ath10k *ar);
5085 int ath10k_wmi_wait_for_service_ready(struct ath10k *ar);
5086 int ath10k_wmi_wait_for_unified_ready(struct ath10k *ar);
5088 struct sk_buff *ath10k_wmi_alloc_skb(struct ath10k *ar, u32 len);
5089 int ath10k_wmi_connect(struct ath10k *ar);
5091 struct sk_buff *ath10k_wmi_alloc_skb(struct ath10k *ar, u32 len);
5092 int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id);
5093 int ath10k_wmi_cmd_send_nowait(struct ath10k *ar, struct sk_buff *skb,
5095 void ath10k_wmi_start_scan_init(struct ath10k *ar, struct wmi_start_scan_arg *);
5097 void ath10k_wmi_pull_pdev_stats_base(const struct wmi_pdev_stats_base *src,
5098 struct ath10k_fw_stats_pdev *dst);
5099 void ath10k_wmi_pull_pdev_stats_tx(const struct wmi_pdev_stats_tx *src,
5100 struct ath10k_fw_stats_pdev *dst);
5101 void ath10k_wmi_pull_pdev_stats_rx(const struct wmi_pdev_stats_rx *src,
5102 struct ath10k_fw_stats_pdev *dst);
5103 void ath10k_wmi_pull_pdev_stats_extra(const struct wmi_pdev_stats_extra *src,
5104 struct ath10k_fw_stats_pdev *dst);
5105 void ath10k_wmi_pull_peer_stats(const struct wmi_peer_stats *src,
5106 struct ath10k_fw_stats_peer *dst);
5107 void ath10k_wmi_put_host_mem_chunks(struct ath10k *ar,
5108 struct wmi_host_mem_chunks *chunks);
5109 void ath10k_wmi_put_start_scan_common(struct wmi_start_scan_common *cmn,
5110 const struct wmi_start_scan_arg *arg);
5111 void ath10k_wmi_set_wmm_param(struct wmi_wmm_params *params,
5112 const struct wmi_wmm_params_arg *arg);
5113 void ath10k_wmi_put_wmi_channel(struct wmi_channel *ch,
5114 const struct wmi_channel_arg *arg);
5115 int ath10k_wmi_start_scan_verify(const struct wmi_start_scan_arg *arg);
5117 int ath10k_wmi_event_scan(struct ath10k *ar, struct sk_buff *skb);
5118 int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb);
5119 void ath10k_wmi_event_chan_info(struct ath10k *ar, struct sk_buff *skb);
5120 void ath10k_wmi_event_echo(struct ath10k *ar, struct sk_buff *skb);
5121 int ath10k_wmi_event_debug_mesg(struct ath10k *ar, struct sk_buff *skb);
5122 void ath10k_wmi_event_update_stats(struct ath10k *ar, struct sk_buff *skb);
5123 void ath10k_wmi_event_vdev_start_resp(struct ath10k *ar, struct sk_buff *skb);
5124 void ath10k_wmi_event_vdev_stopped(struct ath10k *ar, struct sk_buff *skb);
5125 void ath10k_wmi_event_peer_sta_kickout(struct ath10k *ar, struct sk_buff *skb);
5126 void ath10k_wmi_event_host_swba(struct ath10k *ar, struct sk_buff *skb);
5127 void ath10k_wmi_event_tbttoffset_update(struct ath10k *ar, struct sk_buff *skb);
5128 void ath10k_wmi_event_dfs(struct ath10k *ar,
5129 const struct wmi_phyerr *phyerr, u64 tsf);
5130 void ath10k_wmi_event_spectral_scan(struct ath10k *ar,
5131 const struct wmi_phyerr *phyerr,
5133 void ath10k_wmi_event_phyerr(struct ath10k *ar, struct sk_buff *skb);
5134 void ath10k_wmi_event_roam(struct ath10k *ar, struct sk_buff *skb);
5135 void ath10k_wmi_event_profile_match(struct ath10k *ar, struct sk_buff *skb);
5136 void ath10k_wmi_event_debug_print(struct ath10k *ar, struct sk_buff *skb);
5137 void ath10k_wmi_event_pdev_qvit(struct ath10k *ar, struct sk_buff *skb);
5138 void ath10k_wmi_event_wlan_profile_data(struct ath10k *ar, struct sk_buff *skb);
5139 void ath10k_wmi_event_rtt_measurement_report(struct ath10k *ar,
5140 struct sk_buff *skb);
5141 void ath10k_wmi_event_tsf_measurement_report(struct ath10k *ar,
5142 struct sk_buff *skb);
5143 void ath10k_wmi_event_rtt_error_report(struct ath10k *ar, struct sk_buff *skb);
5144 void ath10k_wmi_event_wow_wakeup_host(struct ath10k *ar, struct sk_buff *skb);
5145 void ath10k_wmi_event_dcs_interference(struct ath10k *ar, struct sk_buff *skb);
5146 void ath10k_wmi_event_pdev_tpc_config(struct ath10k *ar, struct sk_buff *skb);
5147 void ath10k_wmi_event_pdev_ftm_intg(struct ath10k *ar, struct sk_buff *skb);
5148 void ath10k_wmi_event_gtk_offload_status(struct ath10k *ar,
5149 struct sk_buff *skb);
5150 void ath10k_wmi_event_gtk_rekey_fail(struct ath10k *ar, struct sk_buff *skb);
5151 void ath10k_wmi_event_delba_complete(struct ath10k *ar, struct sk_buff *skb);
5152 void ath10k_wmi_event_addba_complete(struct ath10k *ar, struct sk_buff *skb);
5153 void ath10k_wmi_event_vdev_install_key_complete(struct ath10k *ar,
5154 struct sk_buff *skb);
5155 void ath10k_wmi_event_inst_rssi_stats(struct ath10k *ar, struct sk_buff *skb);
5156 void ath10k_wmi_event_vdev_standby_req(struct ath10k *ar, struct sk_buff *skb);
5157 void ath10k_wmi_event_vdev_resume_req(struct ath10k *ar, struct sk_buff *skb);
5158 void ath10k_wmi_event_service_ready(struct ath10k *ar, struct sk_buff *skb);
5159 int ath10k_wmi_event_ready(struct ath10k *ar, struct sk_buff *skb);
5161 #endif /* _WMI_H_ */