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,
152 WMI_SERVICE_COEX_GPIO,
158 enum wmi_10x_service {
159 WMI_10X_SERVICE_BEACON_OFFLOAD = 0,
160 WMI_10X_SERVICE_SCAN_OFFLOAD,
161 WMI_10X_SERVICE_ROAM_OFFLOAD,
162 WMI_10X_SERVICE_BCN_MISS_OFFLOAD,
163 WMI_10X_SERVICE_STA_PWRSAVE,
164 WMI_10X_SERVICE_STA_ADVANCED_PWRSAVE,
165 WMI_10X_SERVICE_AP_UAPSD,
166 WMI_10X_SERVICE_AP_DFS,
167 WMI_10X_SERVICE_11AC,
168 WMI_10X_SERVICE_BLOCKACK,
169 WMI_10X_SERVICE_PHYERR,
170 WMI_10X_SERVICE_BCN_FILTER,
172 WMI_10X_SERVICE_RATECTRL,
174 WMI_10X_SERVICE_RATECTRL_CACHE,
175 WMI_10X_SERVICE_IRAM_TIDS,
176 WMI_10X_SERVICE_BURST,
178 /* introduced in 10.2 */
179 WMI_10X_SERVICE_SMART_ANTENNA_SW_SUPPORT,
180 WMI_10X_SERVICE_FORCE_FW_HANG,
181 WMI_10X_SERVICE_SMART_ANTENNA_HW_SUPPORT,
183 WMI_10X_SERVICE_COEX_GPIO,
186 enum wmi_main_service {
187 WMI_MAIN_SERVICE_BEACON_OFFLOAD = 0,
188 WMI_MAIN_SERVICE_SCAN_OFFLOAD,
189 WMI_MAIN_SERVICE_ROAM_OFFLOAD,
190 WMI_MAIN_SERVICE_BCN_MISS_OFFLOAD,
191 WMI_MAIN_SERVICE_STA_PWRSAVE,
192 WMI_MAIN_SERVICE_STA_ADVANCED_PWRSAVE,
193 WMI_MAIN_SERVICE_AP_UAPSD,
194 WMI_MAIN_SERVICE_AP_DFS,
195 WMI_MAIN_SERVICE_11AC,
196 WMI_MAIN_SERVICE_BLOCKACK,
197 WMI_MAIN_SERVICE_PHYERR,
198 WMI_MAIN_SERVICE_BCN_FILTER,
199 WMI_MAIN_SERVICE_RTT,
200 WMI_MAIN_SERVICE_RATECTRL,
201 WMI_MAIN_SERVICE_WOW,
202 WMI_MAIN_SERVICE_RATECTRL_CACHE,
203 WMI_MAIN_SERVICE_IRAM_TIDS,
204 WMI_MAIN_SERVICE_ARPNS_OFFLOAD,
205 WMI_MAIN_SERVICE_NLO,
206 WMI_MAIN_SERVICE_GTK_OFFLOAD,
207 WMI_MAIN_SERVICE_SCAN_SCH,
208 WMI_MAIN_SERVICE_CSA_OFFLOAD,
209 WMI_MAIN_SERVICE_CHATTER,
210 WMI_MAIN_SERVICE_COEX_FREQAVOID,
211 WMI_MAIN_SERVICE_PACKET_POWER_SAVE,
212 WMI_MAIN_SERVICE_FORCE_FW_HANG,
213 WMI_MAIN_SERVICE_GPIO,
214 WMI_MAIN_SERVICE_STA_DTIM_PS_MODULATED_DTIM,
215 WMI_MAIN_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG,
216 WMI_MAIN_SERVICE_STA_UAPSD_VAR_AUTO_TRIG,
217 WMI_MAIN_SERVICE_STA_KEEP_ALIVE,
218 WMI_MAIN_SERVICE_TX_ENCAP,
221 static inline char *wmi_service_name(int service_id)
223 #define SVCSTR(x) case x: return #x
225 switch (service_id) {
226 SVCSTR(WMI_SERVICE_BEACON_OFFLOAD);
227 SVCSTR(WMI_SERVICE_SCAN_OFFLOAD);
228 SVCSTR(WMI_SERVICE_ROAM_OFFLOAD);
229 SVCSTR(WMI_SERVICE_BCN_MISS_OFFLOAD);
230 SVCSTR(WMI_SERVICE_STA_PWRSAVE);
231 SVCSTR(WMI_SERVICE_STA_ADVANCED_PWRSAVE);
232 SVCSTR(WMI_SERVICE_AP_UAPSD);
233 SVCSTR(WMI_SERVICE_AP_DFS);
234 SVCSTR(WMI_SERVICE_11AC);
235 SVCSTR(WMI_SERVICE_BLOCKACK);
236 SVCSTR(WMI_SERVICE_PHYERR);
237 SVCSTR(WMI_SERVICE_BCN_FILTER);
238 SVCSTR(WMI_SERVICE_RTT);
239 SVCSTR(WMI_SERVICE_RATECTRL);
240 SVCSTR(WMI_SERVICE_WOW);
241 SVCSTR(WMI_SERVICE_RATECTRL_CACHE);
242 SVCSTR(WMI_SERVICE_IRAM_TIDS);
243 SVCSTR(WMI_SERVICE_ARPNS_OFFLOAD);
244 SVCSTR(WMI_SERVICE_NLO);
245 SVCSTR(WMI_SERVICE_GTK_OFFLOAD);
246 SVCSTR(WMI_SERVICE_SCAN_SCH);
247 SVCSTR(WMI_SERVICE_CSA_OFFLOAD);
248 SVCSTR(WMI_SERVICE_CHATTER);
249 SVCSTR(WMI_SERVICE_COEX_FREQAVOID);
250 SVCSTR(WMI_SERVICE_PACKET_POWER_SAVE);
251 SVCSTR(WMI_SERVICE_FORCE_FW_HANG);
252 SVCSTR(WMI_SERVICE_GPIO);
253 SVCSTR(WMI_SERVICE_STA_DTIM_PS_MODULATED_DTIM);
254 SVCSTR(WMI_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG);
255 SVCSTR(WMI_SERVICE_STA_UAPSD_VAR_AUTO_TRIG);
256 SVCSTR(WMI_SERVICE_STA_KEEP_ALIVE);
257 SVCSTR(WMI_SERVICE_TX_ENCAP);
258 SVCSTR(WMI_SERVICE_BURST);
259 SVCSTR(WMI_SERVICE_SMART_ANTENNA_SW_SUPPORT);
260 SVCSTR(WMI_SERVICE_SMART_ANTENNA_HW_SUPPORT);
261 SVCSTR(WMI_SERVICE_ROAM_SCAN_OFFLOAD);
262 SVCSTR(WMI_SERVICE_AP_PS_DETECT_OUT_OF_SYNC);
263 SVCSTR(WMI_SERVICE_EARLY_RX);
264 SVCSTR(WMI_SERVICE_STA_SMPS);
265 SVCSTR(WMI_SERVICE_FWTEST);
266 SVCSTR(WMI_SERVICE_STA_WMMAC);
267 SVCSTR(WMI_SERVICE_TDLS);
268 SVCSTR(WMI_SERVICE_MCC_BCN_INTERVAL_CHANGE);
269 SVCSTR(WMI_SERVICE_ADAPTIVE_OCS);
270 SVCSTR(WMI_SERVICE_BA_SSN_SUPPORT);
271 SVCSTR(WMI_SERVICE_FILTER_IPSEC_NATKEEPALIVE);
272 SVCSTR(WMI_SERVICE_WLAN_HB);
273 SVCSTR(WMI_SERVICE_LTE_ANT_SHARE_SUPPORT);
274 SVCSTR(WMI_SERVICE_BATCH_SCAN);
275 SVCSTR(WMI_SERVICE_QPOWER);
276 SVCSTR(WMI_SERVICE_PLMREQ);
277 SVCSTR(WMI_SERVICE_THERMAL_MGMT);
278 SVCSTR(WMI_SERVICE_RMC);
279 SVCSTR(WMI_SERVICE_MHF_OFFLOAD);
280 SVCSTR(WMI_SERVICE_COEX_SAR);
281 SVCSTR(WMI_SERVICE_BCN_TXRATE_OVERRIDE);
282 SVCSTR(WMI_SERVICE_NAN);
283 SVCSTR(WMI_SERVICE_L1SS_STAT);
284 SVCSTR(WMI_SERVICE_ESTIMATE_LINKSPEED);
285 SVCSTR(WMI_SERVICE_OBSS_SCAN);
286 SVCSTR(WMI_SERVICE_TDLS_OFFCHAN);
287 SVCSTR(WMI_SERVICE_TDLS_UAPSD_BUFFER_STA);
288 SVCSTR(WMI_SERVICE_TDLS_UAPSD_SLEEP_STA);
289 SVCSTR(WMI_SERVICE_IBSS_PWRSAVE);
290 SVCSTR(WMI_SERVICE_LPASS);
291 SVCSTR(WMI_SERVICE_EXTSCAN);
292 SVCSTR(WMI_SERVICE_D0WOW);
293 SVCSTR(WMI_SERVICE_HSOFFLOAD);
294 SVCSTR(WMI_SERVICE_ROAM_HO_OFFLOAD);
295 SVCSTR(WMI_SERVICE_RX_FULL_REORDER);
296 SVCSTR(WMI_SERVICE_DHCP_OFFLOAD);
297 SVCSTR(WMI_SERVICE_STA_RX_IPA_OFFLOAD_SUPPORT);
298 SVCSTR(WMI_SERVICE_MDNS_OFFLOAD);
299 SVCSTR(WMI_SERVICE_SAP_AUTH_OFFLOAD);
300 SVCSTR(WMI_SERVICE_ATF);
301 SVCSTR(WMI_SERVICE_COEX_GPIO);
309 #define WMI_SERVICE_IS_ENABLED(wmi_svc_bmap, svc_id, len) \
310 ((svc_id) < (len) && \
311 __le32_to_cpu((wmi_svc_bmap)[(svc_id)/(sizeof(u32))]) & \
312 BIT((svc_id)%(sizeof(u32))))
314 #define SVCMAP(x, y, len) \
316 if (WMI_SERVICE_IS_ENABLED((in), (x), (len))) \
320 static inline void wmi_10x_svc_map(const __le32 *in, unsigned long *out,
323 SVCMAP(WMI_10X_SERVICE_BEACON_OFFLOAD,
324 WMI_SERVICE_BEACON_OFFLOAD, len);
325 SVCMAP(WMI_10X_SERVICE_SCAN_OFFLOAD,
326 WMI_SERVICE_SCAN_OFFLOAD, len);
327 SVCMAP(WMI_10X_SERVICE_ROAM_OFFLOAD,
328 WMI_SERVICE_ROAM_OFFLOAD, len);
329 SVCMAP(WMI_10X_SERVICE_BCN_MISS_OFFLOAD,
330 WMI_SERVICE_BCN_MISS_OFFLOAD, len);
331 SVCMAP(WMI_10X_SERVICE_STA_PWRSAVE,
332 WMI_SERVICE_STA_PWRSAVE, len);
333 SVCMAP(WMI_10X_SERVICE_STA_ADVANCED_PWRSAVE,
334 WMI_SERVICE_STA_ADVANCED_PWRSAVE, len);
335 SVCMAP(WMI_10X_SERVICE_AP_UAPSD,
336 WMI_SERVICE_AP_UAPSD, len);
337 SVCMAP(WMI_10X_SERVICE_AP_DFS,
338 WMI_SERVICE_AP_DFS, len);
339 SVCMAP(WMI_10X_SERVICE_11AC,
340 WMI_SERVICE_11AC, len);
341 SVCMAP(WMI_10X_SERVICE_BLOCKACK,
342 WMI_SERVICE_BLOCKACK, len);
343 SVCMAP(WMI_10X_SERVICE_PHYERR,
344 WMI_SERVICE_PHYERR, len);
345 SVCMAP(WMI_10X_SERVICE_BCN_FILTER,
346 WMI_SERVICE_BCN_FILTER, len);
347 SVCMAP(WMI_10X_SERVICE_RTT,
348 WMI_SERVICE_RTT, len);
349 SVCMAP(WMI_10X_SERVICE_RATECTRL,
350 WMI_SERVICE_RATECTRL, len);
351 SVCMAP(WMI_10X_SERVICE_WOW,
352 WMI_SERVICE_WOW, len);
353 SVCMAP(WMI_10X_SERVICE_RATECTRL_CACHE,
354 WMI_SERVICE_RATECTRL_CACHE, len);
355 SVCMAP(WMI_10X_SERVICE_IRAM_TIDS,
356 WMI_SERVICE_IRAM_TIDS, len);
357 SVCMAP(WMI_10X_SERVICE_BURST,
358 WMI_SERVICE_BURST, len);
359 SVCMAP(WMI_10X_SERVICE_SMART_ANTENNA_SW_SUPPORT,
360 WMI_SERVICE_SMART_ANTENNA_SW_SUPPORT, len);
361 SVCMAP(WMI_10X_SERVICE_FORCE_FW_HANG,
362 WMI_SERVICE_FORCE_FW_HANG, len);
363 SVCMAP(WMI_10X_SERVICE_SMART_ANTENNA_HW_SUPPORT,
364 WMI_SERVICE_SMART_ANTENNA_HW_SUPPORT, len);
365 SVCMAP(WMI_10X_SERVICE_ATF,
366 WMI_SERVICE_ATF, len);
367 SVCMAP(WMI_10X_SERVICE_COEX_GPIO,
368 WMI_SERVICE_COEX_GPIO, len);
371 static inline void wmi_main_svc_map(const __le32 *in, unsigned long *out,
374 SVCMAP(WMI_MAIN_SERVICE_BEACON_OFFLOAD,
375 WMI_SERVICE_BEACON_OFFLOAD, len);
376 SVCMAP(WMI_MAIN_SERVICE_SCAN_OFFLOAD,
377 WMI_SERVICE_SCAN_OFFLOAD, len);
378 SVCMAP(WMI_MAIN_SERVICE_ROAM_OFFLOAD,
379 WMI_SERVICE_ROAM_OFFLOAD, len);
380 SVCMAP(WMI_MAIN_SERVICE_BCN_MISS_OFFLOAD,
381 WMI_SERVICE_BCN_MISS_OFFLOAD, len);
382 SVCMAP(WMI_MAIN_SERVICE_STA_PWRSAVE,
383 WMI_SERVICE_STA_PWRSAVE, len);
384 SVCMAP(WMI_MAIN_SERVICE_STA_ADVANCED_PWRSAVE,
385 WMI_SERVICE_STA_ADVANCED_PWRSAVE, len);
386 SVCMAP(WMI_MAIN_SERVICE_AP_UAPSD,
387 WMI_SERVICE_AP_UAPSD, len);
388 SVCMAP(WMI_MAIN_SERVICE_AP_DFS,
389 WMI_SERVICE_AP_DFS, len);
390 SVCMAP(WMI_MAIN_SERVICE_11AC,
391 WMI_SERVICE_11AC, len);
392 SVCMAP(WMI_MAIN_SERVICE_BLOCKACK,
393 WMI_SERVICE_BLOCKACK, len);
394 SVCMAP(WMI_MAIN_SERVICE_PHYERR,
395 WMI_SERVICE_PHYERR, len);
396 SVCMAP(WMI_MAIN_SERVICE_BCN_FILTER,
397 WMI_SERVICE_BCN_FILTER, len);
398 SVCMAP(WMI_MAIN_SERVICE_RTT,
399 WMI_SERVICE_RTT, len);
400 SVCMAP(WMI_MAIN_SERVICE_RATECTRL,
401 WMI_SERVICE_RATECTRL, len);
402 SVCMAP(WMI_MAIN_SERVICE_WOW,
403 WMI_SERVICE_WOW, len);
404 SVCMAP(WMI_MAIN_SERVICE_RATECTRL_CACHE,
405 WMI_SERVICE_RATECTRL_CACHE, len);
406 SVCMAP(WMI_MAIN_SERVICE_IRAM_TIDS,
407 WMI_SERVICE_IRAM_TIDS, len);
408 SVCMAP(WMI_MAIN_SERVICE_ARPNS_OFFLOAD,
409 WMI_SERVICE_ARPNS_OFFLOAD, len);
410 SVCMAP(WMI_MAIN_SERVICE_NLO,
411 WMI_SERVICE_NLO, len);
412 SVCMAP(WMI_MAIN_SERVICE_GTK_OFFLOAD,
413 WMI_SERVICE_GTK_OFFLOAD, len);
414 SVCMAP(WMI_MAIN_SERVICE_SCAN_SCH,
415 WMI_SERVICE_SCAN_SCH, len);
416 SVCMAP(WMI_MAIN_SERVICE_CSA_OFFLOAD,
417 WMI_SERVICE_CSA_OFFLOAD, len);
418 SVCMAP(WMI_MAIN_SERVICE_CHATTER,
419 WMI_SERVICE_CHATTER, len);
420 SVCMAP(WMI_MAIN_SERVICE_COEX_FREQAVOID,
421 WMI_SERVICE_COEX_FREQAVOID, len);
422 SVCMAP(WMI_MAIN_SERVICE_PACKET_POWER_SAVE,
423 WMI_SERVICE_PACKET_POWER_SAVE, len);
424 SVCMAP(WMI_MAIN_SERVICE_FORCE_FW_HANG,
425 WMI_SERVICE_FORCE_FW_HANG, len);
426 SVCMAP(WMI_MAIN_SERVICE_GPIO,
427 WMI_SERVICE_GPIO, len);
428 SVCMAP(WMI_MAIN_SERVICE_STA_DTIM_PS_MODULATED_DTIM,
429 WMI_SERVICE_STA_DTIM_PS_MODULATED_DTIM, len);
430 SVCMAP(WMI_MAIN_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG,
431 WMI_SERVICE_STA_UAPSD_BASIC_AUTO_TRIG, len);
432 SVCMAP(WMI_MAIN_SERVICE_STA_UAPSD_VAR_AUTO_TRIG,
433 WMI_SERVICE_STA_UAPSD_VAR_AUTO_TRIG, len);
434 SVCMAP(WMI_MAIN_SERVICE_STA_KEEP_ALIVE,
435 WMI_SERVICE_STA_KEEP_ALIVE, len);
436 SVCMAP(WMI_MAIN_SERVICE_TX_ENCAP,
437 WMI_SERVICE_TX_ENCAP, len);
442 /* 2 word representation of MAC addr */
443 struct wmi_mac_addr {
455 u32 start_scan_cmdid;
457 u32 scan_chan_list_cmdid;
458 u32 scan_sch_prio_tbl_cmdid;
459 u32 pdev_set_regdomain_cmdid;
460 u32 pdev_set_channel_cmdid;
461 u32 pdev_set_param_cmdid;
462 u32 pdev_pktlog_enable_cmdid;
463 u32 pdev_pktlog_disable_cmdid;
464 u32 pdev_set_wmm_params_cmdid;
465 u32 pdev_set_ht_cap_ie_cmdid;
466 u32 pdev_set_vht_cap_ie_cmdid;
467 u32 pdev_set_dscp_tid_map_cmdid;
468 u32 pdev_set_quiet_mode_cmdid;
469 u32 pdev_green_ap_ps_enable_cmdid;
470 u32 pdev_get_tpc_config_cmdid;
471 u32 pdev_set_base_macaddr_cmdid;
472 u32 vdev_create_cmdid;
473 u32 vdev_delete_cmdid;
474 u32 vdev_start_request_cmdid;
475 u32 vdev_restart_request_cmdid;
479 u32 vdev_set_param_cmdid;
480 u32 vdev_install_key_cmdid;
481 u32 peer_create_cmdid;
482 u32 peer_delete_cmdid;
483 u32 peer_flush_tids_cmdid;
484 u32 peer_set_param_cmdid;
485 u32 peer_assoc_cmdid;
486 u32 peer_add_wds_entry_cmdid;
487 u32 peer_remove_wds_entry_cmdid;
488 u32 peer_mcast_group_cmdid;
490 u32 pdev_send_bcn_cmdid;
492 u32 bcn_filter_rx_cmdid;
493 u32 prb_req_filter_rx_cmdid;
496 u32 addba_clear_resp_cmdid;
497 u32 addba_send_cmdid;
498 u32 addba_status_cmdid;
499 u32 delba_send_cmdid;
500 u32 addba_set_resp_cmdid;
501 u32 send_singleamsdu_cmdid;
502 u32 sta_powersave_mode_cmdid;
503 u32 sta_powersave_param_cmdid;
504 u32 sta_mimo_ps_mode_cmdid;
505 u32 pdev_dfs_enable_cmdid;
506 u32 pdev_dfs_disable_cmdid;
508 u32 roam_scan_rssi_threshold;
509 u32 roam_scan_period;
510 u32 roam_scan_rssi_change_threshold;
512 u32 ofl_scan_add_ap_profile;
513 u32 ofl_scan_remove_ap_profile;
515 u32 p2p_dev_set_device_info;
516 u32 p2p_dev_set_discoverability;
517 u32 p2p_go_set_beacon_ie;
518 u32 p2p_go_set_probe_resp_ie;
519 u32 p2p_set_vendor_ie_data_cmdid;
520 u32 ap_ps_peer_param_cmdid;
521 u32 ap_ps_peer_uapsd_coex_cmdid;
522 u32 peer_rate_retry_sched_cmdid;
523 u32 wlan_profile_trigger_cmdid;
524 u32 wlan_profile_set_hist_intvl_cmdid;
525 u32 wlan_profile_get_profile_data_cmdid;
526 u32 wlan_profile_enable_profile_id_cmdid;
527 u32 wlan_profile_list_profile_id_cmdid;
528 u32 pdev_suspend_cmdid;
529 u32 pdev_resume_cmdid;
530 u32 add_bcn_filter_cmdid;
531 u32 rmv_bcn_filter_cmdid;
532 u32 wow_add_wake_pattern_cmdid;
533 u32 wow_del_wake_pattern_cmdid;
534 u32 wow_enable_disable_wake_event_cmdid;
535 u32 wow_enable_cmdid;
536 u32 wow_hostwakeup_from_sleep_cmdid;
537 u32 rtt_measreq_cmdid;
539 u32 vdev_spectral_scan_configure_cmdid;
540 u32 vdev_spectral_scan_enable_cmdid;
541 u32 request_stats_cmdid;
542 u32 set_arp_ns_offload_cmdid;
543 u32 network_list_offload_config_cmdid;
544 u32 gtk_offload_cmdid;
545 u32 csa_offload_enable_cmdid;
546 u32 csa_offload_chanswitch_cmdid;
547 u32 chatter_set_mode_cmdid;
548 u32 peer_tid_addba_cmdid;
549 u32 peer_tid_delba_cmdid;
550 u32 sta_dtim_ps_method_cmdid;
551 u32 sta_uapsd_auto_trig_cmdid;
552 u32 sta_keepalive_cmd;
555 u32 dbglog_cfg_cmdid;
557 u32 pdev_ftm_intg_cmdid;
558 u32 vdev_set_keepalive_cmdid;
559 u32 vdev_get_keepalive_cmdid;
560 u32 force_fw_hang_cmdid;
561 u32 gpio_config_cmdid;
562 u32 gpio_output_cmdid;
563 u32 pdev_get_temperature_cmdid;
564 u32 vdev_set_wmm_params_cmdid;
565 u32 tdls_set_state_cmdid;
566 u32 tdls_peer_update_cmdid;
567 u32 adaptive_qcs_cmdid;
571 * wmi command groups.
574 /* 0 to 2 are reserved */
576 WMI_GRP_SCAN = WMI_GRP_START,
606 #define WMI_CMD_GRP(grp_id) (((grp_id) << 12) | 0x1)
607 #define WMI_EVT_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
609 #define WMI_CMD_UNSUPPORTED 0
611 /* Command IDs and command events for MAIN FW. */
613 WMI_INIT_CMDID = 0x1,
615 /* Scan specific commands */
616 WMI_START_SCAN_CMDID = WMI_CMD_GRP(WMI_GRP_SCAN),
618 WMI_SCAN_CHAN_LIST_CMDID,
619 WMI_SCAN_SCH_PRIO_TBL_CMDID,
621 /* PDEV (physical device) specific commands */
622 WMI_PDEV_SET_REGDOMAIN_CMDID = WMI_CMD_GRP(WMI_GRP_PDEV),
623 WMI_PDEV_SET_CHANNEL_CMDID,
624 WMI_PDEV_SET_PARAM_CMDID,
625 WMI_PDEV_PKTLOG_ENABLE_CMDID,
626 WMI_PDEV_PKTLOG_DISABLE_CMDID,
627 WMI_PDEV_SET_WMM_PARAMS_CMDID,
628 WMI_PDEV_SET_HT_CAP_IE_CMDID,
629 WMI_PDEV_SET_VHT_CAP_IE_CMDID,
630 WMI_PDEV_SET_DSCP_TID_MAP_CMDID,
631 WMI_PDEV_SET_QUIET_MODE_CMDID,
632 WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID,
633 WMI_PDEV_GET_TPC_CONFIG_CMDID,
634 WMI_PDEV_SET_BASE_MACADDR_CMDID,
636 /* VDEV (virtual device) specific commands */
637 WMI_VDEV_CREATE_CMDID = WMI_CMD_GRP(WMI_GRP_VDEV),
638 WMI_VDEV_DELETE_CMDID,
639 WMI_VDEV_START_REQUEST_CMDID,
640 WMI_VDEV_RESTART_REQUEST_CMDID,
644 WMI_VDEV_SET_PARAM_CMDID,
645 WMI_VDEV_INSTALL_KEY_CMDID,
647 /* peer specific commands */
648 WMI_PEER_CREATE_CMDID = WMI_CMD_GRP(WMI_GRP_PEER),
649 WMI_PEER_DELETE_CMDID,
650 WMI_PEER_FLUSH_TIDS_CMDID,
651 WMI_PEER_SET_PARAM_CMDID,
652 WMI_PEER_ASSOC_CMDID,
653 WMI_PEER_ADD_WDS_ENTRY_CMDID,
654 WMI_PEER_REMOVE_WDS_ENTRY_CMDID,
655 WMI_PEER_MCAST_GROUP_CMDID,
657 /* beacon/management specific commands */
658 WMI_BCN_TX_CMDID = WMI_CMD_GRP(WMI_GRP_MGMT),
659 WMI_PDEV_SEND_BCN_CMDID,
661 WMI_BCN_FILTER_RX_CMDID,
662 WMI_PRB_REQ_FILTER_RX_CMDID,
666 /* commands to directly control BA negotiation directly from host. */
667 WMI_ADDBA_CLEAR_RESP_CMDID = WMI_CMD_GRP(WMI_GRP_BA_NEG),
668 WMI_ADDBA_SEND_CMDID,
669 WMI_ADDBA_STATUS_CMDID,
670 WMI_DELBA_SEND_CMDID,
671 WMI_ADDBA_SET_RESP_CMDID,
672 WMI_SEND_SINGLEAMSDU_CMDID,
674 /* Station power save specific config */
675 WMI_STA_POWERSAVE_MODE_CMDID = WMI_CMD_GRP(WMI_GRP_STA_PS),
676 WMI_STA_POWERSAVE_PARAM_CMDID,
677 WMI_STA_MIMO_PS_MODE_CMDID,
679 /** DFS-specific commands */
680 WMI_PDEV_DFS_ENABLE_CMDID = WMI_CMD_GRP(WMI_GRP_DFS),
681 WMI_PDEV_DFS_DISABLE_CMDID,
683 /* Roaming specific commands */
684 WMI_ROAM_SCAN_MODE = WMI_CMD_GRP(WMI_GRP_ROAM),
685 WMI_ROAM_SCAN_RSSI_THRESHOLD,
686 WMI_ROAM_SCAN_PERIOD,
687 WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
690 /* offload scan specific commands */
691 WMI_OFL_SCAN_ADD_AP_PROFILE = WMI_CMD_GRP(WMI_GRP_OFL_SCAN),
692 WMI_OFL_SCAN_REMOVE_AP_PROFILE,
695 /* P2P specific commands */
696 WMI_P2P_DEV_SET_DEVICE_INFO = WMI_CMD_GRP(WMI_GRP_P2P),
697 WMI_P2P_DEV_SET_DISCOVERABILITY,
698 WMI_P2P_GO_SET_BEACON_IE,
699 WMI_P2P_GO_SET_PROBE_RESP_IE,
700 WMI_P2P_SET_VENDOR_IE_DATA_CMDID,
702 /* AP power save specific config */
703 WMI_AP_PS_PEER_PARAM_CMDID = WMI_CMD_GRP(WMI_GRP_AP_PS),
704 WMI_AP_PS_PEER_UAPSD_COEX_CMDID,
706 /* Rate-control specific commands */
707 WMI_PEER_RATE_RETRY_SCHED_CMDID =
708 WMI_CMD_GRP(WMI_GRP_RATE_CTRL),
710 /* WLAN Profiling commands. */
711 WMI_WLAN_PROFILE_TRIGGER_CMDID = WMI_CMD_GRP(WMI_GRP_PROFILE),
712 WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
713 WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
714 WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
715 WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
717 /* Suspend resume command Ids */
718 WMI_PDEV_SUSPEND_CMDID = WMI_CMD_GRP(WMI_GRP_SUSPEND),
719 WMI_PDEV_RESUME_CMDID,
721 /* Beacon filter commands */
722 WMI_ADD_BCN_FILTER_CMDID = WMI_CMD_GRP(WMI_GRP_BCN_FILTER),
723 WMI_RMV_BCN_FILTER_CMDID,
725 /* WOW Specific WMI commands*/
726 WMI_WOW_ADD_WAKE_PATTERN_CMDID = WMI_CMD_GRP(WMI_GRP_WOW),
727 WMI_WOW_DEL_WAKE_PATTERN_CMDID,
728 WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
729 WMI_WOW_ENABLE_CMDID,
730 WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
732 /* RTT measurement related cmd */
733 WMI_RTT_MEASREQ_CMDID = WMI_CMD_GRP(WMI_GRP_RTT),
736 /* spectral scan commands */
737 WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID = WMI_CMD_GRP(WMI_GRP_SPECTRAL),
738 WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
741 WMI_REQUEST_STATS_CMDID = WMI_CMD_GRP(WMI_GRP_STATS),
743 /* ARP OFFLOAD REQUEST*/
744 WMI_SET_ARP_NS_OFFLOAD_CMDID = WMI_CMD_GRP(WMI_GRP_ARP_NS_OFL),
746 /* NS offload confid*/
747 WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID = WMI_CMD_GRP(WMI_GRP_NLO_OFL),
749 /* GTK offload Specific WMI commands*/
750 WMI_GTK_OFFLOAD_CMDID = WMI_CMD_GRP(WMI_GRP_GTK_OFL),
752 /* CSA offload Specific WMI commands*/
753 WMI_CSA_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP(WMI_GRP_CSA_OFL),
754 WMI_CSA_OFFLOAD_CHANSWITCH_CMDID,
756 /* Chatter commands*/
757 WMI_CHATTER_SET_MODE_CMDID = WMI_CMD_GRP(WMI_GRP_CHATTER),
759 /* addba specific commands */
760 WMI_PEER_TID_ADDBA_CMDID = WMI_CMD_GRP(WMI_GRP_TID_ADDBA),
761 WMI_PEER_TID_DELBA_CMDID,
763 /* set station mimo powersave method */
764 WMI_STA_DTIM_PS_METHOD_CMDID,
765 /* Configure the Station UAPSD AC Auto Trigger Parameters */
766 WMI_STA_UAPSD_AUTO_TRIG_CMDID,
768 /* STA Keep alive parameter configuration,
769 Requires WMI_SERVICE_STA_KEEP_ALIVE */
770 WMI_STA_KEEPALIVE_CMD,
772 /* misc command group */
773 WMI_ECHO_CMDID = WMI_CMD_GRP(WMI_GRP_MISC),
775 WMI_DBGLOG_CFG_CMDID,
777 WMI_PDEV_FTM_INTG_CMDID,
778 WMI_VDEV_SET_KEEPALIVE_CMDID,
779 WMI_VDEV_GET_KEEPALIVE_CMDID,
780 WMI_FORCE_FW_HANG_CMDID,
782 /* GPIO Configuration */
783 WMI_GPIO_CONFIG_CMDID = WMI_CMD_GRP(WMI_GRP_GPIO),
784 WMI_GPIO_OUTPUT_CMDID,
788 WMI_SERVICE_READY_EVENTID = 0x1,
791 /* Scan specific events */
792 WMI_SCAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SCAN),
794 /* PDEV specific events */
795 WMI_PDEV_TPC_CONFIG_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PDEV),
796 WMI_CHAN_INFO_EVENTID,
799 /* VDEV specific events */
800 WMI_VDEV_START_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_VDEV),
801 WMI_VDEV_STOPPED_EVENTID,
802 WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID,
804 /* peer specific events */
805 WMI_PEER_STA_KICKOUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PEER),
807 /* beacon/mgmt specific events */
808 WMI_MGMT_RX_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MGMT),
809 WMI_HOST_SWBA_EVENTID,
810 WMI_TBTTOFFSET_UPDATE_EVENTID,
812 /* ADDBA Related WMI Events*/
813 WMI_TX_DELBA_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BA_NEG),
814 WMI_TX_ADDBA_COMPLETE_EVENTID,
816 /* Roam event to trigger roaming on host */
817 WMI_ROAM_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ROAM),
821 WMI_WOW_WAKEUP_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_WOW),
824 WMI_RTT_MEASUREMENT_REPORT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RTT),
825 WMI_TSF_MEASUREMENT_REPORT_EVENTID,
826 WMI_RTT_ERROR_REPORT_EVENTID,
829 WMI_GTK_OFFLOAD_STATUS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GTK_OFL),
830 WMI_GTK_REKEY_FAIL_EVENTID,
832 /* CSA IE received event */
833 WMI_CSA_HANDLING_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_CSA_OFL),
836 WMI_ECHO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MISC),
837 WMI_PDEV_UTF_EVENTID,
838 WMI_DEBUG_MESG_EVENTID,
839 WMI_UPDATE_STATS_EVENTID,
840 WMI_DEBUG_PRINT_EVENTID,
841 WMI_DCS_INTERFERENCE_EVENTID,
842 WMI_PDEV_QVIT_EVENTID,
843 WMI_WLAN_PROFILE_DATA_EVENTID,
844 WMI_PDEV_FTM_INTG_EVENTID,
845 WMI_WLAN_FREQ_AVOID_EVENTID,
846 WMI_VDEV_GET_KEEPALIVE_EVENTID,
849 WMI_GPIO_INPUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GPIO),
852 /* Command IDs and command events for 10.X firmware */
853 enum wmi_10x_cmd_id {
854 WMI_10X_START_CMDID = 0x9000,
855 WMI_10X_END_CMDID = 0x9FFF,
857 /* initialize the wlan sub system */
860 /* Scan specific commands */
862 WMI_10X_START_SCAN_CMDID = WMI_10X_START_CMDID,
863 WMI_10X_STOP_SCAN_CMDID,
864 WMI_10X_SCAN_CHAN_LIST_CMDID,
867 /* PDEV(physical device) specific commands */
868 WMI_10X_PDEV_SET_REGDOMAIN_CMDID,
869 WMI_10X_PDEV_SET_CHANNEL_CMDID,
870 WMI_10X_PDEV_SET_PARAM_CMDID,
871 WMI_10X_PDEV_PKTLOG_ENABLE_CMDID,
872 WMI_10X_PDEV_PKTLOG_DISABLE_CMDID,
873 WMI_10X_PDEV_SET_WMM_PARAMS_CMDID,
874 WMI_10X_PDEV_SET_HT_CAP_IE_CMDID,
875 WMI_10X_PDEV_SET_VHT_CAP_IE_CMDID,
876 WMI_10X_PDEV_SET_BASE_MACADDR_CMDID,
877 WMI_10X_PDEV_SET_DSCP_TID_MAP_CMDID,
878 WMI_10X_PDEV_SET_QUIET_MODE_CMDID,
879 WMI_10X_PDEV_GREEN_AP_PS_ENABLE_CMDID,
880 WMI_10X_PDEV_GET_TPC_CONFIG_CMDID,
882 /* VDEV(virtual device) specific commands */
883 WMI_10X_VDEV_CREATE_CMDID,
884 WMI_10X_VDEV_DELETE_CMDID,
885 WMI_10X_VDEV_START_REQUEST_CMDID,
886 WMI_10X_VDEV_RESTART_REQUEST_CMDID,
887 WMI_10X_VDEV_UP_CMDID,
888 WMI_10X_VDEV_STOP_CMDID,
889 WMI_10X_VDEV_DOWN_CMDID,
890 WMI_10X_VDEV_STANDBY_RESPONSE_CMDID,
891 WMI_10X_VDEV_RESUME_RESPONSE_CMDID,
892 WMI_10X_VDEV_SET_PARAM_CMDID,
893 WMI_10X_VDEV_INSTALL_KEY_CMDID,
895 /* peer specific commands */
896 WMI_10X_PEER_CREATE_CMDID,
897 WMI_10X_PEER_DELETE_CMDID,
898 WMI_10X_PEER_FLUSH_TIDS_CMDID,
899 WMI_10X_PEER_SET_PARAM_CMDID,
900 WMI_10X_PEER_ASSOC_CMDID,
901 WMI_10X_PEER_ADD_WDS_ENTRY_CMDID,
902 WMI_10X_PEER_REMOVE_WDS_ENTRY_CMDID,
903 WMI_10X_PEER_MCAST_GROUP_CMDID,
905 /* beacon/management specific commands */
907 WMI_10X_BCN_TX_CMDID,
908 WMI_10X_BCN_PRB_TMPL_CMDID,
909 WMI_10X_BCN_FILTER_RX_CMDID,
910 WMI_10X_PRB_REQ_FILTER_RX_CMDID,
911 WMI_10X_MGMT_TX_CMDID,
913 /* commands to directly control ba negotiation directly from host. */
914 WMI_10X_ADDBA_CLEAR_RESP_CMDID,
915 WMI_10X_ADDBA_SEND_CMDID,
916 WMI_10X_ADDBA_STATUS_CMDID,
917 WMI_10X_DELBA_SEND_CMDID,
918 WMI_10X_ADDBA_SET_RESP_CMDID,
919 WMI_10X_SEND_SINGLEAMSDU_CMDID,
921 /* Station power save specific config */
922 WMI_10X_STA_POWERSAVE_MODE_CMDID,
923 WMI_10X_STA_POWERSAVE_PARAM_CMDID,
924 WMI_10X_STA_MIMO_PS_MODE_CMDID,
926 /* set debug log config */
927 WMI_10X_DBGLOG_CFG_CMDID,
929 /* DFS-specific commands */
930 WMI_10X_PDEV_DFS_ENABLE_CMDID,
931 WMI_10X_PDEV_DFS_DISABLE_CMDID,
933 /* QVIT specific command id */
934 WMI_10X_PDEV_QVIT_CMDID,
936 /* Offload Scan and Roaming related commands */
937 WMI_10X_ROAM_SCAN_MODE,
938 WMI_10X_ROAM_SCAN_RSSI_THRESHOLD,
939 WMI_10X_ROAM_SCAN_PERIOD,
940 WMI_10X_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
941 WMI_10X_ROAM_AP_PROFILE,
942 WMI_10X_OFL_SCAN_ADD_AP_PROFILE,
943 WMI_10X_OFL_SCAN_REMOVE_AP_PROFILE,
944 WMI_10X_OFL_SCAN_PERIOD,
946 /* P2P specific commands */
947 WMI_10X_P2P_DEV_SET_DEVICE_INFO,
948 WMI_10X_P2P_DEV_SET_DISCOVERABILITY,
949 WMI_10X_P2P_GO_SET_BEACON_IE,
950 WMI_10X_P2P_GO_SET_PROBE_RESP_IE,
952 /* AP power save specific config */
953 WMI_10X_AP_PS_PEER_PARAM_CMDID,
954 WMI_10X_AP_PS_PEER_UAPSD_COEX_CMDID,
956 /* Rate-control specific commands */
957 WMI_10X_PEER_RATE_RETRY_SCHED_CMDID,
959 /* WLAN Profiling commands. */
960 WMI_10X_WLAN_PROFILE_TRIGGER_CMDID,
961 WMI_10X_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
962 WMI_10X_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
963 WMI_10X_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
964 WMI_10X_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
966 /* Suspend resume command Ids */
967 WMI_10X_PDEV_SUSPEND_CMDID,
968 WMI_10X_PDEV_RESUME_CMDID,
970 /* Beacon filter commands */
971 WMI_10X_ADD_BCN_FILTER_CMDID,
972 WMI_10X_RMV_BCN_FILTER_CMDID,
974 /* WOW Specific WMI commands*/
975 WMI_10X_WOW_ADD_WAKE_PATTERN_CMDID,
976 WMI_10X_WOW_DEL_WAKE_PATTERN_CMDID,
977 WMI_10X_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
978 WMI_10X_WOW_ENABLE_CMDID,
979 WMI_10X_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
981 /* RTT measurement related cmd */
982 WMI_10X_RTT_MEASREQ_CMDID,
983 WMI_10X_RTT_TSF_CMDID,
985 /* transmit beacon by value */
986 WMI_10X_PDEV_SEND_BCN_CMDID,
989 WMI_10X_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID,
990 WMI_10X_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
991 WMI_10X_REQUEST_STATS_CMDID,
993 /* GPIO Configuration */
994 WMI_10X_GPIO_CONFIG_CMDID,
995 WMI_10X_GPIO_OUTPUT_CMDID,
997 WMI_10X_PDEV_UTF_CMDID = WMI_10X_END_CMDID - 1,
1000 enum wmi_10x_event_id {
1001 WMI_10X_SERVICE_READY_EVENTID = 0x8000,
1002 WMI_10X_READY_EVENTID,
1003 WMI_10X_START_EVENTID = 0x9000,
1004 WMI_10X_END_EVENTID = 0x9FFF,
1006 /* Scan specific events */
1007 WMI_10X_SCAN_EVENTID = WMI_10X_START_EVENTID,
1008 WMI_10X_ECHO_EVENTID,
1009 WMI_10X_DEBUG_MESG_EVENTID,
1010 WMI_10X_UPDATE_STATS_EVENTID,
1012 /* Instantaneous RSSI event */
1013 WMI_10X_INST_RSSI_STATS_EVENTID,
1015 /* VDEV specific events */
1016 WMI_10X_VDEV_START_RESP_EVENTID,
1017 WMI_10X_VDEV_STANDBY_REQ_EVENTID,
1018 WMI_10X_VDEV_RESUME_REQ_EVENTID,
1019 WMI_10X_VDEV_STOPPED_EVENTID,
1021 /* peer specific events */
1022 WMI_10X_PEER_STA_KICKOUT_EVENTID,
1024 /* beacon/mgmt specific events */
1025 WMI_10X_HOST_SWBA_EVENTID,
1026 WMI_10X_TBTTOFFSET_UPDATE_EVENTID,
1027 WMI_10X_MGMT_RX_EVENTID,
1029 /* Channel stats event */
1030 WMI_10X_CHAN_INFO_EVENTID,
1032 /* PHY Error specific WMI event */
1033 WMI_10X_PHYERR_EVENTID,
1035 /* Roam event to trigger roaming on host */
1036 WMI_10X_ROAM_EVENTID,
1038 /* matching AP found from list of profiles */
1039 WMI_10X_PROFILE_MATCH,
1041 /* debug print message used for tracing FW code while debugging */
1042 WMI_10X_DEBUG_PRINT_EVENTID,
1043 /* VI spoecific event */
1044 WMI_10X_PDEV_QVIT_EVENTID,
1045 /* FW code profile data in response to profile request */
1046 WMI_10X_WLAN_PROFILE_DATA_EVENTID,
1048 /*RTT related event ID*/
1049 WMI_10X_RTT_MEASUREMENT_REPORT_EVENTID,
1050 WMI_10X_TSF_MEASUREMENT_REPORT_EVENTID,
1051 WMI_10X_RTT_ERROR_REPORT_EVENTID,
1053 WMI_10X_WOW_WAKEUP_HOST_EVENTID,
1054 WMI_10X_DCS_INTERFERENCE_EVENTID,
1056 /* TPC config for the current operating channel */
1057 WMI_10X_PDEV_TPC_CONFIG_EVENTID,
1059 WMI_10X_GPIO_INPUT_EVENTID,
1060 WMI_10X_PDEV_UTF_EVENTID = WMI_10X_END_EVENTID-1,
1063 enum wmi_10_2_cmd_id {
1064 WMI_10_2_START_CMDID = 0x9000,
1065 WMI_10_2_END_CMDID = 0x9FFF,
1066 WMI_10_2_INIT_CMDID,
1067 WMI_10_2_START_SCAN_CMDID = WMI_10_2_START_CMDID,
1068 WMI_10_2_STOP_SCAN_CMDID,
1069 WMI_10_2_SCAN_CHAN_LIST_CMDID,
1070 WMI_10_2_ECHO_CMDID,
1071 WMI_10_2_PDEV_SET_REGDOMAIN_CMDID,
1072 WMI_10_2_PDEV_SET_CHANNEL_CMDID,
1073 WMI_10_2_PDEV_SET_PARAM_CMDID,
1074 WMI_10_2_PDEV_PKTLOG_ENABLE_CMDID,
1075 WMI_10_2_PDEV_PKTLOG_DISABLE_CMDID,
1076 WMI_10_2_PDEV_SET_WMM_PARAMS_CMDID,
1077 WMI_10_2_PDEV_SET_HT_CAP_IE_CMDID,
1078 WMI_10_2_PDEV_SET_VHT_CAP_IE_CMDID,
1079 WMI_10_2_PDEV_SET_BASE_MACADDR_CMDID,
1080 WMI_10_2_PDEV_SET_QUIET_MODE_CMDID,
1081 WMI_10_2_PDEV_GREEN_AP_PS_ENABLE_CMDID,
1082 WMI_10_2_PDEV_GET_TPC_CONFIG_CMDID,
1083 WMI_10_2_VDEV_CREATE_CMDID,
1084 WMI_10_2_VDEV_DELETE_CMDID,
1085 WMI_10_2_VDEV_START_REQUEST_CMDID,
1086 WMI_10_2_VDEV_RESTART_REQUEST_CMDID,
1087 WMI_10_2_VDEV_UP_CMDID,
1088 WMI_10_2_VDEV_STOP_CMDID,
1089 WMI_10_2_VDEV_DOWN_CMDID,
1090 WMI_10_2_VDEV_STANDBY_RESPONSE_CMDID,
1091 WMI_10_2_VDEV_RESUME_RESPONSE_CMDID,
1092 WMI_10_2_VDEV_SET_PARAM_CMDID,
1093 WMI_10_2_VDEV_INSTALL_KEY_CMDID,
1094 WMI_10_2_VDEV_SET_DSCP_TID_MAP_CMDID,
1095 WMI_10_2_PEER_CREATE_CMDID,
1096 WMI_10_2_PEER_DELETE_CMDID,
1097 WMI_10_2_PEER_FLUSH_TIDS_CMDID,
1098 WMI_10_2_PEER_SET_PARAM_CMDID,
1099 WMI_10_2_PEER_ASSOC_CMDID,
1100 WMI_10_2_PEER_ADD_WDS_ENTRY_CMDID,
1101 WMI_10_2_PEER_UPDATE_WDS_ENTRY_CMDID,
1102 WMI_10_2_PEER_REMOVE_WDS_ENTRY_CMDID,
1103 WMI_10_2_PEER_MCAST_GROUP_CMDID,
1104 WMI_10_2_BCN_TX_CMDID,
1105 WMI_10_2_BCN_PRB_TMPL_CMDID,
1106 WMI_10_2_BCN_FILTER_RX_CMDID,
1107 WMI_10_2_PRB_REQ_FILTER_RX_CMDID,
1108 WMI_10_2_MGMT_TX_CMDID,
1109 WMI_10_2_ADDBA_CLEAR_RESP_CMDID,
1110 WMI_10_2_ADDBA_SEND_CMDID,
1111 WMI_10_2_ADDBA_STATUS_CMDID,
1112 WMI_10_2_DELBA_SEND_CMDID,
1113 WMI_10_2_ADDBA_SET_RESP_CMDID,
1114 WMI_10_2_SEND_SINGLEAMSDU_CMDID,
1115 WMI_10_2_STA_POWERSAVE_MODE_CMDID,
1116 WMI_10_2_STA_POWERSAVE_PARAM_CMDID,
1117 WMI_10_2_STA_MIMO_PS_MODE_CMDID,
1118 WMI_10_2_DBGLOG_CFG_CMDID,
1119 WMI_10_2_PDEV_DFS_ENABLE_CMDID,
1120 WMI_10_2_PDEV_DFS_DISABLE_CMDID,
1121 WMI_10_2_PDEV_QVIT_CMDID,
1122 WMI_10_2_ROAM_SCAN_MODE,
1123 WMI_10_2_ROAM_SCAN_RSSI_THRESHOLD,
1124 WMI_10_2_ROAM_SCAN_PERIOD,
1125 WMI_10_2_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
1126 WMI_10_2_ROAM_AP_PROFILE,
1127 WMI_10_2_OFL_SCAN_ADD_AP_PROFILE,
1128 WMI_10_2_OFL_SCAN_REMOVE_AP_PROFILE,
1129 WMI_10_2_OFL_SCAN_PERIOD,
1130 WMI_10_2_P2P_DEV_SET_DEVICE_INFO,
1131 WMI_10_2_P2P_DEV_SET_DISCOVERABILITY,
1132 WMI_10_2_P2P_GO_SET_BEACON_IE,
1133 WMI_10_2_P2P_GO_SET_PROBE_RESP_IE,
1134 WMI_10_2_AP_PS_PEER_PARAM_CMDID,
1135 WMI_10_2_AP_PS_PEER_UAPSD_COEX_CMDID,
1136 WMI_10_2_PEER_RATE_RETRY_SCHED_CMDID,
1137 WMI_10_2_WLAN_PROFILE_TRIGGER_CMDID,
1138 WMI_10_2_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
1139 WMI_10_2_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
1140 WMI_10_2_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
1141 WMI_10_2_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
1142 WMI_10_2_PDEV_SUSPEND_CMDID,
1143 WMI_10_2_PDEV_RESUME_CMDID,
1144 WMI_10_2_ADD_BCN_FILTER_CMDID,
1145 WMI_10_2_RMV_BCN_FILTER_CMDID,
1146 WMI_10_2_WOW_ADD_WAKE_PATTERN_CMDID,
1147 WMI_10_2_WOW_DEL_WAKE_PATTERN_CMDID,
1148 WMI_10_2_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
1149 WMI_10_2_WOW_ENABLE_CMDID,
1150 WMI_10_2_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
1151 WMI_10_2_RTT_MEASREQ_CMDID,
1152 WMI_10_2_RTT_TSF_CMDID,
1153 WMI_10_2_RTT_KEEPALIVE_CMDID,
1154 WMI_10_2_PDEV_SEND_BCN_CMDID,
1155 WMI_10_2_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID,
1156 WMI_10_2_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
1157 WMI_10_2_REQUEST_STATS_CMDID,
1158 WMI_10_2_GPIO_CONFIG_CMDID,
1159 WMI_10_2_GPIO_OUTPUT_CMDID,
1160 WMI_10_2_VDEV_RATEMASK_CMDID,
1161 WMI_10_2_PDEV_SMART_ANT_ENABLE_CMDID,
1162 WMI_10_2_PDEV_SMART_ANT_SET_RX_ANTENNA_CMDID,
1163 WMI_10_2_PEER_SMART_ANT_SET_TX_ANTENNA_CMDID,
1164 WMI_10_2_PEER_SMART_ANT_SET_TRAIN_INFO_CMDID,
1165 WMI_10_2_PEER_SMART_ANT_SET_NODE_CONFIG_OPS_CMDID,
1166 WMI_10_2_FORCE_FW_HANG_CMDID,
1167 WMI_10_2_PDEV_SET_ANTENNA_SWITCH_TABLE_CMDID,
1168 WMI_10_2_PDEV_SET_CTL_TABLE_CMDID,
1169 WMI_10_2_PDEV_SET_MIMOGAIN_TABLE_CMDID,
1170 WMI_10_2_PDEV_RATEPWR_TABLE_CMDID,
1171 WMI_10_2_PDEV_RATEPWR_CHAINMSK_TABLE_CMDID,
1172 WMI_10_2_PDEV_GET_INFO,
1173 WMI_10_2_VDEV_GET_INFO,
1174 WMI_10_2_VDEV_ATF_REQUEST_CMDID,
1175 WMI_10_2_PEER_ATF_REQUEST_CMDID,
1176 WMI_10_2_PDEV_GET_TEMPERATURE_CMDID,
1177 WMI_10_2_PDEV_UTF_CMDID = WMI_10_2_END_CMDID - 1,
1180 enum wmi_10_2_event_id {
1181 WMI_10_2_SERVICE_READY_EVENTID = 0x8000,
1182 WMI_10_2_READY_EVENTID,
1183 WMI_10_2_DEBUG_MESG_EVENTID,
1184 WMI_10_2_START_EVENTID = 0x9000,
1185 WMI_10_2_END_EVENTID = 0x9FFF,
1186 WMI_10_2_SCAN_EVENTID = WMI_10_2_START_EVENTID,
1187 WMI_10_2_ECHO_EVENTID,
1188 WMI_10_2_UPDATE_STATS_EVENTID,
1189 WMI_10_2_INST_RSSI_STATS_EVENTID,
1190 WMI_10_2_VDEV_START_RESP_EVENTID,
1191 WMI_10_2_VDEV_STANDBY_REQ_EVENTID,
1192 WMI_10_2_VDEV_RESUME_REQ_EVENTID,
1193 WMI_10_2_VDEV_STOPPED_EVENTID,
1194 WMI_10_2_PEER_STA_KICKOUT_EVENTID,
1195 WMI_10_2_HOST_SWBA_EVENTID,
1196 WMI_10_2_TBTTOFFSET_UPDATE_EVENTID,
1197 WMI_10_2_MGMT_RX_EVENTID,
1198 WMI_10_2_CHAN_INFO_EVENTID,
1199 WMI_10_2_PHYERR_EVENTID,
1200 WMI_10_2_ROAM_EVENTID,
1201 WMI_10_2_PROFILE_MATCH,
1202 WMI_10_2_DEBUG_PRINT_EVENTID,
1203 WMI_10_2_PDEV_QVIT_EVENTID,
1204 WMI_10_2_WLAN_PROFILE_DATA_EVENTID,
1205 WMI_10_2_RTT_MEASUREMENT_REPORT_EVENTID,
1206 WMI_10_2_TSF_MEASUREMENT_REPORT_EVENTID,
1207 WMI_10_2_RTT_ERROR_REPORT_EVENTID,
1208 WMI_10_2_RTT_KEEPALIVE_EVENTID,
1209 WMI_10_2_WOW_WAKEUP_HOST_EVENTID,
1210 WMI_10_2_DCS_INTERFERENCE_EVENTID,
1211 WMI_10_2_PDEV_TPC_CONFIG_EVENTID,
1212 WMI_10_2_GPIO_INPUT_EVENTID,
1213 WMI_10_2_PEER_RATECODE_LIST_EVENTID,
1214 WMI_10_2_GENERIC_BUFFER_EVENTID,
1215 WMI_10_2_MCAST_BUF_RELEASE_EVENTID,
1216 WMI_10_2_MCAST_LIST_AGEOUT_EVENTID,
1217 WMI_10_2_WDS_PEER_EVENTID,
1218 WMI_10_2_PEER_STA_PS_STATECHG_EVENTID,
1219 WMI_10_2_PDEV_TEMPERATURE_EVENTID,
1220 WMI_10_2_PDEV_UTF_EVENTID = WMI_10_2_END_EVENTID - 1,
1224 MODE_11A = 0, /* 11a Mode */
1225 MODE_11G = 1, /* 11b/g Mode */
1226 MODE_11B = 2, /* 11b Mode */
1227 MODE_11GONLY = 3, /* 11g only Mode */
1228 MODE_11NA_HT20 = 4, /* 11a HT20 mode */
1229 MODE_11NG_HT20 = 5, /* 11g HT20 mode */
1230 MODE_11NA_HT40 = 6, /* 11a HT40 mode */
1231 MODE_11NG_HT40 = 7, /* 11g HT40 mode */
1232 MODE_11AC_VHT20 = 8,
1233 MODE_11AC_VHT40 = 9,
1234 MODE_11AC_VHT80 = 10,
1235 /* MODE_11AC_VHT160 = 11, */
1236 MODE_11AC_VHT20_2G = 11,
1237 MODE_11AC_VHT40_2G = 12,
1238 MODE_11AC_VHT80_2G = 13,
1243 static inline const char *ath10k_wmi_phymode_str(enum wmi_phy_mode mode)
1254 case MODE_11NA_HT20:
1256 case MODE_11NG_HT20:
1258 case MODE_11NA_HT40:
1260 case MODE_11NG_HT40:
1262 case MODE_11AC_VHT20:
1263 return "11ac-vht20";
1264 case MODE_11AC_VHT40:
1265 return "11ac-vht40";
1266 case MODE_11AC_VHT80:
1267 return "11ac-vht80";
1268 case MODE_11AC_VHT20_2G:
1269 return "11ac-vht20-2g";
1270 case MODE_11AC_VHT40_2G:
1271 return "11ac-vht40-2g";
1272 case MODE_11AC_VHT80_2G:
1273 return "11ac-vht80-2g";
1278 /* no default handler to allow compiler to check that the
1279 * enum is fully handled */
1285 #define WMI_CHAN_LIST_TAG 0x1
1286 #define WMI_SSID_LIST_TAG 0x2
1287 #define WMI_BSSID_LIST_TAG 0x3
1288 #define WMI_IE_TAG 0x4
1290 struct wmi_channel {
1292 __le32 band_center_freq1;
1293 __le32 band_center_freq2; /* valid for 11ac, 80plus80 */
1295 __le32 flags; /* WMI_CHAN_FLAG_ */
1297 u8 mode; /* only 6 LSBs */
1303 /* note: power unit is 0.5 dBm */
1318 struct wmi_channel_arg {
1320 u32 band_center_freq1;
1327 /* note: power unit is 0.5 dBm */
1331 u32 max_antenna_gain;
1333 enum wmi_phy_mode mode;
1336 enum wmi_channel_change_cause {
1337 WMI_CHANNEL_CHANGE_CAUSE_NONE = 0,
1338 WMI_CHANNEL_CHANGE_CAUSE_CSA,
1341 #define WMI_CHAN_FLAG_HT40_PLUS (1 << 6)
1342 #define WMI_CHAN_FLAG_PASSIVE (1 << 7)
1343 #define WMI_CHAN_FLAG_ADHOC_ALLOWED (1 << 8)
1344 #define WMI_CHAN_FLAG_AP_DISABLED (1 << 9)
1345 #define WMI_CHAN_FLAG_DFS (1 << 10)
1346 #define WMI_CHAN_FLAG_ALLOW_HT (1 << 11)
1347 #define WMI_CHAN_FLAG_ALLOW_VHT (1 << 12)
1349 /* Indicate reason for channel switch */
1350 #define WMI_CHANNEL_CHANGE_CAUSE_CSA (1 << 13)
1352 #define WMI_MAX_SPATIAL_STREAM 3
1354 /* HT Capabilities*/
1355 #define WMI_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */
1356 #define WMI_HT_CAP_HT20_SGI 0x0002 /* Short Guard Interval with HT20 */
1357 #define WMI_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */
1358 #define WMI_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */
1359 #define WMI_HT_CAP_TX_STBC_MASK_SHIFT 3
1360 #define WMI_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */
1361 #define WMI_HT_CAP_RX_STBC_MASK_SHIFT 4
1362 #define WMI_HT_CAP_LDPC 0x0040 /* LDPC supported */
1363 #define WMI_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */
1364 #define WMI_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */
1365 #define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
1366 #define WMI_HT_CAP_HT40_SGI 0x0800
1368 #define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED | \
1369 WMI_HT_CAP_HT20_SGI | \
1370 WMI_HT_CAP_HT40_SGI | \
1371 WMI_HT_CAP_TX_STBC | \
1372 WMI_HT_CAP_RX_STBC | \
1376 * WMI_VHT_CAP_* these maps to ieee 802.11ac vht capability information
1377 * field. The fields not defined here are not supported, or reserved.
1378 * Do not change these masks and if you have to add new one follow the
1379 * bitmask as specified by 802.11ac draft.
1382 #define WMI_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003
1383 #define WMI_VHT_CAP_RX_LDPC 0x00000010
1384 #define WMI_VHT_CAP_SGI_80MHZ 0x00000020
1385 #define WMI_VHT_CAP_TX_STBC 0x00000080
1386 #define WMI_VHT_CAP_RX_STBC_MASK 0x00000300
1387 #define WMI_VHT_CAP_RX_STBC_MASK_SHIFT 8
1388 #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000
1389 #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT 23
1390 #define WMI_VHT_CAP_RX_FIXED_ANT 0x10000000
1391 #define WMI_VHT_CAP_TX_FIXED_ANT 0x20000000
1393 /* The following also refer for max HT AMSDU */
1394 #define WMI_VHT_CAP_MAX_MPDU_LEN_3839 0x00000000
1395 #define WMI_VHT_CAP_MAX_MPDU_LEN_7935 0x00000001
1396 #define WMI_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002
1398 #define WMI_VHT_CAP_DEFAULT_ALL (WMI_VHT_CAP_MAX_MPDU_LEN_11454 | \
1399 WMI_VHT_CAP_RX_LDPC | \
1400 WMI_VHT_CAP_SGI_80MHZ | \
1401 WMI_VHT_CAP_TX_STBC | \
1402 WMI_VHT_CAP_RX_STBC_MASK | \
1403 WMI_VHT_CAP_MAX_AMPDU_LEN_EXP | \
1404 WMI_VHT_CAP_RX_FIXED_ANT | \
1405 WMI_VHT_CAP_TX_FIXED_ANT)
1408 * Interested readers refer to Rx/Tx MCS Map definition as defined in
1411 #define WMI_VHT_MAX_MCS_4_SS_MASK(r, ss) ((3 & (r)) << (((ss) - 1) << 1))
1412 #define WMI_VHT_MAX_SUPP_RATE_MASK 0x1fff0000
1413 #define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT 16
1416 REGDMN_MODE_11A = 0x00001, /* 11a channels */
1417 REGDMN_MODE_TURBO = 0x00002, /* 11a turbo-only channels */
1418 REGDMN_MODE_11B = 0x00004, /* 11b channels */
1419 REGDMN_MODE_PUREG = 0x00008, /* 11g channels (OFDM only) */
1420 REGDMN_MODE_11G = 0x00008, /* XXX historical */
1421 REGDMN_MODE_108G = 0x00020, /* 11a+Turbo channels */
1422 REGDMN_MODE_108A = 0x00040, /* 11g+Turbo channels */
1423 REGDMN_MODE_XR = 0x00100, /* XR channels */
1424 REGDMN_MODE_11A_HALF_RATE = 0x00200, /* 11A half rate channels */
1425 REGDMN_MODE_11A_QUARTER_RATE = 0x00400, /* 11A quarter rate channels */
1426 REGDMN_MODE_11NG_HT20 = 0x00800, /* 11N-G HT20 channels */
1427 REGDMN_MODE_11NA_HT20 = 0x01000, /* 11N-A HT20 channels */
1428 REGDMN_MODE_11NG_HT40PLUS = 0x02000, /* 11N-G HT40 + channels */
1429 REGDMN_MODE_11NG_HT40MINUS = 0x04000, /* 11N-G HT40 - channels */
1430 REGDMN_MODE_11NA_HT40PLUS = 0x08000, /* 11N-A HT40 + channels */
1431 REGDMN_MODE_11NA_HT40MINUS = 0x10000, /* 11N-A HT40 - channels */
1432 REGDMN_MODE_11AC_VHT20 = 0x20000, /* 5Ghz, VHT20 */
1433 REGDMN_MODE_11AC_VHT40PLUS = 0x40000, /* 5Ghz, VHT40 + channels */
1434 REGDMN_MODE_11AC_VHT40MINUS = 0x80000, /* 5Ghz VHT40 - channels */
1435 REGDMN_MODE_11AC_VHT80 = 0x100000, /* 5Ghz, VHT80 channels */
1436 REGDMN_MODE_ALL = 0xffffffff
1439 #define REGDMN_CAP1_CHAN_HALF_RATE 0x00000001
1440 #define REGDMN_CAP1_CHAN_QUARTER_RATE 0x00000002
1441 #define REGDMN_CAP1_CHAN_HAL49GHZ 0x00000004
1443 /* regulatory capabilities */
1444 #define REGDMN_EEPROM_EEREGCAP_EN_FCC_MIDBAND 0x0040
1445 #define REGDMN_EEPROM_EEREGCAP_EN_KK_U1_EVEN 0x0080
1446 #define REGDMN_EEPROM_EEREGCAP_EN_KK_U2 0x0100
1447 #define REGDMN_EEPROM_EEREGCAP_EN_KK_MIDBAND 0x0200
1448 #define REGDMN_EEPROM_EEREGCAP_EN_KK_U1_ODD 0x0400
1449 #define REGDMN_EEPROM_EEREGCAP_EN_KK_NEW_11A 0x0800
1451 struct hal_reg_capabilities {
1452 /* regdomain value specified in EEPROM */
1455 __le32 eeprom_rd_ext;
1456 /* CAP1 capabilities bit map. */
1458 /* REGDMN EEPROM CAP. */
1461 __le32 wireless_modes;
1462 __le32 low_2ghz_chan;
1463 __le32 high_2ghz_chan;
1464 __le32 low_5ghz_chan;
1465 __le32 high_5ghz_chan;
1468 enum wlan_mode_capability {
1469 WHAL_WLAN_11A_CAPABILITY = 0x1,
1470 WHAL_WLAN_11G_CAPABILITY = 0x2,
1471 WHAL_WLAN_11AG_CAPABILITY = 0x3,
1474 /* structure used by FW for requesting host memory */
1475 struct wlan_host_mem_req {
1476 /* ID of the request */
1478 /* size of the of each unit */
1480 /* flags to indicate that
1481 * the number units is dependent
1482 * on number of resources(num vdevs num peers .. etc)
1484 __le32 num_unit_info;
1486 * actual number of units to allocate . if flags in the num_unit_info
1487 * indicate that number of units is tied to number of a particular
1488 * resource to allocate then num_units filed is set to 0 and host
1489 * will derive the number units from number of the resources it is
1496 * The following struct holds optional payload for
1497 * wmi_service_ready_event,e.g., 11ac pass some of the
1498 * device capability to the host.
1500 struct wmi_service_ready_event {
1502 __le32 sw_version_1;
1504 /* WMI_PHY_CAPABILITY */
1505 __le32 phy_capability;
1506 /* Maximum number of frag table entries that SW will populate less 1 */
1507 __le32 max_frag_entry;
1508 __le32 wmi_service_bitmap[16];
1509 __le32 num_rf_chains;
1511 * The following field is only valid for service type
1514 __le32 ht_cap_info; /* WMI HT Capability */
1515 __le32 vht_cap_info; /* VHT capability info field of 802.11ac */
1516 __le32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
1517 __le32 hw_min_tx_power;
1518 __le32 hw_max_tx_power;
1519 struct hal_reg_capabilities hal_reg_capabilities;
1520 __le32 sys_cap_info;
1521 __le32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
1523 * Max beacon and Probe Response IE offload size
1524 * (includes optional P2P IEs)
1526 __le32 max_bcn_ie_size;
1528 * request to host to allocate a chuck of memory and pss it down to FW
1529 * via WM_INIT. FW uses this as FW extesnsion memory for saving its
1530 * data structures. Only valid for low latency interfaces like PCIE
1531 * where FW can access this memory directly (or) by DMA.
1533 __le32 num_mem_reqs;
1534 struct wlan_host_mem_req mem_reqs[0];
1537 /* This is the definition from 10.X firmware branch */
1538 struct wmi_10x_service_ready_event {
1542 /* WMI_PHY_CAPABILITY */
1543 __le32 phy_capability;
1545 /* Maximum number of frag table entries that SW will populate less 1 */
1546 __le32 max_frag_entry;
1547 __le32 wmi_service_bitmap[16];
1548 __le32 num_rf_chains;
1551 * The following field is only valid for service type
1554 __le32 ht_cap_info; /* WMI HT Capability */
1555 __le32 vht_cap_info; /* VHT capability info field of 802.11ac */
1556 __le32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
1557 __le32 hw_min_tx_power;
1558 __le32 hw_max_tx_power;
1560 struct hal_reg_capabilities hal_reg_capabilities;
1562 __le32 sys_cap_info;
1563 __le32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
1566 * request to host to allocate a chuck of memory and pss it down to FW
1567 * via WM_INIT. FW uses this as FW extesnsion memory for saving its
1568 * data structures. Only valid for low latency interfaces like PCIE
1569 * where FW can access this memory directly (or) by DMA.
1571 __le32 num_mem_reqs;
1573 struct wlan_host_mem_req mem_reqs[0];
1576 #define WMI_SERVICE_READY_TIMEOUT_HZ (5*HZ)
1577 #define WMI_UNIFIED_READY_TIMEOUT_HZ (5*HZ)
1579 struct wmi_ready_event {
1582 struct wmi_mac_addr mac_addr;
1586 struct wmi_resource_config {
1587 /* number of virtual devices (VAPs) to support */
1590 /* number of peer nodes to support */
1594 * In offload mode target supports features like WOW, chatter and
1595 * other protocol offloads. In order to support them some
1596 * functionalities like reorder buffering, PN checking need to be
1597 * done in target. This determines maximum number of peers suported
1598 * by target in offload mode
1600 __le32 num_offload_peers;
1602 /* For target-based RX reordering */
1603 __le32 num_offload_reorder_bufs;
1605 /* number of keys per peer */
1606 __le32 num_peer_keys;
1608 /* total number of TX/RX data TIDs */
1612 * max skid for resolving hash collisions
1614 * The address search table is sparse, so that if two MAC addresses
1615 * result in the same hash value, the second of these conflicting
1616 * entries can slide to the next index in the address search table,
1617 * and use it, if it is unoccupied. This ast_skid_limit parameter
1618 * specifies the upper bound on how many subsequent indices to search
1619 * over to find an unoccupied space.
1621 __le32 ast_skid_limit;
1624 * the nominal chain mask for transmit
1626 * The chain mask may be modified dynamically, e.g. to operate AP
1627 * tx with a reduced number of chains if no clients are associated.
1628 * This configuration parameter specifies the nominal chain-mask that
1629 * should be used when not operating with a reduced set of tx chains.
1631 __le32 tx_chain_mask;
1634 * the nominal chain mask for receive
1636 * The chain mask may be modified dynamically, e.g. for a client
1637 * to use a reduced number of chains for receive if the traffic to
1638 * the client is low enough that it doesn't require downlink MIMO
1639 * or antenna diversity.
1640 * This configuration parameter specifies the nominal chain-mask that
1641 * should be used when not operating with a reduced set of rx chains.
1643 __le32 rx_chain_mask;
1646 * what rx reorder timeout (ms) to use for the AC
1648 * Each WMM access class (voice, video, best-effort, background) will
1649 * have its own timeout value to dictate how long to wait for missing
1650 * rx MPDUs to arrive before flushing subsequent MPDUs that have
1651 * already been received.
1652 * This parameter specifies the timeout in milliseconds for each
1655 __le32 rx_timeout_pri_vi;
1656 __le32 rx_timeout_pri_vo;
1657 __le32 rx_timeout_pri_be;
1658 __le32 rx_timeout_pri_bk;
1661 * what mode the rx should decap packets to
1663 * MAC can decap to RAW (no decap), native wifi or Ethernet types
1664 * THis setting also determines the default TX behavior, however TX
1665 * behavior can be modified on a per VAP basis during VAP init
1667 __le32 rx_decap_mode;
1669 /* what is the maximum number of scan requests that can be queued */
1670 __le32 scan_max_pending_reqs;
1672 /* maximum VDEV that could use BMISS offload */
1673 __le32 bmiss_offload_max_vdev;
1675 /* maximum VDEV that could use offload roaming */
1676 __le32 roam_offload_max_vdev;
1678 /* maximum AP profiles that would push to offload roaming */
1679 __le32 roam_offload_max_ap_profiles;
1682 * how many groups to use for mcast->ucast conversion
1684 * The target's WAL maintains a table to hold information regarding
1685 * which peers belong to a given multicast group, so that if
1686 * multicast->unicast conversion is enabled, the target can convert
1687 * multicast tx frames to a series of unicast tx frames, to each
1688 * peer within the multicast group.
1689 This num_mcast_groups configuration parameter tells the target how
1690 * many multicast groups to provide storage for within its multicast
1691 * group membership table.
1693 __le32 num_mcast_groups;
1696 * size to alloc for the mcast membership table
1698 * This num_mcast_table_elems configuration parameter tells the
1699 * target how many peer elements it needs to provide storage for in
1700 * its multicast group membership table.
1701 * These multicast group membership table elements are shared by the
1702 * multicast groups stored within the table.
1704 __le32 num_mcast_table_elems;
1707 * whether/how to do multicast->unicast conversion
1709 * This configuration parameter specifies whether the target should
1710 * perform multicast --> unicast conversion on transmit, and if so,
1711 * what to do if it finds no entries in its multicast group
1712 * membership table for the multicast IP address in the tx frame.
1713 * Configuration value:
1714 * 0 -> Do not perform multicast to unicast conversion.
1715 * 1 -> Convert multicast frames to unicast, if the IP multicast
1716 * address from the tx frame is found in the multicast group
1717 * membership table. If the IP multicast address is not found,
1719 * 2 -> Convert multicast frames to unicast, if the IP multicast
1720 * address from the tx frame is found in the multicast group
1721 * membership table. If the IP multicast address is not found,
1722 * transmit the frame as multicast.
1724 __le32 mcast2ucast_mode;
1727 * how much memory to allocate for a tx PPDU dbg log
1729 * This parameter controls how much memory the target will allocate
1730 * to store a log of tx PPDU meta-information (how large the PPDU
1731 * was, when it was sent, whether it was successful, etc.)
1733 __le32 tx_dbg_log_size;
1735 /* how many AST entries to be allocated for WDS */
1736 __le32 num_wds_entries;
1739 * MAC DMA burst size, e.g., For target PCI limit can be
1740 * 0 -default, 1 256B
1742 __le32 dma_burst_size;
1745 * Fixed delimiters to be inserted after every MPDU to
1746 * account for interface latency to avoid underrun.
1748 __le32 mac_aggr_delim;
1751 * determine whether target is responsible for detecting duplicate
1752 * non-aggregate MPDU and timing out stale fragments.
1754 * A-MPDU reordering is always performed on the target.
1756 * 0: target responsible for frag timeout and dup checking
1757 * 1: host responsible for frag timeout and dup checking
1759 __le32 rx_skip_defrag_timeout_dup_detection_check;
1762 * Configuration for VoW :
1763 * No of Video Nodes to be supported
1764 * and Max no of descriptors for each Video link (node).
1768 /* maximum VDEV that could use GTK offload */
1769 __le32 gtk_offload_max_vdev;
1771 /* Number of msdu descriptors target should use */
1772 __le32 num_msdu_desc;
1775 * Max. number of Tx fragments per MSDU
1776 * This parameter controls the max number of Tx fragments per MSDU.
1777 * This is sent by the target as part of the WMI_SERVICE_READY event
1778 * and is overriden by the OS shim as required.
1780 __le32 max_frag_entries;
1783 struct wmi_resource_config_10x {
1784 /* number of virtual devices (VAPs) to support */
1787 /* number of peer nodes to support */
1790 /* number of keys per peer */
1791 __le32 num_peer_keys;
1793 /* total number of TX/RX data TIDs */
1797 * max skid for resolving hash collisions
1799 * The address search table is sparse, so that if two MAC addresses
1800 * result in the same hash value, the second of these conflicting
1801 * entries can slide to the next index in the address search table,
1802 * and use it, if it is unoccupied. This ast_skid_limit parameter
1803 * specifies the upper bound on how many subsequent indices to search
1804 * over to find an unoccupied space.
1806 __le32 ast_skid_limit;
1809 * the nominal chain mask for transmit
1811 * The chain mask may be modified dynamically, e.g. to operate AP
1812 * tx with a reduced number of chains if no clients are associated.
1813 * This configuration parameter specifies the nominal chain-mask that
1814 * should be used when not operating with a reduced set of tx chains.
1816 __le32 tx_chain_mask;
1819 * the nominal chain mask for receive
1821 * The chain mask may be modified dynamically, e.g. for a client
1822 * to use a reduced number of chains for receive if the traffic to
1823 * the client is low enough that it doesn't require downlink MIMO
1824 * or antenna diversity.
1825 * This configuration parameter specifies the nominal chain-mask that
1826 * should be used when not operating with a reduced set of rx chains.
1828 __le32 rx_chain_mask;
1831 * what rx reorder timeout (ms) to use for the AC
1833 * Each WMM access class (voice, video, best-effort, background) will
1834 * have its own timeout value to dictate how long to wait for missing
1835 * rx MPDUs to arrive before flushing subsequent MPDUs that have
1836 * already been received.
1837 * This parameter specifies the timeout in milliseconds for each
1840 __le32 rx_timeout_pri_vi;
1841 __le32 rx_timeout_pri_vo;
1842 __le32 rx_timeout_pri_be;
1843 __le32 rx_timeout_pri_bk;
1846 * what mode the rx should decap packets to
1848 * MAC can decap to RAW (no decap), native wifi or Ethernet types
1849 * THis setting also determines the default TX behavior, however TX
1850 * behavior can be modified on a per VAP basis during VAP init
1852 __le32 rx_decap_mode;
1854 /* what is the maximum number of scan requests that can be queued */
1855 __le32 scan_max_pending_reqs;
1857 /* maximum VDEV that could use BMISS offload */
1858 __le32 bmiss_offload_max_vdev;
1860 /* maximum VDEV that could use offload roaming */
1861 __le32 roam_offload_max_vdev;
1863 /* maximum AP profiles that would push to offload roaming */
1864 __le32 roam_offload_max_ap_profiles;
1867 * how many groups to use for mcast->ucast conversion
1869 * The target's WAL maintains a table to hold information regarding
1870 * which peers belong to a given multicast group, so that if
1871 * multicast->unicast conversion is enabled, the target can convert
1872 * multicast tx frames to a series of unicast tx frames, to each
1873 * peer within the multicast group.
1874 This num_mcast_groups configuration parameter tells the target how
1875 * many multicast groups to provide storage for within its multicast
1876 * group membership table.
1878 __le32 num_mcast_groups;
1881 * size to alloc for the mcast membership table
1883 * This num_mcast_table_elems configuration parameter tells the
1884 * target how many peer elements it needs to provide storage for in
1885 * its multicast group membership table.
1886 * These multicast group membership table elements are shared by the
1887 * multicast groups stored within the table.
1889 __le32 num_mcast_table_elems;
1892 * whether/how to do multicast->unicast conversion
1894 * This configuration parameter specifies whether the target should
1895 * perform multicast --> unicast conversion on transmit, and if so,
1896 * what to do if it finds no entries in its multicast group
1897 * membership table for the multicast IP address in the tx frame.
1898 * Configuration value:
1899 * 0 -> Do not perform multicast to unicast conversion.
1900 * 1 -> Convert multicast frames to unicast, if the IP multicast
1901 * address from the tx frame is found in the multicast group
1902 * membership table. If the IP multicast address is not found,
1904 * 2 -> Convert multicast frames to unicast, if the IP multicast
1905 * address from the tx frame is found in the multicast group
1906 * membership table. If the IP multicast address is not found,
1907 * transmit the frame as multicast.
1909 __le32 mcast2ucast_mode;
1912 * how much memory to allocate for a tx PPDU dbg log
1914 * This parameter controls how much memory the target will allocate
1915 * to store a log of tx PPDU meta-information (how large the PPDU
1916 * was, when it was sent, whether it was successful, etc.)
1918 __le32 tx_dbg_log_size;
1920 /* how many AST entries to be allocated for WDS */
1921 __le32 num_wds_entries;
1924 * MAC DMA burst size, e.g., For target PCI limit can be
1925 * 0 -default, 1 256B
1927 __le32 dma_burst_size;
1930 * Fixed delimiters to be inserted after every MPDU to
1931 * account for interface latency to avoid underrun.
1933 __le32 mac_aggr_delim;
1936 * determine whether target is responsible for detecting duplicate
1937 * non-aggregate MPDU and timing out stale fragments.
1939 * A-MPDU reordering is always performed on the target.
1941 * 0: target responsible for frag timeout and dup checking
1942 * 1: host responsible for frag timeout and dup checking
1944 __le32 rx_skip_defrag_timeout_dup_detection_check;
1947 * Configuration for VoW :
1948 * No of Video Nodes to be supported
1949 * and Max no of descriptors for each Video link (node).
1953 /* Number of msdu descriptors target should use */
1954 __le32 num_msdu_desc;
1957 * Max. number of Tx fragments per MSDU
1958 * This parameter controls the max number of Tx fragments per MSDU.
1959 * This is sent by the target as part of the WMI_SERVICE_READY event
1960 * and is overriden by the OS shim as required.
1962 __le32 max_frag_entries;
1965 enum wmi_10_2_feature_mask {
1966 WMI_10_2_RX_BATCH_MODE = BIT(0),
1967 WMI_10_2_ATF_CONFIG = BIT(1),
1968 WMI_10_2_COEX_GPIO = BIT(3),
1971 struct wmi_resource_config_10_2 {
1972 struct wmi_resource_config_10x common;
1973 __le32 max_peer_ext_stats;
1974 __le32 smart_ant_cap; /* 0-disable, 1-enable */
1979 __le32 feature_mask;
1982 #define NUM_UNITS_IS_NUM_VDEVS 0x1
1983 #define NUM_UNITS_IS_NUM_PEERS 0x2
1985 /* strucutre describing host memory chunk. */
1986 struct host_memory_chunk {
1987 /* id of the request that is passed up in service ready */
1989 /* the physical address the memory chunk */
1991 /* size of the chunk */
1995 struct wmi_host_mem_chunks {
1997 /* some fw revisions require at least 1 chunk regardless of count */
1998 struct host_memory_chunk items[1];
2001 struct wmi_init_cmd {
2002 struct wmi_resource_config resource_config;
2003 struct wmi_host_mem_chunks mem_chunks;
2006 /* _10x stucture is from 10.X FW API */
2007 struct wmi_init_cmd_10x {
2008 struct wmi_resource_config_10x resource_config;
2009 struct wmi_host_mem_chunks mem_chunks;
2012 struct wmi_init_cmd_10_2 {
2013 struct wmi_resource_config_10_2 resource_config;
2014 struct wmi_host_mem_chunks mem_chunks;
2017 struct wmi_chan_list_entry {
2019 u8 phy_mode; /* valid for 10.2 only */
2023 /* TLV for channel list */
2024 struct wmi_chan_list {
2025 __le32 tag; /* WMI_CHAN_LIST_TAG */
2027 struct wmi_chan_list_entry channel_list[0];
2030 struct wmi_bssid_list {
2031 __le32 tag; /* WMI_BSSID_LIST_TAG */
2033 struct wmi_mac_addr bssid_list[0];
2036 struct wmi_ie_data {
2037 __le32 tag; /* WMI_IE_TAG */
2047 struct wmi_ssid_list {
2048 __le32 tag; /* WMI_SSID_LIST_TAG */
2050 struct wmi_ssid ssids[0];
2053 /* prefix used by scan requestor ids on the host */
2054 #define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
2056 /* prefix used by scan request ids generated on the host */
2057 /* host cycles through the lower 12 bits to generate ids */
2058 #define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000
2060 #define WLAN_SCAN_PARAMS_MAX_SSID 16
2061 #define WLAN_SCAN_PARAMS_MAX_BSSID 4
2062 #define WLAN_SCAN_PARAMS_MAX_IE_LEN 256
2064 /* Values lower than this may be refused by some firmware revisions with a scan
2065 * completion with a timedout reason.
2067 #define WMI_SCAN_CHAN_MIN_TIME_MSEC 40
2069 /* Scan priority numbers must be sequential, starting with 0 */
2070 enum wmi_scan_priority {
2071 WMI_SCAN_PRIORITY_VERY_LOW = 0,
2072 WMI_SCAN_PRIORITY_LOW,
2073 WMI_SCAN_PRIORITY_MEDIUM,
2074 WMI_SCAN_PRIORITY_HIGH,
2075 WMI_SCAN_PRIORITY_VERY_HIGH,
2076 WMI_SCAN_PRIORITY_COUNT /* number of priorities supported */
2079 struct wmi_start_scan_common {
2082 /* Scan requestor ID */
2084 /* VDEV id(interface) that is requesting scan */
2086 /* Scan Priority, input to scan scheduler */
2087 __le32 scan_priority;
2088 /* Scan events subscription */
2089 __le32 notify_scan_events;
2090 /* dwell time in msec on active channels */
2091 __le32 dwell_time_active;
2092 /* dwell time in msec on passive channels */
2093 __le32 dwell_time_passive;
2095 * min time in msec on the BSS channel,only valid if atleast one
2098 __le32 min_rest_time;
2100 * max rest time in msec on the BSS channel,only valid if at least
2101 * one VDEV is active
2104 * the scanner will rest on the bss channel at least min_rest_time
2105 * after min_rest_time the scanner will start checking for tx/rx
2106 * activity on all VDEVs. if there is no activity the scanner will
2107 * switch to off channel. if there is activity the scanner will let
2108 * the radio on the bss channel until max_rest_time expires.at
2109 * max_rest_time scanner will switch to off channel irrespective of
2110 * activity. activity is determined by the idle_time parameter.
2112 __le32 max_rest_time;
2114 * time before sending next set of probe requests.
2115 * The scanner keeps repeating probe requests transmission with
2116 * period specified by repeat_probe_time.
2117 * The number of probe requests specified depends on the ssid_list
2120 __le32 repeat_probe_time;
2121 /* time in msec between 2 consequetive probe requests with in a set. */
2122 __le32 probe_spacing_time;
2124 * data inactivity time in msec on bss channel that will be used by
2125 * scanner for measuring the inactivity.
2128 /* maximum time in msec allowed for scan */
2129 __le32 max_scan_time;
2131 * delay in msec before sending first probe request after switching
2135 /* Scan control flags */
2136 __le32 scan_ctrl_flags;
2139 struct wmi_start_scan_tlvs {
2140 /* TLV parameters. These includes channel list, ssid list, bssid list,
2146 struct wmi_start_scan_cmd {
2147 struct wmi_start_scan_common common;
2148 __le32 burst_duration_ms;
2149 struct wmi_start_scan_tlvs tlvs;
2152 /* This is the definition from 10.X firmware branch */
2153 struct wmi_10x_start_scan_cmd {
2154 struct wmi_start_scan_common common;
2155 struct wmi_start_scan_tlvs tlvs;
2158 struct wmi_ssid_arg {
2163 struct wmi_bssid_arg {
2167 struct wmi_start_scan_arg {
2172 u32 notify_scan_events;
2173 u32 dwell_time_active;
2174 u32 dwell_time_passive;
2177 u32 repeat_probe_time;
2178 u32 probe_spacing_time;
2182 u32 scan_ctrl_flags;
2183 u32 burst_duration_ms;
2190 u8 ie[WLAN_SCAN_PARAMS_MAX_IE_LEN];
2192 struct wmi_ssid_arg ssids[WLAN_SCAN_PARAMS_MAX_SSID];
2193 struct wmi_bssid_arg bssids[WLAN_SCAN_PARAMS_MAX_BSSID];
2196 /* scan control flags */
2198 /* passively scan all channels including active channels */
2199 #define WMI_SCAN_FLAG_PASSIVE 0x1
2200 /* add wild card ssid probe request even though ssid_list is specified. */
2201 #define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2
2202 /* add cck rates to rates/xrate ie for the generated probe request */
2203 #define WMI_SCAN_ADD_CCK_RATES 0x4
2204 /* add ofdm rates to rates/xrate ie for the generated probe request */
2205 #define WMI_SCAN_ADD_OFDM_RATES 0x8
2206 /* To enable indication of Chan load and Noise floor to host */
2207 #define WMI_SCAN_CHAN_STAT_EVENT 0x10
2208 /* Filter Probe request frames */
2209 #define WMI_SCAN_FILTER_PROBE_REQ 0x20
2210 /* When set, DFS channels will not be scanned */
2211 #define WMI_SCAN_BYPASS_DFS_CHN 0x40
2212 /* Different FW scan engine may choose to bail out on errors.
2213 * Allow the driver to have influence over that. */
2214 #define WMI_SCAN_CONTINUE_ON_ERROR 0x80
2216 /* WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */
2217 #define WMI_SCAN_CLASS_MASK 0xFF000000
2219 enum wmi_stop_scan_type {
2220 WMI_SCAN_STOP_ONE = 0x00000000, /* stop by scan_id */
2221 WMI_SCAN_STOP_VDEV_ALL = 0x01000000, /* stop by vdev_id */
2222 WMI_SCAN_STOP_ALL = 0x04000000, /* stop all scans */
2225 struct wmi_stop_scan_cmd {
2232 struct wmi_stop_scan_arg {
2234 enum wmi_stop_scan_type req_type;
2241 struct wmi_scan_chan_list_cmd {
2242 __le32 num_scan_chans;
2243 struct wmi_channel chan_info[0];
2246 struct wmi_scan_chan_list_arg {
2248 struct wmi_channel_arg *channels;
2251 enum wmi_bss_filter {
2252 WMI_BSS_FILTER_NONE = 0, /* no beacons forwarded */
2253 WMI_BSS_FILTER_ALL, /* all beacons forwarded */
2254 WMI_BSS_FILTER_PROFILE, /* only beacons matching profile */
2255 WMI_BSS_FILTER_ALL_BUT_PROFILE, /* all but beacons matching profile */
2256 WMI_BSS_FILTER_CURRENT_BSS, /* only beacons matching current BSS */
2257 WMI_BSS_FILTER_ALL_BUT_BSS, /* all but beacons matching BSS */
2258 WMI_BSS_FILTER_PROBED_SSID, /* beacons matching probed ssid */
2259 WMI_BSS_FILTER_LAST_BSS, /* marker only */
2262 enum wmi_scan_event_type {
2263 WMI_SCAN_EVENT_STARTED = 0x1,
2264 WMI_SCAN_EVENT_COMPLETED = 0x2,
2265 WMI_SCAN_EVENT_BSS_CHANNEL = 0x4,
2266 WMI_SCAN_EVENT_FOREIGN_CHANNEL = 0x8,
2267 WMI_SCAN_EVENT_DEQUEUED = 0x10,
2268 WMI_SCAN_EVENT_PREEMPTED = 0x20, /* possibly by high-prio scan */
2269 WMI_SCAN_EVENT_START_FAILED = 0x40,
2270 WMI_SCAN_EVENT_RESTARTED = 0x80,
2271 WMI_SCAN_EVENT_MAX = 0x8000
2274 enum wmi_scan_completion_reason {
2275 WMI_SCAN_REASON_COMPLETED,
2276 WMI_SCAN_REASON_CANCELLED,
2277 WMI_SCAN_REASON_PREEMPTED,
2278 WMI_SCAN_REASON_TIMEDOUT,
2279 WMI_SCAN_REASON_MAX,
2282 struct wmi_scan_event {
2283 __le32 event_type; /* %WMI_SCAN_EVENT_ */
2284 __le32 reason; /* %WMI_SCAN_REASON_ */
2285 __le32 channel_freq; /* only valid for WMI_SCAN_EVENT_FOREIGN_CHANNEL */
2292 * This defines how much headroom is kept in the
2293 * receive frame between the descriptor and the
2294 * payload, in order for the WMI PHY error and
2295 * management handler to insert header contents.
2299 #define WMI_MGMT_RX_HDR_HEADROOM 52
2302 * This event will be used for sending scan results
2303 * as well as rx mgmt frames to the host. The rx buffer
2304 * will be sent as part of this WMI event. It would be a
2305 * good idea to pass all the fields in the RX status
2306 * descriptor up to the host.
2308 struct wmi_mgmt_rx_hdr_v1 {
2314 __le32 status; /* %WMI_RX_STATUS_ */
2317 struct wmi_mgmt_rx_hdr_v2 {
2318 struct wmi_mgmt_rx_hdr_v1 v1;
2322 struct wmi_mgmt_rx_event_v1 {
2323 struct wmi_mgmt_rx_hdr_v1 hdr;
2327 struct wmi_mgmt_rx_event_v2 {
2328 struct wmi_mgmt_rx_hdr_v2 hdr;
2332 #define WMI_RX_STATUS_OK 0x00
2333 #define WMI_RX_STATUS_ERR_CRC 0x01
2334 #define WMI_RX_STATUS_ERR_DECRYPT 0x08
2335 #define WMI_RX_STATUS_ERR_MIC 0x10
2336 #define WMI_RX_STATUS_ERR_KEY_CACHE_MISS 0x20
2338 #define PHY_ERROR_SPECTRAL_SCAN 0x26
2339 #define PHY_ERROR_FALSE_RADAR_EXT 0x24
2340 #define PHY_ERROR_RADAR 0x05
2343 __le32 tsf_timestamp;
2350 __le32 rssi_chains[4];
2351 __le16 nf_chains[4];
2356 struct wmi_phyerr_event {
2360 struct wmi_phyerr phyerrs[0];
2363 #define PHYERR_TLV_SIG 0xBB
2364 #define PHYERR_TLV_TAG_SEARCH_FFT_REPORT 0xFB
2365 #define PHYERR_TLV_TAG_RADAR_PULSE_SUMMARY 0xF8
2366 #define PHYERR_TLV_TAG_SPECTRAL_SUMMARY_REPORT 0xF9
2368 struct phyerr_radar_report {
2369 __le32 reg0; /* RADAR_REPORT_REG0_* */
2370 __le32 reg1; /* REDAR_REPORT_REG1_* */
2373 #define RADAR_REPORT_REG0_PULSE_IS_CHIRP_MASK 0x80000000
2374 #define RADAR_REPORT_REG0_PULSE_IS_CHIRP_LSB 31
2376 #define RADAR_REPORT_REG0_PULSE_IS_MAX_WIDTH_MASK 0x40000000
2377 #define RADAR_REPORT_REG0_PULSE_IS_MAX_WIDTH_LSB 30
2379 #define RADAR_REPORT_REG0_AGC_TOTAL_GAIN_MASK 0x3FF00000
2380 #define RADAR_REPORT_REG0_AGC_TOTAL_GAIN_LSB 20
2382 #define RADAR_REPORT_REG0_PULSE_DELTA_DIFF_MASK 0x000F0000
2383 #define RADAR_REPORT_REG0_PULSE_DELTA_DIFF_LSB 16
2385 #define RADAR_REPORT_REG0_PULSE_DELTA_PEAK_MASK 0x0000FC00
2386 #define RADAR_REPORT_REG0_PULSE_DELTA_PEAK_LSB 10
2388 #define RADAR_REPORT_REG0_PULSE_SIDX_MASK 0x000003FF
2389 #define RADAR_REPORT_REG0_PULSE_SIDX_LSB 0
2391 #define RADAR_REPORT_REG1_PULSE_SRCH_FFT_VALID_MASK 0x80000000
2392 #define RADAR_REPORT_REG1_PULSE_SRCH_FFT_VALID_LSB 31
2394 #define RADAR_REPORT_REG1_PULSE_AGC_MB_GAIN_MASK 0x7F000000
2395 #define RADAR_REPORT_REG1_PULSE_AGC_MB_GAIN_LSB 24
2397 #define RADAR_REPORT_REG1_PULSE_SUBCHAN_MASK_MASK 0x00FF0000
2398 #define RADAR_REPORT_REG1_PULSE_SUBCHAN_MASK_LSB 16
2400 #define RADAR_REPORT_REG1_PULSE_TSF_OFFSET_MASK 0x0000FF00
2401 #define RADAR_REPORT_REG1_PULSE_TSF_OFFSET_LSB 8
2403 #define RADAR_REPORT_REG1_PULSE_DUR_MASK 0x000000FF
2404 #define RADAR_REPORT_REG1_PULSE_DUR_LSB 0
2406 struct phyerr_fft_report {
2407 __le32 reg0; /* SEARCH_FFT_REPORT_REG0_ * */
2408 __le32 reg1; /* SEARCH_FFT_REPORT_REG1_ * */
2411 #define SEARCH_FFT_REPORT_REG0_TOTAL_GAIN_DB_MASK 0xFF800000
2412 #define SEARCH_FFT_REPORT_REG0_TOTAL_GAIN_DB_LSB 23
2414 #define SEARCH_FFT_REPORT_REG0_BASE_PWR_DB_MASK 0x007FC000
2415 #define SEARCH_FFT_REPORT_REG0_BASE_PWR_DB_LSB 14
2417 #define SEARCH_FFT_REPORT_REG0_FFT_CHN_IDX_MASK 0x00003000
2418 #define SEARCH_FFT_REPORT_REG0_FFT_CHN_IDX_LSB 12
2420 #define SEARCH_FFT_REPORT_REG0_PEAK_SIDX_MASK 0x00000FFF
2421 #define SEARCH_FFT_REPORT_REG0_PEAK_SIDX_LSB 0
2423 #define SEARCH_FFT_REPORT_REG1_RELPWR_DB_MASK 0xFC000000
2424 #define SEARCH_FFT_REPORT_REG1_RELPWR_DB_LSB 26
2426 #define SEARCH_FFT_REPORT_REG1_AVGPWR_DB_MASK 0x03FC0000
2427 #define SEARCH_FFT_REPORT_REG1_AVGPWR_DB_LSB 18
2429 #define SEARCH_FFT_REPORT_REG1_PEAK_MAG_MASK 0x0003FF00
2430 #define SEARCH_FFT_REPORT_REG1_PEAK_MAG_LSB 8
2432 #define SEARCH_FFT_REPORT_REG1_NUM_STR_BINS_IB_MASK 0x000000FF
2433 #define SEARCH_FFT_REPORT_REG1_NUM_STR_BINS_IB_LSB 0
2441 #define DFS_RSSI_POSSIBLY_FALSE 50
2442 #define DFS_PEAK_MAG_THOLD_POSSIBLY_FALSE 40
2444 struct wmi_mgmt_tx_hdr {
2446 struct wmi_mac_addr peer_macaddr;
2452 struct wmi_mgmt_tx_cmd {
2453 struct wmi_mgmt_tx_hdr hdr;
2457 struct wmi_echo_event {
2461 struct wmi_echo_cmd {
2465 struct wmi_pdev_set_regdomain_cmd {
2467 __le32 reg_domain_2G;
2468 __le32 reg_domain_5G;
2469 __le32 conformance_test_limit_2G;
2470 __le32 conformance_test_limit_5G;
2473 enum wmi_dfs_region {
2474 /* Uninitialized dfs domain */
2475 WMI_UNINIT_DFS_DOMAIN = 0,
2477 /* FCC3 dfs domain */
2478 WMI_FCC_DFS_DOMAIN = 1,
2480 /* ETSI dfs domain */
2481 WMI_ETSI_DFS_DOMAIN = 2,
2483 /*Japan dfs domain */
2484 WMI_MKK4_DFS_DOMAIN = 3,
2487 struct wmi_pdev_set_regdomain_cmd_10x {
2489 __le32 reg_domain_2G;
2490 __le32 reg_domain_5G;
2491 __le32 conformance_test_limit_2G;
2492 __le32 conformance_test_limit_5G;
2494 /* dfs domain from wmi_dfs_region */
2498 /* Command to set/unset chip in quiet mode */
2499 struct wmi_pdev_set_quiet_cmd {
2503 /* duration in TUs */
2509 /* enable/disable */
2514 * 802.11g protection mode.
2516 enum ath10k_protmode {
2517 ATH10K_PROT_NONE = 0, /* no protection */
2518 ATH10K_PROT_CTSONLY = 1, /* CTS to self */
2519 ATH10K_PROT_RTSCTS = 2, /* RTS-CTS */
2522 enum wmi_rtscts_profile {
2523 WMI_RTSCTS_FOR_NO_RATESERIES = 0,
2524 WMI_RTSCTS_FOR_SECOND_RATESERIES,
2525 WMI_RTSCTS_ACROSS_SW_RETRIES
2528 #define WMI_RTSCTS_ENABLED 1
2529 #define WMI_RTSCTS_SET_MASK 0x0f
2530 #define WMI_RTSCTS_SET_LSB 0
2532 #define WMI_RTSCTS_PROFILE_MASK 0xf0
2533 #define WMI_RTSCTS_PROFILE_LSB 4
2535 enum wmi_beacon_gen_mode {
2536 WMI_BEACON_STAGGERED_MODE = 0,
2537 WMI_BEACON_BURST_MODE = 1
2540 enum wmi_csa_event_ies_present_flag {
2541 WMI_CSA_IE_PRESENT = 0x00000001,
2542 WMI_XCSA_IE_PRESENT = 0x00000002,
2543 WMI_WBW_IE_PRESENT = 0x00000004,
2544 WMI_CSWARP_IE_PRESENT = 0x00000008,
2547 /* wmi CSA receive event from beacon frame */
2548 struct wmi_csa_event {
2551 /* Bit 16-31: DUR */
2552 struct wmi_mac_addr i_addr1;
2553 struct wmi_mac_addr i_addr2;
2558 __le32 ies_present_flag; /* wmi_csa_event_ies_present_flag */
2561 /* the definition of different PDEV parameters */
2562 #define PDEV_DEFAULT_STATS_UPDATE_PERIOD 500
2563 #define VDEV_DEFAULT_STATS_UPDATE_PERIOD 500
2564 #define PEER_DEFAULT_STATS_UPDATE_PERIOD 500
2566 struct wmi_pdev_param_map {
2569 u32 txpower_limit2g;
2570 u32 txpower_limit5g;
2572 u32 beacon_gen_mode;
2574 u32 resmgr_offchan_mode;
2575 u32 protection_mode;
2577 u32 non_agg_sw_retry_th;
2578 u32 agg_sw_retry_th;
2580 u32 ac_aggrsize_scaling;
2582 u32 ltr_ac_latency_be;
2583 u32 ltr_ac_latency_bk;
2584 u32 ltr_ac_latency_vi;
2585 u32 ltr_ac_latency_vo;
2586 u32 ltr_ac_latency_timeout;
2587 u32 ltr_sleep_override;
2588 u32 ltr_rx_override;
2589 u32 ltr_tx_activity_timeout;
2592 u32 pcielp_txbuf_flush;
2593 u32 pcielp_txbuf_watermark;
2594 u32 pcielp_txbuf_tmo_en;
2595 u32 pcielp_txbuf_tmo_value;
2596 u32 pdev_stats_update_period;
2597 u32 vdev_stats_update_period;
2598 u32 peer_stats_update_period;
2599 u32 bcnflt_stats_update_period;
2601 u32 arp_ac_override;
2604 u32 ani_poll_period;
2605 u32 ani_listen_period;
2611 u32 power_gating_sleep;
2612 u32 fast_channel_reset;
2618 #define WMI_PDEV_PARAM_UNSUPPORTED 0
2620 enum wmi_pdev_param {
2622 WMI_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
2624 WMI_PDEV_PARAM_RX_CHAIN_MASK,
2625 /* TX power limit for 2G Radio */
2626 WMI_PDEV_PARAM_TXPOWER_LIMIT2G,
2627 /* TX power limit for 5G Radio */
2628 WMI_PDEV_PARAM_TXPOWER_LIMIT5G,
2629 /* TX power scale */
2630 WMI_PDEV_PARAM_TXPOWER_SCALE,
2631 /* Beacon generation mode . 0: host, 1: target */
2632 WMI_PDEV_PARAM_BEACON_GEN_MODE,
2633 /* Beacon generation mode . 0: staggered 1: bursted */
2634 WMI_PDEV_PARAM_BEACON_TX_MODE,
2636 * Resource manager off chan mode .
2637 * 0: turn off off chan mode. 1: turn on offchan mode
2639 WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE,
2642 * 0: no protection 1:use CTS-to-self 2: use RTS/CTS
2644 WMI_PDEV_PARAM_PROTECTION_MODE,
2646 * Dynamic bandwidth - 0: disable, 1: enable
2648 * When enabled HW rate control tries different bandwidths when
2649 * retransmitting frames.
2651 WMI_PDEV_PARAM_DYNAMIC_BW,
2652 /* Non aggregrate/ 11g sw retry threshold.0-disable */
2653 WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH,
2654 /* aggregrate sw retry threshold. 0-disable*/
2655 WMI_PDEV_PARAM_AGG_SW_RETRY_TH,
2656 /* Station kickout threshold (non of consecutive failures).0-disable */
2657 WMI_PDEV_PARAM_STA_KICKOUT_TH,
2658 /* Aggerate size scaling configuration per AC */
2659 WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING,
2661 WMI_PDEV_PARAM_LTR_ENABLE,
2662 /* LTR latency for BE, in us */
2663 WMI_PDEV_PARAM_LTR_AC_LATENCY_BE,
2664 /* LTR latency for BK, in us */
2665 WMI_PDEV_PARAM_LTR_AC_LATENCY_BK,
2666 /* LTR latency for VI, in us */
2667 WMI_PDEV_PARAM_LTR_AC_LATENCY_VI,
2668 /* LTR latency for VO, in us */
2669 WMI_PDEV_PARAM_LTR_AC_LATENCY_VO,
2670 /* LTR AC latency timeout, in ms */
2671 WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT,
2672 /* LTR platform latency override, in us */
2673 WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE,
2674 /* LTR-RX override, in us */
2675 WMI_PDEV_PARAM_LTR_RX_OVERRIDE,
2676 /* Tx activity timeout for LTR, in us */
2677 WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT,
2678 /* L1SS state machine enable */
2679 WMI_PDEV_PARAM_L1SS_ENABLE,
2680 /* Deep sleep state machine enable */
2681 WMI_PDEV_PARAM_DSLEEP_ENABLE,
2682 /* RX buffering flush enable */
2683 WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH,
2684 /* RX buffering matermark */
2685 WMI_PDEV_PARAM_PCIELP_TXBUF_WATERMARK,
2686 /* RX buffering timeout enable */
2687 WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN,
2688 /* RX buffering timeout value */
2689 WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE,
2690 /* pdev level stats update period in ms */
2691 WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD,
2692 /* vdev level stats update period in ms */
2693 WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD,
2694 /* peer level stats update period in ms */
2695 WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD,
2696 /* beacon filter status update period */
2697 WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD,
2698 /* QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
2699 WMI_PDEV_PARAM_PMF_QOS,
2700 /* Access category on which ARP frames are sent */
2701 WMI_PDEV_PARAM_ARP_AC_OVERRIDE,
2702 /* DCS configuration */
2704 /* Enable/Disable ANI on target */
2705 WMI_PDEV_PARAM_ANI_ENABLE,
2706 /* configure the ANI polling period */
2707 WMI_PDEV_PARAM_ANI_POLL_PERIOD,
2708 /* configure the ANI listening period */
2709 WMI_PDEV_PARAM_ANI_LISTEN_PERIOD,
2710 /* configure OFDM immunity level */
2711 WMI_PDEV_PARAM_ANI_OFDM_LEVEL,
2712 /* configure CCK immunity level */
2713 WMI_PDEV_PARAM_ANI_CCK_LEVEL,
2714 /* Enable/Disable CDD for 1x1 STAs in rate control module */
2715 WMI_PDEV_PARAM_DYNTXCHAIN,
2716 /* Enable/Disable proxy STA */
2717 WMI_PDEV_PARAM_PROXY_STA,
2718 /* Enable/Disable low power state when all VDEVs are inactive/idle. */
2719 WMI_PDEV_PARAM_IDLE_PS_CONFIG,
2720 /* Enable/Disable power gating sleep */
2721 WMI_PDEV_PARAM_POWER_GATING_SLEEP,
2724 enum wmi_10x_pdev_param {
2726 WMI_10X_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
2728 WMI_10X_PDEV_PARAM_RX_CHAIN_MASK,
2729 /* TX power limit for 2G Radio */
2730 WMI_10X_PDEV_PARAM_TXPOWER_LIMIT2G,
2731 /* TX power limit for 5G Radio */
2732 WMI_10X_PDEV_PARAM_TXPOWER_LIMIT5G,
2733 /* TX power scale */
2734 WMI_10X_PDEV_PARAM_TXPOWER_SCALE,
2735 /* Beacon generation mode . 0: host, 1: target */
2736 WMI_10X_PDEV_PARAM_BEACON_GEN_MODE,
2737 /* Beacon generation mode . 0: staggered 1: bursted */
2738 WMI_10X_PDEV_PARAM_BEACON_TX_MODE,
2740 * Resource manager off chan mode .
2741 * 0: turn off off chan mode. 1: turn on offchan mode
2743 WMI_10X_PDEV_PARAM_RESMGR_OFFCHAN_MODE,
2746 * 0: no protection 1:use CTS-to-self 2: use RTS/CTS
2748 WMI_10X_PDEV_PARAM_PROTECTION_MODE,
2749 /* Dynamic bandwidth 0: disable 1: enable */
2750 WMI_10X_PDEV_PARAM_DYNAMIC_BW,
2751 /* Non aggregrate/ 11g sw retry threshold.0-disable */
2752 WMI_10X_PDEV_PARAM_NON_AGG_SW_RETRY_TH,
2753 /* aggregrate sw retry threshold. 0-disable*/
2754 WMI_10X_PDEV_PARAM_AGG_SW_RETRY_TH,
2755 /* Station kickout threshold (non of consecutive failures).0-disable */
2756 WMI_10X_PDEV_PARAM_STA_KICKOUT_TH,
2757 /* Aggerate size scaling configuration per AC */
2758 WMI_10X_PDEV_PARAM_AC_AGGRSIZE_SCALING,
2760 WMI_10X_PDEV_PARAM_LTR_ENABLE,
2761 /* LTR latency for BE, in us */
2762 WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_BE,
2763 /* LTR latency for BK, in us */
2764 WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_BK,
2765 /* LTR latency for VI, in us */
2766 WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_VI,
2767 /* LTR latency for VO, in us */
2768 WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_VO,
2769 /* LTR AC latency timeout, in ms */
2770 WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT,
2771 /* LTR platform latency override, in us */
2772 WMI_10X_PDEV_PARAM_LTR_SLEEP_OVERRIDE,
2773 /* LTR-RX override, in us */
2774 WMI_10X_PDEV_PARAM_LTR_RX_OVERRIDE,
2775 /* Tx activity timeout for LTR, in us */
2776 WMI_10X_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT,
2777 /* L1SS state machine enable */
2778 WMI_10X_PDEV_PARAM_L1SS_ENABLE,
2779 /* Deep sleep state machine enable */
2780 WMI_10X_PDEV_PARAM_DSLEEP_ENABLE,
2781 /* pdev level stats update period in ms */
2782 WMI_10X_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD,
2783 /* vdev level stats update period in ms */
2784 WMI_10X_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD,
2785 /* peer level stats update period in ms */
2786 WMI_10X_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD,
2787 /* beacon filter status update period */
2788 WMI_10X_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD,
2789 /* QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
2790 WMI_10X_PDEV_PARAM_PMF_QOS,
2791 /* Access category on which ARP and DHCP frames are sent */
2792 WMI_10X_PDEV_PARAM_ARPDHCP_AC_OVERRIDE,
2793 /* DCS configuration */
2794 WMI_10X_PDEV_PARAM_DCS,
2795 /* Enable/Disable ANI on target */
2796 WMI_10X_PDEV_PARAM_ANI_ENABLE,
2797 /* configure the ANI polling period */
2798 WMI_10X_PDEV_PARAM_ANI_POLL_PERIOD,
2799 /* configure the ANI listening period */
2800 WMI_10X_PDEV_PARAM_ANI_LISTEN_PERIOD,
2801 /* configure OFDM immunity level */
2802 WMI_10X_PDEV_PARAM_ANI_OFDM_LEVEL,
2803 /* configure CCK immunity level */
2804 WMI_10X_PDEV_PARAM_ANI_CCK_LEVEL,
2805 /* Enable/Disable CDD for 1x1 STAs in rate control module */
2806 WMI_10X_PDEV_PARAM_DYNTXCHAIN,
2807 /* Enable/Disable Fast channel reset*/
2808 WMI_10X_PDEV_PARAM_FAST_CHANNEL_RESET,
2809 /* Set Bursting DUR */
2810 WMI_10X_PDEV_PARAM_BURST_DUR,
2811 /* Set Bursting Enable*/
2812 WMI_10X_PDEV_PARAM_BURST_ENABLE,
2814 /* following are available as of firmware 10.2 */
2815 WMI_10X_PDEV_PARAM_SMART_ANTENNA_DEFAULT_ANTENNA,
2816 WMI_10X_PDEV_PARAM_IGMPMLD_OVERRIDE,
2817 WMI_10X_PDEV_PARAM_IGMPMLD_TID,
2818 WMI_10X_PDEV_PARAM_ANTENNA_GAIN,
2819 WMI_10X_PDEV_PARAM_RX_DECAP_MODE,
2820 WMI_10X_PDEV_PARAM_RX_FILTER,
2821 WMI_10X_PDEV_PARAM_SET_MCAST_TO_UCAST_TID,
2822 WMI_10X_PDEV_PARAM_PROXY_STA_MODE,
2823 WMI_10X_PDEV_PARAM_SET_MCAST2UCAST_MODE,
2824 WMI_10X_PDEV_PARAM_SET_MCAST2UCAST_BUFFER,
2825 WMI_10X_PDEV_PARAM_REMOVE_MCAST2UCAST_BUFFER,
2826 WMI_10X_PDEV_PARAM_PEER_STA_PS_STATECHG_ENABLE,
2827 WMI_10X_PDEV_PARAM_RTS_FIXED_RATE,
2828 WMI_10X_PDEV_PARAM_CAL_PERIOD
2831 struct wmi_pdev_set_param_cmd {
2836 /* valid period is 1 ~ 60000ms, unit in millisecond */
2837 #define WMI_PDEV_PARAM_CAL_PERIOD_MAX 60000
2839 struct wmi_pdev_get_tpc_config_cmd {
2844 #define WMI_TPC_RATE_MAX 160
2845 #define WMI_TPC_TX_N_CHAIN 4
2847 enum wmi_tpc_config_event_flag {
2848 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1,
2849 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
2850 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
2853 struct wmi_pdev_tpc_config_event {
2857 __le32 twice_antenna_reduction;
2858 __le32 twice_max_rd_power;
2859 s32 twice_antenna_gain;
2862 __le32 num_tx_chain;
2865 s8 max_reg_allow_pow[WMI_TPC_TX_N_CHAIN];
2866 s8 max_reg_allow_pow_agcdd[WMI_TPC_TX_N_CHAIN][WMI_TPC_TX_N_CHAIN];
2867 s8 max_reg_allow_pow_agstbc[WMI_TPC_TX_N_CHAIN][WMI_TPC_TX_N_CHAIN];
2868 s8 max_reg_allow_pow_agtxbf[WMI_TPC_TX_N_CHAIN][WMI_TPC_TX_N_CHAIN];
2869 u8 rates_array[WMI_TPC_RATE_MAX];
2872 /* Transmit power scale factor. */
2874 WMI_TP_SCALE_MAX = 0, /* no scaling (default) */
2875 WMI_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
2876 WMI_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
2877 WMI_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
2878 WMI_TP_SCALE_MIN = 4, /* min, but still on */
2879 WMI_TP_SCALE_SIZE = 5, /* max num of enum */
2882 struct wmi_pdev_chanlist_update_event {
2883 /* number of channels */
2885 /* array of channels */
2886 struct wmi_channel channel_list[1];
2889 #define WMI_MAX_DEBUG_MESG (sizeof(u32) * 32)
2891 struct wmi_debug_mesg_event {
2892 /* message buffer, NULL terminated */
2893 char bufp[WMI_MAX_DEBUG_MESG];
2898 VDEV_SUBTYPE_P2PDEV = 0,
2900 VDEV_SUBTYPE_P2PCLI,
2907 struct wmi_pdev_set_channel_cmd {
2908 /* idnore power , only use flags , mode and freq */
2909 struct wmi_channel chan;
2912 struct wmi_pdev_pktlog_enable_cmd {
2916 /* Customize the DSCP (bit) to TID (0-7) mapping for QOS */
2917 #define WMI_DSCP_MAP_MAX (64)
2918 struct wmi_pdev_set_dscp_tid_map_cmd {
2919 /* map indicating DSCP to TID conversion */
2920 __le32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
2923 enum mcast_bcast_rate_id {
2928 struct mcast_bcast_rate {
2929 enum mcast_bcast_rate_id rate_id;
2933 struct wmi_wmm_params {
2942 struct wmi_pdev_set_wmm_params {
2943 struct wmi_wmm_params ac_be;
2944 struct wmi_wmm_params ac_bk;
2945 struct wmi_wmm_params ac_vi;
2946 struct wmi_wmm_params ac_vo;
2949 struct wmi_wmm_params_arg {
2958 struct wmi_wmm_params_all_arg {
2959 struct wmi_wmm_params_arg ac_be;
2960 struct wmi_wmm_params_arg ac_bk;
2961 struct wmi_wmm_params_arg ac_vi;
2962 struct wmi_wmm_params_arg ac_vo;
2965 struct wmi_pdev_stats_tx {
2966 /* Num HTT cookies queued to dispatch list */
2969 /* Num HTT cookies dispatched */
2970 __le32 comp_delivered;
2972 /* Num MSDU queued to WAL */
2975 /* Num MPDU queue to WAL */
2978 /* Num MSDUs dropped by WMM limit */
2981 /* Num Local frames queued */
2982 __le32 local_enqued;
2984 /* Num Local frames done */
2987 /* Num queued to HW */
2990 /* Num PPDU reaped from HW */
2996 /* Num PPDUs cleaned up in TX abort */
2999 /* Num MPDUs requed by SW */
3000 __le32 mpdus_requed;
3002 /* excessive retries */
3005 /* data hw rate code */
3008 /* Scheduler self triggers */
3009 __le32 self_triggers;
3011 /* frames dropped due to excessive sw retries */
3012 __le32 sw_retry_failure;
3014 /* illegal rate phy errors */
3015 __le32 illgl_rate_phy_err;
3017 /* wal pdev continous xretry */
3018 __le32 pdev_cont_xretry;
3020 /* wal pdev continous xretry */
3021 __le32 pdev_tx_timeout;
3023 /* wal pdev resets */
3026 /* frames dropped due to non-availability of stateless TIDs */
3027 __le32 stateless_tid_alloc_failure;
3029 __le32 phy_underrun;
3031 /* MPDU is more than txop limit */
3035 struct wmi_pdev_stats_rx {
3036 /* Cnts any change in ring routing mid-ppdu */
3037 __le32 mid_ppdu_route_change;
3039 /* Total number of statuses processed */
3042 /* Extra frags on rings 0-3 */
3048 /* MSDUs / MPDUs delivered to HTT */
3052 /* MSDUs / MPDUs delivered to local stack */
3056 /* AMSDUs that have more MSDUs than the status ring size */
3057 __le32 oversize_amsdu;
3059 /* Number of PHY errors */
3062 /* Number of PHY errors drops */
3063 __le32 phy_err_drop;
3065 /* Number of mpdu errors - FCS, MIC, ENC etc. */
3069 struct wmi_pdev_stats_peer {
3070 /* REMOVE THIS ONCE REAL PEER STAT COUNTERS ARE ADDED */
3075 WMI_STAT_PEER = BIT(0),
3076 WMI_STAT_AP = BIT(1),
3077 WMI_STAT_PDEV = BIT(2),
3078 WMI_STAT_VDEV = BIT(3),
3079 WMI_STAT_BCNFLT = BIT(4),
3080 WMI_STAT_VDEV_RATE = BIT(5),
3083 struct wlan_inst_rssi_args {
3084 __le16 cfg_retry_count;
3088 struct wmi_request_stats_cmd {
3093 /* peer MAC address */
3094 struct wmi_mac_addr peer_macaddr;
3096 /* Instantaneous RSSI arguments */
3097 struct wlan_inst_rssi_args inst_rssi_args;
3100 /* Suspend option */
3105 /* suspend and disable all interrupts */
3106 WMI_PDEV_SUSPEND_AND_DISABLE_INTR,
3109 struct wmi_pdev_suspend_cmd {
3110 /* suspend option sent to target */
3114 struct wmi_stats_event {
3115 __le32 stats_id; /* WMI_STAT_ */
3117 * number of pdev stats event structures
3118 * (wmi_pdev_stats) 0 or 1
3120 __le32 num_pdev_stats;
3122 * number of vdev stats event structures
3123 * (wmi_vdev_stats) 0 or max vdevs
3125 __le32 num_vdev_stats;
3127 * number of peer stats event structures
3128 * (wmi_peer_stats) 0 or max peers
3130 __le32 num_peer_stats;
3131 __le32 num_bcnflt_stats;
3134 * num_pdev_stats * size of(struct wmi_pdev_stats)
3135 * num_vdev_stats * size of(struct wmi_vdev_stats)
3136 * num_peer_stats * size of(struct wmi_peer_stats)
3138 * By having a zero sized array, the pointer to data area
3139 * becomes available without increasing the struct size
3144 struct wmi_10_2_stats_event {
3145 __le32 stats_id; /* %WMI_REQUEST_ */
3146 __le32 num_pdev_stats;
3147 __le32 num_pdev_ext_stats;
3148 __le32 num_vdev_stats;
3149 __le32 num_peer_stats;
3150 __le32 num_bcnflt_stats;
3156 * TODO: add all PDEV stats here
3158 struct wmi_pdev_stats_base {
3160 __le32 tx_frame_count;
3161 __le32 rx_frame_count;
3162 __le32 rx_clear_count;
3164 __le32 phy_err_count;
3168 struct wmi_pdev_stats {
3169 struct wmi_pdev_stats_base base;
3170 struct wmi_pdev_stats_tx tx;
3171 struct wmi_pdev_stats_rx rx;
3172 struct wmi_pdev_stats_peer peer;
3175 struct wmi_pdev_stats_extra {
3181 __le32 mib_int_count;
3184 struct wmi_10x_pdev_stats {
3185 struct wmi_pdev_stats_base base;
3186 struct wmi_pdev_stats_tx tx;
3187 struct wmi_pdev_stats_rx rx;
3188 struct wmi_pdev_stats_peer peer;
3189 struct wmi_pdev_stats_extra extra;
3192 struct wmi_pdev_stats_mem {
3197 struct wmi_10_2_pdev_stats {
3198 struct wmi_pdev_stats_base base;
3199 struct wmi_pdev_stats_tx tx;
3201 struct wmi_pdev_stats_rx rx;
3202 __le32 pdev_rx_timeout;
3203 struct wmi_pdev_stats_mem mem;
3204 struct wmi_pdev_stats_peer peer;
3205 struct wmi_pdev_stats_extra extra;
3210 * TODO: add all VDEV stats here
3212 struct wmi_vdev_stats {
3218 * TODO: add more stats
3220 struct wmi_peer_stats {
3221 struct wmi_mac_addr peer_macaddr;
3223 __le32 peer_tx_rate;
3226 struct wmi_10x_peer_stats {
3227 struct wmi_peer_stats old;
3228 __le32 peer_rx_rate;
3231 struct wmi_10_2_peer_stats {
3232 struct wmi_peer_stats old;
3233 __le32 peer_rx_rate;
3236 __le32 tx_rate_count;
3237 __le32 max_4ms_frame_len;
3238 __le32 total_sub_frames;
3240 __le32 num_pkt_loss_overflow[4];
3241 __le32 num_pkt_loss_excess_retry[4];
3244 struct wmi_10_2_4_peer_stats {
3245 struct wmi_10_2_peer_stats common;
3246 __le32 unknown_value; /* FIXME: what is this word? */
3249 struct wmi_10_2_pdev_ext_stats {
3250 __le32 rx_rssi_comb;
3257 struct wmi_vdev_create_cmd {
3260 __le32 vdev_subtype;
3261 struct wmi_mac_addr vdev_macaddr;
3264 enum wmi_vdev_type {
3265 WMI_VDEV_TYPE_AP = 1,
3266 WMI_VDEV_TYPE_STA = 2,
3267 WMI_VDEV_TYPE_IBSS = 3,
3268 WMI_VDEV_TYPE_MONITOR = 4,
3271 enum wmi_vdev_subtype {
3272 WMI_VDEV_SUBTYPE_NONE = 0,
3273 WMI_VDEV_SUBTYPE_P2P_DEVICE = 1,
3274 WMI_VDEV_SUBTYPE_P2P_CLIENT = 2,
3275 WMI_VDEV_SUBTYPE_P2P_GO = 3,
3278 /* values for vdev_subtype */
3280 /* values for vdev_start_request flags */
3282 * Indicates that AP VDEV uses hidden ssid. only valid for
3284 #define WMI_VDEV_START_HIDDEN_SSID (1<<0)
3286 * Indicates if robust management frame/management frame
3287 * protection is enabled. For GO/AP vdevs, it indicates that
3288 * it may support station/client associations with RMF enabled.
3289 * For STA/client vdevs, it indicates that sta will
3290 * associate with AP with RMF enabled. */
3291 #define WMI_VDEV_START_PMF_ENABLED (1<<1)
3293 struct wmi_p2p_noa_descriptor {
3294 __le32 type_count; /* 255: continuous schedule, 0: reserved */
3295 __le32 duration; /* Absent period duration in micro seconds */
3296 __le32 interval; /* Absent period interval in micro seconds */
3297 __le32 start_time; /* 32 bit tsf time when in starts */
3300 struct wmi_vdev_start_request_cmd {
3302 struct wmi_channel chan;
3303 /* unique id identifying the VDEV, generated by the caller */
3305 /* requestor id identifying the caller module */
3306 __le32 requestor_id;
3307 /* beacon interval from received beacon */
3308 __le32 beacon_interval;
3309 /* DTIM Period from the received beacon */
3313 /* ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */
3314 struct wmi_ssid ssid;
3315 /* beacon/probe reponse xmit rate. Applicable for SoftAP. */
3317 /* beacon/probe reponse xmit power. Applicable for SoftAP. */
3318 __le32 bcn_tx_power;
3319 /* number of p2p NOA descriptor(s) from scan entry */
3320 __le32 num_noa_descriptors;
3322 * Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID.
3323 * During CAC, Our HW shouldn't ack ditected frames
3325 __le32 disable_hw_ack;
3326 /* actual p2p NOA descriptor from scan entry */
3327 struct wmi_p2p_noa_descriptor noa_descriptors[2];
3330 struct wmi_vdev_restart_request_cmd {
3331 struct wmi_vdev_start_request_cmd vdev_start_request_cmd;
3334 struct wmi_vdev_start_request_arg {
3336 struct wmi_channel_arg channel;
3343 bool disable_hw_ack;
3348 struct wmi_vdev_delete_cmd {
3349 /* unique id identifying the VDEV, generated by the caller */
3353 struct wmi_vdev_up_cmd {
3355 __le32 vdev_assoc_id;
3356 struct wmi_mac_addr vdev_bssid;
3359 struct wmi_vdev_stop_cmd {
3363 struct wmi_vdev_down_cmd {
3367 struct wmi_vdev_standby_response_cmd {
3368 /* unique id identifying the VDEV, generated by the caller */
3372 struct wmi_vdev_resume_response_cmd {
3373 /* unique id identifying the VDEV, generated by the caller */
3377 struct wmi_vdev_set_param_cmd {
3383 #define WMI_MAX_KEY_INDEX 3
3384 #define WMI_MAX_KEY_LEN 32
3386 #define WMI_KEY_PAIRWISE 0x00
3387 #define WMI_KEY_GROUP 0x01
3388 #define WMI_KEY_TX_USAGE 0x02 /* default tx key - static wep */
3390 struct wmi_key_seq_counter {
3391 __le32 key_seq_counter_l;
3392 __le32 key_seq_counter_h;
3395 #define WMI_CIPHER_NONE 0x0 /* clear key */
3396 #define WMI_CIPHER_WEP 0x1
3397 #define WMI_CIPHER_TKIP 0x2
3398 #define WMI_CIPHER_AES_OCB 0x3
3399 #define WMI_CIPHER_AES_CCM 0x4
3400 #define WMI_CIPHER_WAPI 0x5
3401 #define WMI_CIPHER_CKIP 0x6
3402 #define WMI_CIPHER_AES_CMAC 0x7
3404 struct wmi_vdev_install_key_cmd {
3406 struct wmi_mac_addr peer_macaddr;
3409 __le32 key_cipher; /* %WMI_CIPHER_ */
3410 struct wmi_key_seq_counter key_rsc_counter;
3411 struct wmi_key_seq_counter key_global_rsc_counter;
3412 struct wmi_key_seq_counter key_tsc_counter;
3413 u8 wpi_key_rsc_counter[16];
3414 u8 wpi_key_tsc_counter[16];
3416 __le32 key_txmic_len;
3417 __le32 key_rxmic_len;
3419 /* contains key followed by tx mic followed by rx mic */
3423 struct wmi_vdev_install_key_arg {
3432 const void *key_data;
3436 * vdev fixed rate format:
3437 * - preamble - b7:b6 - see WMI_RATE_PREMABLE_
3438 * - nss - b5:b4 - ss number (0 mean 1ss)
3439 * - rate_mcs - b3:b0 - as below
3440 * CCK: 0 - 11Mbps, 1 - 5,5Mbps, 2 - 2Mbps, 3 - 1Mbps,
3441 * 4 - 11Mbps (s), 5 - 5,5Mbps (s), 6 - 2Mbps (s)
3442 * OFDM: 0 - 48Mbps, 1 - 24Mbps, 2 - 12Mbps, 3 - 6Mbps,
3443 * 4 - 54Mbps, 5 - 36Mbps, 6 - 18Mbps, 7 - 9Mbps
3447 /* Preamble types to be used with VDEV fixed rate configuration */
3448 enum wmi_rate_preamble {
3449 WMI_RATE_PREAMBLE_OFDM,
3450 WMI_RATE_PREAMBLE_CCK,
3451 WMI_RATE_PREAMBLE_HT,
3452 WMI_RATE_PREAMBLE_VHT,
3455 /* Value to disable fixed rate setting */
3456 #define WMI_FIXED_RATE_NONE (0xff)
3458 struct wmi_vdev_param_map {
3460 u32 fragmentation_threshold;
3461 u32 beacon_interval;
3462 u32 listen_interval;
3468 u32 wmi_vdev_stats_update_period;
3469 u32 wmi_vdev_pwrsave_ageout_time;
3470 u32 wmi_vdev_host_swba_interval;
3472 u32 wmi_vdev_oc_scheduler_air_time_limit;
3475 u32 bmiss_count_max;
3476 u32 bmiss_first_bcnt;
3477 u32 bmiss_final_bcnt;
3481 u32 disable_htprotection;
3482 u32 sta_quickkickout;
3484 u32 protection_mode;
3493 u32 bcast_data_rate;
3494 u32 mcast_data_rate;
3497 u32 unknown_dest_indicate;
3498 u32 ap_keepalive_min_idle_inactive_time_secs;
3499 u32 ap_keepalive_max_idle_inactive_time_secs;
3500 u32 ap_keepalive_max_unresponsive_time_secs;
3501 u32 ap_enable_nawds;
3502 u32 mcast2ucast_set;
3505 u32 packet_powersave;
3508 u32 ap_detect_out_of_sync_sleeping_sta_time_secs;
3511 #define WMI_VDEV_PARAM_UNSUPPORTED 0
3513 /* the definition of different VDEV parameters */
3514 enum wmi_vdev_param {
3516 WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1,
3517 /* Fragmentation threshold */
3518 WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
3519 /* beacon interval in TUs */
3520 WMI_VDEV_PARAM_BEACON_INTERVAL,
3521 /* Listen interval in TUs */
3522 WMI_VDEV_PARAM_LISTEN_INTERVAL,
3523 /* muticast rate in Mbps */
3524 WMI_VDEV_PARAM_MULTICAST_RATE,
3525 /* management frame rate in Mbps */
3526 WMI_VDEV_PARAM_MGMT_TX_RATE,
3527 /* slot time (long vs short) */
3528 WMI_VDEV_PARAM_SLOT_TIME,
3529 /* preamble (long vs short) */
3530 WMI_VDEV_PARAM_PREAMBLE,
3531 /* SWBA time (time before tbtt in msec) */
3532 WMI_VDEV_PARAM_SWBA_TIME,
3533 /* time period for updating VDEV stats */
3534 WMI_VDEV_STATS_UPDATE_PERIOD,
3535 /* age out time in msec for frames queued for station in power save */
3536 WMI_VDEV_PWRSAVE_AGEOUT_TIME,
3538 * Host SWBA interval (time in msec before tbtt for SWBA event
3541 WMI_VDEV_HOST_SWBA_INTERVAL,
3542 /* DTIM period (specified in units of num beacon intervals) */
3543 WMI_VDEV_PARAM_DTIM_PERIOD,
3545 * scheduler air time limit for this VDEV. used by off chan
3548 WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT,
3549 /* enable/dsiable WDS for this VDEV */
3552 WMI_VDEV_PARAM_ATIM_WINDOW,
3554 WMI_VDEV_PARAM_BMISS_COUNT_MAX,
3555 /* BMISS first time */
3556 WMI_VDEV_PARAM_BMISS_FIRST_BCNT,
3557 /* BMISS final time */
3558 WMI_VDEV_PARAM_BMISS_FINAL_BCNT,
3559 /* WMM enables/disabled */
3560 WMI_VDEV_PARAM_FEATURE_WMM,
3562 WMI_VDEV_PARAM_CHWIDTH,
3563 /* Channel Offset */
3564 WMI_VDEV_PARAM_CHEXTOFFSET,
3565 /* Disable HT Protection */
3566 WMI_VDEV_PARAM_DISABLE_HTPROTECTION,
3567 /* Quick STA Kickout */
3568 WMI_VDEV_PARAM_STA_QUICKKICKOUT,
3569 /* Rate to be used with Management frames */
3570 WMI_VDEV_PARAM_MGMT_RATE,
3571 /* Protection Mode */
3572 WMI_VDEV_PARAM_PROTECTION_MODE,
3573 /* Fixed rate setting */
3574 WMI_VDEV_PARAM_FIXED_RATE,
3575 /* Short GI Enable/Disable */
3578 WMI_VDEV_PARAM_LDPC,
3579 /* Enable Tx STBC */
3580 WMI_VDEV_PARAM_TX_STBC,
3581 /* Enable Rx STBC */
3582 WMI_VDEV_PARAM_RX_STBC,
3583 /* Intra BSS forwarding */
3584 WMI_VDEV_PARAM_INTRA_BSS_FWD,
3585 /* Setting Default xmit key for Vdev */
3586 WMI_VDEV_PARAM_DEF_KEYID,
3589 /* Set the custom rate for the broadcast data frames */
3590 WMI_VDEV_PARAM_BCAST_DATA_RATE,
3591 /* Set the custom rate (rate-code) for multicast data frames */
3592 WMI_VDEV_PARAM_MCAST_DATA_RATE,
3593 /* Tx multicast packet indicate Enable/Disable */
3594 WMI_VDEV_PARAM_MCAST_INDICATE,
3595 /* Tx DHCP packet indicate Enable/Disable */
3596 WMI_VDEV_PARAM_DHCP_INDICATE,
3597 /* Enable host inspection of Tx unicast packet to unknown destination */
3598 WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE,
3600 /* The minimum amount of time AP begins to consider STA inactive */
3601 WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,
3604 * An associated STA is considered inactive when there is no recent
3605 * TX/RX activity and no downlink frames are buffered for it. Once a
3606 * STA exceeds the maximum idle inactive time, the AP will send an
3607 * 802.11 data-null as a keep alive to verify the STA is still
3608 * associated. If the STA does ACK the data-null, or if the data-null
3609 * is buffered and the STA does not retrieve it, the STA will be
3610 * considered unresponsive
3611 * (see WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS).
3613 WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,
3616 * An associated STA is considered unresponsive if there is no recent
3617 * TX/RX activity and downlink frames are buffered for it. Once a STA
3618 * exceeds the maximum unresponsive time, the AP will send a
3619 * WMI_STA_KICKOUT event to the host so the STA can be deleted. */
3620 WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,
3622 /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
3623 WMI_VDEV_PARAM_AP_ENABLE_NAWDS,
3624 /* Enable/Disable RTS-CTS */
3625 WMI_VDEV_PARAM_ENABLE_RTSCTS,
3626 /* Enable TXBFee/er */
3627 WMI_VDEV_PARAM_TXBF,
3629 /* Set packet power save */
3630 WMI_VDEV_PARAM_PACKET_POWERSAVE,
3633 * Drops un-encrypted packets if eceived in an encrypted connection
3634 * otherwise forwards to host.
3636 WMI_VDEV_PARAM_DROP_UNENCRY,
3639 * Set the encapsulation type for frames.
3641 WMI_VDEV_PARAM_TX_ENCAP_TYPE,
3644 /* the definition of different VDEV parameters */
3645 enum wmi_10x_vdev_param {
3647 WMI_10X_VDEV_PARAM_RTS_THRESHOLD = 0x1,
3648 /* Fragmentation threshold */
3649 WMI_10X_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
3650 /* beacon interval in TUs */
3651 WMI_10X_VDEV_PARAM_BEACON_INTERVAL,
3652 /* Listen interval in TUs */
3653 WMI_10X_VDEV_PARAM_LISTEN_INTERVAL,
3654 /* muticast rate in Mbps */
3655 WMI_10X_VDEV_PARAM_MULTICAST_RATE,
3656 /* management frame rate in Mbps */
3657 WMI_10X_VDEV_PARAM_MGMT_TX_RATE,
3658 /* slot time (long vs short) */
3659 WMI_10X_VDEV_PARAM_SLOT_TIME,
3660 /* preamble (long vs short) */
3661 WMI_10X_VDEV_PARAM_PREAMBLE,
3662 /* SWBA time (time before tbtt in msec) */
3663 WMI_10X_VDEV_PARAM_SWBA_TIME,
3664 /* time period for updating VDEV stats */
3665 WMI_10X_VDEV_STATS_UPDATE_PERIOD,
3666 /* age out time in msec for frames queued for station in power save */
3667 WMI_10X_VDEV_PWRSAVE_AGEOUT_TIME,
3669 * Host SWBA interval (time in msec before tbtt for SWBA event
3672 WMI_10X_VDEV_HOST_SWBA_INTERVAL,
3673 /* DTIM period (specified in units of num beacon intervals) */
3674 WMI_10X_VDEV_PARAM_DTIM_PERIOD,
3676 * scheduler air time limit for this VDEV. used by off chan
3679 WMI_10X_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT,
3680 /* enable/dsiable WDS for this VDEV */
3681 WMI_10X_VDEV_PARAM_WDS,
3683 WMI_10X_VDEV_PARAM_ATIM_WINDOW,
3685 WMI_10X_VDEV_PARAM_BMISS_COUNT_MAX,
3686 /* WMM enables/disabled */
3687 WMI_10X_VDEV_PARAM_FEATURE_WMM,
3689 WMI_10X_VDEV_PARAM_CHWIDTH,
3690 /* Channel Offset */
3691 WMI_10X_VDEV_PARAM_CHEXTOFFSET,
3692 /* Disable HT Protection */
3693 WMI_10X_VDEV_PARAM_DISABLE_HTPROTECTION,
3694 /* Quick STA Kickout */
3695 WMI_10X_VDEV_PARAM_STA_QUICKKICKOUT,
3696 /* Rate to be used with Management frames */
3697 WMI_10X_VDEV_PARAM_MGMT_RATE,
3698 /* Protection Mode */
3699 WMI_10X_VDEV_PARAM_PROTECTION_MODE,
3700 /* Fixed rate setting */
3701 WMI_10X_VDEV_PARAM_FIXED_RATE,
3702 /* Short GI Enable/Disable */
3703 WMI_10X_VDEV_PARAM_SGI,
3705 WMI_10X_VDEV_PARAM_LDPC,
3706 /* Enable Tx STBC */
3707 WMI_10X_VDEV_PARAM_TX_STBC,
3708 /* Enable Rx STBC */
3709 WMI_10X_VDEV_PARAM_RX_STBC,
3710 /* Intra BSS forwarding */
3711 WMI_10X_VDEV_PARAM_INTRA_BSS_FWD,
3712 /* Setting Default xmit key for Vdev */
3713 WMI_10X_VDEV_PARAM_DEF_KEYID,
3715 WMI_10X_VDEV_PARAM_NSS,
3716 /* Set the custom rate for the broadcast data frames */
3717 WMI_10X_VDEV_PARAM_BCAST_DATA_RATE,
3718 /* Set the custom rate (rate-code) for multicast data frames */
3719 WMI_10X_VDEV_PARAM_MCAST_DATA_RATE,
3720 /* Tx multicast packet indicate Enable/Disable */
3721 WMI_10X_VDEV_PARAM_MCAST_INDICATE,
3722 /* Tx DHCP packet indicate Enable/Disable */
3723 WMI_10X_VDEV_PARAM_DHCP_INDICATE,
3724 /* Enable host inspection of Tx unicast packet to unknown destination */
3725 WMI_10X_VDEV_PARAM_UNKNOWN_DEST_INDICATE,
3727 /* The minimum amount of time AP begins to consider STA inactive */
3728 WMI_10X_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,
3731 * An associated STA is considered inactive when there is no recent
3732 * TX/RX activity and no downlink frames are buffered for it. Once a
3733 * STA exceeds the maximum idle inactive time, the AP will send an
3734 * 802.11 data-null as a keep alive to verify the STA is still
3735 * associated. If the STA does ACK the data-null, or if the data-null
3736 * is buffered and the STA does not retrieve it, the STA will be
3737 * considered unresponsive
3738 * (see WMI_10X_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS).
3740 WMI_10X_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,
3743 * An associated STA is considered unresponsive if there is no recent
3744 * TX/RX activity and downlink frames are buffered for it. Once a STA
3745 * exceeds the maximum unresponsive time, the AP will send a
3746 * WMI_10X_STA_KICKOUT event to the host so the STA can be deleted. */
3747 WMI_10X_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,
3749 /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
3750 WMI_10X_VDEV_PARAM_AP_ENABLE_NAWDS,
3752 WMI_10X_VDEV_PARAM_MCAST2UCAST_SET,
3753 /* Enable/Disable RTS-CTS */
3754 WMI_10X_VDEV_PARAM_ENABLE_RTSCTS,
3756 WMI_10X_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS,
3758 /* following are available as of firmware 10.2 */
3759 WMI_10X_VDEV_PARAM_TX_ENCAP_TYPE,
3760 WMI_10X_VDEV_PARAM_CABQ_MAXDUR,
3761 WMI_10X_VDEV_PARAM_MFPTEST_SET,
3762 WMI_10X_VDEV_PARAM_RTS_FIXED_RATE,
3763 WMI_10X_VDEV_PARAM_VHT_SGIMASK,
3764 WMI_10X_VDEV_PARAM_VHT80_RATEMASK,
3767 #define WMI_VDEV_PARAM_TXBF_SU_TX_BFEE BIT(0)
3768 #define WMI_VDEV_PARAM_TXBF_MU_TX_BFEE BIT(1)
3769 #define WMI_VDEV_PARAM_TXBF_SU_TX_BFER BIT(2)
3770 #define WMI_VDEV_PARAM_TXBF_MU_TX_BFER BIT(3)
3772 /* slot time long */
3773 #define WMI_VDEV_SLOT_TIME_LONG 0x1
3774 /* slot time short */
3775 #define WMI_VDEV_SLOT_TIME_SHORT 0x2
3777 #define WMI_VDEV_PREAMBLE_LONG 0x1
3778 /* preablbe short */
3779 #define WMI_VDEV_PREAMBLE_SHORT 0x2
3781 enum wmi_start_event_param {
3782 WMI_VDEV_RESP_START_EVENT = 0,
3783 WMI_VDEV_RESP_RESTART_EVENT,
3786 struct wmi_vdev_start_response_event {
3789 __le32 resp_type; /* %WMI_VDEV_RESP_ */
3793 struct wmi_vdev_standby_req_event {
3794 /* unique id identifying the VDEV, generated by the caller */
3798 struct wmi_vdev_resume_req_event {
3799 /* unique id identifying the VDEV, generated by the caller */
3803 struct wmi_vdev_stopped_event {
3804 /* unique id identifying the VDEV, generated by the caller */
3809 * common structure used for simple events
3810 * (stopped, resume_req, standby response)
3812 struct wmi_vdev_simple_event {
3813 /* unique id identifying the VDEV, generated by the caller */
3817 /* VDEV start response status codes */
3818 /* VDEV succesfully started */
3819 #define WMI_INIFIED_VDEV_START_RESPONSE_STATUS_SUCCESS 0x0
3821 /* requested VDEV not found */
3822 #define WMI_INIFIED_VDEV_START_RESPONSE_INVALID_VDEVID 0x1
3824 /* unsupported VDEV combination */
3825 #define WMI_INIFIED_VDEV_START_RESPONSE_NOT_SUPPORTED 0x2
3827 /* TODO: please add more comments if you have in-depth information */
3828 struct wmi_vdev_spectral_conf_cmd {
3831 /* number of fft samples to send (0 for infinite) */
3834 __le32 scan_priority;
3836 /* number of bins in the FFT: 2^(fft_size - bin_scale) */
3837 __le32 scan_fft_size;
3839 __le32 scan_restart_ena;
3840 __le32 scan_noise_floor_ref;
3841 __le32 scan_init_delay;
3842 __le32 scan_nb_tone_thr;
3843 __le32 scan_str_bin_thr;
3844 __le32 scan_wb_rpt_mode;
3845 __le32 scan_rssi_rpt_mode;
3846 __le32 scan_rssi_thr;
3847 __le32 scan_pwr_format;
3849 /* rpt_mode: Format of FFT report to software for spectral scan
3851 * 0: No FFT report (only spectral scan summary report)
3852 * 1: 2-dword summary of metrics for each completed FFT + spectral
3853 * scan summary report
3854 * 2: 2-dword summary of metrics for each completed FFT +
3855 * 1x- oversampled bins(in-band) per FFT + spectral scan summary
3857 * 3: 2-dword summary of metrics for each completed FFT +
3858 * 2x- oversampled bins (all) per FFT + spectral scan summary
3860 __le32 scan_rpt_mode;
3861 __le32 scan_bin_scale;
3862 __le32 scan_dbm_adj;
3863 __le32 scan_chn_mask;
3866 struct wmi_vdev_spectral_conf_arg {
3873 u32 scan_restart_ena;
3874 u32 scan_noise_floor_ref;
3875 u32 scan_init_delay;
3876 u32 scan_nb_tone_thr;
3877 u32 scan_str_bin_thr;
3878 u32 scan_wb_rpt_mode;
3879 u32 scan_rssi_rpt_mode;
3881 u32 scan_pwr_format;
3888 #define WMI_SPECTRAL_ENABLE_DEFAULT 0
3889 #define WMI_SPECTRAL_COUNT_DEFAULT 0
3890 #define WMI_SPECTRAL_PERIOD_DEFAULT 35
3891 #define WMI_SPECTRAL_PRIORITY_DEFAULT 1
3892 #define WMI_SPECTRAL_FFT_SIZE_DEFAULT 7
3893 #define WMI_SPECTRAL_GC_ENA_DEFAULT 1
3894 #define WMI_SPECTRAL_RESTART_ENA_DEFAULT 0
3895 #define WMI_SPECTRAL_NOISE_FLOOR_REF_DEFAULT -96
3896 #define WMI_SPECTRAL_INIT_DELAY_DEFAULT 80
3897 #define WMI_SPECTRAL_NB_TONE_THR_DEFAULT 12
3898 #define WMI_SPECTRAL_STR_BIN_THR_DEFAULT 8
3899 #define WMI_SPECTRAL_WB_RPT_MODE_DEFAULT 0
3900 #define WMI_SPECTRAL_RSSI_RPT_MODE_DEFAULT 0
3901 #define WMI_SPECTRAL_RSSI_THR_DEFAULT 0xf0
3902 #define WMI_SPECTRAL_PWR_FORMAT_DEFAULT 0
3903 #define WMI_SPECTRAL_RPT_MODE_DEFAULT 2
3904 #define WMI_SPECTRAL_BIN_SCALE_DEFAULT 1
3905 #define WMI_SPECTRAL_DBM_ADJ_DEFAULT 1
3906 #define WMI_SPECTRAL_CHN_MASK_DEFAULT 1
3908 struct wmi_vdev_spectral_enable_cmd {
3914 #define WMI_SPECTRAL_TRIGGER_CMD_TRIGGER 1
3915 #define WMI_SPECTRAL_TRIGGER_CMD_CLEAR 2
3916 #define WMI_SPECTRAL_ENABLE_CMD_ENABLE 1
3917 #define WMI_SPECTRAL_ENABLE_CMD_DISABLE 2
3919 /* Beacon processing related command and event structures */
3920 struct wmi_bcn_tx_hdr {
3927 struct wmi_bcn_tx_cmd {
3928 struct wmi_bcn_tx_hdr hdr;
3932 struct wmi_bcn_tx_arg {
3940 enum wmi_bcn_tx_ref_flags {
3941 WMI_BCN_TX_REF_FLAG_DTIM_ZERO = 0x1,
3942 WMI_BCN_TX_REF_FLAG_DELIVER_CAB = 0x2,
3945 /* TODO: It is unclear why "no antenna" works while any other seemingly valid
3946 * chainmask yields no beacons on the air at all.
3948 #define WMI_BCN_TX_REF_DEF_ANTENNA 0
3950 struct wmi_bcn_tx_ref_cmd {
3953 /* physical address of the frame - dma pointer */
3955 /* id for host to track */
3957 /* frame ctrl to setup PPDU desc */
3958 __le32 frame_control;
3959 /* to control CABQ traffic: WMI_BCN_TX_REF_FLAG_ */
3961 /* introduced in 10.2 */
3962 __le32 antenna_mask;
3966 #define WMI_BCN_FILTER_ALL 0 /* Filter all beacons */
3967 #define WMI_BCN_FILTER_NONE 1 /* Pass all beacons */
3968 #define WMI_BCN_FILTER_RSSI 2 /* Pass Beacons RSSI >= RSSI threshold */
3969 #define WMI_BCN_FILTER_BSSID 3 /* Pass Beacons with matching BSSID */
3970 #define WMI_BCN_FILTER_SSID 4 /* Pass Beacons with matching SSID */
3972 struct wmi_bcn_filter_rx_cmd {
3974 __le32 bcn_filter_id;
3975 /* Filter type - wmi_bcn_filter */
3978 __le32 bcn_filter_len;
3979 /* Filter info (threshold, BSSID, RSSI) */
3983 /* Capabilities and IEs to be passed to firmware */
3984 struct wmi_bcn_prb_info {
3989 /* Advanced capabilities */
3990 /* HT capabilities */
4000 struct wmi_bcn_tmpl_cmd {
4001 /* unique id identifying the VDEV, generated by the caller */
4003 /* TIM IE offset from the beginning of the template. */
4004 __le32 tim_ie_offset;
4005 /* beacon probe capabilities and IEs */
4006 struct wmi_bcn_prb_info bcn_prb_info;
4007 /* beacon buffer length */
4009 /* variable length data */
4013 struct wmi_prb_tmpl_cmd {
4014 /* unique id identifying the VDEV, generated by the caller */
4016 /* beacon probe capabilities and IEs */
4017 struct wmi_bcn_prb_info bcn_prb_info;
4018 /* beacon buffer length */
4020 /* Variable length data */
4024 enum wmi_sta_ps_mode {
4025 /* enable power save for the given STA VDEV */
4026 WMI_STA_PS_MODE_DISABLED = 0,
4027 /* disable power save for a given STA VDEV */
4028 WMI_STA_PS_MODE_ENABLED = 1,
4031 struct wmi_sta_powersave_mode_cmd {
4032 /* unique id identifying the VDEV, generated by the caller */
4037 * (see enum wmi_sta_ps_mode)
4042 enum wmi_csa_offload_en {
4043 WMI_CSA_OFFLOAD_DISABLE = 0,
4044 WMI_CSA_OFFLOAD_ENABLE = 1,
4047 struct wmi_csa_offload_enable_cmd {
4049 __le32 csa_offload_enable;
4052 struct wmi_csa_offload_chanswitch_cmd {
4054 struct wmi_channel chan;
4058 * This parameter controls the policy for retrieving frames from AP while the
4059 * STA is in sleep state.
4061 * Only takes affect if the sta_ps_mode is enabled
4063 enum wmi_sta_ps_param_rx_wake_policy {
4065 * Wake up when ever there is an RX activity on the VDEV. In this mode
4066 * the Power save SM(state machine) will come out of sleep by either
4067 * sending null frame (or) a data frame (with PS==0) in response to TIM
4068 * bit set in the received beacon frame from AP.
4070 WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0,
4073 * Here the power save state machine will not wakeup in response to TIM
4074 * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
4075 * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all
4076 * access categories are delivery-enabled, the station will send a
4077 * UAPSD trigger frame, otherwise it will send a PS-Poll.
4079 WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
4083 * Number of tx frames/beacon that cause the power save SM to wake up.
4085 * Value 1 causes the SM to wake up for every TX. Value 0 has a special
4086 * meaning, It will cause the SM to never wake up. This is useful if you want
4087 * to keep the system to sleep all the time for some kind of test mode . host
4088 * can change this parameter any time. It will affect at the next tx frame.
4090 enum wmi_sta_ps_param_tx_wake_threshold {
4091 WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
4092 WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
4095 * Values greater than one indicate that many TX attempts per beacon
4096 * interval before the STA will wake up
4101 * The maximum number of PS-Poll frames the FW will send in response to
4102 * traffic advertised in TIM before waking up (by sending a null frame with PS
4103 * = 0). Value 0 has a special meaning: there is no maximum count and the FW
4104 * will send as many PS-Poll as are necessary to retrieve buffered BU. This
4105 * parameter is used when the RX wake policy is
4106 * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake
4107 * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE.
4109 enum wmi_sta_ps_param_pspoll_count {
4110 WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
4112 * Values greater than 0 indicate the maximum numer of PS-Poll frames
4113 * FW will send before waking up.
4116 /* When u-APSD is enabled the firmware will be very reluctant to exit
4117 * STA PS. This could result in very poor Rx performance with STA doing
4118 * PS-Poll for each and every buffered frame. This value is a bit
4121 WMI_STA_PS_PSPOLL_COUNT_UAPSD = 3,
4125 * This will include the delivery and trigger enabled state for every AC.
4126 * This is the negotiated state with AP. The host MLME needs to set this based
4127 * on AP capability and the state Set in the association request by the
4128 * station MLME.Lower 8 bits of the value specify the UAPSD configuration.
4130 #define WMI_UAPSD_AC_TYPE_DELI 0
4131 #define WMI_UAPSD_AC_TYPE_TRIG 1
4133 #define WMI_UAPSD_AC_BIT_MASK(ac, type) \
4134 ((type == WMI_UAPSD_AC_TYPE_DELI) ? (1<<(ac<<1)) : (1<<((ac<<1)+1)))
4136 enum wmi_sta_ps_param_uapsd {
4137 WMI_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
4138 WMI_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
4139 WMI_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
4140 WMI_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
4141 WMI_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
4142 WMI_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
4143 WMI_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
4144 WMI_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
4147 #define WMI_STA_UAPSD_MAX_INTERVAL_MSEC UINT_MAX
4149 struct wmi_sta_uapsd_auto_trig_param {
4151 __le32 user_priority;
4152 __le32 service_interval;
4153 __le32 suspend_interval;
4154 __le32 delay_interval;
4157 struct wmi_sta_uapsd_auto_trig_cmd_fixed_param {
4159 struct wmi_mac_addr peer_macaddr;
4163 struct wmi_sta_uapsd_auto_trig_arg {
4166 u32 service_interval;
4167 u32 suspend_interval;
4171 enum wmi_sta_powersave_param {
4173 * Controls how frames are retrievd from AP while STA is sleeping
4175 * (see enum wmi_sta_ps_param_rx_wake_policy)
4177 WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0,
4180 * The STA will go active after this many TX
4182 * (see enum wmi_sta_ps_param_tx_wake_threshold)
4184 WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
4187 * Number of PS-Poll to send before STA wakes up
4189 * (see enum wmi_sta_ps_param_pspoll_count)
4192 WMI_STA_PS_PARAM_PSPOLL_COUNT = 2,
4195 * TX/RX inactivity time in msec before going to sleep.
4197 * The power save SM will monitor tx/rx activity on the VDEV, if no
4198 * activity for the specified msec of the parameter the Power save
4199 * SM will go to sleep.
4201 WMI_STA_PS_PARAM_INACTIVITY_TIME = 3,
4204 * Set uapsd configuration.
4206 * (see enum wmi_sta_ps_param_uapsd)
4208 WMI_STA_PS_PARAM_UAPSD = 4,
4211 struct wmi_sta_powersave_param_cmd {
4213 __le32 param_id; /* %WMI_STA_PS_PARAM_ */
4217 /* No MIMO power save */
4218 #define WMI_STA_MIMO_PS_MODE_DISABLE
4219 /* mimo powersave mode static*/
4220 #define WMI_STA_MIMO_PS_MODE_STATIC
4221 /* mimo powersave mode dynamic */
4222 #define WMI_STA_MIMO_PS_MODE_DYNAMIC
4224 struct wmi_sta_mimo_ps_mode_cmd {
4225 /* unique id identifying the VDEV, generated by the caller */
4227 /* mimo powersave mode as defined above */
4228 __le32 mimo_pwrsave_mode;
4231 /* U-APSD configuration of peer station from (re)assoc request and TSPECs */
4232 enum wmi_ap_ps_param_uapsd {
4233 WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
4234 WMI_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
4235 WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
4236 WMI_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
4237 WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
4238 WMI_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
4239 WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
4240 WMI_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
4243 /* U-APSD maximum service period of peer station */
4244 enum wmi_ap_ps_peer_param_max_sp {
4245 WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
4246 WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
4247 WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
4248 WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
4249 MAX_WMI_AP_PS_PEER_PARAM_MAX_SP,
4253 * AP power save parameter
4254 * Set a power save specific parameter for a peer station
4256 enum wmi_ap_ps_peer_param {
4257 /* Set uapsd configuration for a given peer.
4259 * Include the delivery and trigger enabled state for every AC.
4260 * The host MLME needs to set this based on AP capability and stations
4261 * request Set in the association request received from the station.
4263 * Lower 8 bits of the value specify the UAPSD configuration.
4265 * (see enum wmi_ap_ps_param_uapsd)
4266 * The default value is 0.
4268 WMI_AP_PS_PEER_PARAM_UAPSD = 0,
4271 * Set the service period for a UAPSD capable station
4273 * The service period from wme ie in the (re)assoc request frame.
4275 * (see enum wmi_ap_ps_peer_param_max_sp)
4277 WMI_AP_PS_PEER_PARAM_MAX_SP = 1,
4279 /* Time in seconds for aging out buffered frames for STA in PS */
4280 WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
4283 struct wmi_ap_ps_peer_cmd {
4284 /* unique id identifying the VDEV, generated by the caller */
4287 /* peer MAC address */
4288 struct wmi_mac_addr peer_macaddr;
4290 /* AP powersave param (see enum wmi_ap_ps_peer_param) */
4293 /* AP powersave param value */
4297 /* 128 clients = 4 words */
4298 #define WMI_TIM_BITMAP_ARRAY_SIZE 4
4300 struct wmi_tim_info {
4303 __le32 tim_bitmap[WMI_TIM_BITMAP_ARRAY_SIZE];
4305 __le32 tim_num_ps_pending;
4308 /* Maximum number of NOA Descriptors supported */
4309 #define WMI_P2P_MAX_NOA_DESCRIPTORS 4
4310 #define WMI_P2P_OPPPS_ENABLE_BIT BIT(0)
4311 #define WMI_P2P_OPPPS_CTWINDOW_OFFSET 1
4312 #define WMI_P2P_NOA_CHANGED_BIT BIT(0)
4314 struct wmi_p2p_noa_info {
4315 /* Bit 0 - Flag to indicate an update in NOA schedule
4316 Bits 7-1 - Reserved */
4320 /* Bit 0 - Opp PS state of the AP
4321 Bits 1-7 - Ctwindow in TUs */
4323 /* Number of NOA descriptors */
4326 struct wmi_p2p_noa_descriptor descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS];
4329 struct wmi_bcn_info {
4330 struct wmi_tim_info tim_info;
4331 struct wmi_p2p_noa_info p2p_noa_info;
4334 struct wmi_host_swba_event {
4336 struct wmi_bcn_info bcn_info[0];
4339 #define WMI_MAX_AP_VDEV 16
4341 struct wmi_tbtt_offset_event {
4343 __le32 tbttoffset_list[WMI_MAX_AP_VDEV];
4346 struct wmi_peer_create_cmd {
4348 struct wmi_mac_addr peer_macaddr;
4351 enum wmi_peer_type {
4352 WMI_PEER_TYPE_DEFAULT = 0,
4353 WMI_PEER_TYPE_BSS = 1,
4354 WMI_PEER_TYPE_TDLS = 2,
4357 struct wmi_peer_delete_cmd {
4359 struct wmi_mac_addr peer_macaddr;
4362 struct wmi_peer_flush_tids_cmd {
4364 struct wmi_mac_addr peer_macaddr;
4365 __le32 peer_tid_bitmap;
4368 struct wmi_fixed_rate {
4370 * rate mode . 0: disable fixed rate (auto rate)
4371 * 1: legacy (non 11n) rate specified as ieee rate 2*Mbps
4372 * 2: ht20 11n rate specified as mcs index
4373 * 3: ht40 11n rate specified as mcs index
4377 * 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB)
4378 * and series 3 is stored at byte 3 (MSB)
4382 * 4 retry counts for 4 rate series. retry count for rate 0 is stored
4383 * in byte 0 (LSB) and retry count for rate 3 is stored at byte 3
4386 __le32 rate_retries;
4389 struct wmi_peer_fixed_rate_cmd {
4390 /* unique id identifying the VDEV, generated by the caller */
4392 /* peer MAC address */
4393 struct wmi_mac_addr peer_macaddr;
4395 struct wmi_fixed_rate peer_fixed_rate;
4398 #define WMI_MGMT_TID 17
4400 struct wmi_addba_clear_resp_cmd {
4401 /* unique id identifying the VDEV, generated by the caller */
4403 /* peer MAC address */
4404 struct wmi_mac_addr peer_macaddr;
4407 struct wmi_addba_send_cmd {
4408 /* unique id identifying the VDEV, generated by the caller */
4410 /* peer MAC address */
4411 struct wmi_mac_addr peer_macaddr;
4414 /* Buffer/Window size*/
4418 struct wmi_delba_send_cmd {
4419 /* unique id identifying the VDEV, generated by the caller */
4421 /* peer MAC address */
4422 struct wmi_mac_addr peer_macaddr;
4431 struct wmi_addba_setresponse_cmd {
4432 /* unique id identifying the vdev, generated by the caller */
4434 /* peer mac address */
4435 struct wmi_mac_addr peer_macaddr;
4442 struct wmi_send_singleamsdu_cmd {
4443 /* unique id identifying the vdev, generated by the caller */
4445 /* peer mac address */
4446 struct wmi_mac_addr peer_macaddr;
4451 enum wmi_peer_smps_state {
4452 WMI_PEER_SMPS_PS_NONE = 0x0,
4453 WMI_PEER_SMPS_STATIC = 0x1,
4454 WMI_PEER_SMPS_DYNAMIC = 0x2
4457 enum wmi_peer_chwidth {
4458 WMI_PEER_CHWIDTH_20MHZ = 0,
4459 WMI_PEER_CHWIDTH_40MHZ = 1,
4460 WMI_PEER_CHWIDTH_80MHZ = 2,
4463 enum wmi_peer_param {
4464 WMI_PEER_SMPS_STATE = 0x1, /* see %wmi_peer_smps_state */
4465 WMI_PEER_AMPDU = 0x2,
4466 WMI_PEER_AUTHORIZE = 0x3,
4467 WMI_PEER_CHAN_WIDTH = 0x4,
4469 WMI_PEER_USE_4ADDR = 0x6,
4470 WMI_PEER_DUMMY_VAR = 0xff, /* dummy parameter for STA PS workaround */
4473 struct wmi_peer_set_param_cmd {
4475 struct wmi_mac_addr peer_macaddr;
4480 #define MAX_SUPPORTED_RATES 128
4482 struct wmi_rate_set {
4483 /* total number of rates */
4486 * rates (each 8bit value) packed into a 32 bit word.
4487 * the rates are filled from least significant byte to most
4490 __le32 rates[(MAX_SUPPORTED_RATES/4)+1];
4493 struct wmi_rate_set_arg {
4494 unsigned int num_rates;
4495 u8 rates[MAX_SUPPORTED_RATES];
4499 * NOTE: It would bea good idea to represent the Tx MCS
4500 * info in one word and Rx in another word. This is split
4501 * into multiple words for convenience
4503 struct wmi_vht_rate_set {
4504 __le32 rx_max_rate; /* Max Rx data rate */
4505 __le32 rx_mcs_set; /* Negotiated RX VHT rates */
4506 __le32 tx_max_rate; /* Max Tx data rate */
4507 __le32 tx_mcs_set; /* Negotiated TX VHT rates */
4510 struct wmi_vht_rate_set_arg {
4517 struct wmi_peer_set_rates_cmd {
4518 /* peer MAC address */
4519 struct wmi_mac_addr peer_macaddr;
4520 /* legacy rate set */
4521 struct wmi_rate_set peer_legacy_rates;
4523 struct wmi_rate_set peer_ht_rates;
4526 struct wmi_peer_set_q_empty_callback_cmd {
4527 /* unique id identifying the VDEV, generated by the caller */
4529 /* peer MAC address */
4530 struct wmi_mac_addr peer_macaddr;
4531 __le32 callback_enable;
4534 #define WMI_PEER_AUTH 0x00000001
4535 #define WMI_PEER_QOS 0x00000002
4536 #define WMI_PEER_NEED_PTK_4_WAY 0x00000004
4537 #define WMI_PEER_NEED_GTK_2_WAY 0x00000010
4538 #define WMI_PEER_APSD 0x00000800
4539 #define WMI_PEER_HT 0x00001000
4540 #define WMI_PEER_40MHZ 0x00002000
4541 #define WMI_PEER_STBC 0x00008000
4542 #define WMI_PEER_LDPC 0x00010000
4543 #define WMI_PEER_DYN_MIMOPS 0x00020000
4544 #define WMI_PEER_STATIC_MIMOPS 0x00040000
4545 #define WMI_PEER_SPATIAL_MUX 0x00200000
4546 #define WMI_PEER_VHT 0x02000000
4547 #define WMI_PEER_80MHZ 0x04000000
4548 #define WMI_PEER_VHT_2G 0x08000000
4551 * Peer rate capabilities.
4553 * This is of interest to the ratecontrol
4554 * module which resides in the firmware. The bit definitions are
4555 * consistent with that defined in if_athrate.c.
4557 #define WMI_RC_DS_FLAG 0x01
4558 #define WMI_RC_CW40_FLAG 0x02
4559 #define WMI_RC_SGI_FLAG 0x04
4560 #define WMI_RC_HT_FLAG 0x08
4561 #define WMI_RC_RTSCTS_FLAG 0x10
4562 #define WMI_RC_TX_STBC_FLAG 0x20
4563 #define WMI_RC_RX_STBC_FLAG 0xC0
4564 #define WMI_RC_RX_STBC_FLAG_S 6
4565 #define WMI_RC_WEP_TKIP_FLAG 0x100
4566 #define WMI_RC_TS_FLAG 0x200
4567 #define WMI_RC_UAPSD_FLAG 0x400
4569 /* Maximum listen interval supported by hw in units of beacon interval */
4570 #define ATH10K_MAX_HW_LISTEN_INTERVAL 5
4572 struct wmi_common_peer_assoc_complete_cmd {
4573 struct wmi_mac_addr peer_macaddr;
4575 __le32 peer_new_assoc; /* 1=assoc, 0=reassoc */
4576 __le32 peer_associd; /* 16 LSBs */
4578 __le32 peer_caps; /* 16 LSBs */
4579 __le32 peer_listen_intval;
4580 __le32 peer_ht_caps;
4581 __le32 peer_max_mpdu;
4582 __le32 peer_mpdu_density; /* 0..16 */
4583 __le32 peer_rate_caps;
4584 struct wmi_rate_set peer_legacy_rates;
4585 struct wmi_rate_set peer_ht_rates;
4586 __le32 peer_nss; /* num of spatial streams */
4587 __le32 peer_vht_caps;
4588 __le32 peer_phymode;
4589 struct wmi_vht_rate_set peer_vht_rates;
4592 struct wmi_main_peer_assoc_complete_cmd {
4593 struct wmi_common_peer_assoc_complete_cmd cmd;
4595 /* HT Operation Element of the peer. Five bytes packed in 2
4596 * INT32 array and filled from lsb to msb. */
4597 __le32 peer_ht_info[2];
4600 struct wmi_10_1_peer_assoc_complete_cmd {
4601 struct wmi_common_peer_assoc_complete_cmd cmd;
4604 #define WMI_PEER_ASSOC_INFO0_MAX_MCS_IDX_LSB 0
4605 #define WMI_PEER_ASSOC_INFO0_MAX_MCS_IDX_MASK 0x0f
4606 #define WMI_PEER_ASSOC_INFO0_MAX_NSS_LSB 4
4607 #define WMI_PEER_ASSOC_INFO0_MAX_NSS_MASK 0xf0
4609 struct wmi_10_2_peer_assoc_complete_cmd {
4610 struct wmi_common_peer_assoc_complete_cmd cmd;
4611 __le32 info0; /* WMI_PEER_ASSOC_INFO0_ */
4614 struct wmi_peer_assoc_complete_arg {
4619 u32 peer_flags; /* see %WMI_PEER_ */
4621 u32 peer_listen_intval;
4624 u32 peer_mpdu_density; /* 0..16 */
4625 u32 peer_rate_caps; /* see %WMI_RC_ */
4626 struct wmi_rate_set_arg peer_legacy_rates;
4627 struct wmi_rate_set_arg peer_ht_rates;
4628 u32 peer_num_spatial_streams;
4630 enum wmi_phy_mode peer_phymode;
4631 struct wmi_vht_rate_set_arg peer_vht_rates;
4634 struct wmi_peer_add_wds_entry_cmd {
4635 /* peer MAC address */
4636 struct wmi_mac_addr peer_macaddr;
4638 struct wmi_mac_addr wds_macaddr;
4641 struct wmi_peer_remove_wds_entry_cmd {
4643 struct wmi_mac_addr wds_macaddr;
4646 struct wmi_peer_q_empty_callback_event {
4647 /* peer MAC address */
4648 struct wmi_mac_addr peer_macaddr;
4652 * Channel info WMI event
4654 struct wmi_chan_info_event {
4659 __le32 rx_clear_count;
4663 struct wmi_peer_sta_kickout_event {
4664 struct wmi_mac_addr peer_macaddr;
4667 #define WMI_CHAN_INFO_FLAG_COMPLETE BIT(0)
4669 /* Beacon filter wmi command info */
4670 #define BCN_FLT_MAX_SUPPORTED_IES 256
4671 #define BCN_FLT_MAX_ELEMS_IE_LIST (BCN_FLT_MAX_SUPPORTED_IES / 32)
4673 struct bss_bcn_stats {
4675 __le32 bss_bcnsdropped;
4676 __le32 bss_bcnsdelivered;
4679 struct bcn_filter_stats {
4680 __le32 bcns_dropped;
4681 __le32 bcns_delivered;
4682 __le32 activefilters;
4683 struct bss_bcn_stats bss_stats;
4686 struct wmi_add_bcn_filter_cmd {
4688 u32 ie_map[BCN_FLT_MAX_ELEMS_IE_LIST];
4691 enum wmi_sta_keepalive_method {
4692 WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1,
4693 WMI_STA_KEEPALIVE_METHOD_UNSOLICITATED_ARP_RESPONSE = 2,
4696 #define WMI_STA_KEEPALIVE_INTERVAL_DISABLE 0
4698 /* Firmware crashes if keepalive interval exceeds this limit */
4699 #define WMI_STA_KEEPALIVE_INTERVAL_MAX_SECONDS 0xffff
4701 /* note: ip4 addresses are in network byte order, i.e. big endian */
4702 struct wmi_sta_keepalive_arp_resp {
4703 __be32 src_ip4_addr;
4704 __be32 dest_ip4_addr;
4705 struct wmi_mac_addr dest_mac_addr;
4708 struct wmi_sta_keepalive_cmd {
4711 __le32 method; /* WMI_STA_KEEPALIVE_METHOD_ */
4712 __le32 interval; /* in seconds */
4713 struct wmi_sta_keepalive_arp_resp arp_resp;
4716 struct wmi_sta_keepalive_arg {
4721 __be32 src_ip4_addr;
4722 __be32 dest_ip4_addr;
4723 const u8 dest_mac_addr[ETH_ALEN];
4726 enum wmi_force_fw_hang_type {
4727 WMI_FORCE_FW_HANG_ASSERT = 1,
4728 WMI_FORCE_FW_HANG_NO_DETECT,
4729 WMI_FORCE_FW_HANG_CTRL_EP_FULL,
4730 WMI_FORCE_FW_HANG_EMPTY_POINT,
4731 WMI_FORCE_FW_HANG_STACK_OVERFLOW,
4732 WMI_FORCE_FW_HANG_INFINITE_LOOP,
4735 #define WMI_FORCE_FW_HANG_RANDOM_TIME 0xFFFFFFFF
4737 struct wmi_force_fw_hang_cmd {
4742 enum ath10k_dbglog_level {
4743 ATH10K_DBGLOG_LEVEL_VERBOSE = 0,
4744 ATH10K_DBGLOG_LEVEL_INFO = 1,
4745 ATH10K_DBGLOG_LEVEL_WARN = 2,
4746 ATH10K_DBGLOG_LEVEL_ERR = 3,
4749 /* VAP ids to enable dbglog */
4750 #define ATH10K_DBGLOG_CFG_VAP_LOG_LSB 0
4751 #define ATH10K_DBGLOG_CFG_VAP_LOG_MASK 0x0000ffff
4753 /* to enable dbglog in the firmware */
4754 #define ATH10K_DBGLOG_CFG_REPORTING_ENABLE_LSB 16
4755 #define ATH10K_DBGLOG_CFG_REPORTING_ENABLE_MASK 0x00010000
4757 /* timestamp resolution */
4758 #define ATH10K_DBGLOG_CFG_RESOLUTION_LSB 17
4759 #define ATH10K_DBGLOG_CFG_RESOLUTION_MASK 0x000E0000
4761 /* number of queued messages before sending them to the host */
4762 #define ATH10K_DBGLOG_CFG_REPORT_SIZE_LSB 20
4763 #define ATH10K_DBGLOG_CFG_REPORT_SIZE_MASK 0x0ff00000
4766 * Log levels to enable. This defines the minimum level to enable, this is
4767 * not a bitmask. See enum ath10k_dbglog_level for the values.
4769 #define ATH10K_DBGLOG_CFG_LOG_LVL_LSB 28
4770 #define ATH10K_DBGLOG_CFG_LOG_LVL_MASK 0x70000000
4773 * Note: this is a cleaned up version of a struct firmware uses. For
4774 * example, config_valid was hidden inside an array.
4776 struct wmi_dbglog_cfg_cmd {
4777 /* bitmask to hold mod id config*/
4778 __le32 module_enable;
4780 /* see ATH10K_DBGLOG_CFG_ */
4781 __le32 config_enable;
4783 /* mask of module id bits to be changed */
4784 __le32 module_valid;
4786 /* mask of config bits to be changed, see ATH10K_DBGLOG_CFG_ */
4787 __le32 config_valid;
4790 enum wmi_roam_reason {
4791 WMI_ROAM_REASON_BETTER_AP = 1,
4792 WMI_ROAM_REASON_BEACON_MISS = 2,
4793 WMI_ROAM_REASON_LOW_RSSI = 3,
4794 WMI_ROAM_REASON_SUITABLE_AP_FOUND = 4,
4795 WMI_ROAM_REASON_HO_FAILED = 5,
4798 WMI_ROAM_REASON_MAX,
4801 struct wmi_roam_ev {
4806 #define ATH10K_FRAGMT_THRESHOLD_MIN 540
4807 #define ATH10K_FRAGMT_THRESHOLD_MAX 2346
4809 #define WMI_MAX_EVENT 0x1000
4810 /* Maximum number of pending TXed WMI packets */
4811 #define WMI_SKB_HEADROOM sizeof(struct wmi_cmd_hdr)
4813 /* By default disable power save for IBSS */
4814 #define ATH10K_DEFAULT_ATIM 0
4816 #define WMI_MAX_MEM_REQS 16
4818 struct wmi_scan_ev_arg {
4819 __le32 event_type; /* %WMI_SCAN_EVENT_ */
4820 __le32 reason; /* %WMI_SCAN_REASON_ */
4821 __le32 channel_freq; /* only valid for WMI_SCAN_EVENT_FOREIGN_CHANNEL */
4827 struct wmi_mgmt_rx_ev_arg {
4833 __le32 status; /* %WMI_RX_STATUS_ */
4836 struct wmi_ch_info_ev_arg {
4841 __le32 rx_clear_count;
4845 struct wmi_vdev_start_ev_arg {
4848 __le32 resp_type; /* %WMI_VDEV_RESP_ */
4852 struct wmi_peer_kick_ev_arg {
4856 struct wmi_swba_ev_arg {
4858 const struct wmi_tim_info *tim_info[WMI_MAX_AP_VDEV];
4859 const struct wmi_p2p_noa_info *noa_info[WMI_MAX_AP_VDEV];
4862 struct wmi_phyerr_ev_arg {
4867 const struct wmi_phyerr *phyerrs;
4870 struct wmi_svc_rdy_ev_arg {
4871 __le32 min_tx_power;
4872 __le32 max_tx_power;
4879 __le32 num_rf_chains;
4881 __le32 num_mem_reqs;
4882 const __le32 *service_map;
4883 size_t service_map_len;
4884 const struct wlan_host_mem_req *mem_reqs[WMI_MAX_MEM_REQS];
4887 struct wmi_rdy_ev_arg {
4894 struct wmi_roam_ev_arg {
4900 struct wmi_pdev_temperature_event {
4901 /* temperature value in Celcius degree */
4905 /* WOW structures */
4906 enum wmi_wow_wakeup_event {
4907 WOW_BMISS_EVENT = 0,
4908 WOW_BETTER_AP_EVENT,
4909 WOW_DEAUTH_RECVD_EVENT,
4910 WOW_MAGIC_PKT_RECVD_EVENT,
4912 WOW_FOURWAY_HSHAKE_EVENT,
4913 WOW_EAPOL_RECVD_EVENT,
4914 WOW_NLO_DETECTED_EVENT,
4915 WOW_DISASSOC_RECVD_EVENT,
4916 WOW_PATTERN_MATCH_EVENT,
4918 WOW_PROBE_REQ_WPS_IE_EVENT,
4920 WOW_ASSOC_REQ_EVENT,
4923 WOW_HOST_AUTO_SHUTDOWN_EVENT,
4924 WOW_IOAC_MAGIC_EVENT,
4925 WOW_IOAC_SHORT_EVENT,
4926 WOW_IOAC_EXTEND_EVENT,
4927 WOW_IOAC_TIMER_EVENT,
4928 WOW_DFS_PHYERR_RADAR_EVENT,
4930 WOW_CLIENT_KICKOUT_EVENT,
4934 #define C2S(x) case x: return #x
4936 static inline const char *wow_wakeup_event(enum wmi_wow_wakeup_event ev)
4939 C2S(WOW_BMISS_EVENT);
4940 C2S(WOW_BETTER_AP_EVENT);
4941 C2S(WOW_DEAUTH_RECVD_EVENT);
4942 C2S(WOW_MAGIC_PKT_RECVD_EVENT);
4943 C2S(WOW_GTK_ERR_EVENT);
4944 C2S(WOW_FOURWAY_HSHAKE_EVENT);
4945 C2S(WOW_EAPOL_RECVD_EVENT);
4946 C2S(WOW_NLO_DETECTED_EVENT);
4947 C2S(WOW_DISASSOC_RECVD_EVENT);
4948 C2S(WOW_PATTERN_MATCH_EVENT);
4949 C2S(WOW_CSA_IE_EVENT);
4950 C2S(WOW_PROBE_REQ_WPS_IE_EVENT);
4951 C2S(WOW_AUTH_REQ_EVENT);
4952 C2S(WOW_ASSOC_REQ_EVENT);
4954 C2S(WOW_RA_MATCH_EVENT);
4955 C2S(WOW_HOST_AUTO_SHUTDOWN_EVENT);
4956 C2S(WOW_IOAC_MAGIC_EVENT);
4957 C2S(WOW_IOAC_SHORT_EVENT);
4958 C2S(WOW_IOAC_EXTEND_EVENT);
4959 C2S(WOW_IOAC_TIMER_EVENT);
4960 C2S(WOW_DFS_PHYERR_RADAR_EVENT);
4961 C2S(WOW_BEACON_EVENT);
4962 C2S(WOW_CLIENT_KICKOUT_EVENT);
4969 enum wmi_wow_wake_reason {
4970 WOW_REASON_UNSPECIFIED = -1,
4971 WOW_REASON_NLOD = 0,
4972 WOW_REASON_AP_ASSOC_LOST,
4973 WOW_REASON_LOW_RSSI,
4974 WOW_REASON_DEAUTH_RECVD,
4975 WOW_REASON_DISASSOC_RECVD,
4976 WOW_REASON_GTK_HS_ERR,
4978 WOW_REASON_FOURWAY_HS_RECV,
4979 WOW_REASON_TIMER_INTR_RECV,
4980 WOW_REASON_PATTERN_MATCH_FOUND,
4981 WOW_REASON_RECV_MAGIC_PATTERN,
4982 WOW_REASON_P2P_DISC,
4984 WOW_REASON_CSA_EVENT,
4985 WOW_REASON_PROBE_REQ_WPS_IE_RECV,
4986 WOW_REASON_AUTH_REQ_RECV,
4987 WOW_REASON_ASSOC_REQ_RECV,
4988 WOW_REASON_HTT_EVENT,
4989 WOW_REASON_RA_MATCH,
4990 WOW_REASON_HOST_AUTO_SHUTDOWN,
4991 WOW_REASON_IOAC_MAGIC_EVENT,
4992 WOW_REASON_IOAC_SHORT_EVENT,
4993 WOW_REASON_IOAC_EXTEND_EVENT,
4994 WOW_REASON_IOAC_TIMER_EVENT,
4996 WOW_REASON_DFS_PHYERR_RADADR_EVENT,
4997 WOW_REASON_BEACON_RECV,
4998 WOW_REASON_CLIENT_KICKOUT_EVENT,
4999 WOW_REASON_DEBUG_TEST = 0xFF,
5002 static inline const char *wow_reason(enum wmi_wow_wake_reason reason)
5005 C2S(WOW_REASON_UNSPECIFIED);
5006 C2S(WOW_REASON_NLOD);
5007 C2S(WOW_REASON_AP_ASSOC_LOST);
5008 C2S(WOW_REASON_LOW_RSSI);
5009 C2S(WOW_REASON_DEAUTH_RECVD);
5010 C2S(WOW_REASON_DISASSOC_RECVD);
5011 C2S(WOW_REASON_GTK_HS_ERR);
5012 C2S(WOW_REASON_EAP_REQ);
5013 C2S(WOW_REASON_FOURWAY_HS_RECV);
5014 C2S(WOW_REASON_TIMER_INTR_RECV);
5015 C2S(WOW_REASON_PATTERN_MATCH_FOUND);
5016 C2S(WOW_REASON_RECV_MAGIC_PATTERN);
5017 C2S(WOW_REASON_P2P_DISC);
5018 C2S(WOW_REASON_WLAN_HB);
5019 C2S(WOW_REASON_CSA_EVENT);
5020 C2S(WOW_REASON_PROBE_REQ_WPS_IE_RECV);
5021 C2S(WOW_REASON_AUTH_REQ_RECV);
5022 C2S(WOW_REASON_ASSOC_REQ_RECV);
5023 C2S(WOW_REASON_HTT_EVENT);
5024 C2S(WOW_REASON_RA_MATCH);
5025 C2S(WOW_REASON_HOST_AUTO_SHUTDOWN);
5026 C2S(WOW_REASON_IOAC_MAGIC_EVENT);
5027 C2S(WOW_REASON_IOAC_SHORT_EVENT);
5028 C2S(WOW_REASON_IOAC_EXTEND_EVENT);
5029 C2S(WOW_REASON_IOAC_TIMER_EVENT);
5030 C2S(WOW_REASON_ROAM_HO);
5031 C2S(WOW_REASON_DFS_PHYERR_RADADR_EVENT);
5032 C2S(WOW_REASON_BEACON_RECV);
5033 C2S(WOW_REASON_CLIENT_KICKOUT_EVENT);
5034 C2S(WOW_REASON_DEBUG_TEST);
5042 struct wmi_wow_ev_arg {
5045 enum wmi_wow_wake_reason wake_reason;
5049 #define WOW_MIN_PATTERN_SIZE 1
5050 #define WOW_MAX_PATTERN_SIZE 148
5051 #define WOW_MAX_PKT_OFFSET 128
5053 enum wmi_tdls_state {
5055 WMI_TDLS_ENABLE_PASSIVE,
5056 WMI_TDLS_ENABLE_ACTIVE,
5059 enum wmi_tdls_peer_state {
5060 WMI_TDLS_PEER_STATE_PEERING,
5061 WMI_TDLS_PEER_STATE_CONNECTED,
5062 WMI_TDLS_PEER_STATE_TEARDOWN,
5065 struct wmi_tdls_peer_update_cmd_arg {
5067 enum wmi_tdls_peer_state peer_state;
5071 #define WMI_TDLS_MAX_SUPP_OPER_CLASSES 32
5073 struct wmi_tdls_peer_capab_arg {
5074 u8 peer_uapsd_queues;
5076 u32 buff_sta_support;
5077 u32 off_chan_support;
5078 u32 peer_curr_operclass;
5079 u32 self_curr_operclass;
5081 u32 peer_operclass_len;
5082 u8 peer_operclass[WMI_TDLS_MAX_SUPP_OPER_CLASSES];
5083 u32 is_peer_responder;
5084 u32 pref_offchan_num;
5085 u32 pref_offchan_bw;
5090 struct ath10k_fw_stats_pdev;
5091 struct ath10k_fw_stats_peer;
5093 int ath10k_wmi_attach(struct ath10k *ar);
5094 void ath10k_wmi_detach(struct ath10k *ar);
5095 int ath10k_wmi_wait_for_service_ready(struct ath10k *ar);
5096 int ath10k_wmi_wait_for_unified_ready(struct ath10k *ar);
5098 struct sk_buff *ath10k_wmi_alloc_skb(struct ath10k *ar, u32 len);
5099 int ath10k_wmi_connect(struct ath10k *ar);
5101 struct sk_buff *ath10k_wmi_alloc_skb(struct ath10k *ar, u32 len);
5102 int ath10k_wmi_cmd_send(struct ath10k *ar, struct sk_buff *skb, u32 cmd_id);
5103 int ath10k_wmi_cmd_send_nowait(struct ath10k *ar, struct sk_buff *skb,
5105 void ath10k_wmi_start_scan_init(struct ath10k *ar, struct wmi_start_scan_arg *);
5107 void ath10k_wmi_pull_pdev_stats_base(const struct wmi_pdev_stats_base *src,
5108 struct ath10k_fw_stats_pdev *dst);
5109 void ath10k_wmi_pull_pdev_stats_tx(const struct wmi_pdev_stats_tx *src,
5110 struct ath10k_fw_stats_pdev *dst);
5111 void ath10k_wmi_pull_pdev_stats_rx(const struct wmi_pdev_stats_rx *src,
5112 struct ath10k_fw_stats_pdev *dst);
5113 void ath10k_wmi_pull_pdev_stats_extra(const struct wmi_pdev_stats_extra *src,
5114 struct ath10k_fw_stats_pdev *dst);
5115 void ath10k_wmi_pull_peer_stats(const struct wmi_peer_stats *src,
5116 struct ath10k_fw_stats_peer *dst);
5117 void ath10k_wmi_put_host_mem_chunks(struct ath10k *ar,
5118 struct wmi_host_mem_chunks *chunks);
5119 void ath10k_wmi_put_start_scan_common(struct wmi_start_scan_common *cmn,
5120 const struct wmi_start_scan_arg *arg);
5121 void ath10k_wmi_set_wmm_param(struct wmi_wmm_params *params,
5122 const struct wmi_wmm_params_arg *arg);
5123 void ath10k_wmi_put_wmi_channel(struct wmi_channel *ch,
5124 const struct wmi_channel_arg *arg);
5125 int ath10k_wmi_start_scan_verify(const struct wmi_start_scan_arg *arg);
5127 int ath10k_wmi_event_scan(struct ath10k *ar, struct sk_buff *skb);
5128 int ath10k_wmi_event_mgmt_rx(struct ath10k *ar, struct sk_buff *skb);
5129 void ath10k_wmi_event_chan_info(struct ath10k *ar, struct sk_buff *skb);
5130 void ath10k_wmi_event_echo(struct ath10k *ar, struct sk_buff *skb);
5131 int ath10k_wmi_event_debug_mesg(struct ath10k *ar, struct sk_buff *skb);
5132 void ath10k_wmi_event_update_stats(struct ath10k *ar, struct sk_buff *skb);
5133 void ath10k_wmi_event_vdev_start_resp(struct ath10k *ar, struct sk_buff *skb);
5134 void ath10k_wmi_event_vdev_stopped(struct ath10k *ar, struct sk_buff *skb);
5135 void ath10k_wmi_event_peer_sta_kickout(struct ath10k *ar, struct sk_buff *skb);
5136 void ath10k_wmi_event_host_swba(struct ath10k *ar, struct sk_buff *skb);
5137 void ath10k_wmi_event_tbttoffset_update(struct ath10k *ar, struct sk_buff *skb);
5138 void ath10k_wmi_event_dfs(struct ath10k *ar,
5139 const struct wmi_phyerr *phyerr, u64 tsf);
5140 void ath10k_wmi_event_spectral_scan(struct ath10k *ar,
5141 const struct wmi_phyerr *phyerr,
5143 void ath10k_wmi_event_phyerr(struct ath10k *ar, struct sk_buff *skb);
5144 void ath10k_wmi_event_roam(struct ath10k *ar, struct sk_buff *skb);
5145 void ath10k_wmi_event_profile_match(struct ath10k *ar, struct sk_buff *skb);
5146 void ath10k_wmi_event_debug_print(struct ath10k *ar, struct sk_buff *skb);
5147 void ath10k_wmi_event_pdev_qvit(struct ath10k *ar, struct sk_buff *skb);
5148 void ath10k_wmi_event_wlan_profile_data(struct ath10k *ar, struct sk_buff *skb);
5149 void ath10k_wmi_event_rtt_measurement_report(struct ath10k *ar,
5150 struct sk_buff *skb);
5151 void ath10k_wmi_event_tsf_measurement_report(struct ath10k *ar,
5152 struct sk_buff *skb);
5153 void ath10k_wmi_event_rtt_error_report(struct ath10k *ar, struct sk_buff *skb);
5154 void ath10k_wmi_event_wow_wakeup_host(struct ath10k *ar, struct sk_buff *skb);
5155 void ath10k_wmi_event_dcs_interference(struct ath10k *ar, struct sk_buff *skb);
5156 void ath10k_wmi_event_pdev_tpc_config(struct ath10k *ar, struct sk_buff *skb);
5157 void ath10k_wmi_event_pdev_ftm_intg(struct ath10k *ar, struct sk_buff *skb);
5158 void ath10k_wmi_event_gtk_offload_status(struct ath10k *ar,
5159 struct sk_buff *skb);
5160 void ath10k_wmi_event_gtk_rekey_fail(struct ath10k *ar, struct sk_buff *skb);
5161 void ath10k_wmi_event_delba_complete(struct ath10k *ar, struct sk_buff *skb);
5162 void ath10k_wmi_event_addba_complete(struct ath10k *ar, struct sk_buff *skb);
5163 void ath10k_wmi_event_vdev_install_key_complete(struct ath10k *ar,
5164 struct sk_buff *skb);
5165 void ath10k_wmi_event_inst_rssi_stats(struct ath10k *ar, struct sk_buff *skb);
5166 void ath10k_wmi_event_vdev_standby_req(struct ath10k *ar, struct sk_buff *skb);
5167 void ath10k_wmi_event_vdev_resume_req(struct ath10k *ar, struct sk_buff *skb);
5168 void ath10k_wmi_event_service_ready(struct ath10k *ar, struct sk_buff *skb);
5169 int ath10k_wmi_event_ready(struct ath10k *ar, struct sk_buff *skb);
5171 #endif /* _WMI_H_ */