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, /* beacon offload */
78 WMI_SERVICE_SCAN_OFFLOAD, /* scan offload */
79 WMI_SERVICE_ROAM_OFFLOAD, /* roam offload */
80 WMI_SERVICE_BCN_MISS_OFFLOAD, /* beacon miss offload */
81 WMI_SERVICE_STA_PWRSAVE, /* fake sleep + basic power save */
82 WMI_SERVICE_STA_ADVANCED_PWRSAVE, /* uapsd, pspoll, force sleep */
83 WMI_SERVICE_AP_UAPSD, /* uapsd on AP */
84 WMI_SERVICE_AP_DFS, /* DFS on AP */
85 WMI_SERVICE_11AC, /* supports 11ac */
86 WMI_SERVICE_BLOCKACK, /* Supports triggering ADDBA/DELBA from host*/
87 WMI_SERVICE_PHYERR, /* PHY error */
88 WMI_SERVICE_BCN_FILTER, /* Beacon filter support */
89 WMI_SERVICE_RTT, /* RTT (round trip time) support */
90 WMI_SERVICE_RATECTRL, /* Rate-control */
91 WMI_SERVICE_WOW, /* WOW Support */
92 WMI_SERVICE_RATECTRL_CACHE, /* Rate-control caching */
93 WMI_SERVICE_IRAM_TIDS, /* TIDs in IRAM */
94 WMI_SERVICE_ARPNS_OFFLOAD, /* ARP NS Offload support */
95 WMI_SERVICE_NLO, /* Network list offload service */
96 WMI_SERVICE_GTK_OFFLOAD, /* GTK offload */
97 WMI_SERVICE_SCAN_SCH, /* Scan Scheduler Service */
98 WMI_SERVICE_CSA_OFFLOAD, /* CSA offload service */
99 WMI_SERVICE_CHATTER, /* Chatter service */
100 WMI_SERVICE_COEX_FREQAVOID, /* FW report freq range to avoid */
101 WMI_SERVICE_PACKET_POWER_SAVE, /* packet power save service */
102 WMI_SERVICE_FORCE_FW_HANG, /* To test fw recovery mechanism */
103 WMI_SERVICE_GPIO, /* GPIO service */
104 WMI_SERVICE_STA_DTIM_PS_MODULATED_DTIM, /* Modulated DTIM support */
105 WMI_STA_UAPSD_BASIC_AUTO_TRIG, /* UAPSD AC Trigger Generation */
106 WMI_STA_UAPSD_VAR_AUTO_TRIG, /* -do- */
107 WMI_SERVICE_STA_KEEP_ALIVE, /* STA keep alive mechanism support */
108 WMI_SERVICE_TX_ENCAP, /* Packet type for TX encapsulation */
111 WMI_MAX_SERVICE = 64 /* max service */
114 static inline char *wmi_service_name(int service_id)
116 switch (service_id) {
117 case WMI_SERVICE_BEACON_OFFLOAD:
118 return "BEACON_OFFLOAD";
119 case WMI_SERVICE_SCAN_OFFLOAD:
120 return "SCAN_OFFLOAD";
121 case WMI_SERVICE_ROAM_OFFLOAD:
122 return "ROAM_OFFLOAD";
123 case WMI_SERVICE_BCN_MISS_OFFLOAD:
124 return "BCN_MISS_OFFLOAD";
125 case WMI_SERVICE_STA_PWRSAVE:
126 return "STA_PWRSAVE";
127 case WMI_SERVICE_STA_ADVANCED_PWRSAVE:
128 return "STA_ADVANCED_PWRSAVE";
129 case WMI_SERVICE_AP_UAPSD:
131 case WMI_SERVICE_AP_DFS:
133 case WMI_SERVICE_11AC:
135 case WMI_SERVICE_BLOCKACK:
137 case WMI_SERVICE_PHYERR:
139 case WMI_SERVICE_BCN_FILTER:
141 case WMI_SERVICE_RTT:
143 case WMI_SERVICE_RATECTRL:
145 case WMI_SERVICE_WOW:
147 case WMI_SERVICE_RATECTRL_CACHE:
148 return "RATECTRL CACHE";
149 case WMI_SERVICE_IRAM_TIDS:
151 case WMI_SERVICE_ARPNS_OFFLOAD:
152 return "ARPNS_OFFLOAD";
153 case WMI_SERVICE_NLO:
155 case WMI_SERVICE_GTK_OFFLOAD:
156 return "GTK_OFFLOAD";
157 case WMI_SERVICE_SCAN_SCH:
159 case WMI_SERVICE_CSA_OFFLOAD:
160 return "CSA_OFFLOAD";
161 case WMI_SERVICE_CHATTER:
163 case WMI_SERVICE_COEX_FREQAVOID:
164 return "COEX_FREQAVOID";
165 case WMI_SERVICE_PACKET_POWER_SAVE:
166 return "PACKET_POWER_SAVE";
167 case WMI_SERVICE_FORCE_FW_HANG:
168 return "FORCE FW HANG";
169 case WMI_SERVICE_GPIO:
171 case WMI_SERVICE_STA_DTIM_PS_MODULATED_DTIM:
172 return "MODULATED DTIM";
173 case WMI_STA_UAPSD_BASIC_AUTO_TRIG:
174 return "BASIC UAPSD";
175 case WMI_STA_UAPSD_VAR_AUTO_TRIG:
177 case WMI_SERVICE_STA_KEEP_ALIVE:
178 return "STA KEEP ALIVE";
179 case WMI_SERVICE_TX_ENCAP:
182 return "UNKNOWN SERVICE\n";
187 #define WMI_SERVICE_BM_SIZE \
188 ((WMI_MAX_SERVICE + sizeof(u32) - 1)/sizeof(u32))
190 /* 2 word representation of MAC addr */
191 struct wmi_mac_addr {
201 /* macro to convert MAC address from WMI word format to char array */
202 #define WMI_MAC_ADDR_TO_CHAR_ARRAY(pwmi_mac_addr, c_macaddr) do { \
203 (c_macaddr)[0] = ((pwmi_mac_addr)->word0) & 0xff; \
204 (c_macaddr)[1] = (((pwmi_mac_addr)->word0) >> 8) & 0xff; \
205 (c_macaddr)[2] = (((pwmi_mac_addr)->word0) >> 16) & 0xff; \
206 (c_macaddr)[3] = (((pwmi_mac_addr)->word0) >> 24) & 0xff; \
207 (c_macaddr)[4] = ((pwmi_mac_addr)->word1) & 0xff; \
208 (c_macaddr)[5] = (((pwmi_mac_addr)->word1) >> 8) & 0xff; \
213 u32 start_scan_cmdid;
215 u32 scan_chan_list_cmdid;
216 u32 scan_sch_prio_tbl_cmdid;
217 u32 pdev_set_regdomain_cmdid;
218 u32 pdev_set_channel_cmdid;
219 u32 pdev_set_param_cmdid;
220 u32 pdev_pktlog_enable_cmdid;
221 u32 pdev_pktlog_disable_cmdid;
222 u32 pdev_set_wmm_params_cmdid;
223 u32 pdev_set_ht_cap_ie_cmdid;
224 u32 pdev_set_vht_cap_ie_cmdid;
225 u32 pdev_set_dscp_tid_map_cmdid;
226 u32 pdev_set_quiet_mode_cmdid;
227 u32 pdev_green_ap_ps_enable_cmdid;
228 u32 pdev_get_tpc_config_cmdid;
229 u32 pdev_set_base_macaddr_cmdid;
230 u32 vdev_create_cmdid;
231 u32 vdev_delete_cmdid;
232 u32 vdev_start_request_cmdid;
233 u32 vdev_restart_request_cmdid;
237 u32 vdev_set_param_cmdid;
238 u32 vdev_install_key_cmdid;
239 u32 peer_create_cmdid;
240 u32 peer_delete_cmdid;
241 u32 peer_flush_tids_cmdid;
242 u32 peer_set_param_cmdid;
243 u32 peer_assoc_cmdid;
244 u32 peer_add_wds_entry_cmdid;
245 u32 peer_remove_wds_entry_cmdid;
246 u32 peer_mcast_group_cmdid;
248 u32 pdev_send_bcn_cmdid;
250 u32 bcn_filter_rx_cmdid;
251 u32 prb_req_filter_rx_cmdid;
254 u32 addba_clear_resp_cmdid;
255 u32 addba_send_cmdid;
256 u32 addba_status_cmdid;
257 u32 delba_send_cmdid;
258 u32 addba_set_resp_cmdid;
259 u32 send_singleamsdu_cmdid;
260 u32 sta_powersave_mode_cmdid;
261 u32 sta_powersave_param_cmdid;
262 u32 sta_mimo_ps_mode_cmdid;
263 u32 pdev_dfs_enable_cmdid;
264 u32 pdev_dfs_disable_cmdid;
266 u32 roam_scan_rssi_threshold;
267 u32 roam_scan_period;
268 u32 roam_scan_rssi_change_threshold;
270 u32 ofl_scan_add_ap_profile;
271 u32 ofl_scan_remove_ap_profile;
273 u32 p2p_dev_set_device_info;
274 u32 p2p_dev_set_discoverability;
275 u32 p2p_go_set_beacon_ie;
276 u32 p2p_go_set_probe_resp_ie;
277 u32 p2p_set_vendor_ie_data_cmdid;
278 u32 ap_ps_peer_param_cmdid;
279 u32 ap_ps_peer_uapsd_coex_cmdid;
280 u32 peer_rate_retry_sched_cmdid;
281 u32 wlan_profile_trigger_cmdid;
282 u32 wlan_profile_set_hist_intvl_cmdid;
283 u32 wlan_profile_get_profile_data_cmdid;
284 u32 wlan_profile_enable_profile_id_cmdid;
285 u32 wlan_profile_list_profile_id_cmdid;
286 u32 pdev_suspend_cmdid;
287 u32 pdev_resume_cmdid;
288 u32 add_bcn_filter_cmdid;
289 u32 rmv_bcn_filter_cmdid;
290 u32 wow_add_wake_pattern_cmdid;
291 u32 wow_del_wake_pattern_cmdid;
292 u32 wow_enable_disable_wake_event_cmdid;
293 u32 wow_enable_cmdid;
294 u32 wow_hostwakeup_from_sleep_cmdid;
295 u32 rtt_measreq_cmdid;
297 u32 vdev_spectral_scan_configure_cmdid;
298 u32 vdev_spectral_scan_enable_cmdid;
299 u32 request_stats_cmdid;
300 u32 set_arp_ns_offload_cmdid;
301 u32 network_list_offload_config_cmdid;
302 u32 gtk_offload_cmdid;
303 u32 csa_offload_enable_cmdid;
304 u32 csa_offload_chanswitch_cmdid;
305 u32 chatter_set_mode_cmdid;
306 u32 peer_tid_addba_cmdid;
307 u32 peer_tid_delba_cmdid;
308 u32 sta_dtim_ps_method_cmdid;
309 u32 sta_uapsd_auto_trig_cmdid;
310 u32 sta_keepalive_cmd;
313 u32 dbglog_cfg_cmdid;
315 u32 pdev_ftm_intg_cmdid;
316 u32 vdev_set_keepalive_cmdid;
317 u32 vdev_get_keepalive_cmdid;
318 u32 force_fw_hang_cmdid;
319 u32 gpio_config_cmdid;
320 u32 gpio_output_cmdid;
324 * wmi command groups.
327 /* 0 to 2 are reserved */
329 WMI_GRP_SCAN = WMI_GRP_START,
359 #define WMI_CMD_GRP(grp_id) (((grp_id) << 12) | 0x1)
360 #define WMI_EVT_GRP_START_ID(grp_id) (((grp_id) << 12) | 0x1)
362 #define WMI_CMD_UNDEFINED 0
364 /* Command IDs and command events for MAIN FW. */
366 WMI_INIT_CMDID = 0x1,
368 /* Scan specific commands */
369 WMI_START_SCAN_CMDID = WMI_CMD_GRP(WMI_GRP_SCAN),
371 WMI_SCAN_CHAN_LIST_CMDID,
372 WMI_SCAN_SCH_PRIO_TBL_CMDID,
374 /* PDEV (physical device) specific commands */
375 WMI_PDEV_SET_REGDOMAIN_CMDID = WMI_CMD_GRP(WMI_GRP_PDEV),
376 WMI_PDEV_SET_CHANNEL_CMDID,
377 WMI_PDEV_SET_PARAM_CMDID,
378 WMI_PDEV_PKTLOG_ENABLE_CMDID,
379 WMI_PDEV_PKTLOG_DISABLE_CMDID,
380 WMI_PDEV_SET_WMM_PARAMS_CMDID,
381 WMI_PDEV_SET_HT_CAP_IE_CMDID,
382 WMI_PDEV_SET_VHT_CAP_IE_CMDID,
383 WMI_PDEV_SET_DSCP_TID_MAP_CMDID,
384 WMI_PDEV_SET_QUIET_MODE_CMDID,
385 WMI_PDEV_GREEN_AP_PS_ENABLE_CMDID,
386 WMI_PDEV_GET_TPC_CONFIG_CMDID,
387 WMI_PDEV_SET_BASE_MACADDR_CMDID,
389 /* VDEV (virtual device) specific commands */
390 WMI_VDEV_CREATE_CMDID = WMI_CMD_GRP(WMI_GRP_VDEV),
391 WMI_VDEV_DELETE_CMDID,
392 WMI_VDEV_START_REQUEST_CMDID,
393 WMI_VDEV_RESTART_REQUEST_CMDID,
397 WMI_VDEV_SET_PARAM_CMDID,
398 WMI_VDEV_INSTALL_KEY_CMDID,
400 /* peer specific commands */
401 WMI_PEER_CREATE_CMDID = WMI_CMD_GRP(WMI_GRP_PEER),
402 WMI_PEER_DELETE_CMDID,
403 WMI_PEER_FLUSH_TIDS_CMDID,
404 WMI_PEER_SET_PARAM_CMDID,
405 WMI_PEER_ASSOC_CMDID,
406 WMI_PEER_ADD_WDS_ENTRY_CMDID,
407 WMI_PEER_REMOVE_WDS_ENTRY_CMDID,
408 WMI_PEER_MCAST_GROUP_CMDID,
410 /* beacon/management specific commands */
411 WMI_BCN_TX_CMDID = WMI_CMD_GRP(WMI_GRP_MGMT),
412 WMI_PDEV_SEND_BCN_CMDID,
414 WMI_BCN_FILTER_RX_CMDID,
415 WMI_PRB_REQ_FILTER_RX_CMDID,
419 /* commands to directly control BA negotiation directly from host. */
420 WMI_ADDBA_CLEAR_RESP_CMDID = WMI_CMD_GRP(WMI_GRP_BA_NEG),
421 WMI_ADDBA_SEND_CMDID,
422 WMI_ADDBA_STATUS_CMDID,
423 WMI_DELBA_SEND_CMDID,
424 WMI_ADDBA_SET_RESP_CMDID,
425 WMI_SEND_SINGLEAMSDU_CMDID,
427 /* Station power save specific config */
428 WMI_STA_POWERSAVE_MODE_CMDID = WMI_CMD_GRP(WMI_GRP_STA_PS),
429 WMI_STA_POWERSAVE_PARAM_CMDID,
430 WMI_STA_MIMO_PS_MODE_CMDID,
432 /** DFS-specific commands */
433 WMI_PDEV_DFS_ENABLE_CMDID = WMI_CMD_GRP(WMI_GRP_DFS),
434 WMI_PDEV_DFS_DISABLE_CMDID,
436 /* Roaming specific commands */
437 WMI_ROAM_SCAN_MODE = WMI_CMD_GRP(WMI_GRP_ROAM),
438 WMI_ROAM_SCAN_RSSI_THRESHOLD,
439 WMI_ROAM_SCAN_PERIOD,
440 WMI_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
443 /* offload scan specific commands */
444 WMI_OFL_SCAN_ADD_AP_PROFILE = WMI_CMD_GRP(WMI_GRP_OFL_SCAN),
445 WMI_OFL_SCAN_REMOVE_AP_PROFILE,
448 /* P2P specific commands */
449 WMI_P2P_DEV_SET_DEVICE_INFO = WMI_CMD_GRP(WMI_GRP_P2P),
450 WMI_P2P_DEV_SET_DISCOVERABILITY,
451 WMI_P2P_GO_SET_BEACON_IE,
452 WMI_P2P_GO_SET_PROBE_RESP_IE,
453 WMI_P2P_SET_VENDOR_IE_DATA_CMDID,
455 /* AP power save specific config */
456 WMI_AP_PS_PEER_PARAM_CMDID = WMI_CMD_GRP(WMI_GRP_AP_PS),
457 WMI_AP_PS_PEER_UAPSD_COEX_CMDID,
459 /* Rate-control specific commands */
460 WMI_PEER_RATE_RETRY_SCHED_CMDID =
461 WMI_CMD_GRP(WMI_GRP_RATE_CTRL),
463 /* WLAN Profiling commands. */
464 WMI_WLAN_PROFILE_TRIGGER_CMDID = WMI_CMD_GRP(WMI_GRP_PROFILE),
465 WMI_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
466 WMI_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
467 WMI_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
468 WMI_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
470 /* Suspend resume command Ids */
471 WMI_PDEV_SUSPEND_CMDID = WMI_CMD_GRP(WMI_GRP_SUSPEND),
472 WMI_PDEV_RESUME_CMDID,
474 /* Beacon filter commands */
475 WMI_ADD_BCN_FILTER_CMDID = WMI_CMD_GRP(WMI_GRP_BCN_FILTER),
476 WMI_RMV_BCN_FILTER_CMDID,
478 /* WOW Specific WMI commands*/
479 WMI_WOW_ADD_WAKE_PATTERN_CMDID = WMI_CMD_GRP(WMI_GRP_WOW),
480 WMI_WOW_DEL_WAKE_PATTERN_CMDID,
481 WMI_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
482 WMI_WOW_ENABLE_CMDID,
483 WMI_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
485 /* RTT measurement related cmd */
486 WMI_RTT_MEASREQ_CMDID = WMI_CMD_GRP(WMI_GRP_RTT),
489 /* spectral scan commands */
490 WMI_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID = WMI_CMD_GRP(WMI_GRP_SPECTRAL),
491 WMI_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
494 WMI_REQUEST_STATS_CMDID = WMI_CMD_GRP(WMI_GRP_STATS),
496 /* ARP OFFLOAD REQUEST*/
497 WMI_SET_ARP_NS_OFFLOAD_CMDID = WMI_CMD_GRP(WMI_GRP_ARP_NS_OFL),
499 /* NS offload confid*/
500 WMI_NETWORK_LIST_OFFLOAD_CONFIG_CMDID = WMI_CMD_GRP(WMI_GRP_NLO_OFL),
502 /* GTK offload Specific WMI commands*/
503 WMI_GTK_OFFLOAD_CMDID = WMI_CMD_GRP(WMI_GRP_GTK_OFL),
505 /* CSA offload Specific WMI commands*/
506 WMI_CSA_OFFLOAD_ENABLE_CMDID = WMI_CMD_GRP(WMI_GRP_CSA_OFL),
507 WMI_CSA_OFFLOAD_CHANSWITCH_CMDID,
509 /* Chatter commands*/
510 WMI_CHATTER_SET_MODE_CMDID = WMI_CMD_GRP(WMI_GRP_CHATTER),
512 /* addba specific commands */
513 WMI_PEER_TID_ADDBA_CMDID = WMI_CMD_GRP(WMI_GRP_TID_ADDBA),
514 WMI_PEER_TID_DELBA_CMDID,
516 /* set station mimo powersave method */
517 WMI_STA_DTIM_PS_METHOD_CMDID,
518 /* Configure the Station UAPSD AC Auto Trigger Parameters */
519 WMI_STA_UAPSD_AUTO_TRIG_CMDID,
521 /* STA Keep alive parameter configuration,
522 Requires WMI_SERVICE_STA_KEEP_ALIVE */
523 WMI_STA_KEEPALIVE_CMD,
525 /* misc command group */
526 WMI_ECHO_CMDID = WMI_CMD_GRP(WMI_GRP_MISC),
528 WMI_DBGLOG_CFG_CMDID,
530 WMI_PDEV_FTM_INTG_CMDID,
531 WMI_VDEV_SET_KEEPALIVE_CMDID,
532 WMI_VDEV_GET_KEEPALIVE_CMDID,
533 WMI_FORCE_FW_HANG_CMDID,
535 /* GPIO Configuration */
536 WMI_GPIO_CONFIG_CMDID = WMI_CMD_GRP(WMI_GRP_GPIO),
537 WMI_GPIO_OUTPUT_CMDID,
541 WMI_SERVICE_READY_EVENTID = 0x1,
544 /* Scan specific events */
545 WMI_SCAN_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_SCAN),
547 /* PDEV specific events */
548 WMI_PDEV_TPC_CONFIG_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PDEV),
549 WMI_CHAN_INFO_EVENTID,
552 /* VDEV specific events */
553 WMI_VDEV_START_RESP_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_VDEV),
554 WMI_VDEV_STOPPED_EVENTID,
555 WMI_VDEV_INSTALL_KEY_COMPLETE_EVENTID,
557 /* peer specific events */
558 WMI_PEER_STA_KICKOUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_PEER),
560 /* beacon/mgmt specific events */
561 WMI_MGMT_RX_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MGMT),
562 WMI_HOST_SWBA_EVENTID,
563 WMI_TBTTOFFSET_UPDATE_EVENTID,
565 /* ADDBA Related WMI Events*/
566 WMI_TX_DELBA_COMPLETE_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_BA_NEG),
567 WMI_TX_ADDBA_COMPLETE_EVENTID,
569 /* Roam event to trigger roaming on host */
570 WMI_ROAM_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_ROAM),
574 WMI_WOW_WAKEUP_HOST_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_WOW),
577 WMI_RTT_MEASUREMENT_REPORT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_RTT),
578 WMI_TSF_MEASUREMENT_REPORT_EVENTID,
579 WMI_RTT_ERROR_REPORT_EVENTID,
582 WMI_GTK_OFFLOAD_STATUS_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GTK_OFL),
583 WMI_GTK_REKEY_FAIL_EVENTID,
585 /* CSA IE received event */
586 WMI_CSA_HANDLING_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_CSA_OFL),
589 WMI_ECHO_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_MISC),
590 WMI_PDEV_UTF_EVENTID,
591 WMI_DEBUG_MESG_EVENTID,
592 WMI_UPDATE_STATS_EVENTID,
593 WMI_DEBUG_PRINT_EVENTID,
594 WMI_DCS_INTERFERENCE_EVENTID,
595 WMI_PDEV_QVIT_EVENTID,
596 WMI_WLAN_PROFILE_DATA_EVENTID,
597 WMI_PDEV_FTM_INTG_EVENTID,
598 WMI_WLAN_FREQ_AVOID_EVENTID,
599 WMI_VDEV_GET_KEEPALIVE_EVENTID,
602 WMI_GPIO_INPUT_EVENTID = WMI_EVT_GRP_START_ID(WMI_GRP_GPIO),
605 /* Command IDs and command events for 10.X firmware */
606 enum wmi_10x_cmd_id {
607 WMI_10X_START_CMDID = 0x9000,
608 WMI_10X_END_CMDID = 0x9FFF,
610 /* initialize the wlan sub system */
613 /* Scan specific commands */
615 WMI_10X_START_SCAN_CMDID = WMI_10X_START_CMDID,
616 WMI_10X_STOP_SCAN_CMDID,
617 WMI_10X_SCAN_CHAN_LIST_CMDID,
620 /* PDEV(physical device) specific commands */
621 WMI_10X_PDEV_SET_REGDOMAIN_CMDID,
622 WMI_10X_PDEV_SET_CHANNEL_CMDID,
623 WMI_10X_PDEV_SET_PARAM_CMDID,
624 WMI_10X_PDEV_PKTLOG_ENABLE_CMDID,
625 WMI_10X_PDEV_PKTLOG_DISABLE_CMDID,
626 WMI_10X_PDEV_SET_WMM_PARAMS_CMDID,
627 WMI_10X_PDEV_SET_HT_CAP_IE_CMDID,
628 WMI_10X_PDEV_SET_VHT_CAP_IE_CMDID,
629 WMI_10X_PDEV_SET_BASE_MACADDR_CMDID,
630 WMI_10X_PDEV_SET_DSCP_TID_MAP_CMDID,
631 WMI_10X_PDEV_SET_QUIET_MODE_CMDID,
632 WMI_10X_PDEV_GREEN_AP_PS_ENABLE_CMDID,
633 WMI_10X_PDEV_GET_TPC_CONFIG_CMDID,
635 /* VDEV(virtual device) specific commands */
636 WMI_10X_VDEV_CREATE_CMDID,
637 WMI_10X_VDEV_DELETE_CMDID,
638 WMI_10X_VDEV_START_REQUEST_CMDID,
639 WMI_10X_VDEV_RESTART_REQUEST_CMDID,
640 WMI_10X_VDEV_UP_CMDID,
641 WMI_10X_VDEV_STOP_CMDID,
642 WMI_10X_VDEV_DOWN_CMDID,
643 WMI_10X_VDEV_STANDBY_RESPONSE_CMDID,
644 WMI_10X_VDEV_RESUME_RESPONSE_CMDID,
645 WMI_10X_VDEV_SET_PARAM_CMDID,
646 WMI_10X_VDEV_INSTALL_KEY_CMDID,
648 /* peer specific commands */
649 WMI_10X_PEER_CREATE_CMDID,
650 WMI_10X_PEER_DELETE_CMDID,
651 WMI_10X_PEER_FLUSH_TIDS_CMDID,
652 WMI_10X_PEER_SET_PARAM_CMDID,
653 WMI_10X_PEER_ASSOC_CMDID,
654 WMI_10X_PEER_ADD_WDS_ENTRY_CMDID,
655 WMI_10X_PEER_REMOVE_WDS_ENTRY_CMDID,
656 WMI_10X_PEER_MCAST_GROUP_CMDID,
658 /* beacon/management specific commands */
660 WMI_10X_BCN_TX_CMDID,
661 WMI_10X_BCN_PRB_TMPL_CMDID,
662 WMI_10X_BCN_FILTER_RX_CMDID,
663 WMI_10X_PRB_REQ_FILTER_RX_CMDID,
664 WMI_10X_MGMT_TX_CMDID,
666 /* commands to directly control ba negotiation directly from host. */
667 WMI_10X_ADDBA_CLEAR_RESP_CMDID,
668 WMI_10X_ADDBA_SEND_CMDID,
669 WMI_10X_ADDBA_STATUS_CMDID,
670 WMI_10X_DELBA_SEND_CMDID,
671 WMI_10X_ADDBA_SET_RESP_CMDID,
672 WMI_10X_SEND_SINGLEAMSDU_CMDID,
674 /* Station power save specific config */
675 WMI_10X_STA_POWERSAVE_MODE_CMDID,
676 WMI_10X_STA_POWERSAVE_PARAM_CMDID,
677 WMI_10X_STA_MIMO_PS_MODE_CMDID,
679 /* set debug log config */
680 WMI_10X_DBGLOG_CFG_CMDID,
682 /* DFS-specific commands */
683 WMI_10X_PDEV_DFS_ENABLE_CMDID,
684 WMI_10X_PDEV_DFS_DISABLE_CMDID,
686 /* QVIT specific command id */
687 WMI_10X_PDEV_QVIT_CMDID,
689 /* Offload Scan and Roaming related commands */
690 WMI_10X_ROAM_SCAN_MODE,
691 WMI_10X_ROAM_SCAN_RSSI_THRESHOLD,
692 WMI_10X_ROAM_SCAN_PERIOD,
693 WMI_10X_ROAM_SCAN_RSSI_CHANGE_THRESHOLD,
694 WMI_10X_ROAM_AP_PROFILE,
695 WMI_10X_OFL_SCAN_ADD_AP_PROFILE,
696 WMI_10X_OFL_SCAN_REMOVE_AP_PROFILE,
697 WMI_10X_OFL_SCAN_PERIOD,
699 /* P2P specific commands */
700 WMI_10X_P2P_DEV_SET_DEVICE_INFO,
701 WMI_10X_P2P_DEV_SET_DISCOVERABILITY,
702 WMI_10X_P2P_GO_SET_BEACON_IE,
703 WMI_10X_P2P_GO_SET_PROBE_RESP_IE,
705 /* AP power save specific config */
706 WMI_10X_AP_PS_PEER_PARAM_CMDID,
707 WMI_10X_AP_PS_PEER_UAPSD_COEX_CMDID,
709 /* Rate-control specific commands */
710 WMI_10X_PEER_RATE_RETRY_SCHED_CMDID,
712 /* WLAN Profiling commands. */
713 WMI_10X_WLAN_PROFILE_TRIGGER_CMDID,
714 WMI_10X_WLAN_PROFILE_SET_HIST_INTVL_CMDID,
715 WMI_10X_WLAN_PROFILE_GET_PROFILE_DATA_CMDID,
716 WMI_10X_WLAN_PROFILE_ENABLE_PROFILE_ID_CMDID,
717 WMI_10X_WLAN_PROFILE_LIST_PROFILE_ID_CMDID,
719 /* Suspend resume command Ids */
720 WMI_10X_PDEV_SUSPEND_CMDID,
721 WMI_10X_PDEV_RESUME_CMDID,
723 /* Beacon filter commands */
724 WMI_10X_ADD_BCN_FILTER_CMDID,
725 WMI_10X_RMV_BCN_FILTER_CMDID,
727 /* WOW Specific WMI commands*/
728 WMI_10X_WOW_ADD_WAKE_PATTERN_CMDID,
729 WMI_10X_WOW_DEL_WAKE_PATTERN_CMDID,
730 WMI_10X_WOW_ENABLE_DISABLE_WAKE_EVENT_CMDID,
731 WMI_10X_WOW_ENABLE_CMDID,
732 WMI_10X_WOW_HOSTWAKEUP_FROM_SLEEP_CMDID,
734 /* RTT measurement related cmd */
735 WMI_10X_RTT_MEASREQ_CMDID,
736 WMI_10X_RTT_TSF_CMDID,
738 /* transmit beacon by value */
739 WMI_10X_PDEV_SEND_BCN_CMDID,
742 WMI_10X_VDEV_SPECTRAL_SCAN_CONFIGURE_CMDID,
743 WMI_10X_VDEV_SPECTRAL_SCAN_ENABLE_CMDID,
744 WMI_10X_REQUEST_STATS_CMDID,
746 /* GPIO Configuration */
747 WMI_10X_GPIO_CONFIG_CMDID,
748 WMI_10X_GPIO_OUTPUT_CMDID,
750 WMI_10X_PDEV_UTF_CMDID = WMI_10X_END_CMDID - 1,
753 enum wmi_10x_event_id {
754 WMI_10X_SERVICE_READY_EVENTID = 0x8000,
755 WMI_10X_READY_EVENTID,
756 WMI_10X_START_EVENTID = 0x9000,
757 WMI_10X_END_EVENTID = 0x9FFF,
759 /* Scan specific events */
760 WMI_10X_SCAN_EVENTID = WMI_10X_START_EVENTID,
761 WMI_10X_ECHO_EVENTID,
762 WMI_10X_DEBUG_MESG_EVENTID,
763 WMI_10X_UPDATE_STATS_EVENTID,
765 /* Instantaneous RSSI event */
766 WMI_10X_INST_RSSI_STATS_EVENTID,
768 /* VDEV specific events */
769 WMI_10X_VDEV_START_RESP_EVENTID,
770 WMI_10X_VDEV_STANDBY_REQ_EVENTID,
771 WMI_10X_VDEV_RESUME_REQ_EVENTID,
772 WMI_10X_VDEV_STOPPED_EVENTID,
774 /* peer specific events */
775 WMI_10X_PEER_STA_KICKOUT_EVENTID,
777 /* beacon/mgmt specific events */
778 WMI_10X_HOST_SWBA_EVENTID,
779 WMI_10X_TBTTOFFSET_UPDATE_EVENTID,
780 WMI_10X_MGMT_RX_EVENTID,
782 /* Channel stats event */
783 WMI_10X_CHAN_INFO_EVENTID,
785 /* PHY Error specific WMI event */
786 WMI_10X_PHYERR_EVENTID,
788 /* Roam event to trigger roaming on host */
789 WMI_10X_ROAM_EVENTID,
791 /* matching AP found from list of profiles */
792 WMI_10X_PROFILE_MATCH,
794 /* debug print message used for tracing FW code while debugging */
795 WMI_10X_DEBUG_PRINT_EVENTID,
796 /* VI spoecific event */
797 WMI_10X_PDEV_QVIT_EVENTID,
798 /* FW code profile data in response to profile request */
799 WMI_10X_WLAN_PROFILE_DATA_EVENTID,
801 /*RTT related event ID*/
802 WMI_10X_RTT_MEASUREMENT_REPORT_EVENTID,
803 WMI_10X_TSF_MEASUREMENT_REPORT_EVENTID,
804 WMI_10X_RTT_ERROR_REPORT_EVENTID,
806 WMI_10X_WOW_WAKEUP_HOST_EVENTID,
807 WMI_10X_DCS_INTERFERENCE_EVENTID,
809 /* TPC config for the current operating channel */
810 WMI_10X_PDEV_TPC_CONFIG_EVENTID,
812 WMI_10X_GPIO_INPUT_EVENTID,
813 WMI_10X_PDEV_UTF_EVENTID = WMI_10X_END_EVENTID-1,
817 MODE_11A = 0, /* 11a Mode */
818 MODE_11G = 1, /* 11b/g Mode */
819 MODE_11B = 2, /* 11b Mode */
820 MODE_11GONLY = 3, /* 11g only Mode */
821 MODE_11NA_HT20 = 4, /* 11a HT20 mode */
822 MODE_11NG_HT20 = 5, /* 11g HT20 mode */
823 MODE_11NA_HT40 = 6, /* 11a HT40 mode */
824 MODE_11NG_HT40 = 7, /* 11g HT40 mode */
827 MODE_11AC_VHT80 = 10,
828 /* MODE_11AC_VHT160 = 11, */
829 MODE_11AC_VHT20_2G = 11,
830 MODE_11AC_VHT40_2G = 12,
831 MODE_11AC_VHT80_2G = 13,
836 static inline const char *ath10k_wmi_phymode_str(enum wmi_phy_mode mode)
855 case MODE_11AC_VHT20:
857 case MODE_11AC_VHT40:
859 case MODE_11AC_VHT80:
861 case MODE_11AC_VHT20_2G:
862 return "11ac-vht20-2g";
863 case MODE_11AC_VHT40_2G:
864 return "11ac-vht40-2g";
865 case MODE_11AC_VHT80_2G:
866 return "11ac-vht80-2g";
871 /* no default handler to allow compiler to check that the
872 * enum is fully handled */
878 #define WMI_CHAN_LIST_TAG 0x1
879 #define WMI_SSID_LIST_TAG 0x2
880 #define WMI_BSSID_LIST_TAG 0x3
881 #define WMI_IE_TAG 0x4
885 __le32 band_center_freq1;
886 __le32 band_center_freq2; /* valid for 11ac, 80plus80 */
888 __le32 flags; /* WMI_CHAN_FLAG_ */
890 u8 mode; /* only 6 LSBs */
910 struct wmi_channel_arg {
912 u32 band_center_freq1;
918 /* note: power unit is 1/4th of dBm */
922 u32 max_antenna_gain;
924 enum wmi_phy_mode mode;
927 enum wmi_channel_change_cause {
928 WMI_CHANNEL_CHANGE_CAUSE_NONE = 0,
929 WMI_CHANNEL_CHANGE_CAUSE_CSA,
932 #define WMI_CHAN_FLAG_HT40_PLUS (1 << 6)
933 #define WMI_CHAN_FLAG_PASSIVE (1 << 7)
934 #define WMI_CHAN_FLAG_ADHOC_ALLOWED (1 << 8)
935 #define WMI_CHAN_FLAG_AP_DISABLED (1 << 9)
936 #define WMI_CHAN_FLAG_DFS (1 << 10)
937 #define WMI_CHAN_FLAG_ALLOW_HT (1 << 11)
938 #define WMI_CHAN_FLAG_ALLOW_VHT (1 << 12)
940 /* Indicate reason for channel switch */
941 #define WMI_CHANNEL_CHANGE_CAUSE_CSA (1 << 13)
943 #define WMI_MAX_SPATIAL_STREAM 3
946 #define WMI_HT_CAP_ENABLED 0x0001 /* HT Enabled/ disabled */
947 #define WMI_HT_CAP_HT20_SGI 0x0002 /* Short Guard Interval with HT20 */
948 #define WMI_HT_CAP_DYNAMIC_SMPS 0x0004 /* Dynamic MIMO powersave */
949 #define WMI_HT_CAP_TX_STBC 0x0008 /* B3 TX STBC */
950 #define WMI_HT_CAP_TX_STBC_MASK_SHIFT 3
951 #define WMI_HT_CAP_RX_STBC 0x0030 /* B4-B5 RX STBC */
952 #define WMI_HT_CAP_RX_STBC_MASK_SHIFT 4
953 #define WMI_HT_CAP_LDPC 0x0040 /* LDPC supported */
954 #define WMI_HT_CAP_L_SIG_TXOP_PROT 0x0080 /* L-SIG TXOP Protection */
955 #define WMI_HT_CAP_MPDU_DENSITY 0x0700 /* MPDU Density */
956 #define WMI_HT_CAP_MPDU_DENSITY_MASK_SHIFT 8
957 #define WMI_HT_CAP_HT40_SGI 0x0800
959 #define WMI_HT_CAP_DEFAULT_ALL (WMI_HT_CAP_ENABLED | \
960 WMI_HT_CAP_HT20_SGI | \
961 WMI_HT_CAP_HT40_SGI | \
962 WMI_HT_CAP_TX_STBC | \
963 WMI_HT_CAP_RX_STBC | \
968 * WMI_VHT_CAP_* these maps to ieee 802.11ac vht capability information
969 * field. The fields not defined here are not supported, or reserved.
970 * Do not change these masks and if you have to add new one follow the
971 * bitmask as specified by 802.11ac draft.
974 #define WMI_VHT_CAP_MAX_MPDU_LEN_MASK 0x00000003
975 #define WMI_VHT_CAP_RX_LDPC 0x00000010
976 #define WMI_VHT_CAP_SGI_80MHZ 0x00000020
977 #define WMI_VHT_CAP_TX_STBC 0x00000080
978 #define WMI_VHT_CAP_RX_STBC_MASK 0x00000300
979 #define WMI_VHT_CAP_RX_STBC_MASK_SHIFT 8
980 #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP 0x03800000
981 #define WMI_VHT_CAP_MAX_AMPDU_LEN_EXP_SHIFT 23
982 #define WMI_VHT_CAP_RX_FIXED_ANT 0x10000000
983 #define WMI_VHT_CAP_TX_FIXED_ANT 0x20000000
985 /* The following also refer for max HT AMSDU */
986 #define WMI_VHT_CAP_MAX_MPDU_LEN_3839 0x00000000
987 #define WMI_VHT_CAP_MAX_MPDU_LEN_7935 0x00000001
988 #define WMI_VHT_CAP_MAX_MPDU_LEN_11454 0x00000002
990 #define WMI_VHT_CAP_DEFAULT_ALL (WMI_VHT_CAP_MAX_MPDU_LEN_11454 | \
991 WMI_VHT_CAP_RX_LDPC | \
992 WMI_VHT_CAP_SGI_80MHZ | \
993 WMI_VHT_CAP_TX_STBC | \
994 WMI_VHT_CAP_RX_STBC_MASK | \
995 WMI_VHT_CAP_MAX_AMPDU_LEN_EXP | \
996 WMI_VHT_CAP_RX_FIXED_ANT | \
997 WMI_VHT_CAP_TX_FIXED_ANT)
1000 * Interested readers refer to Rx/Tx MCS Map definition as defined in
1003 #define WMI_VHT_MAX_MCS_4_SS_MASK(r, ss) ((3 & (r)) << (((ss) - 1) << 1))
1004 #define WMI_VHT_MAX_SUPP_RATE_MASK 0x1fff0000
1005 #define WMI_VHT_MAX_SUPP_RATE_MASK_SHIFT 16
1008 REGDMN_MODE_11A = 0x00001, /* 11a channels */
1009 REGDMN_MODE_TURBO = 0x00002, /* 11a turbo-only channels */
1010 REGDMN_MODE_11B = 0x00004, /* 11b channels */
1011 REGDMN_MODE_PUREG = 0x00008, /* 11g channels (OFDM only) */
1012 REGDMN_MODE_11G = 0x00008, /* XXX historical */
1013 REGDMN_MODE_108G = 0x00020, /* 11a+Turbo channels */
1014 REGDMN_MODE_108A = 0x00040, /* 11g+Turbo channels */
1015 REGDMN_MODE_XR = 0x00100, /* XR channels */
1016 REGDMN_MODE_11A_HALF_RATE = 0x00200, /* 11A half rate channels */
1017 REGDMN_MODE_11A_QUARTER_RATE = 0x00400, /* 11A quarter rate channels */
1018 REGDMN_MODE_11NG_HT20 = 0x00800, /* 11N-G HT20 channels */
1019 REGDMN_MODE_11NA_HT20 = 0x01000, /* 11N-A HT20 channels */
1020 REGDMN_MODE_11NG_HT40PLUS = 0x02000, /* 11N-G HT40 + channels */
1021 REGDMN_MODE_11NG_HT40MINUS = 0x04000, /* 11N-G HT40 - channels */
1022 REGDMN_MODE_11NA_HT40PLUS = 0x08000, /* 11N-A HT40 + channels */
1023 REGDMN_MODE_11NA_HT40MINUS = 0x10000, /* 11N-A HT40 - channels */
1024 REGDMN_MODE_11AC_VHT20 = 0x20000, /* 5Ghz, VHT20 */
1025 REGDMN_MODE_11AC_VHT40PLUS = 0x40000, /* 5Ghz, VHT40 + channels */
1026 REGDMN_MODE_11AC_VHT40MINUS = 0x80000, /* 5Ghz VHT40 - channels */
1027 REGDMN_MODE_11AC_VHT80 = 0x100000, /* 5Ghz, VHT80 channels */
1028 REGDMN_MODE_ALL = 0xffffffff
1031 #define REGDMN_CAP1_CHAN_HALF_RATE 0x00000001
1032 #define REGDMN_CAP1_CHAN_QUARTER_RATE 0x00000002
1033 #define REGDMN_CAP1_CHAN_HAL49GHZ 0x00000004
1035 /* regulatory capabilities */
1036 #define REGDMN_EEPROM_EEREGCAP_EN_FCC_MIDBAND 0x0040
1037 #define REGDMN_EEPROM_EEREGCAP_EN_KK_U1_EVEN 0x0080
1038 #define REGDMN_EEPROM_EEREGCAP_EN_KK_U2 0x0100
1039 #define REGDMN_EEPROM_EEREGCAP_EN_KK_MIDBAND 0x0200
1040 #define REGDMN_EEPROM_EEREGCAP_EN_KK_U1_ODD 0x0400
1041 #define REGDMN_EEPROM_EEREGCAP_EN_KK_NEW_11A 0x0800
1043 struct hal_reg_capabilities {
1044 /* regdomain value specified in EEPROM */
1047 __le32 eeprom_rd_ext;
1048 /* CAP1 capabilities bit map. */
1050 /* REGDMN EEPROM CAP. */
1053 __le32 wireless_modes;
1054 __le32 low_2ghz_chan;
1055 __le32 high_2ghz_chan;
1056 __le32 low_5ghz_chan;
1057 __le32 high_5ghz_chan;
1060 enum wlan_mode_capability {
1061 WHAL_WLAN_11A_CAPABILITY = 0x1,
1062 WHAL_WLAN_11G_CAPABILITY = 0x2,
1063 WHAL_WLAN_11AG_CAPABILITY = 0x3,
1066 /* structure used by FW for requesting host memory */
1067 struct wlan_host_mem_req {
1068 /* ID of the request */
1070 /* size of the of each unit */
1072 /* flags to indicate that
1073 * the number units is dependent
1074 * on number of resources(num vdevs num peers .. etc)
1076 __le32 num_unit_info;
1078 * actual number of units to allocate . if flags in the num_unit_info
1079 * indicate that number of units is tied to number of a particular
1080 * resource to allocate then num_units filed is set to 0 and host
1081 * will derive the number units from number of the resources it is
1087 #define WMI_SERVICE_IS_ENABLED(wmi_svc_bmap, svc_id) \
1088 ((((wmi_svc_bmap)[(svc_id)/(sizeof(u32))]) & \
1089 (1 << ((svc_id)%(sizeof(u32))))) != 0)
1092 * The following struct holds optional payload for
1093 * wmi_service_ready_event,e.g., 11ac pass some of the
1094 * device capability to the host.
1096 struct wmi_service_ready_event {
1098 __le32 sw_version_1;
1100 /* WMI_PHY_CAPABILITY */
1101 __le32 phy_capability;
1102 /* Maximum number of frag table entries that SW will populate less 1 */
1103 __le32 max_frag_entry;
1104 __le32 wmi_service_bitmap[WMI_SERVICE_BM_SIZE];
1105 __le32 num_rf_chains;
1107 * The following field is only valid for service type
1110 __le32 ht_cap_info; /* WMI HT Capability */
1111 __le32 vht_cap_info; /* VHT capability info field of 802.11ac */
1112 __le32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
1113 __le32 hw_min_tx_power;
1114 __le32 hw_max_tx_power;
1115 struct hal_reg_capabilities hal_reg_capabilities;
1116 __le32 sys_cap_info;
1117 __le32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
1119 * Max beacon and Probe Response IE offload size
1120 * (includes optional P2P IEs)
1122 __le32 max_bcn_ie_size;
1124 * request to host to allocate a chuck of memory and pss it down to FW
1125 * via WM_INIT. FW uses this as FW extesnsion memory for saving its
1126 * data structures. Only valid for low latency interfaces like PCIE
1127 * where FW can access this memory directly (or) by DMA.
1129 __le32 num_mem_reqs;
1130 struct wlan_host_mem_req mem_reqs[1];
1133 /* This is the definition from 10.X firmware branch */
1134 struct wmi_service_ready_event_10x {
1138 /* WMI_PHY_CAPABILITY */
1139 __le32 phy_capability;
1141 /* Maximum number of frag table entries that SW will populate less 1 */
1142 __le32 max_frag_entry;
1143 __le32 wmi_service_bitmap[WMI_SERVICE_BM_SIZE];
1144 __le32 num_rf_chains;
1147 * The following field is only valid for service type
1150 __le32 ht_cap_info; /* WMI HT Capability */
1151 __le32 vht_cap_info; /* VHT capability info field of 802.11ac */
1152 __le32 vht_supp_mcs; /* VHT Supported MCS Set field Rx/Tx same */
1153 __le32 hw_min_tx_power;
1154 __le32 hw_max_tx_power;
1156 struct hal_reg_capabilities hal_reg_capabilities;
1158 __le32 sys_cap_info;
1159 __le32 min_pkt_size_enable; /* Enterprise mode short pkt enable */
1162 * request to host to allocate a chuck of memory and pss it down to FW
1163 * via WM_INIT. FW uses this as FW extesnsion memory for saving its
1164 * data structures. Only valid for low latency interfaces like PCIE
1165 * where FW can access this memory directly (or) by DMA.
1167 __le32 num_mem_reqs;
1169 struct wlan_host_mem_req mem_reqs[1];
1173 #define WMI_SERVICE_READY_TIMEOUT_HZ (5*HZ)
1174 #define WMI_UNIFIED_READY_TIMEOUT_HZ (5*HZ)
1176 struct wmi_ready_event {
1179 struct wmi_mac_addr mac_addr;
1183 struct wmi_resource_config {
1184 /* number of virtual devices (VAPs) to support */
1187 /* number of peer nodes to support */
1191 * In offload mode target supports features like WOW, chatter and
1192 * other protocol offloads. In order to support them some
1193 * functionalities like reorder buffering, PN checking need to be
1194 * done in target. This determines maximum number of peers suported
1195 * by target in offload mode
1197 __le32 num_offload_peers;
1199 /* For target-based RX reordering */
1200 __le32 num_offload_reorder_bufs;
1202 /* number of keys per peer */
1203 __le32 num_peer_keys;
1205 /* total number of TX/RX data TIDs */
1209 * max skid for resolving hash collisions
1211 * The address search table is sparse, so that if two MAC addresses
1212 * result in the same hash value, the second of these conflicting
1213 * entries can slide to the next index in the address search table,
1214 * and use it, if it is unoccupied. This ast_skid_limit parameter
1215 * specifies the upper bound on how many subsequent indices to search
1216 * over to find an unoccupied space.
1218 __le32 ast_skid_limit;
1221 * the nominal chain mask for transmit
1223 * The chain mask may be modified dynamically, e.g. to operate AP
1224 * tx with a reduced number of chains if no clients are associated.
1225 * This configuration parameter specifies the nominal chain-mask that
1226 * should be used when not operating with a reduced set of tx chains.
1228 __le32 tx_chain_mask;
1231 * the nominal chain mask for receive
1233 * The chain mask may be modified dynamically, e.g. for a client
1234 * to use a reduced number of chains for receive if the traffic to
1235 * the client is low enough that it doesn't require downlink MIMO
1236 * or antenna diversity.
1237 * This configuration parameter specifies the nominal chain-mask that
1238 * should be used when not operating with a reduced set of rx chains.
1240 __le32 rx_chain_mask;
1243 * what rx reorder timeout (ms) to use for the AC
1245 * Each WMM access class (voice, video, best-effort, background) will
1246 * have its own timeout value to dictate how long to wait for missing
1247 * rx MPDUs to arrive before flushing subsequent MPDUs that have
1248 * already been received.
1249 * This parameter specifies the timeout in milliseconds for each
1252 __le32 rx_timeout_pri_vi;
1253 __le32 rx_timeout_pri_vo;
1254 __le32 rx_timeout_pri_be;
1255 __le32 rx_timeout_pri_bk;
1258 * what mode the rx should decap packets to
1260 * MAC can decap to RAW (no decap), native wifi or Ethernet types
1261 * THis setting also determines the default TX behavior, however TX
1262 * behavior can be modified on a per VAP basis during VAP init
1264 __le32 rx_decap_mode;
1266 /* what is the maximum scan requests than can be queued */
1267 __le32 scan_max_pending_reqs;
1269 /* maximum VDEV that could use BMISS offload */
1270 __le32 bmiss_offload_max_vdev;
1272 /* maximum VDEV that could use offload roaming */
1273 __le32 roam_offload_max_vdev;
1275 /* maximum AP profiles that would push to offload roaming */
1276 __le32 roam_offload_max_ap_profiles;
1279 * how many groups to use for mcast->ucast conversion
1281 * The target's WAL maintains a table to hold information regarding
1282 * which peers belong to a given multicast group, so that if
1283 * multicast->unicast conversion is enabled, the target can convert
1284 * multicast tx frames to a series of unicast tx frames, to each
1285 * peer within the multicast group.
1286 This num_mcast_groups configuration parameter tells the target how
1287 * many multicast groups to provide storage for within its multicast
1288 * group membership table.
1290 __le32 num_mcast_groups;
1293 * size to alloc for the mcast membership table
1295 * This num_mcast_table_elems configuration parameter tells the
1296 * target how many peer elements it needs to provide storage for in
1297 * its multicast group membership table.
1298 * These multicast group membership table elements are shared by the
1299 * multicast groups stored within the table.
1301 __le32 num_mcast_table_elems;
1304 * whether/how to do multicast->unicast conversion
1306 * This configuration parameter specifies whether the target should
1307 * perform multicast --> unicast conversion on transmit, and if so,
1308 * what to do if it finds no entries in its multicast group
1309 * membership table for the multicast IP address in the tx frame.
1310 * Configuration value:
1311 * 0 -> Do not perform multicast to unicast conversion.
1312 * 1 -> Convert multicast frames to unicast, if the IP multicast
1313 * address from the tx frame is found in the multicast group
1314 * membership table. If the IP multicast address is not found,
1316 * 2 -> Convert multicast frames to unicast, if the IP multicast
1317 * address from the tx frame is found in the multicast group
1318 * membership table. If the IP multicast address is not found,
1319 * transmit the frame as multicast.
1321 __le32 mcast2ucast_mode;
1324 * how much memory to allocate for a tx PPDU dbg log
1326 * This parameter controls how much memory the target will allocate
1327 * to store a log of tx PPDU meta-information (how large the PPDU
1328 * was, when it was sent, whether it was successful, etc.)
1330 __le32 tx_dbg_log_size;
1332 /* how many AST entries to be allocated for WDS */
1333 __le32 num_wds_entries;
1336 * MAC DMA burst size, e.g., For target PCI limit can be
1337 * 0 -default, 1 256B
1339 __le32 dma_burst_size;
1342 * Fixed delimiters to be inserted after every MPDU to
1343 * account for interface latency to avoid underrun.
1345 __le32 mac_aggr_delim;
1348 * determine whether target is responsible for detecting duplicate
1349 * non-aggregate MPDU and timing out stale fragments.
1351 * A-MPDU reordering is always performed on the target.
1353 * 0: target responsible for frag timeout and dup checking
1354 * 1: host responsible for frag timeout and dup checking
1356 __le32 rx_skip_defrag_timeout_dup_detection_check;
1359 * Configuration for VoW :
1360 * No of Video Nodes to be supported
1361 * and Max no of descriptors for each Video link (node).
1365 /* maximum VDEV that could use GTK offload */
1366 __le32 gtk_offload_max_vdev;
1368 /* Number of msdu descriptors target should use */
1369 __le32 num_msdu_desc;
1372 * Max. number of Tx fragments per MSDU
1373 * This parameter controls the max number of Tx fragments per MSDU.
1374 * This is sent by the target as part of the WMI_SERVICE_READY event
1375 * and is overriden by the OS shim as required.
1377 __le32 max_frag_entries;
1380 struct wmi_resource_config_10x {
1381 /* number of virtual devices (VAPs) to support */
1384 /* number of peer nodes to support */
1387 /* number of keys per peer */
1388 __le32 num_peer_keys;
1390 /* total number of TX/RX data TIDs */
1394 * max skid for resolving hash collisions
1396 * The address search table is sparse, so that if two MAC addresses
1397 * result in the same hash value, the second of these conflicting
1398 * entries can slide to the next index in the address search table,
1399 * and use it, if it is unoccupied. This ast_skid_limit parameter
1400 * specifies the upper bound on how many subsequent indices to search
1401 * over to find an unoccupied space.
1403 __le32 ast_skid_limit;
1406 * the nominal chain mask for transmit
1408 * The chain mask may be modified dynamically, e.g. to operate AP
1409 * tx with a reduced number of chains if no clients are associated.
1410 * This configuration parameter specifies the nominal chain-mask that
1411 * should be used when not operating with a reduced set of tx chains.
1413 __le32 tx_chain_mask;
1416 * the nominal chain mask for receive
1418 * The chain mask may be modified dynamically, e.g. for a client
1419 * to use a reduced number of chains for receive if the traffic to
1420 * the client is low enough that it doesn't require downlink MIMO
1421 * or antenna diversity.
1422 * This configuration parameter specifies the nominal chain-mask that
1423 * should be used when not operating with a reduced set of rx chains.
1425 __le32 rx_chain_mask;
1428 * what rx reorder timeout (ms) to use for the AC
1430 * Each WMM access class (voice, video, best-effort, background) will
1431 * have its own timeout value to dictate how long to wait for missing
1432 * rx MPDUs to arrive before flushing subsequent MPDUs that have
1433 * already been received.
1434 * This parameter specifies the timeout in milliseconds for each
1437 __le32 rx_timeout_pri_vi;
1438 __le32 rx_timeout_pri_vo;
1439 __le32 rx_timeout_pri_be;
1440 __le32 rx_timeout_pri_bk;
1443 * what mode the rx should decap packets to
1445 * MAC can decap to RAW (no decap), native wifi or Ethernet types
1446 * THis setting also determines the default TX behavior, however TX
1447 * behavior can be modified on a per VAP basis during VAP init
1449 __le32 rx_decap_mode;
1451 /* what is the maximum scan requests than can be queued */
1452 __le32 scan_max_pending_reqs;
1454 /* maximum VDEV that could use BMISS offload */
1455 __le32 bmiss_offload_max_vdev;
1457 /* maximum VDEV that could use offload roaming */
1458 __le32 roam_offload_max_vdev;
1460 /* maximum AP profiles that would push to offload roaming */
1461 __le32 roam_offload_max_ap_profiles;
1464 * how many groups to use for mcast->ucast conversion
1466 * The target's WAL maintains a table to hold information regarding
1467 * which peers belong to a given multicast group, so that if
1468 * multicast->unicast conversion is enabled, the target can convert
1469 * multicast tx frames to a series of unicast tx frames, to each
1470 * peer within the multicast group.
1471 This num_mcast_groups configuration parameter tells the target how
1472 * many multicast groups to provide storage for within its multicast
1473 * group membership table.
1475 __le32 num_mcast_groups;
1478 * size to alloc for the mcast membership table
1480 * This num_mcast_table_elems configuration parameter tells the
1481 * target how many peer elements it needs to provide storage for in
1482 * its multicast group membership table.
1483 * These multicast group membership table elements are shared by the
1484 * multicast groups stored within the table.
1486 __le32 num_mcast_table_elems;
1489 * whether/how to do multicast->unicast conversion
1491 * This configuration parameter specifies whether the target should
1492 * perform multicast --> unicast conversion on transmit, and if so,
1493 * what to do if it finds no entries in its multicast group
1494 * membership table for the multicast IP address in the tx frame.
1495 * Configuration value:
1496 * 0 -> Do not perform multicast to unicast conversion.
1497 * 1 -> Convert multicast frames to unicast, if the IP multicast
1498 * address from the tx frame is found in the multicast group
1499 * membership table. If the IP multicast address is not found,
1501 * 2 -> Convert multicast frames to unicast, if the IP multicast
1502 * address from the tx frame is found in the multicast group
1503 * membership table. If the IP multicast address is not found,
1504 * transmit the frame as multicast.
1506 __le32 mcast2ucast_mode;
1509 * how much memory to allocate for a tx PPDU dbg log
1511 * This parameter controls how much memory the target will allocate
1512 * to store a log of tx PPDU meta-information (how large the PPDU
1513 * was, when it was sent, whether it was successful, etc.)
1515 __le32 tx_dbg_log_size;
1517 /* how many AST entries to be allocated for WDS */
1518 __le32 num_wds_entries;
1521 * MAC DMA burst size, e.g., For target PCI limit can be
1522 * 0 -default, 1 256B
1524 __le32 dma_burst_size;
1527 * Fixed delimiters to be inserted after every MPDU to
1528 * account for interface latency to avoid underrun.
1530 __le32 mac_aggr_delim;
1533 * determine whether target is responsible for detecting duplicate
1534 * non-aggregate MPDU and timing out stale fragments.
1536 * A-MPDU reordering is always performed on the target.
1538 * 0: target responsible for frag timeout and dup checking
1539 * 1: host responsible for frag timeout and dup checking
1541 __le32 rx_skip_defrag_timeout_dup_detection_check;
1544 * Configuration for VoW :
1545 * No of Video Nodes to be supported
1546 * and Max no of descriptors for each Video link (node).
1550 /* Number of msdu descriptors target should use */
1551 __le32 num_msdu_desc;
1554 * Max. number of Tx fragments per MSDU
1555 * This parameter controls the max number of Tx fragments per MSDU.
1556 * This is sent by the target as part of the WMI_SERVICE_READY event
1557 * and is overriden by the OS shim as required.
1559 __le32 max_frag_entries;
1563 #define NUM_UNITS_IS_NUM_VDEVS 0x1
1564 #define NUM_UNITS_IS_NUM_PEERS 0x2
1566 /* strucutre describing host memory chunk. */
1567 struct host_memory_chunk {
1568 /* id of the request that is passed up in service ready */
1570 /* the physical address the memory chunk */
1572 /* size of the chunk */
1576 struct wmi_init_cmd {
1577 struct wmi_resource_config resource_config;
1578 __le32 num_host_mem_chunks;
1581 * variable number of host memory chunks.
1582 * This should be the last element in the structure
1584 struct host_memory_chunk host_mem_chunks[1];
1587 /* _10x stucture is from 10.X FW API */
1588 struct wmi_init_cmd_10x {
1589 struct wmi_resource_config_10x resource_config;
1590 __le32 num_host_mem_chunks;
1593 * variable number of host memory chunks.
1594 * This should be the last element in the structure
1596 struct host_memory_chunk host_mem_chunks[1];
1599 /* TLV for channel list */
1600 struct wmi_chan_list {
1601 __le32 tag; /* WMI_CHAN_LIST_TAG */
1603 __le32 channel_list[0];
1606 struct wmi_bssid_list {
1607 __le32 tag; /* WMI_BSSID_LIST_TAG */
1609 struct wmi_mac_addr bssid_list[0];
1612 struct wmi_ie_data {
1613 __le32 tag; /* WMI_IE_TAG */
1623 struct wmi_ssid_list {
1624 __le32 tag; /* WMI_SSID_LIST_TAG */
1626 struct wmi_ssid ssids[0];
1629 /* prefix used by scan requestor ids on the host */
1630 #define WMI_HOST_SCAN_REQUESTOR_ID_PREFIX 0xA000
1632 /* prefix used by scan request ids generated on the host */
1633 /* host cycles through the lower 12 bits to generate ids */
1634 #define WMI_HOST_SCAN_REQ_ID_PREFIX 0xA000
1636 #define WLAN_SCAN_PARAMS_MAX_SSID 16
1637 #define WLAN_SCAN_PARAMS_MAX_BSSID 4
1638 #define WLAN_SCAN_PARAMS_MAX_IE_LEN 256
1640 /* Scan priority numbers must be sequential, starting with 0 */
1641 enum wmi_scan_priority {
1642 WMI_SCAN_PRIORITY_VERY_LOW = 0,
1643 WMI_SCAN_PRIORITY_LOW,
1644 WMI_SCAN_PRIORITY_MEDIUM,
1645 WMI_SCAN_PRIORITY_HIGH,
1646 WMI_SCAN_PRIORITY_VERY_HIGH,
1647 WMI_SCAN_PRIORITY_COUNT /* number of priorities supported */
1650 struct wmi_start_scan_cmd {
1653 /* Scan requestor ID */
1655 /* VDEV id(interface) that is requesting scan */
1657 /* Scan Priority, input to scan scheduler */
1658 __le32 scan_priority;
1659 /* Scan events subscription */
1660 __le32 notify_scan_events;
1661 /* dwell time in msec on active channels */
1662 __le32 dwell_time_active;
1663 /* dwell time in msec on passive channels */
1664 __le32 dwell_time_passive;
1666 * min time in msec on the BSS channel,only valid if atleast one
1669 __le32 min_rest_time;
1671 * max rest time in msec on the BSS channel,only valid if at least
1672 * one VDEV is active
1675 * the scanner will rest on the bss channel at least min_rest_time
1676 * after min_rest_time the scanner will start checking for tx/rx
1677 * activity on all VDEVs. if there is no activity the scanner will
1678 * switch to off channel. if there is activity the scanner will let
1679 * the radio on the bss channel until max_rest_time expires.at
1680 * max_rest_time scanner will switch to off channel irrespective of
1681 * activity. activity is determined by the idle_time parameter.
1683 __le32 max_rest_time;
1685 * time before sending next set of probe requests.
1686 * The scanner keeps repeating probe requests transmission with
1687 * period specified by repeat_probe_time.
1688 * The number of probe requests specified depends on the ssid_list
1691 __le32 repeat_probe_time;
1692 /* time in msec between 2 consequetive probe requests with in a set. */
1693 __le32 probe_spacing_time;
1695 * data inactivity time in msec on bss channel that will be used by
1696 * scanner for measuring the inactivity.
1699 /* maximum time in msec allowed for scan */
1700 __le32 max_scan_time;
1702 * delay in msec before sending first probe request after switching
1706 /* Scan control flags */
1707 __le32 scan_ctrl_flags;
1709 /* Burst duration time in msecs */
1710 __le32 burst_duration;
1712 * TLV (tag length value ) paramerters follow the scan_cmd structure.
1713 * TLV can contain channel list, bssid list, ssid list and
1714 * ie. the TLV tags are defined above;
1718 struct wmi_ssid_arg {
1723 struct wmi_bssid_arg {
1727 struct wmi_start_scan_arg {
1732 u32 notify_scan_events;
1733 u32 dwell_time_active;
1734 u32 dwell_time_passive;
1737 u32 repeat_probe_time;
1738 u32 probe_spacing_time;
1742 u32 scan_ctrl_flags;
1749 u8 ie[WLAN_SCAN_PARAMS_MAX_IE_LEN];
1751 struct wmi_ssid_arg ssids[WLAN_SCAN_PARAMS_MAX_SSID];
1752 struct wmi_bssid_arg bssids[WLAN_SCAN_PARAMS_MAX_BSSID];
1755 /* scan control flags */
1757 /* passively scan all channels including active channels */
1758 #define WMI_SCAN_FLAG_PASSIVE 0x1
1759 /* add wild card ssid probe request even though ssid_list is specified. */
1760 #define WMI_SCAN_ADD_BCAST_PROBE_REQ 0x2
1761 /* add cck rates to rates/xrate ie for the generated probe request */
1762 #define WMI_SCAN_ADD_CCK_RATES 0x4
1763 /* add ofdm rates to rates/xrate ie for the generated probe request */
1764 #define WMI_SCAN_ADD_OFDM_RATES 0x8
1765 /* To enable indication of Chan load and Noise floor to host */
1766 #define WMI_SCAN_CHAN_STAT_EVENT 0x10
1767 /* Filter Probe request frames */
1768 #define WMI_SCAN_FILTER_PROBE_REQ 0x20
1769 /* When set, DFS channels will not be scanned */
1770 #define WMI_SCAN_BYPASS_DFS_CHN 0x40
1771 /* Different FW scan engine may choose to bail out on errors.
1772 * Allow the driver to have influence over that. */
1773 #define WMI_SCAN_CONTINUE_ON_ERROR 0x80
1775 /* WMI_SCAN_CLASS_MASK must be the same value as IEEE80211_SCAN_CLASS_MASK */
1776 #define WMI_SCAN_CLASS_MASK 0xFF000000
1779 enum wmi_stop_scan_type {
1780 WMI_SCAN_STOP_ONE = 0x00000000, /* stop by scan_id */
1781 WMI_SCAN_STOP_VDEV_ALL = 0x01000000, /* stop by vdev_id */
1782 WMI_SCAN_STOP_ALL = 0x04000000, /* stop all scans */
1785 struct wmi_stop_scan_cmd {
1792 struct wmi_stop_scan_arg {
1794 enum wmi_stop_scan_type req_type;
1801 struct wmi_scan_chan_list_cmd {
1802 __le32 num_scan_chans;
1803 struct wmi_channel chan_info[0];
1806 struct wmi_scan_chan_list_arg {
1808 struct wmi_channel_arg *channels;
1811 enum wmi_bss_filter {
1812 WMI_BSS_FILTER_NONE = 0, /* no beacons forwarded */
1813 WMI_BSS_FILTER_ALL, /* all beacons forwarded */
1814 WMI_BSS_FILTER_PROFILE, /* only beacons matching profile */
1815 WMI_BSS_FILTER_ALL_BUT_PROFILE, /* all but beacons matching profile */
1816 WMI_BSS_FILTER_CURRENT_BSS, /* only beacons matching current BSS */
1817 WMI_BSS_FILTER_ALL_BUT_BSS, /* all but beacons matching BSS */
1818 WMI_BSS_FILTER_PROBED_SSID, /* beacons matching probed ssid */
1819 WMI_BSS_FILTER_LAST_BSS, /* marker only */
1822 enum wmi_scan_event_type {
1823 WMI_SCAN_EVENT_STARTED = 0x1,
1824 WMI_SCAN_EVENT_COMPLETED = 0x2,
1825 WMI_SCAN_EVENT_BSS_CHANNEL = 0x4,
1826 WMI_SCAN_EVENT_FOREIGN_CHANNEL = 0x8,
1827 WMI_SCAN_EVENT_DEQUEUED = 0x10,
1828 WMI_SCAN_EVENT_PREEMPTED = 0x20, /* possibly by high-prio scan */
1829 WMI_SCAN_EVENT_START_FAILED = 0x40,
1830 WMI_SCAN_EVENT_RESTARTED = 0x80,
1831 WMI_SCAN_EVENT_MAX = 0x8000
1834 enum wmi_scan_completion_reason {
1835 WMI_SCAN_REASON_COMPLETED,
1836 WMI_SCAN_REASON_CANCELLED,
1837 WMI_SCAN_REASON_PREEMPTED,
1838 WMI_SCAN_REASON_TIMEDOUT,
1839 WMI_SCAN_REASON_MAX,
1842 struct wmi_scan_event {
1843 __le32 event_type; /* %WMI_SCAN_EVENT_ */
1844 __le32 reason; /* %WMI_SCAN_REASON_ */
1845 __le32 channel_freq; /* only valid for WMI_SCAN_EVENT_FOREIGN_CHANNEL */
1852 * This defines how much headroom is kept in the
1853 * receive frame between the descriptor and the
1854 * payload, in order for the WMI PHY error and
1855 * management handler to insert header contents.
1859 #define WMI_MGMT_RX_HDR_HEADROOM 52
1862 * This event will be used for sending scan results
1863 * as well as rx mgmt frames to the host. The rx buffer
1864 * will be sent as part of this WMI event. It would be a
1865 * good idea to pass all the fields in the RX status
1866 * descriptor up to the host.
1868 struct wmi_mgmt_rx_hdr_v1 {
1874 __le32 status; /* %WMI_RX_STATUS_ */
1877 struct wmi_mgmt_rx_hdr_v2 {
1878 struct wmi_mgmt_rx_hdr_v1 v1;
1882 struct wmi_mgmt_rx_event_v1 {
1883 struct wmi_mgmt_rx_hdr_v1 hdr;
1887 struct wmi_mgmt_rx_event_v2 {
1888 struct wmi_mgmt_rx_hdr_v2 hdr;
1892 #define WMI_RX_STATUS_OK 0x00
1893 #define WMI_RX_STATUS_ERR_CRC 0x01
1894 #define WMI_RX_STATUS_ERR_DECRYPT 0x08
1895 #define WMI_RX_STATUS_ERR_MIC 0x10
1896 #define WMI_RX_STATUS_ERR_KEY_CACHE_MISS 0x20
1898 struct wmi_single_phyerr_rx_hdr {
1900 __le32 tsf_timestamp;
1903 * Current freq1, freq2
1906 * [15:8] : freq1[hi]
1907 * [23:16]: freq2[lo]
1908 * [31:24]: freq2[hi]
1914 * Combined RSSI over all chains and channel width for this PHY error
1916 * [7:0]: RSSI combined
1917 * [15:8]: Channel width (MHz)
1918 * [23:16]: PHY error code
1919 * [24:16]: reserved (future use)
1927 * RSSI on chain 0 through 3
1929 * This is formatted the same as the PPDU_START RX descriptor
1944 * Last calibrated NF value for chain 0 through 3
1948 * + [15:0] - chain 0
1949 * + [31:16] - chain 1
1953 * + [15:0] - chain 2
1954 * + [31:16] - chain 3
1960 /* Length of the frame */
1964 struct wmi_single_phyerr_rx_event {
1965 /* Phy error event header */
1966 struct wmi_single_phyerr_rx_hdr hdr;
1971 struct wmi_comb_phyerr_rx_hdr {
1972 /* Phy error phy error count */
1973 __le32 num_phyerr_events;
1978 struct wmi_comb_phyerr_rx_event {
1979 /* Phy error phy error count */
1980 struct wmi_comb_phyerr_rx_hdr hdr;
1982 * frame buffer - contains multiple payloads in the order:
1983 * header - payload, header - payload...
1984 * (The header is of type: wmi_single_phyerr_rx_hdr)
1989 struct wmi_mgmt_tx_hdr {
1991 struct wmi_mac_addr peer_macaddr;
1997 struct wmi_mgmt_tx_cmd {
1998 struct wmi_mgmt_tx_hdr hdr;
2002 struct wmi_echo_event {
2006 struct wmi_echo_cmd {
2011 struct wmi_pdev_set_regdomain_cmd {
2013 __le32 reg_domain_2G;
2014 __le32 reg_domain_5G;
2015 __le32 conformance_test_limit_2G;
2016 __le32 conformance_test_limit_5G;
2019 /* Command to set/unset chip in quiet mode */
2020 struct wmi_pdev_set_quiet_cmd {
2024 /* duration in TUs */
2030 /* enable/disable */
2036 * 802.11g protection mode.
2038 enum ath10k_protmode {
2039 ATH10K_PROT_NONE = 0, /* no protection */
2040 ATH10K_PROT_CTSONLY = 1, /* CTS to self */
2041 ATH10K_PROT_RTSCTS = 2, /* RTS-CTS */
2044 enum wmi_beacon_gen_mode {
2045 WMI_BEACON_STAGGERED_MODE = 0,
2046 WMI_BEACON_BURST_MODE = 1
2049 enum wmi_csa_event_ies_present_flag {
2050 WMI_CSA_IE_PRESENT = 0x00000001,
2051 WMI_XCSA_IE_PRESENT = 0x00000002,
2052 WMI_WBW_IE_PRESENT = 0x00000004,
2053 WMI_CSWARP_IE_PRESENT = 0x00000008,
2056 /* wmi CSA receive event from beacon frame */
2057 struct wmi_csa_event {
2060 /* Bit 16-31: DUR */
2061 struct wmi_mac_addr i_addr1;
2062 struct wmi_mac_addr i_addr2;
2067 __le32 ies_present_flag; /* wmi_csa_event_ies_present_flag */
2070 /* the definition of different PDEV parameters */
2071 #define PDEV_DEFAULT_STATS_UPDATE_PERIOD 500
2072 #define VDEV_DEFAULT_STATS_UPDATE_PERIOD 500
2073 #define PEER_DEFAULT_STATS_UPDATE_PERIOD 500
2075 struct wmi_pdev_param_map {
2078 u32 txpower_limit2g;
2079 u32 txpower_limit5g;
2081 u32 beacon_gen_mode;
2083 u32 resmgr_offchan_mode;
2084 u32 protection_mode;
2086 u32 non_agg_sw_retry_th;
2087 u32 agg_sw_retry_th;
2089 u32 ac_aggrsize_scaling;
2091 u32 ltr_ac_latency_be;
2092 u32 ltr_ac_latency_bk;
2093 u32 ltr_ac_latency_vi;
2094 u32 ltr_ac_latency_vo;
2095 u32 ltr_ac_latency_timeout;
2096 u32 ltr_sleep_override;
2097 u32 ltr_rx_override;
2098 u32 ltr_tx_activity_timeout;
2101 u32 pcielp_txbuf_flush;
2102 u32 pcielp_txbuf_watermark;
2103 u32 pcielp_txbuf_tmo_en;
2104 u32 pcielp_txbuf_tmo_value;
2105 u32 pdev_stats_update_period;
2106 u32 vdev_stats_update_period;
2107 u32 peer_stats_update_period;
2108 u32 bcnflt_stats_update_period;
2110 u32 arp_ac_override;
2111 u32 arpdhcp_ac_override;
2114 u32 ani_poll_period;
2115 u32 ani_listen_period;
2121 u32 power_gating_sleep;
2122 u32 fast_channel_reset;
2127 #define WMI_PDEV_PARAM_UNSUPPORTED 0
2129 enum wmi_pdev_param {
2131 WMI_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
2133 WMI_PDEV_PARAM_RX_CHAIN_MASK,
2134 /* TX power limit for 2G Radio */
2135 WMI_PDEV_PARAM_TXPOWER_LIMIT2G,
2136 /* TX power limit for 5G Radio */
2137 WMI_PDEV_PARAM_TXPOWER_LIMIT5G,
2138 /* TX power scale */
2139 WMI_PDEV_PARAM_TXPOWER_SCALE,
2140 /* Beacon generation mode . 0: host, 1: target */
2141 WMI_PDEV_PARAM_BEACON_GEN_MODE,
2142 /* Beacon generation mode . 0: staggered 1: bursted */
2143 WMI_PDEV_PARAM_BEACON_TX_MODE,
2145 * Resource manager off chan mode .
2146 * 0: turn off off chan mode. 1: turn on offchan mode
2148 WMI_PDEV_PARAM_RESMGR_OFFCHAN_MODE,
2151 * 0: no protection 1:use CTS-to-self 2: use RTS/CTS
2153 WMI_PDEV_PARAM_PROTECTION_MODE,
2154 /* Dynamic bandwidth 0: disable 1: enable */
2155 WMI_PDEV_PARAM_DYNAMIC_BW,
2156 /* Non aggregrate/ 11g sw retry threshold.0-disable */
2157 WMI_PDEV_PARAM_NON_AGG_SW_RETRY_TH,
2158 /* aggregrate sw retry threshold. 0-disable*/
2159 WMI_PDEV_PARAM_AGG_SW_RETRY_TH,
2160 /* Station kickout threshold (non of consecutive failures).0-disable */
2161 WMI_PDEV_PARAM_STA_KICKOUT_TH,
2162 /* Aggerate size scaling configuration per AC */
2163 WMI_PDEV_PARAM_AC_AGGRSIZE_SCALING,
2165 WMI_PDEV_PARAM_LTR_ENABLE,
2166 /* LTR latency for BE, in us */
2167 WMI_PDEV_PARAM_LTR_AC_LATENCY_BE,
2168 /* LTR latency for BK, in us */
2169 WMI_PDEV_PARAM_LTR_AC_LATENCY_BK,
2170 /* LTR latency for VI, in us */
2171 WMI_PDEV_PARAM_LTR_AC_LATENCY_VI,
2172 /* LTR latency for VO, in us */
2173 WMI_PDEV_PARAM_LTR_AC_LATENCY_VO,
2174 /* LTR AC latency timeout, in ms */
2175 WMI_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT,
2176 /* LTR platform latency override, in us */
2177 WMI_PDEV_PARAM_LTR_SLEEP_OVERRIDE,
2178 /* LTR-RX override, in us */
2179 WMI_PDEV_PARAM_LTR_RX_OVERRIDE,
2180 /* Tx activity timeout for LTR, in us */
2181 WMI_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT,
2182 /* L1SS state machine enable */
2183 WMI_PDEV_PARAM_L1SS_ENABLE,
2184 /* Deep sleep state machine enable */
2185 WMI_PDEV_PARAM_DSLEEP_ENABLE,
2186 /* RX buffering flush enable */
2187 WMI_PDEV_PARAM_PCIELP_TXBUF_FLUSH,
2188 /* RX buffering matermark */
2189 WMI_PDEV_PARAM_PCIELP_TXBUF_WATERMARK,
2190 /* RX buffering timeout enable */
2191 WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_EN,
2192 /* RX buffering timeout value */
2193 WMI_PDEV_PARAM_PCIELP_TXBUF_TMO_VALUE,
2194 /* pdev level stats update period in ms */
2195 WMI_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD,
2196 /* vdev level stats update period in ms */
2197 WMI_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD,
2198 /* peer level stats update period in ms */
2199 WMI_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD,
2200 /* beacon filter status update period */
2201 WMI_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD,
2202 /* QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
2203 WMI_PDEV_PARAM_PMF_QOS,
2204 /* Access category on which ARP frames are sent */
2205 WMI_PDEV_PARAM_ARP_AC_OVERRIDE,
2206 /* DCS configuration */
2208 /* Enable/Disable ANI on target */
2209 WMI_PDEV_PARAM_ANI_ENABLE,
2210 /* configure the ANI polling period */
2211 WMI_PDEV_PARAM_ANI_POLL_PERIOD,
2212 /* configure the ANI listening period */
2213 WMI_PDEV_PARAM_ANI_LISTEN_PERIOD,
2214 /* configure OFDM immunity level */
2215 WMI_PDEV_PARAM_ANI_OFDM_LEVEL,
2216 /* configure CCK immunity level */
2217 WMI_PDEV_PARAM_ANI_CCK_LEVEL,
2218 /* Enable/Disable CDD for 1x1 STAs in rate control module */
2219 WMI_PDEV_PARAM_DYNTXCHAIN,
2220 /* Enable/Disable proxy STA */
2221 WMI_PDEV_PARAM_PROXY_STA,
2222 /* Enable/Disable low power state when all VDEVs are inactive/idle. */
2223 WMI_PDEV_PARAM_IDLE_PS_CONFIG,
2224 /* Enable/Disable power gating sleep */
2225 WMI_PDEV_PARAM_POWER_GATING_SLEEP,
2228 enum wmi_10x_pdev_param {
2230 WMI_10X_PDEV_PARAM_TX_CHAIN_MASK = 0x1,
2232 WMI_10X_PDEV_PARAM_RX_CHAIN_MASK,
2233 /* TX power limit for 2G Radio */
2234 WMI_10X_PDEV_PARAM_TXPOWER_LIMIT2G,
2235 /* TX power limit for 5G Radio */
2236 WMI_10X_PDEV_PARAM_TXPOWER_LIMIT5G,
2237 /* TX power scale */
2238 WMI_10X_PDEV_PARAM_TXPOWER_SCALE,
2239 /* Beacon generation mode . 0: host, 1: target */
2240 WMI_10X_PDEV_PARAM_BEACON_GEN_MODE,
2241 /* Beacon generation mode . 0: staggered 1: bursted */
2242 WMI_10X_PDEV_PARAM_BEACON_TX_MODE,
2244 * Resource manager off chan mode .
2245 * 0: turn off off chan mode. 1: turn on offchan mode
2247 WMI_10X_PDEV_PARAM_RESMGR_OFFCHAN_MODE,
2250 * 0: no protection 1:use CTS-to-self 2: use RTS/CTS
2252 WMI_10X_PDEV_PARAM_PROTECTION_MODE,
2253 /* Dynamic bandwidth 0: disable 1: enable */
2254 WMI_10X_PDEV_PARAM_DYNAMIC_BW,
2255 /* Non aggregrate/ 11g sw retry threshold.0-disable */
2256 WMI_10X_PDEV_PARAM_NON_AGG_SW_RETRY_TH,
2257 /* aggregrate sw retry threshold. 0-disable*/
2258 WMI_10X_PDEV_PARAM_AGG_SW_RETRY_TH,
2259 /* Station kickout threshold (non of consecutive failures).0-disable */
2260 WMI_10X_PDEV_PARAM_STA_KICKOUT_TH,
2261 /* Aggerate size scaling configuration per AC */
2262 WMI_10X_PDEV_PARAM_AC_AGGRSIZE_SCALING,
2264 WMI_10X_PDEV_PARAM_LTR_ENABLE,
2265 /* LTR latency for BE, in us */
2266 WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_BE,
2267 /* LTR latency for BK, in us */
2268 WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_BK,
2269 /* LTR latency for VI, in us */
2270 WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_VI,
2271 /* LTR latency for VO, in us */
2272 WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_VO,
2273 /* LTR AC latency timeout, in ms */
2274 WMI_10X_PDEV_PARAM_LTR_AC_LATENCY_TIMEOUT,
2275 /* LTR platform latency override, in us */
2276 WMI_10X_PDEV_PARAM_LTR_SLEEP_OVERRIDE,
2277 /* LTR-RX override, in us */
2278 WMI_10X_PDEV_PARAM_LTR_RX_OVERRIDE,
2279 /* Tx activity timeout for LTR, in us */
2280 WMI_10X_PDEV_PARAM_LTR_TX_ACTIVITY_TIMEOUT,
2281 /* L1SS state machine enable */
2282 WMI_10X_PDEV_PARAM_L1SS_ENABLE,
2283 /* Deep sleep state machine enable */
2284 WMI_10X_PDEV_PARAM_DSLEEP_ENABLE,
2285 /* pdev level stats update period in ms */
2286 WMI_10X_PDEV_PARAM_PDEV_STATS_UPDATE_PERIOD,
2287 /* vdev level stats update period in ms */
2288 WMI_10X_PDEV_PARAM_VDEV_STATS_UPDATE_PERIOD,
2289 /* peer level stats update period in ms */
2290 WMI_10X_PDEV_PARAM_PEER_STATS_UPDATE_PERIOD,
2291 /* beacon filter status update period */
2292 WMI_10X_PDEV_PARAM_BCNFLT_STATS_UPDATE_PERIOD,
2293 /* QOS Mgmt frame protection MFP/PMF 0: disable, 1: enable */
2294 WMI_10X_PDEV_PARAM_PMF_QOS,
2295 /* Access category on which ARP and DHCP frames are sent */
2296 WMI_10X_PDEV_PARAM_ARPDHCP_AC_OVERRIDE,
2297 /* DCS configuration */
2298 WMI_10X_PDEV_PARAM_DCS,
2299 /* Enable/Disable ANI on target */
2300 WMI_10X_PDEV_PARAM_ANI_ENABLE,
2301 /* configure the ANI polling period */
2302 WMI_10X_PDEV_PARAM_ANI_POLL_PERIOD,
2303 /* configure the ANI listening period */
2304 WMI_10X_PDEV_PARAM_ANI_LISTEN_PERIOD,
2305 /* configure OFDM immunity level */
2306 WMI_10X_PDEV_PARAM_ANI_OFDM_LEVEL,
2307 /* configure CCK immunity level */
2308 WMI_10X_PDEV_PARAM_ANI_CCK_LEVEL,
2309 /* Enable/Disable CDD for 1x1 STAs in rate control module */
2310 WMI_10X_PDEV_PARAM_DYNTXCHAIN,
2311 /* Enable/Disable Fast channel reset*/
2312 WMI_10X_PDEV_PARAM_FAST_CHANNEL_RESET,
2313 /* Set Bursting DUR */
2314 WMI_10X_PDEV_PARAM_BURST_DUR,
2315 /* Set Bursting Enable*/
2316 WMI_10X_PDEV_PARAM_BURST_ENABLE,
2319 struct wmi_pdev_set_param_cmd {
2324 struct wmi_pdev_get_tpc_config_cmd {
2329 #define WMI_TPC_RATE_MAX 160
2330 #define WMI_TPC_TX_N_CHAIN 4
2332 enum wmi_tpc_config_event_flag {
2333 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_CDD = 0x1,
2334 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_STBC = 0x2,
2335 WMI_TPC_CONFIG_EVENT_FLAG_TABLE_TXBF = 0x4,
2338 struct wmi_pdev_tpc_config_event {
2342 __le32 twice_antenna_reduction;
2343 __le32 twice_max_rd_power;
2344 s32 twice_antenna_gain;
2347 __le32 num_tx_chain;
2350 s8 max_reg_allow_pow[WMI_TPC_TX_N_CHAIN];
2351 s8 max_reg_allow_pow_agcdd[WMI_TPC_TX_N_CHAIN][WMI_TPC_TX_N_CHAIN];
2352 s8 max_reg_allow_pow_agstbc[WMI_TPC_TX_N_CHAIN][WMI_TPC_TX_N_CHAIN];
2353 s8 max_reg_allow_pow_agtxbf[WMI_TPC_TX_N_CHAIN][WMI_TPC_TX_N_CHAIN];
2354 u8 rates_array[WMI_TPC_RATE_MAX];
2357 /* Transmit power scale factor. */
2359 WMI_TP_SCALE_MAX = 0, /* no scaling (default) */
2360 WMI_TP_SCALE_50 = 1, /* 50% of max (-3 dBm) */
2361 WMI_TP_SCALE_25 = 2, /* 25% of max (-6 dBm) */
2362 WMI_TP_SCALE_12 = 3, /* 12% of max (-9 dBm) */
2363 WMI_TP_SCALE_MIN = 4, /* min, but still on */
2364 WMI_TP_SCALE_SIZE = 5, /* max num of enum */
2367 struct wmi_set_channel_cmd {
2368 /* channel (only frequency and mode info are used) */
2369 struct wmi_channel chan;
2372 struct wmi_pdev_chanlist_update_event {
2373 /* number of channels */
2375 /* array of channels */
2376 struct wmi_channel channel_list[1];
2379 #define WMI_MAX_DEBUG_MESG (sizeof(u32) * 32)
2381 struct wmi_debug_mesg_event {
2382 /* message buffer, NULL terminated */
2383 char bufp[WMI_MAX_DEBUG_MESG];
2388 VDEV_SUBTYPE_P2PDEV = 0,
2390 VDEV_SUBTYPE_P2PCLI,
2397 struct wmi_pdev_set_channel_cmd {
2398 /* idnore power , only use flags , mode and freq */
2399 struct wmi_channel chan;
2402 /* Customize the DSCP (bit) to TID (0-7) mapping for QOS */
2403 #define WMI_DSCP_MAP_MAX (64)
2404 struct wmi_pdev_set_dscp_tid_map_cmd {
2405 /* map indicating DSCP to TID conversion */
2406 __le32 dscp_to_tid_map[WMI_DSCP_MAP_MAX];
2409 enum mcast_bcast_rate_id {
2414 struct mcast_bcast_rate {
2415 enum mcast_bcast_rate_id rate_id;
2419 struct wmi_wmm_params {
2428 struct wmi_pdev_set_wmm_params {
2429 struct wmi_wmm_params ac_be;
2430 struct wmi_wmm_params ac_bk;
2431 struct wmi_wmm_params ac_vi;
2432 struct wmi_wmm_params ac_vo;
2435 struct wmi_wmm_params_arg {
2444 struct wmi_pdev_set_wmm_params_arg {
2445 struct wmi_wmm_params_arg ac_be;
2446 struct wmi_wmm_params_arg ac_bk;
2447 struct wmi_wmm_params_arg ac_vi;
2448 struct wmi_wmm_params_arg ac_vo;
2451 struct wal_dbg_tx_stats {
2452 /* Num HTT cookies queued to dispatch list */
2455 /* Num HTT cookies dispatched */
2456 __le32 comp_delivered;
2458 /* Num MSDU queued to WAL */
2461 /* Num MPDU queue to WAL */
2464 /* Num MSDUs dropped by WMM limit */
2467 /* Num Local frames queued */
2468 __le32 local_enqued;
2470 /* Num Local frames done */
2473 /* Num queued to HW */
2476 /* Num PPDU reaped from HW */
2482 /* Num PPDUs cleaned up in TX abort */
2485 /* Num MPDUs requed by SW */
2486 __le32 mpdus_requed;
2488 /* excessive retries */
2491 /* data hw rate code */
2494 /* Scheduler self triggers */
2495 __le32 self_triggers;
2497 /* frames dropped due to excessive sw retries */
2498 __le32 sw_retry_failure;
2500 /* illegal rate phy errors */
2501 __le32 illgl_rate_phy_err;
2503 /* wal pdev continous xretry */
2504 __le32 pdev_cont_xretry;
2506 /* wal pdev continous xretry */
2507 __le32 pdev_tx_timeout;
2509 /* wal pdev resets */
2512 __le32 phy_underrun;
2514 /* MPDU is more than txop limit */
2518 struct wal_dbg_rx_stats {
2519 /* Cnts any change in ring routing mid-ppdu */
2520 __le32 mid_ppdu_route_change;
2522 /* Total number of statuses processed */
2525 /* Extra frags on rings 0-3 */
2531 /* MSDUs / MPDUs delivered to HTT */
2535 /* MSDUs / MPDUs delivered to local stack */
2539 /* AMSDUs that have more MSDUs than the status ring size */
2540 __le32 oversize_amsdu;
2542 /* Number of PHY errors */
2545 /* Number of PHY errors drops */
2546 __le32 phy_err_drop;
2548 /* Number of mpdu errors - FCS, MIC, ENC etc. */
2552 struct wal_dbg_peer_stats {
2553 /* REMOVE THIS ONCE REAL PEER STAT COUNTERS ARE ADDED */
2557 struct wal_dbg_stats {
2558 struct wal_dbg_tx_stats tx;
2559 struct wal_dbg_rx_stats rx;
2560 struct wal_dbg_peer_stats peer;
2564 WMI_REQUEST_PEER_STAT = 0x01,
2565 WMI_REQUEST_AP_STAT = 0x02
2568 struct wmi_request_stats_cmd {
2572 * Space to add parameters like
2577 /* Suspend option */
2582 /* suspend and disable all interrupts */
2583 WMI_PDEV_SUSPEND_AND_DISABLE_INTR,
2586 struct wmi_pdev_suspend_cmd {
2587 /* suspend option sent to target */
2591 struct wmi_stats_event {
2592 __le32 stats_id; /* %WMI_REQUEST_ */
2594 * number of pdev stats event structures
2595 * (wmi_pdev_stats) 0 or 1
2597 __le32 num_pdev_stats;
2599 * number of vdev stats event structures
2600 * (wmi_vdev_stats) 0 or max vdevs
2602 __le32 num_vdev_stats;
2604 * number of peer stats event structures
2605 * (wmi_peer_stats) 0 or max peers
2607 __le32 num_peer_stats;
2608 __le32 num_bcnflt_stats;
2611 * num_pdev_stats * size of(struct wmi_pdev_stats)
2612 * num_vdev_stats * size of(struct wmi_vdev_stats)
2613 * num_peer_stats * size of(struct wmi_peer_stats)
2615 * By having a zero sized array, the pointer to data area
2616 * becomes available without increasing the struct size
2623 * TODO: add all PDEV stats here
2625 struct wmi_pdev_stats {
2626 __le32 chan_nf; /* Channel noise floor */
2627 __le32 tx_frame_count; /* TX frame count */
2628 __le32 rx_frame_count; /* RX frame count */
2629 __le32 rx_clear_count; /* rx clear count */
2630 __le32 cycle_count; /* cycle count */
2631 __le32 phy_err_count; /* Phy error count */
2632 __le32 chan_tx_pwr; /* channel tx power */
2633 struct wal_dbg_stats wal; /* WAL dbg stats */
2638 * TODO: add all VDEV stats here
2640 struct wmi_vdev_stats {
2646 * TODO: add more stats
2648 struct wmi_peer_stats {
2649 struct wmi_mac_addr peer_macaddr;
2651 __le32 peer_tx_rate;
2654 struct wmi_vdev_create_cmd {
2657 __le32 vdev_subtype;
2658 struct wmi_mac_addr vdev_macaddr;
2661 enum wmi_vdev_type {
2662 WMI_VDEV_TYPE_AP = 1,
2663 WMI_VDEV_TYPE_STA = 2,
2664 WMI_VDEV_TYPE_IBSS = 3,
2665 WMI_VDEV_TYPE_MONITOR = 4,
2668 enum wmi_vdev_subtype {
2669 WMI_VDEV_SUBTYPE_NONE = 0,
2670 WMI_VDEV_SUBTYPE_P2P_DEVICE = 1,
2671 WMI_VDEV_SUBTYPE_P2P_CLIENT = 2,
2672 WMI_VDEV_SUBTYPE_P2P_GO = 3,
2675 /* values for vdev_subtype */
2677 /* values for vdev_start_request flags */
2679 * Indicates that AP VDEV uses hidden ssid. only valid for
2681 #define WMI_VDEV_START_HIDDEN_SSID (1<<0)
2683 * Indicates if robust management frame/management frame
2684 * protection is enabled. For GO/AP vdevs, it indicates that
2685 * it may support station/client associations with RMF enabled.
2686 * For STA/client vdevs, it indicates that sta will
2687 * associate with AP with RMF enabled. */
2688 #define WMI_VDEV_START_PMF_ENABLED (1<<1)
2690 struct wmi_p2p_noa_descriptor {
2691 __le32 type_count; /* 255: continuous schedule, 0: reserved */
2692 __le32 duration; /* Absent period duration in micro seconds */
2693 __le32 interval; /* Absent period interval in micro seconds */
2694 __le32 start_time; /* 32 bit tsf time when in starts */
2697 struct wmi_vdev_start_request_cmd {
2699 struct wmi_channel chan;
2700 /* unique id identifying the VDEV, generated by the caller */
2702 /* requestor id identifying the caller module */
2703 __le32 requestor_id;
2704 /* beacon interval from received beacon */
2705 __le32 beacon_interval;
2706 /* DTIM Period from the received beacon */
2710 /* ssid field. Only valid for AP/GO/IBSS/BTAmp VDEV type. */
2711 struct wmi_ssid ssid;
2712 /* beacon/probe reponse xmit rate. Applicable for SoftAP. */
2714 /* beacon/probe reponse xmit power. Applicable for SoftAP. */
2715 __le32 bcn_tx_power;
2716 /* number of p2p NOA descriptor(s) from scan entry */
2717 __le32 num_noa_descriptors;
2719 * Disable H/W ack. This used by WMI_VDEV_RESTART_REQUEST_CMDID.
2720 * During CAC, Our HW shouldn't ack ditected frames
2722 __le32 disable_hw_ack;
2723 /* actual p2p NOA descriptor from scan entry */
2724 struct wmi_p2p_noa_descriptor noa_descriptors[2];
2727 struct wmi_vdev_restart_request_cmd {
2728 struct wmi_vdev_start_request_cmd vdev_start_request_cmd;
2731 struct wmi_vdev_start_request_arg {
2733 struct wmi_channel_arg channel;
2740 bool disable_hw_ack;
2745 struct wmi_vdev_delete_cmd {
2746 /* unique id identifying the VDEV, generated by the caller */
2750 struct wmi_vdev_up_cmd {
2752 __le32 vdev_assoc_id;
2753 struct wmi_mac_addr vdev_bssid;
2756 struct wmi_vdev_stop_cmd {
2760 struct wmi_vdev_down_cmd {
2764 struct wmi_vdev_standby_response_cmd {
2765 /* unique id identifying the VDEV, generated by the caller */
2769 struct wmi_vdev_resume_response_cmd {
2770 /* unique id identifying the VDEV, generated by the caller */
2774 struct wmi_vdev_set_param_cmd {
2780 #define WMI_MAX_KEY_INDEX 3
2781 #define WMI_MAX_KEY_LEN 32
2783 #define WMI_KEY_PAIRWISE 0x00
2784 #define WMI_KEY_GROUP 0x01
2785 #define WMI_KEY_TX_USAGE 0x02 /* default tx key - static wep */
2787 struct wmi_key_seq_counter {
2788 __le32 key_seq_counter_l;
2789 __le32 key_seq_counter_h;
2792 #define WMI_CIPHER_NONE 0x0 /* clear key */
2793 #define WMI_CIPHER_WEP 0x1
2794 #define WMI_CIPHER_TKIP 0x2
2795 #define WMI_CIPHER_AES_OCB 0x3
2796 #define WMI_CIPHER_AES_CCM 0x4
2797 #define WMI_CIPHER_WAPI 0x5
2798 #define WMI_CIPHER_CKIP 0x6
2799 #define WMI_CIPHER_AES_CMAC 0x7
2801 struct wmi_vdev_install_key_cmd {
2803 struct wmi_mac_addr peer_macaddr;
2806 __le32 key_cipher; /* %WMI_CIPHER_ */
2807 struct wmi_key_seq_counter key_rsc_counter;
2808 struct wmi_key_seq_counter key_global_rsc_counter;
2809 struct wmi_key_seq_counter key_tsc_counter;
2810 u8 wpi_key_rsc_counter[16];
2811 u8 wpi_key_tsc_counter[16];
2813 __le32 key_txmic_len;
2814 __le32 key_rxmic_len;
2816 /* contains key followed by tx mic followed by rx mic */
2820 struct wmi_vdev_install_key_arg {
2829 const void *key_data;
2832 /* Preamble types to be used with VDEV fixed rate configuration */
2833 enum wmi_rate_preamble {
2834 WMI_RATE_PREAMBLE_OFDM,
2835 WMI_RATE_PREAMBLE_CCK,
2836 WMI_RATE_PREAMBLE_HT,
2837 WMI_RATE_PREAMBLE_VHT,
2840 /* Value to disable fixed rate setting */
2841 #define WMI_FIXED_RATE_NONE (0xff)
2843 struct wmi_vdev_param_map {
2845 u32 fragmentation_threshold;
2846 u32 beacon_interval;
2847 u32 listen_interval;
2853 u32 wmi_vdev_stats_update_period;
2854 u32 wmi_vdev_pwrsave_ageout_time;
2855 u32 wmi_vdev_host_swba_interval;
2857 u32 wmi_vdev_oc_scheduler_air_time_limit;
2860 u32 bmiss_count_max;
2861 u32 bmiss_first_bcnt;
2862 u32 bmiss_final_bcnt;
2866 u32 disable_htprotection;
2867 u32 sta_quickkickout;
2869 u32 protection_mode;
2878 u32 bcast_data_rate;
2879 u32 mcast_data_rate;
2882 u32 unknown_dest_indicate;
2883 u32 ap_keepalive_min_idle_inactive_time_secs;
2884 u32 ap_keepalive_max_idle_inactive_time_secs;
2885 u32 ap_keepalive_max_unresponsive_time_secs;
2886 u32 ap_enable_nawds;
2887 u32 mcast2ucast_set;
2890 u32 packet_powersave;
2893 u32 ap_detect_out_of_sync_sleeping_sta_time_secs;
2896 #define WMI_VDEV_PARAM_UNSUPPORTED 0
2898 /* the definition of different VDEV parameters */
2899 enum wmi_vdev_param {
2901 WMI_VDEV_PARAM_RTS_THRESHOLD = 0x1,
2902 /* Fragmentation threshold */
2903 WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
2904 /* beacon interval in TUs */
2905 WMI_VDEV_PARAM_BEACON_INTERVAL,
2906 /* Listen interval in TUs */
2907 WMI_VDEV_PARAM_LISTEN_INTERVAL,
2908 /* muticast rate in Mbps */
2909 WMI_VDEV_PARAM_MULTICAST_RATE,
2910 /* management frame rate in Mbps */
2911 WMI_VDEV_PARAM_MGMT_TX_RATE,
2912 /* slot time (long vs short) */
2913 WMI_VDEV_PARAM_SLOT_TIME,
2914 /* preamble (long vs short) */
2915 WMI_VDEV_PARAM_PREAMBLE,
2916 /* SWBA time (time before tbtt in msec) */
2917 WMI_VDEV_PARAM_SWBA_TIME,
2918 /* time period for updating VDEV stats */
2919 WMI_VDEV_STATS_UPDATE_PERIOD,
2920 /* age out time in msec for frames queued for station in power save */
2921 WMI_VDEV_PWRSAVE_AGEOUT_TIME,
2923 * Host SWBA interval (time in msec before tbtt for SWBA event
2926 WMI_VDEV_HOST_SWBA_INTERVAL,
2927 /* DTIM period (specified in units of num beacon intervals) */
2928 WMI_VDEV_PARAM_DTIM_PERIOD,
2930 * scheduler air time limit for this VDEV. used by off chan
2933 WMI_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT,
2934 /* enable/dsiable WDS for this VDEV */
2937 WMI_VDEV_PARAM_ATIM_WINDOW,
2939 WMI_VDEV_PARAM_BMISS_COUNT_MAX,
2940 /* BMISS first time */
2941 WMI_VDEV_PARAM_BMISS_FIRST_BCNT,
2942 /* BMISS final time */
2943 WMI_VDEV_PARAM_BMISS_FINAL_BCNT,
2944 /* WMM enables/disabled */
2945 WMI_VDEV_PARAM_FEATURE_WMM,
2947 WMI_VDEV_PARAM_CHWIDTH,
2948 /* Channel Offset */
2949 WMI_VDEV_PARAM_CHEXTOFFSET,
2950 /* Disable HT Protection */
2951 WMI_VDEV_PARAM_DISABLE_HTPROTECTION,
2952 /* Quick STA Kickout */
2953 WMI_VDEV_PARAM_STA_QUICKKICKOUT,
2954 /* Rate to be used with Management frames */
2955 WMI_VDEV_PARAM_MGMT_RATE,
2956 /* Protection Mode */
2957 WMI_VDEV_PARAM_PROTECTION_MODE,
2958 /* Fixed rate setting */
2959 WMI_VDEV_PARAM_FIXED_RATE,
2960 /* Short GI Enable/Disable */
2963 WMI_VDEV_PARAM_LDPC,
2964 /* Enable Tx STBC */
2965 WMI_VDEV_PARAM_TX_STBC,
2966 /* Enable Rx STBC */
2967 WMI_VDEV_PARAM_RX_STBC,
2968 /* Intra BSS forwarding */
2969 WMI_VDEV_PARAM_INTRA_BSS_FWD,
2970 /* Setting Default xmit key for Vdev */
2971 WMI_VDEV_PARAM_DEF_KEYID,
2974 /* Set the custom rate for the broadcast data frames */
2975 WMI_VDEV_PARAM_BCAST_DATA_RATE,
2976 /* Set the custom rate (rate-code) for multicast data frames */
2977 WMI_VDEV_PARAM_MCAST_DATA_RATE,
2978 /* Tx multicast packet indicate Enable/Disable */
2979 WMI_VDEV_PARAM_MCAST_INDICATE,
2980 /* Tx DHCP packet indicate Enable/Disable */
2981 WMI_VDEV_PARAM_DHCP_INDICATE,
2982 /* Enable host inspection of Tx unicast packet to unknown destination */
2983 WMI_VDEV_PARAM_UNKNOWN_DEST_INDICATE,
2985 /* The minimum amount of time AP begins to consider STA inactive */
2986 WMI_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,
2989 * An associated STA is considered inactive when there is no recent
2990 * TX/RX activity and no downlink frames are buffered for it. Once a
2991 * STA exceeds the maximum idle inactive time, the AP will send an
2992 * 802.11 data-null as a keep alive to verify the STA is still
2993 * associated. If the STA does ACK the data-null, or if the data-null
2994 * is buffered and the STA does not retrieve it, the STA will be
2995 * considered unresponsive
2996 * (see WMI_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS).
2998 WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,
3001 * An associated STA is considered unresponsive if there is no recent
3002 * TX/RX activity and downlink frames are buffered for it. Once a STA
3003 * exceeds the maximum unresponsive time, the AP will send a
3004 * WMI_STA_KICKOUT event to the host so the STA can be deleted. */
3005 WMI_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,
3007 /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
3008 WMI_VDEV_PARAM_AP_ENABLE_NAWDS,
3009 /* Enable/Disable RTS-CTS */
3010 WMI_VDEV_PARAM_ENABLE_RTSCTS,
3011 /* Enable TXBFee/er */
3012 WMI_VDEV_PARAM_TXBF,
3014 /* Set packet power save */
3015 WMI_VDEV_PARAM_PACKET_POWERSAVE,
3018 * Drops un-encrypted packets if eceived in an encrypted connection
3019 * otherwise forwards to host.
3021 WMI_VDEV_PARAM_DROP_UNENCRY,
3024 * Set the encapsulation type for frames.
3026 WMI_VDEV_PARAM_TX_ENCAP_TYPE,
3029 /* the definition of different VDEV parameters */
3030 enum wmi_10x_vdev_param {
3032 WMI_10X_VDEV_PARAM_RTS_THRESHOLD = 0x1,
3033 /* Fragmentation threshold */
3034 WMI_10X_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
3035 /* beacon interval in TUs */
3036 WMI_10X_VDEV_PARAM_BEACON_INTERVAL,
3037 /* Listen interval in TUs */
3038 WMI_10X_VDEV_PARAM_LISTEN_INTERVAL,
3039 /* muticast rate in Mbps */
3040 WMI_10X_VDEV_PARAM_MULTICAST_RATE,
3041 /* management frame rate in Mbps */
3042 WMI_10X_VDEV_PARAM_MGMT_TX_RATE,
3043 /* slot time (long vs short) */
3044 WMI_10X_VDEV_PARAM_SLOT_TIME,
3045 /* preamble (long vs short) */
3046 WMI_10X_VDEV_PARAM_PREAMBLE,
3047 /* SWBA time (time before tbtt in msec) */
3048 WMI_10X_VDEV_PARAM_SWBA_TIME,
3049 /* time period for updating VDEV stats */
3050 WMI_10X_VDEV_STATS_UPDATE_PERIOD,
3051 /* age out time in msec for frames queued for station in power save */
3052 WMI_10X_VDEV_PWRSAVE_AGEOUT_TIME,
3054 * Host SWBA interval (time in msec before tbtt for SWBA event
3057 WMI_10X_VDEV_HOST_SWBA_INTERVAL,
3058 /* DTIM period (specified in units of num beacon intervals) */
3059 WMI_10X_VDEV_PARAM_DTIM_PERIOD,
3061 * scheduler air time limit for this VDEV. used by off chan
3064 WMI_10X_VDEV_OC_SCHEDULER_AIR_TIME_LIMIT,
3065 /* enable/dsiable WDS for this VDEV */
3066 WMI_10X_VDEV_PARAM_WDS,
3068 WMI_10X_VDEV_PARAM_ATIM_WINDOW,
3070 WMI_10X_VDEV_PARAM_BMISS_COUNT_MAX,
3071 /* WMM enables/disabled */
3072 WMI_10X_VDEV_PARAM_FEATURE_WMM,
3074 WMI_10X_VDEV_PARAM_CHWIDTH,
3075 /* Channel Offset */
3076 WMI_10X_VDEV_PARAM_CHEXTOFFSET,
3077 /* Disable HT Protection */
3078 WMI_10X_VDEV_PARAM_DISABLE_HTPROTECTION,
3079 /* Quick STA Kickout */
3080 WMI_10X_VDEV_PARAM_STA_QUICKKICKOUT,
3081 /* Rate to be used with Management frames */
3082 WMI_10X_VDEV_PARAM_MGMT_RATE,
3083 /* Protection Mode */
3084 WMI_10X_VDEV_PARAM_PROTECTION_MODE,
3085 /* Fixed rate setting */
3086 WMI_10X_VDEV_PARAM_FIXED_RATE,
3087 /* Short GI Enable/Disable */
3088 WMI_10X_VDEV_PARAM_SGI,
3090 WMI_10X_VDEV_PARAM_LDPC,
3091 /* Enable Tx STBC */
3092 WMI_10X_VDEV_PARAM_TX_STBC,
3093 /* Enable Rx STBC */
3094 WMI_10X_VDEV_PARAM_RX_STBC,
3095 /* Intra BSS forwarding */
3096 WMI_10X_VDEV_PARAM_INTRA_BSS_FWD,
3097 /* Setting Default xmit key for Vdev */
3098 WMI_10X_VDEV_PARAM_DEF_KEYID,
3100 WMI_10X_VDEV_PARAM_NSS,
3101 /* Set the custom rate for the broadcast data frames */
3102 WMI_10X_VDEV_PARAM_BCAST_DATA_RATE,
3103 /* Set the custom rate (rate-code) for multicast data frames */
3104 WMI_10X_VDEV_PARAM_MCAST_DATA_RATE,
3105 /* Tx multicast packet indicate Enable/Disable */
3106 WMI_10X_VDEV_PARAM_MCAST_INDICATE,
3107 /* Tx DHCP packet indicate Enable/Disable */
3108 WMI_10X_VDEV_PARAM_DHCP_INDICATE,
3109 /* Enable host inspection of Tx unicast packet to unknown destination */
3110 WMI_10X_VDEV_PARAM_UNKNOWN_DEST_INDICATE,
3112 /* The minimum amount of time AP begins to consider STA inactive */
3113 WMI_10X_VDEV_PARAM_AP_KEEPALIVE_MIN_IDLE_INACTIVE_TIME_SECS,
3116 * An associated STA is considered inactive when there is no recent
3117 * TX/RX activity and no downlink frames are buffered for it. Once a
3118 * STA exceeds the maximum idle inactive time, the AP will send an
3119 * 802.11 data-null as a keep alive to verify the STA is still
3120 * associated. If the STA does ACK the data-null, or if the data-null
3121 * is buffered and the STA does not retrieve it, the STA will be
3122 * considered unresponsive
3123 * (see WMI_10X_VDEV_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS).
3125 WMI_10X_VDEV_PARAM_AP_KEEPALIVE_MAX_IDLE_INACTIVE_TIME_SECS,
3128 * An associated STA is considered unresponsive if there is no recent
3129 * TX/RX activity and downlink frames are buffered for it. Once a STA
3130 * exceeds the maximum unresponsive time, the AP will send a
3131 * WMI_10X_STA_KICKOUT event to the host so the STA can be deleted. */
3132 WMI_10X_VDEV_PARAM_AP_KEEPALIVE_MAX_UNRESPONSIVE_TIME_SECS,
3134 /* Enable NAWDS : MCAST INSPECT Enable, NAWDS Flag set */
3135 WMI_10X_VDEV_PARAM_AP_ENABLE_NAWDS,
3137 WMI_10X_VDEV_PARAM_MCAST2UCAST_SET,
3138 /* Enable/Disable RTS-CTS */
3139 WMI_10X_VDEV_PARAM_ENABLE_RTSCTS,
3141 WMI_10X_VDEV_PARAM_AP_DETECT_OUT_OF_SYNC_SLEEPING_STA_TIME_SECS,
3144 /* slot time long */
3145 #define WMI_VDEV_SLOT_TIME_LONG 0x1
3146 /* slot time short */
3147 #define WMI_VDEV_SLOT_TIME_SHORT 0x2
3149 #define WMI_VDEV_PREAMBLE_LONG 0x1
3150 /* preablbe short */
3151 #define WMI_VDEV_PREAMBLE_SHORT 0x2
3153 enum wmi_start_event_param {
3154 WMI_VDEV_RESP_START_EVENT = 0,
3155 WMI_VDEV_RESP_RESTART_EVENT,
3158 struct wmi_vdev_start_response_event {
3161 __le32 resp_type; /* %WMI_VDEV_RESP_ */
3165 struct wmi_vdev_standby_req_event {
3166 /* unique id identifying the VDEV, generated by the caller */
3170 struct wmi_vdev_resume_req_event {
3171 /* unique id identifying the VDEV, generated by the caller */
3175 struct wmi_vdev_stopped_event {
3176 /* unique id identifying the VDEV, generated by the caller */
3181 * common structure used for simple events
3182 * (stopped, resume_req, standby response)
3184 struct wmi_vdev_simple_event {
3185 /* unique id identifying the VDEV, generated by the caller */
3189 /* VDEV start response status codes */
3190 /* VDEV succesfully started */
3191 #define WMI_INIFIED_VDEV_START_RESPONSE_STATUS_SUCCESS 0x0
3193 /* requested VDEV not found */
3194 #define WMI_INIFIED_VDEV_START_RESPONSE_INVALID_VDEVID 0x1
3196 /* unsupported VDEV combination */
3197 #define WMI_INIFIED_VDEV_START_RESPONSE_NOT_SUPPORTED 0x2
3199 /* Beacon processing related command and event structures */
3200 struct wmi_bcn_tx_hdr {
3207 struct wmi_bcn_tx_cmd {
3208 struct wmi_bcn_tx_hdr hdr;
3212 struct wmi_bcn_tx_arg {
3221 #define WMI_BCN_FILTER_ALL 0 /* Filter all beacons */
3222 #define WMI_BCN_FILTER_NONE 1 /* Pass all beacons */
3223 #define WMI_BCN_FILTER_RSSI 2 /* Pass Beacons RSSI >= RSSI threshold */
3224 #define WMI_BCN_FILTER_BSSID 3 /* Pass Beacons with matching BSSID */
3225 #define WMI_BCN_FILTER_SSID 4 /* Pass Beacons with matching SSID */
3227 struct wmi_bcn_filter_rx_cmd {
3229 __le32 bcn_filter_id;
3230 /* Filter type - wmi_bcn_filter */
3233 __le32 bcn_filter_len;
3234 /* Filter info (threshold, BSSID, RSSI) */
3238 /* Capabilities and IEs to be passed to firmware */
3239 struct wmi_bcn_prb_info {
3244 /* Advanced capabilities */
3245 /* HT capabilities */
3255 struct wmi_bcn_tmpl_cmd {
3256 /* unique id identifying the VDEV, generated by the caller */
3258 /* TIM IE offset from the beginning of the template. */
3259 __le32 tim_ie_offset;
3260 /* beacon probe capabilities and IEs */
3261 struct wmi_bcn_prb_info bcn_prb_info;
3262 /* beacon buffer length */
3264 /* variable length data */
3268 struct wmi_prb_tmpl_cmd {
3269 /* unique id identifying the VDEV, generated by the caller */
3271 /* beacon probe capabilities and IEs */
3272 struct wmi_bcn_prb_info bcn_prb_info;
3273 /* beacon buffer length */
3275 /* Variable length data */
3279 enum wmi_sta_ps_mode {
3280 /* enable power save for the given STA VDEV */
3281 WMI_STA_PS_MODE_DISABLED = 0,
3282 /* disable power save for a given STA VDEV */
3283 WMI_STA_PS_MODE_ENABLED = 1,
3286 struct wmi_sta_powersave_mode_cmd {
3287 /* unique id identifying the VDEV, generated by the caller */
3292 * (see enum wmi_sta_ps_mode)
3297 enum wmi_csa_offload_en {
3298 WMI_CSA_OFFLOAD_DISABLE = 0,
3299 WMI_CSA_OFFLOAD_ENABLE = 1,
3302 struct wmi_csa_offload_enable_cmd {
3304 __le32 csa_offload_enable;
3307 struct wmi_csa_offload_chanswitch_cmd {
3309 struct wmi_channel chan;
3313 * This parameter controls the policy for retrieving frames from AP while the
3314 * STA is in sleep state.
3316 * Only takes affect if the sta_ps_mode is enabled
3318 enum wmi_sta_ps_param_rx_wake_policy {
3320 * Wake up when ever there is an RX activity on the VDEV. In this mode
3321 * the Power save SM(state machine) will come out of sleep by either
3322 * sending null frame (or) a data frame (with PS==0) in response to TIM
3323 * bit set in the received beacon frame from AP.
3325 WMI_STA_PS_RX_WAKE_POLICY_WAKE = 0,
3328 * Here the power save state machine will not wakeup in response to TIM
3329 * bit, instead it will send a PSPOLL (or) UASPD trigger based on UAPSD
3330 * configuration setup by WMISET_PS_SET_UAPSD WMI command. When all
3331 * access categories are delivery-enabled, the station will send a
3332 * UAPSD trigger frame, otherwise it will send a PS-Poll.
3334 WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD = 1,
3338 * Number of tx frames/beacon that cause the power save SM to wake up.
3340 * Value 1 causes the SM to wake up for every TX. Value 0 has a special
3341 * meaning, It will cause the SM to never wake up. This is useful if you want
3342 * to keep the system to sleep all the time for some kind of test mode . host
3343 * can change this parameter any time. It will affect at the next tx frame.
3345 enum wmi_sta_ps_param_tx_wake_threshold {
3346 WMI_STA_PS_TX_WAKE_THRESHOLD_NEVER = 0,
3347 WMI_STA_PS_TX_WAKE_THRESHOLD_ALWAYS = 1,
3350 * Values greater than one indicate that many TX attempts per beacon
3351 * interval before the STA will wake up
3356 * The maximum number of PS-Poll frames the FW will send in response to
3357 * traffic advertised in TIM before waking up (by sending a null frame with PS
3358 * = 0). Value 0 has a special meaning: there is no maximum count and the FW
3359 * will send as many PS-Poll as are necessary to retrieve buffered BU. This
3360 * parameter is used when the RX wake policy is
3361 * WMI_STA_PS_RX_WAKE_POLICY_POLL_UAPSD and ignored when the RX wake
3362 * policy is WMI_STA_PS_RX_WAKE_POLICY_WAKE.
3364 enum wmi_sta_ps_param_pspoll_count {
3365 WMI_STA_PS_PSPOLL_COUNT_NO_MAX = 0,
3367 * Values greater than 0 indicate the maximum numer of PS-Poll frames
3368 * FW will send before waking up.
3373 * This will include the delivery and trigger enabled state for every AC.
3374 * This is the negotiated state with AP. The host MLME needs to set this based
3375 * on AP capability and the state Set in the association request by the
3376 * station MLME.Lower 8 bits of the value specify the UAPSD configuration.
3378 #define WMI_UAPSD_AC_TYPE_DELI 0
3379 #define WMI_UAPSD_AC_TYPE_TRIG 1
3381 #define WMI_UAPSD_AC_BIT_MASK(ac, type) \
3382 ((type == WMI_UAPSD_AC_TYPE_DELI) ? (1<<(ac<<1)) : (1<<((ac<<1)+1)))
3384 enum wmi_sta_ps_param_uapsd {
3385 WMI_STA_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
3386 WMI_STA_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
3387 WMI_STA_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
3388 WMI_STA_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
3389 WMI_STA_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
3390 WMI_STA_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
3391 WMI_STA_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
3392 WMI_STA_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
3395 enum wmi_sta_powersave_param {
3397 * Controls how frames are retrievd from AP while STA is sleeping
3399 * (see enum wmi_sta_ps_param_rx_wake_policy)
3401 WMI_STA_PS_PARAM_RX_WAKE_POLICY = 0,
3404 * The STA will go active after this many TX
3406 * (see enum wmi_sta_ps_param_tx_wake_threshold)
3408 WMI_STA_PS_PARAM_TX_WAKE_THRESHOLD = 1,
3411 * Number of PS-Poll to send before STA wakes up
3413 * (see enum wmi_sta_ps_param_pspoll_count)
3416 WMI_STA_PS_PARAM_PSPOLL_COUNT = 2,
3419 * TX/RX inactivity time in msec before going to sleep.
3421 * The power save SM will monitor tx/rx activity on the VDEV, if no
3422 * activity for the specified msec of the parameter the Power save
3423 * SM will go to sleep.
3425 WMI_STA_PS_PARAM_INACTIVITY_TIME = 3,
3428 * Set uapsd configuration.
3430 * (see enum wmi_sta_ps_param_uapsd)
3432 WMI_STA_PS_PARAM_UAPSD = 4,
3435 struct wmi_sta_powersave_param_cmd {
3437 __le32 param_id; /* %WMI_STA_PS_PARAM_ */
3441 /* No MIMO power save */
3442 #define WMI_STA_MIMO_PS_MODE_DISABLE
3443 /* mimo powersave mode static*/
3444 #define WMI_STA_MIMO_PS_MODE_STATIC
3445 /* mimo powersave mode dynamic */
3446 #define WMI_STA_MIMO_PS_MODE_DYNAMIC
3448 struct wmi_sta_mimo_ps_mode_cmd {
3449 /* unique id identifying the VDEV, generated by the caller */
3451 /* mimo powersave mode as defined above */
3452 __le32 mimo_pwrsave_mode;
3455 /* U-APSD configuration of peer station from (re)assoc request and TSPECs */
3456 enum wmi_ap_ps_param_uapsd {
3457 WMI_AP_PS_UAPSD_AC0_DELIVERY_EN = (1 << 0),
3458 WMI_AP_PS_UAPSD_AC0_TRIGGER_EN = (1 << 1),
3459 WMI_AP_PS_UAPSD_AC1_DELIVERY_EN = (1 << 2),
3460 WMI_AP_PS_UAPSD_AC1_TRIGGER_EN = (1 << 3),
3461 WMI_AP_PS_UAPSD_AC2_DELIVERY_EN = (1 << 4),
3462 WMI_AP_PS_UAPSD_AC2_TRIGGER_EN = (1 << 5),
3463 WMI_AP_PS_UAPSD_AC3_DELIVERY_EN = (1 << 6),
3464 WMI_AP_PS_UAPSD_AC3_TRIGGER_EN = (1 << 7),
3467 /* U-APSD maximum service period of peer station */
3468 enum wmi_ap_ps_peer_param_max_sp {
3469 WMI_AP_PS_PEER_PARAM_MAX_SP_UNLIMITED = 0,
3470 WMI_AP_PS_PEER_PARAM_MAX_SP_2 = 1,
3471 WMI_AP_PS_PEER_PARAM_MAX_SP_4 = 2,
3472 WMI_AP_PS_PEER_PARAM_MAX_SP_6 = 3,
3473 MAX_WMI_AP_PS_PEER_PARAM_MAX_SP,
3477 * AP power save parameter
3478 * Set a power save specific parameter for a peer station
3480 enum wmi_ap_ps_peer_param {
3481 /* Set uapsd configuration for a given peer.
3483 * Include the delivery and trigger enabled state for every AC.
3484 * The host MLME needs to set this based on AP capability and stations
3485 * request Set in the association request received from the station.
3487 * Lower 8 bits of the value specify the UAPSD configuration.
3489 * (see enum wmi_ap_ps_param_uapsd)
3490 * The default value is 0.
3492 WMI_AP_PS_PEER_PARAM_UAPSD = 0,
3495 * Set the service period for a UAPSD capable station
3497 * The service period from wme ie in the (re)assoc request frame.
3499 * (see enum wmi_ap_ps_peer_param_max_sp)
3501 WMI_AP_PS_PEER_PARAM_MAX_SP = 1,
3503 /* Time in seconds for aging out buffered frames for STA in PS */
3504 WMI_AP_PS_PEER_PARAM_AGEOUT_TIME = 2,
3507 struct wmi_ap_ps_peer_cmd {
3508 /* unique id identifying the VDEV, generated by the caller */
3511 /* peer MAC address */
3512 struct wmi_mac_addr peer_macaddr;
3514 /* AP powersave param (see enum wmi_ap_ps_peer_param) */
3517 /* AP powersave param value */
3521 /* 128 clients = 4 words */
3522 #define WMI_TIM_BITMAP_ARRAY_SIZE 4
3524 struct wmi_tim_info {
3527 __le32 tim_bitmap[WMI_TIM_BITMAP_ARRAY_SIZE];
3529 __le32 tim_num_ps_pending;
3532 /* Maximum number of NOA Descriptors supported */
3533 #define WMI_P2P_MAX_NOA_DESCRIPTORS 4
3534 #define WMI_P2P_OPPPS_ENABLE_BIT BIT(0)
3535 #define WMI_P2P_OPPPS_CTWINDOW_OFFSET 1
3536 #define WMI_P2P_NOA_CHANGED_BIT BIT(0)
3538 struct wmi_p2p_noa_info {
3539 /* Bit 0 - Flag to indicate an update in NOA schedule
3540 Bits 7-1 - Reserved */
3544 /* Bit 0 - Opp PS state of the AP
3545 Bits 1-7 - Ctwindow in TUs */
3547 /* Number of NOA descriptors */
3550 struct wmi_p2p_noa_descriptor descriptors[WMI_P2P_MAX_NOA_DESCRIPTORS];
3553 struct wmi_bcn_info {
3554 struct wmi_tim_info tim_info;
3555 struct wmi_p2p_noa_info p2p_noa_info;
3558 struct wmi_host_swba_event {
3560 struct wmi_bcn_info bcn_info[1];
3563 #define WMI_MAX_AP_VDEV 16
3565 struct wmi_tbtt_offset_event {
3567 __le32 tbttoffset_list[WMI_MAX_AP_VDEV];
3571 struct wmi_peer_create_cmd {
3573 struct wmi_mac_addr peer_macaddr;
3576 struct wmi_peer_delete_cmd {
3578 struct wmi_mac_addr peer_macaddr;
3581 struct wmi_peer_flush_tids_cmd {
3583 struct wmi_mac_addr peer_macaddr;
3584 __le32 peer_tid_bitmap;
3587 struct wmi_fixed_rate {
3589 * rate mode . 0: disable fixed rate (auto rate)
3590 * 1: legacy (non 11n) rate specified as ieee rate 2*Mbps
3591 * 2: ht20 11n rate specified as mcs index
3592 * 3: ht40 11n rate specified as mcs index
3596 * 4 rate values for 4 rate series. series 0 is stored in byte 0 (LSB)
3597 * and series 3 is stored at byte 3 (MSB)
3601 * 4 retry counts for 4 rate series. retry count for rate 0 is stored
3602 * in byte 0 (LSB) and retry count for rate 3 is stored at byte 3
3605 __le32 rate_retries;
3608 struct wmi_peer_fixed_rate_cmd {
3609 /* unique id identifying the VDEV, generated by the caller */
3611 /* peer MAC address */
3612 struct wmi_mac_addr peer_macaddr;
3614 struct wmi_fixed_rate peer_fixed_rate;
3617 #define WMI_MGMT_TID 17
3619 struct wmi_addba_clear_resp_cmd {
3620 /* unique id identifying the VDEV, generated by the caller */
3622 /* peer MAC address */
3623 struct wmi_mac_addr peer_macaddr;
3626 struct wmi_addba_send_cmd {
3627 /* unique id identifying the VDEV, generated by the caller */
3629 /* peer MAC address */
3630 struct wmi_mac_addr peer_macaddr;
3633 /* Buffer/Window size*/
3637 struct wmi_delba_send_cmd {
3638 /* unique id identifying the VDEV, generated by the caller */
3640 /* peer MAC address */
3641 struct wmi_mac_addr peer_macaddr;
3650 struct wmi_addba_setresponse_cmd {
3651 /* unique id identifying the vdev, generated by the caller */
3653 /* peer mac address */
3654 struct wmi_mac_addr peer_macaddr;
3661 struct wmi_send_singleamsdu_cmd {
3662 /* unique id identifying the vdev, generated by the caller */
3664 /* peer mac address */
3665 struct wmi_mac_addr peer_macaddr;
3670 enum wmi_peer_smps_state {
3671 WMI_PEER_SMPS_PS_NONE = 0x0,
3672 WMI_PEER_SMPS_STATIC = 0x1,
3673 WMI_PEER_SMPS_DYNAMIC = 0x2
3676 enum wmi_peer_param {
3677 WMI_PEER_SMPS_STATE = 0x1, /* see %wmi_peer_smps_state */
3678 WMI_PEER_AMPDU = 0x2,
3679 WMI_PEER_AUTHORIZE = 0x3,
3680 WMI_PEER_CHAN_WIDTH = 0x4,
3682 WMI_PEER_USE_4ADDR = 0x6
3685 struct wmi_peer_set_param_cmd {
3687 struct wmi_mac_addr peer_macaddr;
3692 #define MAX_SUPPORTED_RATES 128
3694 struct wmi_rate_set {
3695 /* total number of rates */
3698 * rates (each 8bit value) packed into a 32 bit word.
3699 * the rates are filled from least significant byte to most
3702 __le32 rates[(MAX_SUPPORTED_RATES/4)+1];
3705 struct wmi_rate_set_arg {
3706 unsigned int num_rates;
3707 u8 rates[MAX_SUPPORTED_RATES];
3711 * NOTE: It would bea good idea to represent the Tx MCS
3712 * info in one word and Rx in another word. This is split
3713 * into multiple words for convenience
3715 struct wmi_vht_rate_set {
3716 __le32 rx_max_rate; /* Max Rx data rate */
3717 __le32 rx_mcs_set; /* Negotiated RX VHT rates */
3718 __le32 tx_max_rate; /* Max Tx data rate */
3719 __le32 tx_mcs_set; /* Negotiated TX VHT rates */
3722 struct wmi_vht_rate_set_arg {
3729 struct wmi_peer_set_rates_cmd {
3730 /* peer MAC address */
3731 struct wmi_mac_addr peer_macaddr;
3732 /* legacy rate set */
3733 struct wmi_rate_set peer_legacy_rates;
3735 struct wmi_rate_set peer_ht_rates;
3738 struct wmi_peer_set_q_empty_callback_cmd {
3739 /* unique id identifying the VDEV, generated by the caller */
3741 /* peer MAC address */
3742 struct wmi_mac_addr peer_macaddr;
3743 __le32 callback_enable;
3746 #define WMI_PEER_AUTH 0x00000001
3747 #define WMI_PEER_QOS 0x00000002
3748 #define WMI_PEER_NEED_PTK_4_WAY 0x00000004
3749 #define WMI_PEER_NEED_GTK_2_WAY 0x00000010
3750 #define WMI_PEER_APSD 0x00000800
3751 #define WMI_PEER_HT 0x00001000
3752 #define WMI_PEER_40MHZ 0x00002000
3753 #define WMI_PEER_STBC 0x00008000
3754 #define WMI_PEER_LDPC 0x00010000
3755 #define WMI_PEER_DYN_MIMOPS 0x00020000
3756 #define WMI_PEER_STATIC_MIMOPS 0x00040000
3757 #define WMI_PEER_SPATIAL_MUX 0x00200000
3758 #define WMI_PEER_VHT 0x02000000
3759 #define WMI_PEER_80MHZ 0x04000000
3760 #define WMI_PEER_PMF 0x08000000
3763 * Peer rate capabilities.
3765 * This is of interest to the ratecontrol
3766 * module which resides in the firmware. The bit definitions are
3767 * consistent with that defined in if_athrate.c.
3769 #define WMI_RC_DS_FLAG 0x01
3770 #define WMI_RC_CW40_FLAG 0x02
3771 #define WMI_RC_SGI_FLAG 0x04
3772 #define WMI_RC_HT_FLAG 0x08
3773 #define WMI_RC_RTSCTS_FLAG 0x10
3774 #define WMI_RC_TX_STBC_FLAG 0x20
3775 #define WMI_RC_RX_STBC_FLAG 0xC0
3776 #define WMI_RC_RX_STBC_FLAG_S 6
3777 #define WMI_RC_WEP_TKIP_FLAG 0x100
3778 #define WMI_RC_TS_FLAG 0x200
3779 #define WMI_RC_UAPSD_FLAG 0x400
3781 /* Maximum listen interval supported by hw in units of beacon interval */
3782 #define ATH10K_MAX_HW_LISTEN_INTERVAL 5
3784 struct wmi_peer_assoc_complete_cmd {
3785 struct wmi_mac_addr peer_macaddr;
3787 __le32 peer_new_assoc; /* 1=assoc, 0=reassoc */
3788 __le32 peer_associd; /* 16 LSBs */
3790 __le32 peer_caps; /* 16 LSBs */
3791 __le32 peer_listen_intval;
3792 __le32 peer_ht_caps;
3793 __le32 peer_max_mpdu;
3794 __le32 peer_mpdu_density; /* 0..16 */
3795 __le32 peer_rate_caps;
3796 struct wmi_rate_set peer_legacy_rates;
3797 struct wmi_rate_set peer_ht_rates;
3798 __le32 peer_nss; /* num of spatial streams */
3799 __le32 peer_vht_caps;
3800 __le32 peer_phymode;
3801 struct wmi_vht_rate_set peer_vht_rates;
3802 /* HT Operation Element of the peer. Five bytes packed in 2
3803 * INT32 array and filled from lsb to msb. */
3804 __le32 peer_ht_info[2];
3807 struct wmi_peer_assoc_complete_arg {
3812 u32 peer_flags; /* see %WMI_PEER_ */
3814 u32 peer_listen_intval;
3817 u32 peer_mpdu_density; /* 0..16 */
3818 u32 peer_rate_caps; /* see %WMI_RC_ */
3819 struct wmi_rate_set_arg peer_legacy_rates;
3820 struct wmi_rate_set_arg peer_ht_rates;
3821 u32 peer_num_spatial_streams;
3823 enum wmi_phy_mode peer_phymode;
3824 struct wmi_vht_rate_set_arg peer_vht_rates;
3827 struct wmi_peer_add_wds_entry_cmd {
3828 /* peer MAC address */
3829 struct wmi_mac_addr peer_macaddr;
3831 struct wmi_mac_addr wds_macaddr;
3834 struct wmi_peer_remove_wds_entry_cmd {
3836 struct wmi_mac_addr wds_macaddr;
3839 struct wmi_peer_q_empty_callback_event {
3840 /* peer MAC address */
3841 struct wmi_mac_addr peer_macaddr;
3845 * Channel info WMI event
3847 struct wmi_chan_info_event {
3852 __le32 rx_clear_count;
3856 #define WMI_CHAN_INFO_FLAG_COMPLETE BIT(0)
3858 /* FIXME: empirically extrapolated */
3859 #define WMI_CHAN_INFO_MSEC(x) ((x) / 76595)
3861 /* Beacon filter wmi command info */
3862 #define BCN_FLT_MAX_SUPPORTED_IES 256
3863 #define BCN_FLT_MAX_ELEMS_IE_LIST (BCN_FLT_MAX_SUPPORTED_IES / 32)
3865 struct bss_bcn_stats {
3867 __le32 bss_bcnsdropped;
3868 __le32 bss_bcnsdelivered;
3871 struct bcn_filter_stats {
3872 __le32 bcns_dropped;
3873 __le32 bcns_delivered;
3874 __le32 activefilters;
3875 struct bss_bcn_stats bss_stats;
3878 struct wmi_add_bcn_filter_cmd {
3880 u32 ie_map[BCN_FLT_MAX_ELEMS_IE_LIST];
3883 enum wmi_sta_keepalive_method {
3884 WMI_STA_KEEPALIVE_METHOD_NULL_FRAME = 1,
3885 WMI_STA_KEEPALIVE_METHOD_UNSOLICITATED_ARP_RESPONSE = 2,
3888 /* note: ip4 addresses are in network byte order, i.e. big endian */
3889 struct wmi_sta_keepalive_arp_resp {
3890 __be32 src_ip4_addr;
3891 __be32 dest_ip4_addr;
3892 struct wmi_mac_addr dest_mac_addr;
3895 struct wmi_sta_keepalive_cmd {
3898 __le32 method; /* WMI_STA_KEEPALIVE_METHOD_ */
3899 __le32 interval; /* in seconds */
3900 struct wmi_sta_keepalive_arp_resp arp_resp;
3903 enum wmi_force_fw_hang_type {
3904 WMI_FORCE_FW_HANG_ASSERT = 1,
3905 WMI_FORCE_FW_HANG_NO_DETECT,
3906 WMI_FORCE_FW_HANG_CTRL_EP_FULL,
3907 WMI_FORCE_FW_HANG_EMPTY_POINT,
3908 WMI_FORCE_FW_HANG_STACK_OVERFLOW,
3909 WMI_FORCE_FW_HANG_INFINITE_LOOP,
3912 #define WMI_FORCE_FW_HANG_RANDOM_TIME 0xFFFFFFFF
3914 struct wmi_force_fw_hang_cmd {
3919 #define ATH10K_RTS_MAX 2347
3920 #define ATH10K_FRAGMT_THRESHOLD_MIN 540
3921 #define ATH10K_FRAGMT_THRESHOLD_MAX 2346
3923 #define WMI_MAX_EVENT 0x1000
3924 /* Maximum number of pending TXed WMI packets */
3925 #define WMI_SKB_HEADROOM sizeof(struct wmi_cmd_hdr)
3927 /* By default disable power save for IBSS */
3928 #define ATH10K_DEFAULT_ATIM 0
3933 int ath10k_wmi_attach(struct ath10k *ar);
3934 void ath10k_wmi_detach(struct ath10k *ar);
3935 int ath10k_wmi_wait_for_service_ready(struct ath10k *ar);
3936 int ath10k_wmi_wait_for_unified_ready(struct ath10k *ar);
3938 int ath10k_wmi_connect_htc_service(struct ath10k *ar);
3939 int ath10k_wmi_pdev_set_channel(struct ath10k *ar,
3940 const struct wmi_channel_arg *);
3941 int ath10k_wmi_pdev_suspend_target(struct ath10k *ar);
3942 int ath10k_wmi_pdev_resume_target(struct ath10k *ar);
3943 int ath10k_wmi_pdev_set_regdomain(struct ath10k *ar, u16 rd, u16 rd2g,
3944 u16 rd5g, u16 ctl2g, u16 ctl5g);
3945 int ath10k_wmi_pdev_set_param(struct ath10k *ar, u32 id, u32 value);
3946 int ath10k_wmi_cmd_init(struct ath10k *ar);
3947 int ath10k_wmi_start_scan(struct ath10k *ar, const struct wmi_start_scan_arg *);
3948 void ath10k_wmi_start_scan_init(struct ath10k *ar, struct wmi_start_scan_arg *);
3949 int ath10k_wmi_stop_scan(struct ath10k *ar,
3950 const struct wmi_stop_scan_arg *arg);
3951 int ath10k_wmi_vdev_create(struct ath10k *ar, u32 vdev_id,
3952 enum wmi_vdev_type type,
3953 enum wmi_vdev_subtype subtype,
3954 const u8 macaddr[ETH_ALEN]);
3955 int ath10k_wmi_vdev_delete(struct ath10k *ar, u32 vdev_id);
3956 int ath10k_wmi_vdev_start(struct ath10k *ar,
3957 const struct wmi_vdev_start_request_arg *);
3958 int ath10k_wmi_vdev_restart(struct ath10k *ar,
3959 const struct wmi_vdev_start_request_arg *);
3960 int ath10k_wmi_vdev_stop(struct ath10k *ar, u32 vdev_id);
3961 int ath10k_wmi_vdev_up(struct ath10k *ar, u32 vdev_id, u32 aid,
3963 int ath10k_wmi_vdev_down(struct ath10k *ar, u32 vdev_id);
3964 int ath10k_wmi_vdev_set_param(struct ath10k *ar, u32 vdev_id,
3965 u32 param_id, u32 param_value);
3966 int ath10k_wmi_vdev_install_key(struct ath10k *ar,
3967 const struct wmi_vdev_install_key_arg *arg);
3968 int ath10k_wmi_peer_create(struct ath10k *ar, u32 vdev_id,
3969 const u8 peer_addr[ETH_ALEN]);
3970 int ath10k_wmi_peer_delete(struct ath10k *ar, u32 vdev_id,
3971 const u8 peer_addr[ETH_ALEN]);
3972 int ath10k_wmi_peer_flush(struct ath10k *ar, u32 vdev_id,
3973 const u8 peer_addr[ETH_ALEN], u32 tid_bitmap);
3974 int ath10k_wmi_peer_set_param(struct ath10k *ar, u32 vdev_id,
3975 const u8 *peer_addr,
3976 enum wmi_peer_param param_id, u32 param_value);
3977 int ath10k_wmi_peer_assoc(struct ath10k *ar,
3978 const struct wmi_peer_assoc_complete_arg *arg);
3979 int ath10k_wmi_set_psmode(struct ath10k *ar, u32 vdev_id,
3980 enum wmi_sta_ps_mode psmode);
3981 int ath10k_wmi_set_sta_ps_param(struct ath10k *ar, u32 vdev_id,
3982 enum wmi_sta_powersave_param param_id,
3984 int ath10k_wmi_set_ap_ps_param(struct ath10k *ar, u32 vdev_id, const u8 *mac,
3985 enum wmi_ap_ps_peer_param param_id, u32 value);
3986 int ath10k_wmi_scan_chan_list(struct ath10k *ar,
3987 const struct wmi_scan_chan_list_arg *arg);
3988 int ath10k_wmi_beacon_send_nowait(struct ath10k *ar,
3989 const struct wmi_bcn_tx_arg *arg);
3990 int ath10k_wmi_pdev_set_wmm_params(struct ath10k *ar,
3991 const struct wmi_pdev_set_wmm_params_arg *arg);
3992 int ath10k_wmi_request_stats(struct ath10k *ar, enum wmi_stats_id stats_id);
3993 int ath10k_wmi_force_fw_hang(struct ath10k *ar,
3994 enum wmi_force_fw_hang_type type, u32 delay_ms);
3995 int ath10k_wmi_mgmt_tx(struct ath10k *ar, struct sk_buff *skb);
3997 #endif /* _WMI_H_ */