1 //------------------------------------------------------------------------------
2 // Copyright (c) 2004-2010 Atheros Corporation. All rights reserved.
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.
19 // Author(s): ="Atheros"
20 //------------------------------------------------------------------------------
23 * This file contains the definitions of the WMI protocol specified in the
24 * Wireless Module Interface (WMI). It includes definitions of all the
25 * commands and events. Commands are messages from the host to the WM.
26 * Events and Replies are messages from the WM to the host.
28 * Ownership of correctness in regards to commands
29 * belongs to the host driver and the WMI is not required to validate
30 * parameters for value, proper range, or any other checking.
38 #include "wlan_defs.h"
44 #define HTC_PROTOCOL_VERSION 0x0002
45 #define HTC_PROTOCOL_REVISION 0x0000
47 #define WMI_PROTOCOL_VERSION 0x0002
48 #define WMI_PROTOCOL_REVISION 0x0000
50 #define ATH_MAC_LEN 6 /* length of mac in bytes */
51 #define WMI_CMD_MAX_LEN 100
52 #define WMI_CONTROL_MSG_MAX_LEN 256
53 #define WMI_OPT_CONTROL_MSG_MAX_LEN 1536
54 #define IS_ETHERTYPE(_typeOrLen) ((_typeOrLen) >= 0x0600)
55 #define RFC1042OUI {0x00, 0x00, 0x00}
57 #define IP_ETHERTYPE 0x0800
59 #define WMI_IMPLICIT_PSTREAM 0xFF
60 #define WMI_MAX_THINSTREAM 15
63 #define IBSS_MAX_NUM_STA 4
65 #define IBSS_MAX_NUM_STA 8
68 PREPACK struct host_app_area_s {
75 typedef PREPACK struct {
76 u8 dstMac[ATH_MAC_LEN];
77 u8 srcMac[ATH_MAC_LEN];
79 } POSTPACK ATH_MAC_HDR;
81 typedef PREPACK struct {
87 } POSTPACK ATH_LLC_SNAP_HDR;
98 * Macros for operating on WMI_DATA_HDR (info) field
101 #define WMI_DATA_HDR_MSG_TYPE_MASK 0x03
102 #define WMI_DATA_HDR_MSG_TYPE_SHIFT 0
103 #define WMI_DATA_HDR_UP_MASK 0x07
104 #define WMI_DATA_HDR_UP_SHIFT 2
105 /* In AP mode, the same bit (b5) is used to indicate Power save state in
106 * the Rx dir and More data bit state in the tx direction.
108 #define WMI_DATA_HDR_PS_MASK 0x1
109 #define WMI_DATA_HDR_PS_SHIFT 5
111 #define WMI_DATA_HDR_MORE_MASK 0x1
112 #define WMI_DATA_HDR_MORE_SHIFT 5
115 WMI_DATA_HDR_DATA_TYPE_802_3 = 0,
116 WMI_DATA_HDR_DATA_TYPE_802_11,
117 WMI_DATA_HDR_DATA_TYPE_ACL, /* used to be used for the PAL */
118 } WMI_DATA_HDR_DATA_TYPE;
120 #define WMI_DATA_HDR_DATA_TYPE_MASK 0x3
121 #define WMI_DATA_HDR_DATA_TYPE_SHIFT 6
123 #define WMI_DATA_HDR_SET_MORE_BIT(h) ((h)->info |= (WMI_DATA_HDR_MORE_MASK << WMI_DATA_HDR_MORE_SHIFT))
125 #define WMI_DATA_HDR_IS_MSG_TYPE(h, t) (((h)->info & (WMI_DATA_HDR_MSG_TYPE_MASK)) == (t))
126 #define WMI_DATA_HDR_SET_MSG_TYPE(h, t) (h)->info = (((h)->info & ~(WMI_DATA_HDR_MSG_TYPE_MASK << WMI_DATA_HDR_MSG_TYPE_SHIFT)) | (t << WMI_DATA_HDR_MSG_TYPE_SHIFT))
127 #define WMI_DATA_HDR_GET_UP(h) (((h)->info >> WMI_DATA_HDR_UP_SHIFT) & WMI_DATA_HDR_UP_MASK)
128 #define WMI_DATA_HDR_SET_UP(h, p) (h)->info = (((h)->info & ~(WMI_DATA_HDR_UP_MASK << WMI_DATA_HDR_UP_SHIFT)) | (p << WMI_DATA_HDR_UP_SHIFT))
130 #define WMI_DATA_HDR_GET_DATA_TYPE(h) (((h)->info >> WMI_DATA_HDR_DATA_TYPE_SHIFT) & WMI_DATA_HDR_DATA_TYPE_MASK)
131 #define WMI_DATA_HDR_SET_DATA_TYPE(h, p) (h)->info = (((h)->info & ~(WMI_DATA_HDR_DATA_TYPE_MASK << WMI_DATA_HDR_DATA_TYPE_SHIFT)) | ((p) << WMI_DATA_HDR_DATA_TYPE_SHIFT))
133 #define WMI_DATA_HDR_GET_DOT11(h) (WMI_DATA_HDR_GET_DATA_TYPE((h)) == WMI_DATA_HDR_DATA_TYPE_802_11)
134 #define WMI_DATA_HDR_SET_DOT11(h, p) WMI_DATA_HDR_SET_DATA_TYPE((h), (p))
136 /* Macros for operating on WMI_DATA_HDR (info2) field */
137 #define WMI_DATA_HDR_SEQNO_MASK 0xFFF
138 #define WMI_DATA_HDR_SEQNO_SHIFT 0
140 #define WMI_DATA_HDR_AMSDU_MASK 0x1
141 #define WMI_DATA_HDR_AMSDU_SHIFT 12
143 #define WMI_DATA_HDR_META_MASK 0x7
144 #define WMI_DATA_HDR_META_SHIFT 13
146 #define GET_SEQ_NO(_v) ((_v) & WMI_DATA_HDR_SEQNO_MASK)
147 #define GET_ISMSDU(_v) ((_v) & WMI_DATA_HDR_AMSDU_MASK)
149 #define WMI_DATA_HDR_GET_SEQNO(h) GET_SEQ_NO((h)->info2 >> WMI_DATA_HDR_SEQNO_SHIFT)
150 #define WMI_DATA_HDR_SET_SEQNO(h, _v) ((h)->info2 = ((h)->info2 & ~(WMI_DATA_HDR_SEQNO_MASK << WMI_DATA_HDR_SEQNO_SHIFT)) | (GET_SEQ_NO(_v) << WMI_DATA_HDR_SEQNO_SHIFT))
152 #define WMI_DATA_HDR_IS_AMSDU(h) GET_ISMSDU((h)->info2 >> WMI_DATA_HDR_AMSDU_SHIFT)
153 #define WMI_DATA_HDR_SET_AMSDU(h, _v) ((h)->info2 = ((h)->info2 & ~(WMI_DATA_HDR_AMSDU_MASK << WMI_DATA_HDR_AMSDU_SHIFT)) | (GET_ISMSDU(_v) << WMI_DATA_HDR_AMSDU_SHIFT))
155 #define WMI_DATA_HDR_GET_META(h) (((h)->info2 >> WMI_DATA_HDR_META_SHIFT) & WMI_DATA_HDR_META_MASK)
156 #define WMI_DATA_HDR_SET_META(h, _v) ((h)->info2 = ((h)->info2 & ~(WMI_DATA_HDR_META_MASK << WMI_DATA_HDR_META_SHIFT)) | ((_v) << WMI_DATA_HDR_META_SHIFT))
158 /* Macros for operating on WMI_DATA_HDR (info3) field */
159 #define WMI_DATA_HDR_DEVID_MASK 0xF
160 #define WMI_DATA_HDR_DEVID_SHIFT 0
161 #define GET_DEVID(_v) ((_v) & WMI_DATA_HDR_DEVID_MASK)
163 #define WMI_DATA_HDR_GET_DEVID(h) \
164 (((h)->info3 >> WMI_DATA_HDR_DEVID_SHIFT) & WMI_DATA_HDR_DEVID_MASK)
165 #define WMI_DATA_HDR_SET_DEVID(h, _v) \
166 ((h)->info3 = ((h)->info3 & ~(WMI_DATA_HDR_DEVID_MASK << WMI_DATA_HDR_DEVID_SHIFT)) | (GET_DEVID(_v) << WMI_DATA_HDR_DEVID_SHIFT))
168 typedef PREPACK struct {
170 u8 info; /* usage of 'info' field(8-bit):
171 * b1:b0 - WMI_MSG_TYPE
173 * b5 - Used in AP mode. More-data in tx dir, PS in rx.
174 * b7:b6 - Dot3 header(0),
179 u16 info2; /* usage of 'info2' field(16-bit):
182 * b15:b13 - META_DATA_VERSION 0 - 7
185 } POSTPACK WMI_DATA_HDR;
188 * TX META VERSION DEFINITIONS
190 #define WMI_MAX_TX_META_SZ (12)
191 #define WMI_MAX_TX_META_VERSION (7)
192 #define WMI_META_VERSION_1 (0x01)
193 #define WMI_META_VERSION_2 (0X02)
195 #define WMI_ACL_TO_DOT11_HEADROOM 36
197 #if 0 /* removed to prevent compile errors for WM.. */
198 typedef PREPACK struct {
199 /* intentionally empty. Default version is no meta data. */
200 } POSTPACK WMI_TX_META_V0;
203 typedef PREPACK struct {
204 u8 pktID; /* The packet ID to identify the tx request */
205 u8 ratePolicyID; /* The rate policy to be used for the tx of this frame */
206 } POSTPACK WMI_TX_META_V1;
209 #define WMI_CSUM_DIR_TX (0x1)
210 #define TX_CSUM_CALC_FILL (0x1)
211 typedef PREPACK struct {
212 u8 csumStart; /*Offset from start of the WMI header for csum calculation to begin */
213 u8 csumDest; /*Offset from start of WMI header where final csum goes*/
214 u8 csumFlags; /*number of bytes over which csum is calculated*/
215 } POSTPACK WMI_TX_META_V2;
219 * RX META VERSION DEFINITIONS
221 /* if RX meta data is present at all then the meta data field
222 * will consume WMI_MAX_RX_META_SZ bytes of space between the
223 * WMI_DATA_HDR and the payload. How much of the available
224 * Meta data is actually used depends on which meta data
225 * version is active. */
226 #define WMI_MAX_RX_META_SZ (12)
227 #define WMI_MAX_RX_META_VERSION (7)
229 #define WMI_RX_STATUS_OK 0 /* success */
230 #define WMI_RX_STATUS_DECRYPT_ERR 1 /* decrypt error */
231 #define WMI_RX_STATUS_MIC_ERR 2 /* tkip MIC error */
232 #define WMI_RX_STATUS_ERR 3 /* undefined error */
234 #define WMI_RX_FLAGS_AGGR 0x0001 /* part of AGGR */
235 #define WMI_RX_FlAGS_STBC 0x0002 /* used STBC */
236 #define WMI_RX_FLAGS_SGI 0x0004 /* used SGI */
237 #define WMI_RX_FLAGS_HT 0x0008 /* is HT packet */
238 /* the flags field is also used to store the CRYPTO_TYPE of the frame
239 * that value is shifted by WMI_RX_FLAGS_CRYPTO_SHIFT */
240 #define WMI_RX_FLAGS_CRYPTO_SHIFT 4
241 #define WMI_RX_FLAGS_CRYPTO_MASK 0x1f
242 #define WMI_RX_META_GET_CRYPTO(flags) (((flags) >> WMI_RX_FLAGS_CRYPTO_SHIFT) & WMI_RX_FLAGS_CRYPTO_MASK)
244 #if 0 /* removed to prevent compile errors for WM.. */
245 typedef PREPACK struct {
246 /* intentionally empty. Default version is no meta data. */
247 } POSTPACK WMI_RX_META_VERSION_0;
250 typedef PREPACK struct {
251 u8 status; /* one of WMI_RX_STATUS_... */
252 u8 rix; /* rate index mapped to rate at which this packet was received. */
253 u8 rssi; /* rssi of packet */
254 u8 channel;/* rf channel during packet reception */
255 u16 flags; /* a combination of WMI_RX_FLAGS_... */
256 } POSTPACK WMI_RX_META_V1;
258 #define RX_CSUM_VALID_FLAG (0x1)
259 typedef PREPACK struct {
261 u8 csumFlags;/* bit 0 set -partial csum valid
262 bit 1 set -test mode */
263 } POSTPACK WMI_RX_META_V2;
267 #define WMI_GET_DEVICE_ID(info1) ((info1) & 0xF)
268 /* Macros for operating on WMI_CMD_HDR (info1) field */
269 #define WMI_CMD_HDR_DEVID_MASK 0xF
270 #define WMI_CMD_HDR_DEVID_SHIFT 0
271 #define GET_CMD_DEVID(_v) ((_v) & WMI_CMD_HDR_DEVID_MASK)
273 #define WMI_CMD_HDR_GET_DEVID(h) \
274 (((h)->info1 >> WMI_CMD_HDR_DEVID_SHIFT) & WMI_CMD_HDR_DEVID_MASK)
275 #define WMI_CMD_HDR_SET_DEVID(h, _v) \
276 ((h)->info1 = ((h)->info1 & \
277 ~(WMI_CMD_HDR_DEVID_MASK << WMI_CMD_HDR_DEVID_SHIFT)) | \
278 (GET_CMD_DEVID(_v) << WMI_CMD_HDR_DEVID_SHIFT))
283 typedef PREPACK struct {
292 u16 reserved; /* For alignment */
293 } POSTPACK WMI_CMD_HDR; /* used for commands and events */
299 WMI_CONNECT_CMDID = 0x0001,
301 WMI_DISCONNECT_CMDID,
302 WMI_SYNCHRONIZE_CMDID,
303 WMI_CREATE_PSTREAM_CMDID,
304 WMI_DELETE_PSTREAM_CMDID,
305 WMI_START_SCAN_CMDID,
306 WMI_SET_SCAN_PARAMS_CMDID,
307 WMI_SET_BSS_FILTER_CMDID,
308 WMI_SET_PROBED_SSID_CMDID, /* 10 */
309 WMI_SET_LISTEN_INT_CMDID,
310 WMI_SET_BMISS_TIME_CMDID,
311 WMI_SET_DISC_TIMEOUT_CMDID,
312 WMI_GET_CHANNEL_LIST_CMDID,
313 WMI_SET_BEACON_INT_CMDID,
314 WMI_GET_STATISTICS_CMDID,
315 WMI_SET_CHANNEL_PARAMS_CMDID,
316 WMI_SET_POWER_MODE_CMDID,
317 WMI_SET_IBSS_PM_CAPS_CMDID,
318 WMI_SET_POWER_PARAMS_CMDID, /* 20 */
319 WMI_SET_POWERSAVE_TIMERS_POLICY_CMDID,
320 WMI_ADD_CIPHER_KEY_CMDID,
321 WMI_DELETE_CIPHER_KEY_CMDID,
323 WMI_DELETE_KRK_CMDID,
325 WMI_SET_TX_PWR_CMDID,
326 WMI_GET_TX_PWR_CMDID,
327 WMI_SET_ASSOC_INFO_CMDID,
328 WMI_ADD_BAD_AP_CMDID, /* 30 */
329 WMI_DELETE_BAD_AP_CMDID,
330 WMI_SET_TKIP_COUNTERMEASURES_CMDID,
331 WMI_RSSI_THRESHOLD_PARAMS_CMDID,
332 WMI_TARGET_ERROR_REPORT_BITMASK_CMDID,
333 WMI_SET_ACCESS_PARAMS_CMDID,
334 WMI_SET_RETRY_LIMITS_CMDID,
335 WMI_SET_OPT_MODE_CMDID,
336 WMI_OPT_TX_FRAME_CMDID,
337 WMI_SET_VOICE_PKT_SIZE_CMDID,
338 WMI_SET_MAX_SP_LEN_CMDID, /* 40 */
339 WMI_SET_ROAM_CTRL_CMDID,
340 WMI_GET_ROAM_TBL_CMDID,
341 WMI_GET_ROAM_DATA_CMDID,
343 WMI_SET_MAX_OFFHOME_DURATION_CMDID,
344 WMI_EXTENSION_CMDID, /* Non-wireless extensions */
345 WMI_SNR_THRESHOLD_PARAMS_CMDID,
346 WMI_LQ_THRESHOLD_PARAMS_CMDID,
347 WMI_SET_LPREAMBLE_CMDID,
348 WMI_SET_RTS_CMDID, /* 50 */
349 WMI_CLR_RSSI_SNR_CMDID,
350 WMI_SET_FIXRATES_CMDID,
351 WMI_GET_FIXRATES_CMDID,
352 WMI_SET_AUTH_MODE_CMDID,
353 WMI_SET_REASSOC_MODE_CMDID,
355 WMI_SET_WMM_TXOP_CMDID,
357 /* COEX AR6002 only*/
358 WMI_SET_BT_STATUS_CMDID,
359 WMI_SET_BT_PARAMS_CMDID, /* 60 */
361 WMI_SET_KEEPALIVE_CMDID,
362 WMI_GET_KEEPALIVE_CMDID,
365 WMI_SET_WSC_STATUS_CMDID,
367 /* Wake on Wireless */
368 WMI_SET_HOST_SLEEP_MODE_CMDID,
369 WMI_SET_WOW_MODE_CMDID,
370 WMI_GET_WOW_LIST_CMDID,
371 WMI_ADD_WOW_PATTERN_CMDID,
372 WMI_DEL_WOW_PATTERN_CMDID, /* 70 */
374 WMI_SET_FRAMERATES_CMDID,
376 WMI_SET_QOS_SUPP_CMDID,
377 /* WMI_THIN_RESERVED_... mark the start and end
378 * values for WMI_THIN_RESERVED command IDs. These
379 * command IDs can be found in wmi_thin.h */
380 WMI_THIN_RESERVED_START = 0x8000,
381 WMI_THIN_RESERVED_END = 0x8fff,
383 * Developer commands starts at 0xF000
385 WMI_SET_BITRATE_CMDID = 0xF000,
386 WMI_GET_BITRATE_CMDID,
387 WMI_SET_WHALPARAM_CMDID,
390 /*Should add the new command to the tail for compatible with
393 WMI_SET_MAC_ADDRESS_CMDID,
394 WMI_SET_AKMP_PARAMS_CMDID,
395 WMI_SET_PMKID_LIST_CMDID,
396 WMI_GET_PMKID_LIST_CMDID,
397 WMI_ABORT_SCAN_CMDID,
398 WMI_SET_TARGET_EVENT_REPORT_CMDID,
407 WMI_AP_HIDDEN_SSID_CMDID,
408 WMI_AP_SET_NUM_STA_CMDID,
409 WMI_AP_ACL_POLICY_CMDID,
410 WMI_AP_ACL_MAC_LIST_CMDID,
411 WMI_AP_CONFIG_COMMIT_CMDID,
412 WMI_AP_SET_MLME_CMDID,
413 WMI_AP_SET_PVB_CMDID,
414 WMI_AP_CONN_INACT_CMDID,
415 WMI_AP_PROT_SCAN_TIME_CMDID,
416 WMI_AP_SET_COUNTRY_CMDID,
417 WMI_AP_SET_DTIM_CMDID,
418 WMI_AP_MODE_STAT_CMDID,
421 WMI_SET_PARAMS_CMDID,
422 WMI_SET_MCAST_FILTER_CMDID,
423 WMI_DEL_MCAST_FILTER_CMDID,
425 WMI_ALLOW_AGGR_CMDID,
428 WMI_SET_HT_CAP_CMDID,
430 WMI_SET_TX_SELECT_RATES_CMDID,
431 WMI_SET_TX_SGI_PARAM_CMDID,
432 WMI_SET_RATE_POLICY_CMDID,
435 WMI_RX_FRAME_FORMAT_CMDID,
436 WMI_SET_THIN_MODE_CMDID,
437 WMI_SET_BT_WLAN_CONN_PRECEDENCE_CMDID,
439 WMI_AP_SET_11BG_RATESET_CMDID,
441 WMI_MCAST_FILTER_CMDID,
442 /* COEX CMDID AR6003*/
443 WMI_SET_BTCOEX_FE_ANT_CMDID,
444 WMI_SET_BTCOEX_COLOCATED_BT_DEV_CMDID,
445 WMI_SET_BTCOEX_SCO_CONFIG_CMDID,
446 WMI_SET_BTCOEX_A2DP_CONFIG_CMDID,
447 WMI_SET_BTCOEX_ACLCOEX_CONFIG_CMDID,
448 WMI_SET_BTCOEX_BTINQUIRY_PAGE_CONFIG_CMDID,
449 WMI_SET_BTCOEX_DEBUG_CMDID,
450 WMI_SET_BTCOEX_BT_OPERATING_STATUS_CMDID,
451 WMI_GET_BTCOEX_STATS_CMDID,
452 WMI_GET_BTCOEX_CONFIG_CMDID,
454 WMI_SET_DFS_ENABLE_CMDID, /* F034 */
455 WMI_SET_DFS_MINRSSITHRESH_CMDID,
456 WMI_SET_DFS_MAXPULSEDUR_CMDID,
457 WMI_DFS_RADAR_DETECTED_CMDID,
460 WMI_P2P_SET_CONFIG_CMDID, /* F038 */
461 WMI_WPS_SET_CONFIG_CMDID,
462 WMI_SET_REQ_DEV_ATTR_CMDID,
464 WMI_P2P_STOP_FIND_CMDID,
465 WMI_P2P_GO_NEG_START_CMDID,
466 WMI_P2P_LISTEN_CMDID,
468 WMI_CONFIG_TX_MAC_RULES_CMDID, /* F040 */
469 WMI_SET_PROMISCUOUS_MODE_CMDID,
470 WMI_RX_FRAME_FILTER_CMDID,
471 WMI_SET_CHANNEL_CMDID,
474 WMI_ENABLE_WAC_CMDID,
475 WMI_WAC_SCAN_REPLY_CMDID,
476 WMI_WAC_CTRL_REQ_CMDID,
477 WMI_SET_DIV_PARAMS_CMDID,
480 WMI_SET_PASSPHRASE_CMDID,
481 WMI_SEND_ASSOC_RES_CMDID,
482 WMI_SET_ASSOC_REQ_RELAY_CMDID,
483 WMI_GET_RFKILL_MODE_CMDID,
485 /* ACS command, consists of sub-commands */
488 /* Ultra low power store / recall commands */
489 WMI_STORERECALL_CONFIGURE_CMDID,
490 WMI_STORERECALL_RECALL_CMDID,
491 WMI_STORERECALL_HOST_READY_CMDID,
492 WMI_FORCE_TARGET_ASSERT_CMDID,
493 WMI_SET_EXCESS_TX_RETRY_THRES_CMDID,
500 WMI_FRAME_BEACON = 0,
502 WMI_FRAME_PROBE_RESP,
504 WMI_FRAME_ASSOC_RESP,
506 } WMI_MGMT_FRAME_TYPE;
512 INFRA_NETWORK = 0x01,
513 ADHOC_NETWORK = 0x02,
514 ADHOC_CREATOR = 0x04,
521 LEAP_AUTH = 0x04, /* different from IEEE_AUTH_MODE definitions */
526 AUTH_OPEN_IN_PROGRESS,
534 WPA2_PSK_AUTH = 0x10,
535 WPA_AUTH_CCKM = 0x20,
536 WPA2_AUTH_CCKM = 0x40,
546 #endif /*WAPI_ENABLE*/
549 #define WMI_MIN_CRYPTO_TYPE NONE_CRYPT
550 #define WMI_MAX_CRYPTO_TYPE (AES_CRYPT + 1)
553 #undef WMI_MAX_CRYPTO_TYPE
554 #define WMI_MAX_CRYPTO_TYPE (WAPI_CRYPT + 1)
555 #endif /* WAPI_ENABLE */
558 #define IW_ENCODE_ALG_SM4 0x20
559 #define IW_AUTH_WAPI_ENABLED 0x20
562 #define WMI_MIN_KEY_INDEX 0
563 #define WMI_MAX_KEY_INDEX 3
566 #undef WMI_MAX_KEY_INDEX
567 #define WMI_MAX_KEY_INDEX 7 /* wapi grpKey 0-3, prwKey 4-7 */
568 #endif /* WAPI_ENABLE */
570 #define WMI_MAX_KEY_LEN 32
572 #define WMI_MAX_SSID_LEN 32
575 CONNECT_ASSOC_POLICY_USER = 0x0001,
576 CONNECT_SEND_REASSOC = 0x0002,
577 CONNECT_IGNORE_WPAx_GROUP_CIPHER = 0x0004,
578 CONNECT_PROFILE_MATCH_DONE = 0x0008,
579 CONNECT_IGNORE_AAC_BEACON = 0x0010,
580 CONNECT_CSA_FOLLOW_BSS = 0x0020,
581 CONNECT_DO_WPA_OFFLOAD = 0x0040,
582 CONNECT_DO_NOT_DEAUTH = 0x0080,
583 } WMI_CONNECT_CTRL_FLAGS_BITS;
585 #define DEFAULT_CONNECT_CTRL_FLAGS (CONNECT_CSA_FOLLOW_BSS)
587 typedef PREPACK struct {
591 u8 pairwiseCryptoType;
592 u8 pairwiseCryptoLen;
596 u8 ssid[WMI_MAX_SSID_LEN];
598 u8 bssid[ATH_MAC_LEN];
600 } POSTPACK WMI_CONNECT_CMD;
603 * WMI_RECONNECT_CMDID
605 typedef PREPACK struct {
606 u16 channel; /* hint */
607 u8 bssid[ATH_MAC_LEN]; /* mandatory if set */
608 } POSTPACK WMI_RECONNECT_CMD;
610 #define WMI_PMK_LEN 32
611 typedef PREPACK struct {
613 } POSTPACK WMI_SET_PMK_CMD;
616 * WMI_SET_EXCESS_TX_RETRY_THRES_CMDID
618 typedef PREPACK struct {
620 } POSTPACK WMI_SET_EXCESS_TX_RETRY_THRES_CMD;
623 * WMI_ADD_CIPHER_KEY_CMDID
626 PAIRWISE_USAGE = 0x00,
628 TX_USAGE = 0x02, /* default Tx Key - Static WEP only */
633 * Bit 0 - Initialise TSC - default is Initialize
635 #define KEY_OP_INIT_TSC 0x01
636 #define KEY_OP_INIT_RSC 0x02
638 #define KEY_OP_INIT_WAPIPN 0x10
639 #endif /* WAPI_ENABLE */
641 #define KEY_OP_INIT_VAL 0x03 /* Default Initialise the TSC & RSC */
642 #define KEY_OP_VALID_MASK 0x03
644 typedef PREPACK struct {
647 u8 keyUsage; /* KEY_USAGE */
649 u8 keyRSC[8]; /* key replay sequence counter */
650 u8 key[WMI_MAX_KEY_LEN];
651 u8 key_op_ctrl; /* Additional Key Control information */
652 u8 key_macaddr[ATH_MAC_LEN];
653 } POSTPACK WMI_ADD_CIPHER_KEY_CMD;
656 * WMI_DELETE_CIPHER_KEY_CMDID
658 typedef PREPACK struct {
660 } POSTPACK WMI_DELETE_CIPHER_KEY_CMD;
662 #define WMI_KRK_LEN 16
666 typedef PREPACK struct {
668 } POSTPACK WMI_ADD_KRK_CMD;
671 * WMI_SET_TKIP_COUNTERMEASURES_CMDID
674 WMI_TKIP_CM_DISABLE = 0x0,
675 WMI_TKIP_CM_ENABLE = 0x1,
676 } WMI_TKIP_CM_CONTROL;
678 typedef PREPACK struct {
679 u8 cm_en; /* WMI_TKIP_CM_CONTROL */
680 } POSTPACK WMI_SET_TKIP_COUNTERMEASURES_CMD;
683 * WMI_SET_PMKID_CMDID
686 #define WMI_PMKID_LEN 16
693 typedef PREPACK struct {
694 u8 bssid[ATH_MAC_LEN];
695 u8 enable; /* PMKID_ENABLE_FLG */
696 u8 pmkid[WMI_PMKID_LEN];
697 } POSTPACK WMI_SET_PMKID_CMD;
707 typedef PREPACK struct {
709 u32 isLegacy; /* For Legacy Cisco AP compatibility */
710 u32 homeDwellTime; /* Maximum duration in the home channel(milliseconds) */
711 u32 forceScanInterval; /* Time interval between scans (milliseconds)*/
712 u8 scanType; /* WMI_SCAN_TYPE */
713 u8 numChannels; /* how many channels follow */
714 u16 channelList[1]; /* channels in Mhz */
715 } POSTPACK WMI_START_SCAN_CMD;
718 * WMI_SET_SCAN_PARAMS_CMDID
720 #define WMI_SHORTSCANRATIO_DEFAULT 3
722 * Warning: ScanCtrlFlag value of 0xFF is used to disable all flags in WMI_SCAN_PARAMS_CMD
723 * Do not add any more flags to WMI_SCAN_CTRL_FLAG_BITS
726 CONNECT_SCAN_CTRL_FLAGS = 0x01, /* set if can scan in the Connect cmd */
727 SCAN_CONNECTED_CTRL_FLAGS = 0x02, /* set if scan for the SSID it is */
728 /* already connected to */
729 ACTIVE_SCAN_CTRL_FLAGS = 0x04, /* set if enable active scan */
730 ROAM_SCAN_CTRL_FLAGS = 0x08, /* set if enable roam scan when bmiss and lowrssi */
731 REPORT_BSSINFO_CTRL_FLAGS = 0x10, /* set if follows customer BSSINFO reporting rule */
732 ENABLE_AUTO_CTRL_FLAGS = 0x20, /* if disabled, target doesn't
733 scan after a disconnect event */
734 ENABLE_SCAN_ABORT_EVENT = 0x40 /* Scan complete event with canceled status will be generated when a scan is prempted before it gets completed */
735 } WMI_SCAN_CTRL_FLAGS_BITS;
737 #define CAN_SCAN_IN_CONNECT(flags) (flags & CONNECT_SCAN_CTRL_FLAGS)
738 #define CAN_SCAN_CONNECTED(flags) (flags & SCAN_CONNECTED_CTRL_FLAGS)
739 #define ENABLE_ACTIVE_SCAN(flags) (flags & ACTIVE_SCAN_CTRL_FLAGS)
740 #define ENABLE_ROAM_SCAN(flags) (flags & ROAM_SCAN_CTRL_FLAGS)
741 #define CONFIG_REPORT_BSSINFO(flags) (flags & REPORT_BSSINFO_CTRL_FLAGS)
742 #define IS_AUTO_SCAN_ENABLED(flags) (flags & ENABLE_AUTO_CTRL_FLAGS)
743 #define SCAN_ABORT_EVENT_ENABLED(flags) (flags & ENABLE_SCAN_ABORT_EVENT)
745 #define DEFAULT_SCAN_CTRL_FLAGS (CONNECT_SCAN_CTRL_FLAGS| SCAN_CONNECTED_CTRL_FLAGS| ACTIVE_SCAN_CTRL_FLAGS| ROAM_SCAN_CTRL_FLAGS | ENABLE_AUTO_CTRL_FLAGS)
748 typedef PREPACK struct {
749 u16 fg_start_period; /* seconds */
750 u16 fg_end_period; /* seconds */
751 u16 bg_period; /* seconds */
752 u16 maxact_chdwell_time; /* msec */
753 u16 pas_chdwell_time; /* msec */
754 u8 shortScanRatio; /* how many shorts scan for one long */
756 u16 minact_chdwell_time; /* msec */
757 u16 maxact_scan_per_ssid; /* max active scans per ssid */
758 u32 max_dfsch_act_time; /* msecs */
759 } POSTPACK WMI_SCAN_PARAMS_CMD;
762 * WMI_SET_BSS_FILTER_CMDID
765 NONE_BSS_FILTER = 0x0, /* no beacons forwarded */
766 ALL_BSS_FILTER, /* all beacons forwarded */
767 PROFILE_FILTER, /* only beacons matching profile */
768 ALL_BUT_PROFILE_FILTER, /* all but beacons matching profile */
769 CURRENT_BSS_FILTER, /* only beacons matching current BSS */
770 ALL_BUT_BSS_FILTER, /* all but beacons matching BSS */
771 PROBED_SSID_FILTER, /* beacons matching probed ssid */
772 LAST_BSS_FILTER, /* marker only */
775 typedef PREPACK struct {
776 u8 bssFilter; /* see WMI_BSS_FILTER */
777 u8 reserved1; /* For alignment */
778 u16 reserved2; /* For alignment */
780 } POSTPACK WMI_BSS_FILTER_CMD;
783 * WMI_SET_PROBED_SSID_CMDID
785 #define MAX_PROBED_SSID_INDEX 9
788 DISABLE_SSID_FLAG = 0, /* disables entry */
789 SPECIFIC_SSID_FLAG = 0x01, /* probes specified ssid */
790 ANY_SSID_FLAG = 0x02, /* probes for any ssid */
793 typedef PREPACK struct {
794 u8 entryIndex; /* 0 to MAX_PROBED_SSID_INDEX */
795 u8 flag; /* WMI_SSID_FLG */
798 } POSTPACK WMI_PROBED_SSID_CMD;
801 * WMI_SET_LISTEN_INT_CMDID
802 * The Listen interval is between 15 and 3000 TUs
804 #define MIN_LISTEN_INTERVAL 15
805 #define MAX_LISTEN_INTERVAL 5000
806 #define MIN_LISTEN_BEACONS 1
807 #define MAX_LISTEN_BEACONS 50
809 typedef PREPACK struct {
812 } POSTPACK WMI_LISTEN_INT_CMD;
815 * WMI_SET_BEACON_INT_CMDID
817 typedef PREPACK struct {
819 } POSTPACK WMI_BEACON_INT_CMD;
822 * WMI_SET_BMISS_TIME_CMDID
823 * valid values are between 1000 and 5000 TUs
826 #define MIN_BMISS_TIME 1000
827 #define MAX_BMISS_TIME 5000
828 #define MIN_BMISS_BEACONS 1
829 #define MAX_BMISS_BEACONS 50
831 typedef PREPACK struct {
834 } POSTPACK WMI_BMISS_TIME_CMD;
837 * WMI_SET_POWER_MODE_CMDID
844 typedef PREPACK struct {
845 u8 powerMode; /* WMI_POWER_MODE */
846 } POSTPACK WMI_POWER_MODE_CMD;
848 typedef PREPACK struct {
849 s8 status; /* WMI_SET_PARAMS_REPLY */
850 } POSTPACK WMI_SET_PARAMS_REPLY;
852 typedef PREPACK struct {
855 char buffer[1]; /* WMI_SET_PARAMS */
856 } POSTPACK WMI_SET_PARAMS_CMD;
858 typedef PREPACK struct {
859 u8 multicast_mac[ATH_MAC_LEN]; /* WMI_SET_MCAST_FILTER */
860 } POSTPACK WMI_SET_MCAST_FILTER_CMD;
862 typedef PREPACK struct {
863 u8 enable; /* WMI_MCAST_FILTER */
864 } POSTPACK WMI_MCAST_FILTER_CMD;
867 * WMI_SET_POWER_PARAMS_CMDID
876 /* Policy to determnine whether TX should wakeup WLAN if sleeping */
878 TX_WAKEUP_UPON_SLEEP = 1,
879 TX_DONT_WAKEUP_UPON_SLEEP = 2
880 } WMI_TX_WAKEUP_POLICY_UPON_SLEEP;
883 * Policy to determnine whether power save failure event should be sent to
884 * host during scanning
887 SEND_POWER_SAVE_FAIL_EVENT_ALWAYS = 1,
888 IGNORE_POWER_SAVE_FAIL_EVENT_DURING_SCAN = 2,
889 } POWER_SAVE_FAIL_EVENT_POLICY;
891 typedef PREPACK struct {
892 u16 idle_period; /* msec */
895 u16 tx_wakeup_policy;
896 u16 num_tx_to_wakeup;
897 u16 ps_fail_event_policy;
898 } POSTPACK WMI_POWER_PARAMS_CMD;
900 /* Adhoc power save types */
908 typedef PREPACK struct {
910 u8 ttl; /* number of beacon periods */
911 u16 atim_windows; /* msec */
912 u16 timeout_value; /* msec */
913 } POSTPACK WMI_IBSS_PM_CAPS_CMD;
915 /* AP power save types */
921 typedef PREPACK struct {
922 u32 idle_time; /* in msec */
923 u32 ps_period; /* in usec */
924 u8 sleep_period; /* in ps periods */
926 } POSTPACK WMI_AP_PS_CMD;
929 * WMI_SET_POWERSAVE_TIMERS_POLICY_CMDID
932 IGNORE_TIM_ALL_QUEUES_APSD = 0,
933 PROCESS_TIM_ALL_QUEUES_APSD = 1,
934 IGNORE_TIM_SIMULATED_APSD = 2,
935 PROCESS_TIM_SIMULATED_APSD = 3,
938 typedef PREPACK struct {
939 u16 psPollTimeout; /* msec */
940 u16 triggerTimeout; /* msec */
941 u32 apsdTimPolicy; /* TIM behavior with ques APSD enabled. Default is IGNORE_TIM_ALL_QUEUES_APSD */
942 u32 simulatedAPSDTimPolicy; /* TIM behavior with simulated APSD enabled. Default is PROCESS_TIM_SIMULATED_APSD */
943 } POSTPACK WMI_POWERSAVE_TIMERS_POLICY_CMD;
946 * WMI_SET_VOICE_PKT_SIZE_CMDID
948 typedef PREPACK struct {
950 } POSTPACK WMI_SET_VOICE_PKT_SIZE_CMD;
953 * WMI_SET_MAX_SP_LEN_CMDID
956 DELIVER_ALL_PKT = 0x0,
962 typedef PREPACK struct {
964 } POSTPACK WMI_SET_MAX_SP_LEN_CMD;
967 * WMI_SET_DISC_TIMEOUT_CMDID
969 typedef PREPACK struct {
970 u8 disconnectTimeout; /* seconds */
971 } POSTPACK WMI_DISC_TIMEOUT_CMD;
980 DISABLE_FOR_THIS_AC = 0,
981 ENABLE_FOR_THIS_AC = 1,
982 ENABLE_FOR_ALL_AC = 2,
986 TRAFFIC_TYPE_APERIODIC = 0,
987 TRAFFIC_TYPE_PERIODIC = 1,
991 * WMI_SYNCHRONIZE_CMDID
993 typedef PREPACK struct {
995 } POSTPACK WMI_SYNC_CMD;
998 * WMI_CREATE_PSTREAM_CMDID
1000 typedef PREPACK struct {
1001 u32 minServiceInt; /* in milli-sec */
1002 u32 maxServiceInt; /* in milli-sec */
1003 u32 inactivityInt; /* in milli-sec */
1004 u32 suspensionInt; /* in milli-sec */
1005 u32 serviceStartTime;
1006 u32 minDataRate; /* in bps */
1007 u32 meanDataRate; /* in bps */
1008 u32 peakDataRate; /* in bps */
1011 u32 minPhyRate; /* in bps */
1014 u16 nominalMSDU; /* in octects */
1015 u16 maxMSDU; /* in octects */
1017 u8 trafficDirection; /* DIR_TYPE */
1019 u8 trafficType; /* TRAFFIC_TYPE */
1020 u8 voicePSCapability; /* VOICEPS_CAP_TYPE */
1022 u8 userPriority; /* 802.1D user priority */
1023 u8 nominalPHY; /* nominal phy rate */
1024 } POSTPACK WMI_CREATE_PSTREAM_CMD;
1027 * WMI_DELETE_PSTREAM_CMDID
1029 typedef PREPACK struct {
1032 u8 trafficDirection;
1035 } POSTPACK WMI_DELETE_PSTREAM_CMD;
1038 * WMI_SET_CHANNEL_PARAMS_CMDID
1043 WMI_11AG_MODE = 0x3,
1045 WMI_11GONLY_MODE = 0x5,
1048 #define WMI_MAX_CHANNELS 32
1050 typedef PREPACK struct {
1052 u8 scanParam; /* set if enable scan */
1053 u8 phyMode; /* see WMI_PHY_MODE */
1054 u8 numChannels; /* how many channels follow */
1055 u16 channelList[1]; /* channels in Mhz */
1056 } POSTPACK WMI_CHANNEL_PARAMS_CMD;
1060 * WMI_RSSI_THRESHOLD_PARAMS_CMDID
1061 * Setting the polltime to 0 would disable polling.
1062 * Threshold values are in the ascending order, and should agree to:
1063 * (lowThreshold_lowerVal < lowThreshold_upperVal < highThreshold_lowerVal
1064 * < highThreshold_upperVal)
1067 typedef PREPACK struct WMI_RSSI_THRESHOLD_PARAMS{
1068 u32 pollTime; /* Polling time as a factor of LI */
1069 s16 thresholdAbove1_Val; /* lowest of upper */
1070 s16 thresholdAbove2_Val;
1071 s16 thresholdAbove3_Val;
1072 s16 thresholdAbove4_Val;
1073 s16 thresholdAbove5_Val;
1074 s16 thresholdAbove6_Val; /* highest of upper */
1075 s16 thresholdBelow1_Val; /* lowest of bellow */
1076 s16 thresholdBelow2_Val;
1077 s16 thresholdBelow3_Val;
1078 s16 thresholdBelow4_Val;
1079 s16 thresholdBelow5_Val;
1080 s16 thresholdBelow6_Val; /* highest of bellow */
1081 u8 weight; /* "alpha" */
1083 } POSTPACK WMI_RSSI_THRESHOLD_PARAMS_CMD;
1086 * WMI_SNR_THRESHOLD_PARAMS_CMDID
1087 * Setting the polltime to 0 would disable polling.
1090 typedef PREPACK struct WMI_SNR_THRESHOLD_PARAMS{
1091 u32 pollTime; /* Polling time as a factor of LI */
1092 u8 weight; /* "alpha" */
1093 u8 thresholdAbove1_Val; /* lowest of uppper*/
1094 u8 thresholdAbove2_Val;
1095 u8 thresholdAbove3_Val;
1096 u8 thresholdAbove4_Val; /* highest of upper */
1097 u8 thresholdBelow1_Val; /* lowest of bellow */
1098 u8 thresholdBelow2_Val;
1099 u8 thresholdBelow3_Val;
1100 u8 thresholdBelow4_Val; /* highest of bellow */
1102 } POSTPACK WMI_SNR_THRESHOLD_PARAMS_CMD;
1105 * WMI_LQ_THRESHOLD_PARAMS_CMDID
1107 typedef PREPACK struct WMI_LQ_THRESHOLD_PARAMS {
1109 u8 thresholdAbove1_Val;
1110 u8 thresholdAbove2_Val;
1111 u8 thresholdAbove3_Val;
1112 u8 thresholdAbove4_Val;
1113 u8 thresholdBelow1_Val;
1114 u8 thresholdBelow2_Val;
1115 u8 thresholdBelow3_Val;
1116 u8 thresholdBelow4_Val;
1118 } POSTPACK WMI_LQ_THRESHOLD_PARAMS_CMD;
1121 WMI_LPREAMBLE_DISABLED = 0,
1122 WMI_LPREAMBLE_ENABLED
1123 } WMI_LPREAMBLE_STATUS;
1126 WMI_IGNORE_BARKER_IN_ERP = 0,
1127 WMI_DONOT_IGNORE_BARKER_IN_ERP
1128 } WMI_PREAMBLE_POLICY;
1130 typedef PREPACK struct {
1133 }POSTPACK WMI_SET_LPREAMBLE_CMD;
1135 typedef PREPACK struct {
1137 }POSTPACK WMI_SET_RTS_CMD;
1140 * WMI_TARGET_ERROR_REPORT_BITMASK_CMDID
1141 * Sets the error reporting event bitmask in target. Target clears it
1142 * upon an error. Subsequent errors are counted, but not reported
1143 * via event, unless the bitmask is set again.
1145 typedef PREPACK struct {
1147 } POSTPACK WMI_TARGET_ERROR_REPORT_BITMASK;
1150 * WMI_SET_TX_PWR_CMDID
1152 typedef PREPACK struct {
1153 u8 dbM; /* in dbM units */
1154 } POSTPACK WMI_SET_TX_PWR_CMD, WMI_TX_PWR_REPLY;
1157 * WMI_SET_ASSOC_INFO_CMDID
1159 * A maximum of 2 private IEs can be sent in the [Re]Assoc request.
1160 * A 3rd one, the CCX version IE can also be set from the host.
1162 #define WMI_MAX_ASSOC_INFO_TYPE 2
1163 #define WMI_CCX_VER_IE 2 /* ieType to set CCX Version IE */
1165 #define WMI_MAX_ASSOC_INFO_LEN 240
1167 typedef PREPACK struct {
1170 u8 assocInfo[1]; /* up to WMI_MAX_ASSOC_INFO_LEN */
1171 } POSTPACK WMI_SET_ASSOC_INFO_CMD;
1175 * WMI_GET_TX_PWR_CMDID does not take any parameters
1179 * WMI_ADD_BAD_AP_CMDID
1181 #define WMI_MAX_BAD_AP_INDEX 1
1183 typedef PREPACK struct {
1184 u8 badApIndex; /* 0 to WMI_MAX_BAD_AP_INDEX */
1185 u8 bssid[ATH_MAC_LEN];
1186 } POSTPACK WMI_ADD_BAD_AP_CMD;
1189 * WMI_DELETE_BAD_AP_CMDID
1191 typedef PREPACK struct {
1192 u8 badApIndex; /* 0 to WMI_MAX_BAD_AP_INDEX */
1193 } POSTPACK WMI_DELETE_BAD_AP_CMD;
1196 * WMI_SET_ACCESS_PARAMS_CMDID
1198 #define WMI_DEFAULT_TXOP_ACPARAM 0 /* implies one MSDU */
1199 #define WMI_DEFAULT_ECWMIN_ACPARAM 4 /* corresponds to CWmin of 15 */
1200 #define WMI_DEFAULT_ECWMAX_ACPARAM 10 /* corresponds to CWmax of 1023 */
1201 #define WMI_MAX_CW_ACPARAM 15 /* maximum eCWmin or eCWmax */
1202 #define WMI_DEFAULT_AIFSN_ACPARAM 2
1203 #define WMI_MAX_AIFSN_ACPARAM 15
1204 typedef PREPACK struct {
1205 u16 txop; /* in units of 32 usec */
1210 } POSTPACK WMI_SET_ACCESS_PARAMS_CMD;
1214 * WMI_SET_RETRY_LIMITS_CMDID
1216 * This command is used to customize the number of retries the
1217 * wlan device will perform on a given frame.
1219 #define WMI_MIN_RETRIES 2
1220 #define WMI_MAX_RETRIES 13
1223 CONTROL_FRAMETYPE = 1,
1227 typedef PREPACK struct {
1228 u8 frameType; /* WMI_FRAMETYPE */
1229 u8 trafficClass; /* applies only to DATA_FRAMETYPE */
1232 } POSTPACK WMI_SET_RETRY_LIMITS_CMD;
1235 * WMI_SET_ROAM_CTRL_CMDID
1237 * This command is used to influence the Roaming behaviour
1238 * Set the host biases of the BSSs before setting the roam mode as bias
1243 * Different types of Roam Control
1247 WMI_FORCE_ROAM = 1, /* Roam to the specified BSSID */
1248 WMI_SET_ROAM_MODE = 2, /* default ,progd bias, no roam */
1249 WMI_SET_HOST_BIAS = 3, /* Set the Host Bias */
1250 WMI_SET_LOWRSSI_SCAN_PARAMS = 4, /* Set lowrssi Scan parameters */
1251 } WMI_ROAM_CTRL_TYPE;
1253 #define WMI_MIN_ROAM_CTRL_TYPE WMI_FORCE_ROAM
1254 #define WMI_MAX_ROAM_CTRL_TYPE WMI_SET_LOWRSSI_SCAN_PARAMS
1261 WMI_DEFAULT_ROAM_MODE = 1, /* RSSI based ROAM */
1262 WMI_HOST_BIAS_ROAM_MODE = 2, /* HOST BIAS based ROAM */
1263 WMI_LOCK_BSS_MODE = 3 /* Lock to the Current BSS - no Roam */
1267 * BSS HOST BIAS INFO
1270 typedef PREPACK struct {
1271 u8 bssid[ATH_MAC_LEN];
1273 } POSTPACK WMI_BSS_BIAS;
1275 typedef PREPACK struct {
1277 WMI_BSS_BIAS bssBias[1];
1278 } POSTPACK WMI_BSS_BIAS_INFO;
1280 typedef PREPACK struct WMI_LOWRSSI_SCAN_PARAMS {
1281 u16 lowrssi_scan_period;
1282 s16 lowrssi_scan_threshold;
1283 s16 lowrssi_roam_threshold;
1285 u8 reserved[1]; /* For alignment */
1286 } POSTPACK WMI_LOWRSSI_SCAN_PARAMS;
1288 typedef PREPACK struct {
1290 u8 bssid[ATH_MAC_LEN]; /* WMI_FORCE_ROAM */
1291 u8 roamMode; /* WMI_SET_ROAM_MODE */
1292 WMI_BSS_BIAS_INFO bssBiasInfo; /* WMI_SET_HOST_BIAS */
1293 WMI_LOWRSSI_SCAN_PARAMS lrScanParams;
1296 } POSTPACK WMI_SET_ROAM_CTRL_CMD;
1299 * WMI_SET_BT_WLAN_CONN_PRECEDENCE_CMDID
1302 BT_WLAN_CONN_PRECDENCE_WLAN=0, /* Default */
1303 BT_WLAN_CONN_PRECDENCE_PAL,
1304 } BT_WLAN_CONN_PRECEDENCE;
1306 typedef PREPACK struct {
1308 } POSTPACK WMI_SET_BT_WLAN_CONN_PRECEDENCE;
1311 * WMI_ENABLE_RM_CMDID
1313 typedef PREPACK struct {
1314 u32 enable_radio_measurements;
1315 } POSTPACK WMI_ENABLE_RM_CMD;
1318 * WMI_SET_MAX_OFFHOME_DURATION_CMDID
1320 typedef PREPACK struct {
1321 u8 max_offhome_duration;
1322 } POSTPACK WMI_SET_MAX_OFFHOME_DURATION_CMD;
1324 typedef PREPACK struct {
1327 } POSTPACK WMI_SET_HB_CHALLENGE_RESP_PARAMS_CMD;
1328 /*---------------------- BTCOEX RELATED -------------------------------------*/
1329 /*----------------------COMMON to AR6002 and AR6003 -------------------------*/
1331 BT_STREAM_UNDEF = 0,
1332 BT_STREAM_SCO, /* SCO stream */
1333 BT_STREAM_A2DP, /* A2DP stream */
1334 BT_STREAM_SCAN, /* BT Discovery or Page */
1340 BT_PARAM_SCO_PSPOLL_LATENCY_ONE_FOURTH =1,
1341 BT_PARAM_SCO_PSPOLL_LATENCY_HALF,
1342 BT_PARAM_SCO_PSPOLL_LATENCY_THREE_FOURTH,
1343 } BT_PARAMS_SCO_PSPOLL_LATENCY;
1346 BT_PARAMS_SCO_STOMP_SCO_NEVER =1,
1347 BT_PARAMS_SCO_STOMP_SCO_ALWAYS,
1348 BT_PARAMS_SCO_STOMP_SCO_IN_LOWRSSI,
1349 } BT_PARAMS_SCO_STOMP_RULES;
1352 BT_STATUS_UNDEF = 0,
1358 typedef PREPACK struct {
1361 } POSTPACK WMI_SET_BT_STATUS_CMD;
1364 BT_ANT_TYPE_UNDEF=0,
1366 BT_ANT_TYPE_SPLITTER,
1368 BT_ANT_TYPE_HIGH_ISO_DUAL
1369 } BT_ANT_FRONTEND_CONFIG;
1372 BT_COLOCATED_DEV_BTS4020=0,
1373 BT_COLCATED_DEV_CSR ,
1374 BT_COLOCATED_DEV_VALKYRIE
1375 } BT_COLOCATED_DEV_TYPE;
1377 /*********************** Applicable to AR6002 ONLY ******************************/
1380 BT_PARAM_SCO = 1, /* SCO stream parameters */
1382 BT_PARAM_ANTENNA_CONFIG,
1383 BT_PARAM_COLOCATED_BT_DEVICE,
1385 BT_PARAM_11A_SEPARATE_ANT,
1390 #define BT_SCO_ALLOW_CLOSE_RANGE_OPT (1 << 0)
1391 #define BT_SCO_FORCE_AWAKE_OPT (1 << 1)
1392 #define BT_SCO_SET_RSSI_OVERRIDE(flags) ((flags) |= (1 << 2))
1393 #define BT_SCO_GET_RSSI_OVERRIDE(flags) (((flags) >> 2) & 0x1)
1394 #define BT_SCO_SET_RTS_OVERRIDE(flags) ((flags) |= (1 << 3))
1395 #define BT_SCO_GET_RTS_OVERRIDE(flags) (((flags) >> 3) & 0x1)
1396 #define BT_SCO_GET_MIN_LOW_RATE_CNT(flags) (((flags) >> 8) & 0xFF)
1397 #define BT_SCO_GET_MAX_LOW_RATE_CNT(flags) (((flags) >> 16) & 0xFF)
1398 #define BT_SCO_SET_MIN_LOW_RATE_CNT(flags,val) (flags) |= (((val) & 0xFF) << 8)
1399 #define BT_SCO_SET_MAX_LOW_RATE_CNT(flags,val) (flags) |= (((val) & 0xFF) << 16)
1401 typedef PREPACK struct {
1402 u32 numScoCyclesForceTrigger; /* Number SCO cycles after which
1403 force a pspoll. default = 10 */
1404 u32 dataResponseTimeout; /* Timeout Waiting for Downlink pkt
1405 in response for ps-poll,
1406 default = 10 msecs */
1408 u32 scoOptFlags; /* SCO Options Flags :
1410 0 Allow Close Range Optimization
1411 1 Force awake during close range
1412 2 If set use host supplied RSSI for OPT
1413 3 If set use host supplied RTS COUNT for OPT
1415 8..15 Low Data Rate Min Cnt
1416 16..23 Low Data Rate Max Cnt
1419 u8 stompDutyCyleVal; /* Sco cycles to limit ps-poll queuing
1421 u8 stompDutyCyleMaxVal; /*firm ware increases stomp duty cycle
1422 gradually uptill this value on need basis*/
1423 u8 psPollLatencyFraction; /* Fraction of idle
1424 period, within which
1427 u8 noSCOSlots; /* Number of SCO Tx/Rx slots.
1428 HVx, EV3, 2EV3 = 2 */
1429 u8 noIdleSlots; /* Number of Bluetooth idle slots between
1430 consecutive SCO Tx/Rx slots
1433 u8 scoOptOffRssi;/*RSSI value below which we go to ps poll*/
1434 u8 scoOptOnRssi; /*RSSI value above which we reenter opt mode*/
1436 } POSTPACK BT_PARAMS_SCO;
1438 #define BT_A2DP_ALLOW_CLOSE_RANGE_OPT (1 << 0)
1439 #define BT_A2DP_FORCE_AWAKE_OPT (1 << 1)
1440 #define BT_A2DP_SET_RSSI_OVERRIDE(flags) ((flags) |= (1 << 2))
1441 #define BT_A2DP_GET_RSSI_OVERRIDE(flags) (((flags) >> 2) & 0x1)
1442 #define BT_A2DP_SET_RTS_OVERRIDE(flags) ((flags) |= (1 << 3))
1443 #define BT_A2DP_GET_RTS_OVERRIDE(flags) (((flags) >> 3) & 0x1)
1444 #define BT_A2DP_GET_MIN_LOW_RATE_CNT(flags) (((flags) >> 8) & 0xFF)
1445 #define BT_A2DP_GET_MAX_LOW_RATE_CNT(flags) (((flags) >> 16) & 0xFF)
1446 #define BT_A2DP_SET_MIN_LOW_RATE_CNT(flags,val) (flags) |= (((val) & 0xFF) << 8)
1447 #define BT_A2DP_SET_MAX_LOW_RATE_CNT(flags,val) (flags) |= (((val) & 0xFF) << 16)
1449 typedef PREPACK struct {
1450 u32 a2dpWlanUsageLimit; /* MAX time firmware uses the medium for
1451 wlan, after it identifies the idle time
1452 default (30 msecs) */
1453 u32 a2dpBurstCntMin; /* Minimum number of bluetooth data frames
1454 to replenish Wlan Usage limit (default 3) */
1455 u32 a2dpDataRespTimeout;
1456 u32 a2dpOptFlags; /* A2DP Option flags:
1458 0 Allow Close Range Optimization
1459 1 Force awake during close range
1460 2 If set use host supplied RSSI for OPT
1461 3 If set use host supplied RTS COUNT for OPT
1463 8..15 Low Data Rate Min Cnt
1464 16..23 Low Data Rate Max Cnt
1466 u8 isCoLocatedBtRoleMaster;
1467 u8 a2dpOptOffRssi;/*RSSI value below which we go to ps poll*/
1468 u8 a2dpOptOnRssi; /*RSSI value above which we reenter opt mode*/
1470 }POSTPACK BT_PARAMS_A2DP;
1472 /* During BT ftp/ BT OPP or any another data based acl profile on bluetooth
1474 typedef PREPACK struct {
1475 u32 aclWlanMediumUsageTime; /* Wlan usage time during Acl (non-a2dp)
1476 coexistence (default 30 msecs) */
1477 u32 aclBtMediumUsageTime; /* Bt usage time during acl coexistence
1478 (default 30 msecs)*/
1479 u32 aclDataRespTimeout;
1480 u32 aclDetectTimeout; /* ACL coexistence enabled if we get
1481 10 Pkts in X msec(default 100 msecs) */
1482 u32 aclmaxPktCnt; /* No of ACL pkts to receive before
1483 enabling ACL coex */
1485 }POSTPACK BT_PARAMS_ACLCOEX;
1487 typedef PREPACK struct {
1489 BT_PARAMS_SCO scoParams;
1490 BT_PARAMS_A2DP a2dpParams;
1491 BT_PARAMS_ACLCOEX aclCoexParams;
1492 u8 antType; /* 0 -Disabled (default)
1493 1 - BT_ANT_TYPE_DUAL
1494 2 - BT_ANT_TYPE_SPLITTER
1495 3 - BT_ANT_TYPE_SWITCH */
1496 u8 coLocatedBtDev; /* 0 - BT_COLOCATED_DEV_BTS4020 (default)
1497 1 - BT_COLCATED_DEV_CSR
1498 2 - BT_COLOCATED_DEV_VALKYRIe
1502 } POSTPACK WMI_SET_BT_PARAMS_CMD;
1504 /************************ END AR6002 BTCOEX *******************************/
1505 /*-----------------------AR6003 BTCOEX -----------------------------------*/
1507 /* ---------------WMI_SET_BTCOEX_FE_ANT_CMDID --------------------------*/
1508 /* Indicates front end antenna configuration. This command needs to be issued
1509 * right after initialization and after WMI_SET_BTCOEX_COLOCATED_BT_DEV_CMDID.
1510 * AR6003 enables coexistence and antenna switching based on the configuration.
1513 WMI_BTCOEX_NOT_ENABLED = 0,
1514 WMI_BTCOEX_FE_ANT_SINGLE =1,
1515 WMI_BTCOEX_FE_ANT_DUAL=2,
1516 WMI_BTCOEX_FE_ANT_DUAL_HIGH_ISO=3,
1517 WMI_BTCOEX_FE_ANT_TYPE_MAX
1518 }WMI_BTCOEX_FE_ANT_TYPE;
1520 typedef PREPACK struct {
1521 u8 btcoexFeAntType; /* 1 - WMI_BTCOEX_FE_ANT_SINGLE for single antenna front end
1522 2 - WMI_BTCOEX_FE_ANT_DUAL for dual antenna front end
1523 (for isolations less 35dB, for higher isolation there
1524 is not need to pass this command).
1527 }POSTPACK WMI_SET_BTCOEX_FE_ANT_CMD;
1529 /* -------------WMI_SET_BTCOEX_COLOCATED_BT_DEV_CMDID ----------------*/
1530 /* Indicate the bluetooth chip to the firmware. Firmware can have different algorithm based
1531 * bluetooth chip type.Based on bluetooth device, different coexistence protocol would be used.
1533 typedef PREPACK struct {
1534 u8 btcoexCoLocatedBTdev; /*1 - Qcom BT (3 -wire PTA)
1535 2 - CSR BT (3 wire PTA)
1536 3 - Atheros 3001 BT (3 wire PTA)
1537 4 - STE bluetooth (4-wire ePTA)
1538 5 - Atheros 3002 BT (4-wire MCI)
1539 defaults= 3 (Atheros 3001 BT )
1541 }POSTPACK WMI_SET_BTCOEX_COLOCATED_BT_DEV_CMD;
1543 /* -------------WMI_SET_BTCOEX_BTINQUIRY_PAGE_CONFIG_CMDID ------------*/
1544 /* Configuration parameters during bluetooth inquiry and page. Page configuration
1545 * is applicable only on interfaces which can distinguish page (applicable only for ePTA -
1547 * Bluetooth inquiry start and end is indicated via WMI_SET_BTCOEX_BT_OPERATING_STATUS_CMDID.
1548 * During this the station will be power-save mode.
1550 typedef PREPACK struct {
1551 u32 btInquiryDataFetchFrequency;/* The frequency of querying the AP for data
1552 (via pspoll) is configured by this parameter.
1553 "default = 10 ms" */
1555 u32 protectBmissDurPostBtInquiry;/* The firmware will continue to be in inquiry state
1556 for configured duration, after inquiry completion
1557 . This is to ensure other bluetooth transactions
1558 (RDP, SDP profiles, link key exchange ...etc)
1559 goes through smoothly without wifi stomping.
1562 u32 maxpageStomp; /*Applicable only for STE-BT interface. Currently not
1564 u32 btInquiryPageFlag; /* Not used */
1565 }POSTPACK WMI_SET_BTCOEX_BTINQUIRY_PAGE_CONFIG_CMD;
1567 /*---------------------WMI_SET_BTCOEX_SCO_CONFIG_CMDID ---------------*/
1568 /* Configure SCO parameters. These parameters would be used whenever firmware is indicated
1569 * of (e)SCO profile on bluetooth ( via WMI_SET_BTCOEX_BT_OPERATING_STATUS_CMDID).
1570 * Configration of BTCOEX_SCO_CONFIG data structure are common configuration and applies
1571 * ps-poll mode and opt mode.
1572 * Ps-poll Mode - Station is in power-save and retrieves downlink data between sco gaps.
1573 * Opt Mode - station is in awake state and access point can send data to station any time.
1574 * BTCOEX_PSPOLLMODE_SCO_CONFIG - Configuration applied only during ps-poll mode.
1575 * BTCOEX_OPTMODE_SCO_CONFIG - Configuration applied only during opt mode.
1577 #define WMI_SCO_CONFIG_FLAG_ALLOW_OPTIMIZATION (1 << 0)
1578 #define WMI_SCO_CONFIG_FLAG_IS_EDR_CAPABLE (1 << 1)
1579 #define WMI_SCO_CONFIG_FLAG_IS_BT_MASTER (1 << 2)
1580 #define WMI_SCO_CONFIG_FLAG_FW_DETECT_OF_PER (1 << 3)
1581 typedef PREPACK struct {
1582 u32 scoSlots; /* Number of SCO Tx/Rx slots.
1583 HVx, EV3, 2EV3 = 2 */
1584 u32 scoIdleSlots; /* Number of Bluetooth idle slots between
1585 consecutive SCO Tx/Rx slots
1589 u32 scoFlags; /* SCO Options Flags :
1591 0 Allow Close Range Optimization
1592 1 Is EDR capable or Not
1593 2 IS Co-located Bt role Master
1594 3 Firmware determines the periodicity of SCO.
1597 u32 linkId; /* applicable to STE-BT - not used */
1598 }POSTPACK BTCOEX_SCO_CONFIG;
1600 typedef PREPACK struct {
1601 u32 scoCyclesForceTrigger; /* Number SCO cycles after which
1602 force a pspoll. default = 10 */
1603 u32 scoDataResponseTimeout; /* Timeout Waiting for Downlink pkt
1604 in response for ps-poll,
1605 default = 20 msecs */
1607 u32 scoStompDutyCyleVal; /* not implemented */
1609 u32 scoStompDutyCyleMaxVal; /*Not implemented */
1611 u32 scoPsPollLatencyFraction; /* Fraction of idle
1612 period, within which
1613 additional ps-polls can be queued
1614 1 - 1/4 of idle duration
1615 2 - 1/2 of idle duration
1616 3 - 3/4 of idle duration
1619 }POSTPACK BTCOEX_PSPOLLMODE_SCO_CONFIG;
1621 typedef PREPACK struct {
1622 u32 scoStompCntIn100ms;/*max number of SCO stomp in 100ms allowed in
1623 opt mode. If exceeds the configured value,
1624 switch to ps-poll mode
1627 u32 scoContStompMax; /* max number of continuous stomp allowed in opt mode.
1628 if exceeded switch to pspoll mode
1631 u32 scoMinlowRateMbps; /* Low rate threshold */
1633 u32 scoLowRateCnt; /* number of low rate pkts (< scoMinlowRateMbps) allowed in 100 ms.
1634 If exceeded switch/stay to ps-poll mode, lower stay in opt mode.
1638 u32 scoHighPktRatio; /*(Total Rx pkts in 100 ms + 1)/
1639 ((Total tx pkts in 100 ms - No of high rate pkts in 100 ms) + 1) in 100 ms,
1640 if exceeded switch/stay in opt mode and if lower switch/stay in pspoll mode.
1641 default = 5 (80% of high rates)
1644 u32 scoMaxAggrSize; /* Max number of Rx subframes allowed in this mode. (Firmware re-negogiates
1645 max number of aggregates if it was negogiated to higher value
1647 Recommended value Basic rate headsets = 1, EDR (2-EV3) =4.
1649 }POSTPACK BTCOEX_OPTMODE_SCO_CONFIG;
1651 typedef PREPACK struct {
1653 u32 maxScanStompCnt;
1654 }POSTPACK BTCOEX_WLANSCAN_SCO_CONFIG;
1656 typedef PREPACK struct {
1657 BTCOEX_SCO_CONFIG scoConfig;
1658 BTCOEX_PSPOLLMODE_SCO_CONFIG scoPspollConfig;
1659 BTCOEX_OPTMODE_SCO_CONFIG scoOptModeConfig;
1660 BTCOEX_WLANSCAN_SCO_CONFIG scoWlanScanConfig;
1661 }POSTPACK WMI_SET_BTCOEX_SCO_CONFIG_CMD;
1663 /* ------------------WMI_SET_BTCOEX_A2DP_CONFIG_CMDID -------------------*/
1664 /* Configure A2DP profile parameters. These parameters would be used whenver firmware is indicated
1665 * of A2DP profile on bluetooth ( via WMI_SET_BTCOEX_BT_OPERATING_STATUS_CMDID).
1666 * Configuration of BTCOEX_A2DP_CONFIG data structure are common configuration and applies to
1667 * ps-poll mode and opt mode.
1668 * Ps-poll Mode - Station is in power-save and retrieves downlink data between a2dp data bursts.
1669 * Opt Mode - station is in power save during a2dp bursts and awake in the gaps.
1670 * BTCOEX_PSPOLLMODE_A2DP_CONFIG - Configuration applied only during ps-poll mode.
1671 * BTCOEX_OPTMODE_A2DP_CONFIG - Configuration applied only during opt mode.
1674 #define WMI_A2DP_CONFIG_FLAG_ALLOW_OPTIMIZATION (1 << 0)
1675 #define WMI_A2DP_CONFIG_FLAG_IS_EDR_CAPABLE (1 << 1)
1676 #define WMI_A2DP_CONFIG_FLAG_IS_BT_ROLE_MASTER (1 << 2)
1677 #define WMI_A2DP_CONFIG_FLAG_IS_A2DP_HIGH_PRI (1 << 3)
1678 #define WMI_A2DP_CONFIG_FLAG_FIND_BT_ROLE (1 << 4)
1680 typedef PREPACK struct {
1681 u32 a2dpFlags; /* A2DP Option flags:
1683 0 Allow Close Range Optimization
1685 2 IS Co-located Bt role Master
1686 3 a2dp traffic is high priority
1687 4 Fw detect the role of bluetooth.
1689 u32 linkId; /* Applicable only to STE-BT - not used */
1691 }POSTPACK BTCOEX_A2DP_CONFIG;
1693 typedef PREPACK struct {
1694 u32 a2dpWlanMaxDur; /* MAX time firmware uses the medium for
1695 wlan, after it identifies the idle time
1696 default (30 msecs) */
1698 u32 a2dpMinBurstCnt; /* Minimum number of bluetooth data frames
1699 to replenish Wlan Usage limit (default 3) */
1701 u32 a2dpDataRespTimeout; /* Max duration firmware waits for downlink
1702 by stomping on bluetooth
1703 after ps-poll is acknowledged.
1706 }POSTPACK BTCOEX_PSPOLLMODE_A2DP_CONFIG;
1708 typedef PREPACK struct {
1709 u32 a2dpMinlowRateMbps; /* Low rate threshold */
1711 u32 a2dpLowRateCnt; /* number of low rate pkts (< a2dpMinlowRateMbps) allowed in 100 ms.
1712 If exceeded switch/stay to ps-poll mode, lower stay in opt mode.
1716 u32 a2dpHighPktRatio; /*(Total Rx pkts in 100 ms + 1)/
1717 ((Total tx pkts in 100 ms - No of high rate pkts in 100 ms) + 1) in 100 ms,
1718 if exceeded switch/stay in opt mode and if lower switch/stay in pspoll mode.
1719 default = 5 (80% of high rates)
1722 u32 a2dpMaxAggrSize; /* Max number of Rx subframes allowed in this mode. (Firmware re-negogiates
1723 max number of aggregates if it was negogiated to higher value
1725 Recommended value Basic rate headsets = 1, EDR (2-EV3) =8.
1727 u32 a2dpPktStompCnt; /*number of a2dp pkts that can be stomped per burst.
1730 }POSTPACK BTCOEX_OPTMODE_A2DP_CONFIG;
1732 typedef PREPACK struct {
1733 BTCOEX_A2DP_CONFIG a2dpConfig;
1734 BTCOEX_PSPOLLMODE_A2DP_CONFIG a2dppspollConfig;
1735 BTCOEX_OPTMODE_A2DP_CONFIG a2dpOptConfig;
1736 }POSTPACK WMI_SET_BTCOEX_A2DP_CONFIG_CMD;
1738 /*------------ WMI_SET_BTCOEX_ACLCOEX_CONFIG_CMDID---------------------*/
1739 /* Configure non-A2dp ACL profile parameters.The starts of ACL profile can either be
1740 * indicated via WMI_SET_BTCOEX_BT_OPERATING_STATUS_CMDID orenabled via firmware detection
1741 * which is configured via "aclCoexFlags".
1742 * Configration of BTCOEX_ACLCOEX_CONFIG data structure are common configuration and applies
1743 * ps-poll mode and opt mode.
1744 * Ps-poll Mode - Station is in power-save and retrieves downlink data during wlan medium.
1745 * Opt Mode - station is in power save during bluetooth medium time and awake during wlan duration.
1746 * (Not implemented yet)
1748 * BTCOEX_PSPOLLMODE_ACLCOEX_CONFIG - Configuration applied only during ps-poll mode.
1749 * BTCOEX_OPTMODE_ACLCOEX_CONFIG - Configuration applied only during opt mode.
1752 #define WMI_ACLCOEX_FLAGS_ALLOW_OPTIMIZATION (1 << 0)
1753 #define WMI_ACLCOEX_FLAGS_DISABLE_FW_DETECTION (1 << 1)
1755 typedef PREPACK struct {
1756 u32 aclWlanMediumDur; /* Wlan usage time during Acl (non-a2dp)
1757 coexistence (default 30 msecs)
1760 u32 aclBtMediumDur; /* Bt usage time during acl coexistence
1764 u32 aclDetectTimeout; /* BT activity observation time limit.
1765 In this time duration, number of bt pkts are counted.
1766 If the Cnt reaches "aclPktCntLowerLimit" value
1767 for "aclIterToEnableCoex" iteration continuously,
1768 firmware gets into ACL coexistence mode.
1769 Similarly, if bt traffic count during ACL coexistence
1770 has not reached "aclPktCntLowerLimit" continuously
1771 for "aclIterToEnableCoex", then ACL coexistence is
1776 u32 aclPktCntLowerLimit; /* Acl Pkt Cnt to be received in duration of
1777 "aclDetectTimeout" for
1778 "aclIterForEnDis" times to enabling ACL coex.
1779 Similar logic is used to disable acl coexistence.
1780 (If "aclPktCntLowerLimit" cnt of acl pkts
1781 are not seen by the for "aclIterForEnDis"
1782 then acl coexistence is disabled).
1786 u32 aclIterForEnDis; /* number of Iteration of "aclPktCntLowerLimit" for Enabling and
1787 Disabling Acl Coexistence.
1791 u32 aclPktCntUpperLimit; /* This is upperBound limit, if there is more than
1792 "aclPktCntUpperLimit" seen in "aclDetectTimeout",
1793 ACL coexistence is enabled right away.
1796 u32 aclCoexFlags; /* A2DP Option flags:
1798 0 Allow Close Range Optimization
1799 1 disable Firmware detection
1800 (Currently supported configuration is aclCoexFlags =0)
1802 u32 linkId; /* Applicable only for STE-BT - not used */
1804 }POSTPACK BTCOEX_ACLCOEX_CONFIG;
1806 typedef PREPACK struct {
1807 u32 aclDataRespTimeout; /* Max duration firmware waits for downlink
1808 by stomping on bluetooth
1809 after ps-poll is acknowledged.
1812 }POSTPACK BTCOEX_PSPOLLMODE_ACLCOEX_CONFIG;
1815 /* Not implemented yet*/
1816 typedef PREPACK struct {
1817 u32 aclCoexMinlowRateMbps;
1818 u32 aclCoexLowRateCnt;
1819 u32 aclCoexHighPktRatio;
1820 u32 aclCoexMaxAggrSize;
1822 }POSTPACK BTCOEX_OPTMODE_ACLCOEX_CONFIG;
1824 typedef PREPACK struct {
1825 BTCOEX_ACLCOEX_CONFIG aclCoexConfig;
1826 BTCOEX_PSPOLLMODE_ACLCOEX_CONFIG aclCoexPspollConfig;
1827 BTCOEX_OPTMODE_ACLCOEX_CONFIG aclCoexOptConfig;
1828 }POSTPACK WMI_SET_BTCOEX_ACLCOEX_CONFIG_CMD;
1830 /* -----------WMI_SET_BTCOEX_BT_OPERATING_STATUS_CMDID ------------------*/
1832 WMI_BTCOEX_BT_PROFILE_SCO =1,
1833 WMI_BTCOEX_BT_PROFILE_A2DP,
1834 WMI_BTCOEX_BT_PROFILE_INQUIRY_PAGE,
1835 WMI_BTCOEX_BT_PROFILE_ACLCOEX,
1836 }WMI_BTCOEX_BT_PROFILE;
1838 typedef PREPACK struct {
1840 u32 btOperatingStatus;
1842 }WMI_SET_BTCOEX_BT_OPERATING_STATUS_CMD;
1844 /*--------------------- WMI_SET_BTCOEX_DEBUG_CMDID ---------------------*/
1845 /* Used for firmware development and debugging */
1846 typedef PREPACK struct {
1847 u32 btcoexDbgParam1;
1848 u32 btcoexDbgParam2;
1849 u32 btcoexDbgParam3;
1850 u32 btcoexDbgParam4;
1851 u32 btcoexDbgParam5;
1852 }WMI_SET_BTCOEX_DEBUG_CMD;
1854 /*---------------------WMI_GET_BTCOEX_CONFIG_CMDID --------------------- */
1855 /* Command to firmware to get configuration parameters of the bt profile
1856 * reported via WMI_BTCOEX_CONFIG_EVENTID */
1857 typedef PREPACK struct {
1858 u32 btProfileType; /* 1 - SCO
1863 u32 linkId; /* not used */
1864 }WMI_GET_BTCOEX_CONFIG_CMD;
1866 /*------------------WMI_REPORT_BTCOEX_CONFIG_EVENTID------------------- */
1867 /* Event from firmware to host, sent in response to WMI_GET_BTCOEX_CONFIG_CMDID
1869 typedef PREPACK struct {
1871 u32 linkId; /* not used */
1873 WMI_SET_BTCOEX_SCO_CONFIG_CMD scoConfigCmd;
1874 WMI_SET_BTCOEX_A2DP_CONFIG_CMD a2dpConfigCmd;
1875 WMI_SET_BTCOEX_ACLCOEX_CONFIG_CMD aclcoexConfig;
1876 WMI_SET_BTCOEX_BTINQUIRY_PAGE_CONFIG_CMD btinquiryPageConfigCmd;
1878 } POSTPACK WMI_BTCOEX_CONFIG_EVENT;
1880 /*------------- WMI_REPORT_BTCOEX_BTCOEX_STATS_EVENTID--------------------*/
1881 /* Used for firmware development and debugging*/
1882 typedef PREPACK struct {
1885 u32 psPollFailureCnt;
1886 u32 nullFrameFailureCnt;
1887 u32 optModeTransitionCnt;
1888 }BTCOEX_GENERAL_STATS;
1890 typedef PREPACK struct {
1892 u32 scoStompIn100ms;
1893 u32 scoMaxContStomp;
1894 u32 scoAvgNoRetries;
1895 u32 scoMaxNoRetriesIn100ms;
1898 typedef PREPACK struct {
1900 u32 a2dpMaxBurstCnt;
1901 u32 a2dpAvgIdletimeIn100ms;
1902 u32 a2dpAvgStompCnt;
1905 typedef PREPACK struct {
1906 u32 aclPktCntInBtTime;
1907 u32 aclStompCntInWlanTime;
1908 u32 aclPktCntIn100ms;
1909 }BTCOEX_ACLCOEX_STATS;
1911 typedef PREPACK struct {
1912 BTCOEX_GENERAL_STATS coexStats;
1913 BTCOEX_SCO_STATS scoStats;
1914 BTCOEX_A2DP_STATS a2dpStats;
1915 BTCOEX_ACLCOEX_STATS aclCoexStats;
1916 }WMI_BTCOEX_STATS_EVENT;
1919 /*--------------------------END OF BTCOEX -------------------------------------*/
1920 typedef PREPACK struct {
1922 }WMI_REPORT_SLEEP_STATE_EVENT;
1925 WMI_REPORT_SLEEP_STATUS_IS_DEEP_SLEEP =0,
1926 WMI_REPORT_SLEEP_STATUS_IS_AWAKE
1927 } WMI_REPORT_SLEEP_STATUS;
1929 DISCONN_EVT_IN_RECONN = 0, /* default */
1930 NO_DISCONN_EVT_IN_RECONN
1931 } TARGET_EVENT_REPORT_CONFIG;
1933 typedef PREPACK struct {
1935 } POSTPACK WMI_SET_TARGET_EVENT_REPORT_CMD;
1938 typedef PREPACK struct {
1939 u16 cmd_buf_sz; /* HCI cmd buffer size */
1940 u8 buf[1]; /* Absolute HCI cmd */
1941 } POSTPACK WMI_HCI_CMD;
1948 * WMI_GET_CHANNEL_LIST_CMDID reply
1950 typedef PREPACK struct {
1952 u8 numChannels; /* number of channels in reply */
1953 u16 channelList[1]; /* channel in Mhz */
1954 } POSTPACK WMI_CHANNEL_LIST_REPLY;
1958 A_FAILED_DELETE_STREAM_DOESNOT_EXIST=250,
1959 A_SUCCEEDED_MODIFY_STREAM=251,
1960 A_FAILED_INVALID_STREAM = 252,
1961 A_FAILED_MAX_THINSTREAMS = 253,
1962 A_FAILED_CREATE_REMOVE_PSTREAM_FIRST = 254,
1963 } PSTREAM_REPLY_STATUS;
1965 typedef PREPACK struct {
1966 u8 status; /* PSTREAM_REPLY_STATUS */
1970 u8 trafficDirection; /* DIR_TYPE */
1971 } POSTPACK WMI_CRE_PRIORITY_STREAM_REPLY;
1973 typedef PREPACK struct {
1974 u8 status; /* PSTREAM_REPLY_STATUS */
1977 u8 trafficDirection; /* DIR_TYPE */
1979 } POSTPACK WMI_DEL_PRIORITY_STREAM_REPLY;
1982 * List of Events (target to host)
1985 WMI_READY_EVENTID = 0x1001,
1986 WMI_CONNECT_EVENTID,
1987 WMI_DISCONNECT_EVENTID,
1988 WMI_BSSINFO_EVENTID,
1989 WMI_CMDERROR_EVENTID,
1990 WMI_REGDOMAIN_EVENTID,
1991 WMI_PSTREAM_TIMEOUT_EVENTID,
1992 WMI_NEIGHBOR_REPORT_EVENTID,
1993 WMI_TKIP_MICERR_EVENTID,
1994 WMI_SCAN_COMPLETE_EVENTID, /* 0x100a */
1995 WMI_REPORT_STATISTICS_EVENTID,
1996 WMI_RSSI_THRESHOLD_EVENTID,
1997 WMI_ERROR_REPORT_EVENTID,
1998 WMI_OPT_RX_FRAME_EVENTID,
1999 WMI_REPORT_ROAM_TBL_EVENTID,
2000 WMI_EXTENSION_EVENTID,
2002 WMI_SNR_THRESHOLD_EVENTID,
2003 WMI_LQ_THRESHOLD_EVENTID,
2004 WMI_TX_RETRY_ERR_EVENTID, /* 0x1014 */
2005 WMI_REPORT_ROAM_DATA_EVENTID,
2008 WMI_GET_WOW_LIST_EVENTID,
2009 WMI_GET_PMKID_LIST_EVENTID,
2010 WMI_CHANNEL_CHANGE_EVENTID,
2011 WMI_PEER_NODE_EVENTID,
2013 WMI_DTIMEXPIRY_EVENTID,
2014 WMI_WLAN_VERSION_EVENTID,
2015 WMI_SET_PARAMS_REPLY_EVENTID,
2016 WMI_ADDBA_REQ_EVENTID, /*0x1020 */
2017 WMI_ADDBA_RESP_EVENTID,
2018 WMI_DELBA_REQ_EVENTID,
2019 WMI_TX_COMPLETE_EVENTID,
2020 WMI_HCI_EVENT_EVENTID,
2021 WMI_ACL_DATA_EVENTID,
2022 WMI_REPORT_SLEEP_STATE_EVENTID,
2024 WMI_WAPI_REKEY_EVENTID,
2026 WMI_REPORT_BTCOEX_STATS_EVENTID,
2027 WMI_REPORT_BTCOEX_CONFIG_EVENTID,
2028 WMI_GET_PMK_EVENTID,
2031 WMI_DFS_HOST_ATTACH_EVENTID,
2032 WMI_DFS_HOST_INIT_EVENTID,
2033 WMI_DFS_RESET_DELAYLINES_EVENTID,
2034 WMI_DFS_RESET_RADARQ_EVENTID,
2035 WMI_DFS_RESET_AR_EVENTID,
2036 WMI_DFS_RESET_ARQ_EVENTID,
2037 WMI_DFS_SET_DUR_MULTIPLIER_EVENTID,
2038 WMI_DFS_SET_BANGRADAR_EVENTID,
2039 WMI_DFS_SET_DEBUGLEVEL_EVENTID,
2040 WMI_DFS_PHYERR_EVENTID,
2042 WMI_CCX_RM_STATUS_EVENTID,
2045 WMI_P2P_GO_NEG_RESULT_EVENTID,
2047 WMI_WAC_SCAN_DONE_EVENTID,
2048 WMI_WAC_REPORT_BSS_EVENTID,
2049 WMI_WAC_START_WPS_EVENTID,
2050 WMI_WAC_CTRL_REQ_REPLY_EVENTID,
2053 WMI_RFKILL_STATE_CHANGE_EVENTID,
2054 WMI_RFKILL_GET_MODE_CMD_EVENTID,
2055 WMI_THIN_RESERVED_START_EVENTID = 0x8000,
2058 * Events in this range are reserved for thinmode
2059 * See wmi_thin.h for actual definitions
2061 WMI_THIN_RESERVED_END_EVENTID = 0x8fff,
2063 WMI_SET_CHANNEL_EVENTID,
2064 WMI_ASSOC_REQ_EVENTID,
2066 /* generic ACS event */
2068 WMI_REPORT_WMM_PARAMS_EVENTID
2073 WMI_11A_CAPABILITY = 1,
2074 WMI_11G_CAPABILITY = 2,
2075 WMI_11AG_CAPABILITY = 3,
2076 WMI_11NA_CAPABILITY = 4,
2077 WMI_11NG_CAPABILITY = 5,
2078 WMI_11NAG_CAPABILITY = 6,
2080 WMI_11N_CAPABILITY_OFFSET = (WMI_11NA_CAPABILITY - WMI_11A_CAPABILITY),
2081 } WMI_PHY_CAPABILITY;
2083 typedef PREPACK struct {
2084 u8 macaddr[ATH_MAC_LEN];
2085 u8 phyCapability; /* WMI_PHY_CAPABILITY */
2086 } POSTPACK WMI_READY_EVENT_1;
2088 typedef PREPACK struct {
2091 u8 macaddr[ATH_MAC_LEN];
2092 u8 phyCapability; /* WMI_PHY_CAPABILITY */
2093 } POSTPACK WMI_READY_EVENT_2;
2095 #if defined(ATH_TARGET)
2097 #define WMI_READY_EVENT WMI_READY_EVENT_1 /* AR6002_REV2 target code */
2099 #define WMI_READY_EVENT WMI_READY_EVENT_2 /* AR6001, AR6002_REV4, AR6002_REV5 */
2102 #define WMI_READY_EVENT WMI_READY_EVENT_2 /* host code */
2109 typedef PREPACK struct {
2111 u8 bssid[ATH_MAC_LEN];
2119 } POSTPACK WMI_CONNECT_EVENT;
2125 NO_NETWORK_AVAIL = 0x01,
2126 LOST_LINK = 0x02, /* bmiss */
2127 DISCONNECT_CMD = 0x03,
2128 BSS_DISCONNECTED = 0x04,
2130 ASSOC_FAILED = 0x06,
2131 NO_RESOURCES_AVAIL = 0x07,
2132 CSERV_DISCONNECT = 0x08,
2133 INVALID_PROFILE = 0x0a,
2134 DOT11H_CHANNEL_SWITCH = 0x0b,
2135 PROFILE_MISMATCH = 0x0c,
2136 CONNECTION_EVICTED = 0x0d,
2138 } WMI_DISCONNECT_REASON;
2140 typedef PREPACK struct {
2141 u16 protocolReasonStatus; /* reason code, see 802.11 spec. */
2142 u8 bssid[ATH_MAC_LEN]; /* set if known */
2143 u8 disconnectReason ; /* see WMI_DISCONNECT_REASON */
2146 } POSTPACK WMI_DISCONNECT_EVENT;
2150 * Mechanism used to inform host of the presence and characteristic of
2151 * wireless networks present. Consists of bss info header followed by
2152 * the beacon or probe-response frame body. The 802.11 header is not included.
2162 BSS_ELEMID_CHANSWITCH = 0x01,
2163 BSS_ELEMID_ATHEROS = 0x02,
2166 typedef PREPACK struct {
2168 u8 frameType; /* see WMI_BI_FTYPE */
2171 u8 bssid[ATH_MAC_LEN];
2173 } POSTPACK WMI_BSS_INFO_HDR;
2176 * BSS INFO HDR version 2.0
2177 * With 6 bytes HTC header and 6 bytes of WMI header
2178 * WMI_BSS_INFO_HDR cannot be accommodated in the removed 802.11 management
2180 * - Reduce the ieMask to 2 bytes as only two bit flags are used
2181 * - Remove rssi and compute it on the host. rssi = snr - 95
2183 typedef PREPACK struct {
2185 u8 frameType; /* see WMI_BI_FTYPE */
2187 u8 bssid[ATH_MAC_LEN];
2189 } POSTPACK WMI_BSS_INFO_HDR2;
2192 * Command Error Event
2195 INVALID_PARAM = 0x01,
2196 ILLEGAL_STATE = 0x02,
2197 INTERNAL_ERROR = 0x03,
2200 typedef PREPACK struct {
2203 } POSTPACK WMI_CMD_ERROR_EVENT;
2206 * New Regulatory Domain Event
2208 typedef PREPACK struct {
2210 } POSTPACK WMI_REG_DOMAIN_EVENT;
2212 typedef PREPACK struct {
2215 u8 trafficDirection;
2217 } POSTPACK WMI_PSTREAM_TIMEOUT_EVENT;
2219 typedef PREPACK struct {
2224 } POSTPACK WMI_ACM_REJECT_EVENT;
2227 * The WMI_NEIGHBOR_REPORT Event is generated by the target to inform
2228 * the host of BSS's it has found that matches the current profile.
2229 * It can be used by the host to cache PMKs and/to initiate pre-authentication
2230 * if the BSS supports it. The first bssid is always the current associated
2232 * The bssid and bssFlags information repeats according to the number
2236 WMI_DEFAULT_BSS_FLAGS = 0x00,
2237 WMI_PREAUTH_CAPABLE_BSS = 0x01,
2238 WMI_PMKID_VALID_BSS = 0x02,
2241 typedef PREPACK struct {
2242 u8 bssid[ATH_MAC_LEN];
2243 u8 bssFlags; /* see WMI_BSS_FLAGS */
2244 } POSTPACK WMI_NEIGHBOR_INFO;
2246 typedef PREPACK struct {
2248 WMI_NEIGHBOR_INFO neighbor[1];
2249 } POSTPACK WMI_NEIGHBOR_REPORT_EVENT;
2252 * TKIP MIC Error Event
2254 typedef PREPACK struct {
2257 } POSTPACK WMI_TKIP_MICERR_EVENT;
2260 * WMI_SCAN_COMPLETE_EVENTID - no parameters (old), staus parameter (new)
2262 typedef PREPACK struct {
2264 } POSTPACK WMI_SCAN_COMPLETE_EVENT;
2266 #define MAX_OPT_DATA_LEN 1400
2269 * WMI_SET_ADHOC_BSSID_CMDID
2271 typedef PREPACK struct {
2272 u8 bssid[ATH_MAC_LEN];
2273 } POSTPACK WMI_SET_ADHOC_BSSID_CMD;
2276 * WMI_SET_OPT_MODE_CMDID
2283 typedef PREPACK struct {
2285 } POSTPACK WMI_SET_OPT_MODE_CMD;
2288 * WMI_TX_OPT_FRAME_CMDID
2291 OPT_PROBE_REQ = 0x01,
2292 OPT_PROBE_RESP = 0x02,
2293 OPT_CPPP_START = 0x03,
2294 OPT_CPPP_STOP = 0x04,
2297 typedef PREPACK struct {
2300 u8 dstAddr[ATH_MAC_LEN];
2301 u8 bssid[ATH_MAC_LEN];
2302 u8 reserved; /* For alignment */
2304 } POSTPACK WMI_OPT_TX_FRAME_CMD;
2307 * Special frame receive Event.
2308 * Mechanism used to inform host of the receiption of the special frames.
2309 * Consists of special frame info header followed by special frame body.
2310 * The 802.11 header is not included.
2312 typedef PREPACK struct {
2314 u8 frameType; /* see WMI_OPT_FTYPE */
2316 u8 srcAddr[ATH_MAC_LEN];
2317 u8 bssid[ATH_MAC_LEN];
2318 } POSTPACK WMI_OPT_RX_INFO_HDR;
2321 * Reporting statistics.
2323 typedef PREPACK struct {
2326 u32 tx_unicast_pkts;
2327 u32 tx_unicast_bytes;
2328 u32 tx_multicast_pkts;
2329 u32 tx_multicast_bytes;
2330 u32 tx_broadcast_pkts;
2331 u32 tx_broadcast_bytes;
2332 u32 tx_rts_success_cnt;
2333 u32 tx_packet_per_ac[4];
2334 u32 tx_errors_per_ac[4];
2339 u32 tx_mult_retry_cnt;
2340 u32 tx_rts_fail_cnt;
2341 s32 tx_unicast_rate;
2342 }POSTPACK tx_stats_t;
2344 typedef PREPACK struct {
2347 u32 rx_unicast_pkts;
2348 u32 rx_unicast_bytes;
2349 u32 rx_multicast_pkts;
2350 u32 rx_multicast_bytes;
2351 u32 rx_broadcast_pkts;
2352 u32 rx_broadcast_bytes;
2353 u32 rx_fragment_pkt;
2357 u32 rx_key_cache_miss;
2359 u32 rx_duplicate_frames;
2360 s32 rx_unicast_rate;
2361 }POSTPACK rx_stats_t;
2363 typedef PREPACK struct {
2364 u32 tkip_local_mic_failure;
2365 u32 tkip_counter_measures_invoked;
2367 u32 tkip_format_errors;
2368 u32 ccmp_format_errors;
2370 }POSTPACK tkip_ccmp_stats_t;
2372 typedef PREPACK struct {
2373 u32 power_save_failure_cnt;
2374 u16 stop_tx_failure_cnt;
2375 u16 atim_tx_failure_cnt;
2376 u16 atim_rx_failure_cnt;
2377 u16 bcn_rx_failure_cnt;
2378 }POSTPACK pm_stats_t;
2380 typedef PREPACK struct {
2384 u16 cs_disconnect_cnt;
2385 s16 cs_aveBeacon_rssi;
2389 u8 cs_aveBeacon_snr;
2390 u8 cs_lastRoam_msec;
2391 } POSTPACK cserv_stats_t;
2393 typedef PREPACK struct {
2394 tx_stats_t tx_stats;
2395 rx_stats_t rx_stats;
2396 tkip_ccmp_stats_t tkipCcmpStats;
2397 }POSTPACK wlan_net_stats_t;
2399 typedef PREPACK struct {
2403 } POSTPACK arp_stats_t;
2405 typedef PREPACK struct {
2406 u32 wow_num_pkts_dropped;
2407 u16 wow_num_events_discarded;
2408 u8 wow_num_host_pkt_wakeups;
2409 u8 wow_num_host_event_wakeups;
2410 } POSTPACK wlan_wow_stats_t;
2412 typedef PREPACK struct {
2414 s32 noise_floor_calibation;
2416 wlan_net_stats_t txrxStats;
2417 wlan_wow_stats_t wowStats;
2418 arp_stats_t arpStats;
2419 cserv_stats_t cservStats;
2420 } POSTPACK WMI_TARGET_STATS;
2423 * WMI_RSSI_THRESHOLD_EVENTID.
2424 * Indicate the RSSI events to host. Events are indicated when we breach a
2428 WMI_RSSI_THRESHOLD1_ABOVE = 0,
2429 WMI_RSSI_THRESHOLD2_ABOVE,
2430 WMI_RSSI_THRESHOLD3_ABOVE,
2431 WMI_RSSI_THRESHOLD4_ABOVE,
2432 WMI_RSSI_THRESHOLD5_ABOVE,
2433 WMI_RSSI_THRESHOLD6_ABOVE,
2434 WMI_RSSI_THRESHOLD1_BELOW,
2435 WMI_RSSI_THRESHOLD2_BELOW,
2436 WMI_RSSI_THRESHOLD3_BELOW,
2437 WMI_RSSI_THRESHOLD4_BELOW,
2438 WMI_RSSI_THRESHOLD5_BELOW,
2439 WMI_RSSI_THRESHOLD6_BELOW
2440 }WMI_RSSI_THRESHOLD_VAL;
2442 typedef PREPACK struct {
2445 }POSTPACK WMI_RSSI_THRESHOLD_EVENT;
2448 * WMI_ERROR_REPORT_EVENTID
2451 WMI_TARGET_PM_ERR_FAIL = 0x00000001,
2452 WMI_TARGET_KEY_NOT_FOUND = 0x00000002,
2453 WMI_TARGET_DECRYPTION_ERR = 0x00000004,
2454 WMI_TARGET_BMISS = 0x00000008,
2455 WMI_PSDISABLE_NODE_JOIN = 0x00000010,
2456 WMI_TARGET_COM_ERR = 0x00000020,
2457 WMI_TARGET_FATAL_ERR = 0x00000040
2458 } WMI_TARGET_ERROR_VAL;
2460 typedef PREPACK struct {
2462 }POSTPACK WMI_TARGET_ERROR_REPORT_EVENT;
2464 typedef PREPACK struct {
2466 }POSTPACK WMI_TX_RETRY_ERR_EVENT;
2469 WMI_SNR_THRESHOLD1_ABOVE = 1,
2470 WMI_SNR_THRESHOLD1_BELOW,
2471 WMI_SNR_THRESHOLD2_ABOVE,
2472 WMI_SNR_THRESHOLD2_BELOW,
2473 WMI_SNR_THRESHOLD3_ABOVE,
2474 WMI_SNR_THRESHOLD3_BELOW,
2475 WMI_SNR_THRESHOLD4_ABOVE,
2476 WMI_SNR_THRESHOLD4_BELOW
2477 } WMI_SNR_THRESHOLD_VAL;
2479 typedef PREPACK struct {
2480 u8 range; /* WMI_SNR_THRESHOLD_VAL */
2482 }POSTPACK WMI_SNR_THRESHOLD_EVENT;
2485 WMI_LQ_THRESHOLD1_ABOVE = 1,
2486 WMI_LQ_THRESHOLD1_BELOW,
2487 WMI_LQ_THRESHOLD2_ABOVE,
2488 WMI_LQ_THRESHOLD2_BELOW,
2489 WMI_LQ_THRESHOLD3_ABOVE,
2490 WMI_LQ_THRESHOLD3_BELOW,
2491 WMI_LQ_THRESHOLD4_ABOVE,
2492 WMI_LQ_THRESHOLD4_BELOW
2493 } WMI_LQ_THRESHOLD_VAL;
2495 typedef PREPACK struct {
2497 u8 range; /* WMI_LQ_THRESHOLD_VAL */
2498 }POSTPACK WMI_LQ_THRESHOLD_EVENT;
2500 * WMI_REPORT_ROAM_TBL_EVENTID
2502 #define MAX_ROAM_TBL_CAND 5
2504 typedef PREPACK struct {
2506 u8 bssid[ATH_MAC_LEN];
2512 u8 reserved; /* For alignment */
2513 } POSTPACK WMI_BSS_ROAM_INFO;
2516 typedef PREPACK struct {
2519 WMI_BSS_ROAM_INFO bssRoamInfo[1];
2520 } POSTPACK WMI_TARGET_ROAM_TBL;
2523 * WMI_HCI_EVENT_EVENTID
2525 typedef PREPACK struct {
2526 u16 evt_buf_sz; /* HCI event buffer size */
2527 u8 buf[1]; /* HCI event */
2528 } POSTPACK WMI_HCI_EVENT;
2534 CAC_INDICATION_ADMISSION = 0x00,
2535 CAC_INDICATION_ADMISSION_RESP = 0x01,
2536 CAC_INDICATION_DELETE = 0x02,
2537 CAC_INDICATION_NO_RESP = 0x03,
2540 #define WMM_TSPEC_IE_LEN 63
2542 typedef PREPACK struct {
2546 u8 tspecSuggestion[WMM_TSPEC_IE_LEN];
2547 }POSTPACK WMI_CAC_EVENT;
2550 * WMI_APLIST_EVENTID
2557 typedef PREPACK struct {
2558 u8 bssid[ATH_MAC_LEN];
2560 } POSTPACK WMI_AP_INFO_V1;
2562 typedef PREPACK union {
2563 WMI_AP_INFO_V1 apInfoV1;
2564 } POSTPACK WMI_AP_INFO;
2566 typedef PREPACK struct {
2569 WMI_AP_INFO apList[1];
2570 } POSTPACK WMI_APLIST_EVENT;
2573 * developer commands
2577 * WMI_SET_BITRATE_CMDID
2579 * Get bit rate cmd uses same definition as set bit rate cmd
2613 typedef PREPACK struct {
2614 s8 rateIndex; /* see WMI_BIT_RATE */
2617 } POSTPACK WMI_BIT_RATE_CMD;
2620 typedef PREPACK struct {
2621 s8 rateIndex; /* see WMI_BIT_RATE */
2622 } POSTPACK WMI_BIT_RATE_REPLY;
2626 * WMI_SET_FIXRATES_CMDID
2628 * Get fix rates cmd uses same definition as set fix rates cmd
2630 #define FIX_RATE_1Mb ((u32)0x1)
2631 #define FIX_RATE_2Mb ((u32)0x2)
2632 #define FIX_RATE_5_5Mb ((u32)0x4)
2633 #define FIX_RATE_11Mb ((u32)0x8)
2634 #define FIX_RATE_6Mb ((u32)0x10)
2635 #define FIX_RATE_9Mb ((u32)0x20)
2636 #define FIX_RATE_12Mb ((u32)0x40)
2637 #define FIX_RATE_18Mb ((u32)0x80)
2638 #define FIX_RATE_24Mb ((u32)0x100)
2639 #define FIX_RATE_36Mb ((u32)0x200)
2640 #define FIX_RATE_48Mb ((u32)0x400)
2641 #define FIX_RATE_54Mb ((u32)0x800)
2642 #define FIX_RATE_MCS_0_20 ((u32)0x1000)
2643 #define FIX_RATE_MCS_1_20 ((u32)0x2000)
2644 #define FIX_RATE_MCS_2_20 ((u32)0x4000)
2645 #define FIX_RATE_MCS_3_20 ((u32)0x8000)
2646 #define FIX_RATE_MCS_4_20 ((u32)0x10000)
2647 #define FIX_RATE_MCS_5_20 ((u32)0x20000)
2648 #define FIX_RATE_MCS_6_20 ((u32)0x40000)
2649 #define FIX_RATE_MCS_7_20 ((u32)0x80000)
2650 #define FIX_RATE_MCS_0_40 ((u32)0x100000)
2651 #define FIX_RATE_MCS_1_40 ((u32)0x200000)
2652 #define FIX_RATE_MCS_2_40 ((u32)0x400000)
2653 #define FIX_RATE_MCS_3_40 ((u32)0x800000)
2654 #define FIX_RATE_MCS_4_40 ((u32)0x1000000)
2655 #define FIX_RATE_MCS_5_40 ((u32)0x2000000)
2656 #define FIX_RATE_MCS_6_40 ((u32)0x4000000)
2657 #define FIX_RATE_MCS_7_40 ((u32)0x8000000)
2659 typedef PREPACK struct {
2660 u32 fixRateMask; /* see WMI_BIT_RATE */
2661 } POSTPACK WMI_FIX_RATES_CMD, WMI_FIX_RATES_REPLY;
2663 typedef PREPACK struct {
2665 u8 frameType; /*type and subtype*/
2666 u32 frameRateMask; /* see WMI_BIT_RATE */
2667 } POSTPACK WMI_FRAME_RATES_CMD, WMI_FRAME_RATES_REPLY;
2670 * WMI_SET_RECONNECT_AUTH_MODE_CMDID
2672 * Set authentication mode
2675 RECONN_DO_AUTH = 0x00,
2676 RECONN_NOT_AUTH = 0x01
2679 typedef PREPACK struct {
2681 } POSTPACK WMI_SET_AUTH_MODE_CMD;
2684 * WMI_SET_REASSOC_MODE_CMDID
2686 * Set authentication mode
2689 REASSOC_DO_DISASSOC = 0x00,
2690 REASSOC_DONOT_DISASSOC = 0x01
2693 typedef PREPACK struct {
2695 }POSTPACK WMI_SET_REASSOC_MODE_CMD;
2698 ROAM_DATA_TIME = 1, /* Get The Roam Time Data */
2701 typedef PREPACK struct {
2705 u32 allow_txrx_time;
2706 u8 disassoc_bssid[ATH_MAC_LEN];
2707 s8 disassoc_bss_rssi;
2708 u8 assoc_bssid[ATH_MAC_LEN];
2710 } POSTPACK WMI_TARGET_ROAM_TIME;
2712 typedef PREPACK struct {
2714 WMI_TARGET_ROAM_TIME roamTime;
2717 } POSTPACK WMI_TARGET_ROAM_DATA;
2720 WMI_WMM_DISABLED = 0,
2724 typedef PREPACK struct {
2726 }POSTPACK WMI_SET_WMM_CMD;
2728 typedef PREPACK struct {
2730 }POSTPACK WMI_SET_QOS_SUPP_CMD;
2733 WMI_TXOP_DISABLED = 0,
2737 typedef PREPACK struct {
2739 }POSTPACK WMI_SET_WMM_TXOP_CMD;
2741 typedef PREPACK struct {
2742 u8 keepaliveInterval;
2743 } POSTPACK WMI_SET_KEEPALIVE_CMD;
2745 typedef PREPACK struct {
2747 u8 keepaliveInterval;
2748 } POSTPACK WMI_GET_KEEPALIVE_CMD;
2751 * Add Application specified IE to a management frame
2753 #define WMI_MAX_IE_LEN 255
2755 typedef PREPACK struct {
2756 u8 mgmtFrmType; /* one of WMI_MGMT_FRAME_TYPE */
2757 u8 ieLen; /* Length of the IE that should be added to the MGMT frame */
2759 } POSTPACK WMI_SET_APPIE_CMD;
2762 * Notify the WSC registration status to the target
2764 #define WSC_REG_ACTIVE 1
2765 #define WSC_REG_INACTIVE 0
2766 /* Generic Hal Interface for setting hal paramters. */
2767 /* Add new Set HAL Param cmdIds here for newer params */
2769 WHAL_SETCABTO_CMDID = 1,
2772 typedef PREPACK struct {
2774 } POSTPACK WHAL_SETCABTO_PARAM;
2776 typedef PREPACK struct {
2779 } POSTPACK WHAL_PARAMCMD;
2782 #define WOW_MAX_FILTER_LISTS 1 /*4*/
2783 #define WOW_MAX_FILTERS_PER_LIST 4
2784 #define WOW_PATTERN_SIZE 64
2785 #define WOW_MASK_SIZE 64
2787 #define MAC_MAX_FILTERS_PER_LIST 4
2789 typedef PREPACK struct {
2790 u8 wow_valid_filter;
2793 u8 wow_filter_offset;
2794 u8 wow_filter_mask[WOW_MASK_SIZE];
2795 u8 wow_filter_pattern[WOW_PATTERN_SIZE];
2796 } POSTPACK WOW_FILTER;
2799 typedef PREPACK struct {
2803 u8 wow_total_list_size;
2804 WOW_FILTER list[WOW_MAX_FILTERS_PER_LIST];
2805 } POSTPACK WOW_FILTER_LIST;
2807 typedef PREPACK struct {
2809 u8 mac_addr[ATH_MAC_LEN];
2810 } POSTPACK MAC_FILTER;
2813 typedef PREPACK struct {
2816 MAC_FILTER list[MAC_MAX_FILTERS_PER_LIST];
2817 } POSTPACK MAC_FILTER_LIST;
2819 #define MAX_IP_ADDRS 2
2820 typedef PREPACK struct {
2821 u32 ips[MAX_IP_ADDRS]; /* IP in Network Byte Order */
2822 } POSTPACK WMI_SET_IP_CMD;
2824 typedef PREPACK struct {
2827 } POSTPACK WMI_SET_HOST_SLEEP_MODE_CMD;
2830 WOW_FILTER_SSID = 0x1
2833 typedef PREPACK struct {
2835 WMI_WOW_FILTER filter;
2837 } POSTPACK WMI_SET_WOW_MODE_CMD;
2839 typedef PREPACK struct {
2841 } POSTPACK WMI_GET_WOW_LIST_CMD;
2844 * WMI_GET_WOW_LIST_CMD reply
2846 typedef PREPACK struct {
2847 u8 num_filters; /* number of patterns in reply */
2848 u8 this_filter_num; /* this is filter # x of total num_filters */
2851 WOW_FILTER wow_filters[1];
2852 } POSTPACK WMI_GET_WOW_LIST_REPLY;
2854 typedef PREPACK struct {
2859 } POSTPACK WMI_ADD_WOW_PATTERN_CMD;
2861 typedef PREPACK struct {
2864 } POSTPACK WMI_DEL_WOW_PATTERN_CMD;
2866 typedef PREPACK struct {
2867 u8 macaddr[ATH_MAC_LEN];
2868 } POSTPACK WMI_SET_MAC_ADDRESS_CMD;
2871 * WMI_SET_AKMP_PARAMS_CMD
2874 #define WMI_AKMP_MULTI_PMKID_EN 0x000001
2876 typedef PREPACK struct {
2878 } POSTPACK WMI_SET_AKMP_PARAMS_CMD;
2880 typedef PREPACK struct {
2881 u8 pmkid[WMI_PMKID_LEN];
2882 } POSTPACK WMI_PMKID;
2885 * WMI_SET_PMKID_LIST_CMD
2887 #define WMI_MAX_PMKID_CACHE 8
2889 typedef PREPACK struct {
2891 WMI_PMKID pmkidList[WMI_MAX_PMKID_CACHE];
2892 } POSTPACK WMI_SET_PMKID_LIST_CMD;
2895 * WMI_GET_PMKID_LIST_CMD Reply
2896 * Following the Number of PMKIDs is the list of PMKIDs
2898 typedef PREPACK struct {
2900 u8 bssidList[ATH_MAC_LEN][1];
2901 WMI_PMKID pmkidList[1];
2902 } POSTPACK WMI_PMKID_LIST_REPLY;
2904 typedef PREPACK struct {
2907 } POSTPACK WMI_CHANNEL_CHANGE_EVENT;
2909 typedef PREPACK struct {
2911 } POSTPACK WMI_WLAN_VERSION_EVENT;
2914 /* WMI_ADDBA_REQ_EVENTID */
2915 typedef PREPACK struct {
2919 u8 status; /* f/w response for ADDBA Req; OK(0) or failure(!=0) */
2920 } POSTPACK WMI_ADDBA_REQ_EVENT;
2922 /* WMI_ADDBA_RESP_EVENTID */
2923 typedef PREPACK struct {
2925 u8 status; /* OK(0), failure (!=0) */
2926 u16 amsdu_sz; /* Three values: Not supported(0), 3839, 8k */
2927 } POSTPACK WMI_ADDBA_RESP_EVENT;
2929 /* WMI_DELBA_EVENTID
2930 * f/w received a DELBA for peer and processed it.
2931 * Host is notified of this
2933 typedef PREPACK struct {
2935 u8 is_peer_initiator;
2937 } POSTPACK WMI_DELBA_EVENT;
2941 #define WAPI_REKEY_UCAST 1
2942 #define WAPI_REKEY_MCAST 2
2943 typedef PREPACK struct {
2945 u8 macAddr[ATH_MAC_LEN];
2946 } POSTPACK WMI_WAPIREKEY_EVENT;
2950 /* WMI_ALLOW_AGGR_CMDID
2951 * Configures tid's to allow ADDBA negotiations
2952 * on each tid, in each direction
2954 typedef PREPACK struct {
2955 u16 tx_allow_aggr; /* 16-bit mask to allow uplink ADDBA negotiation - bit position indicates tid*/
2956 u16 rx_allow_aggr; /* 16-bit mask to allow donwlink ADDBA negotiation - bit position indicates tid*/
2957 } POSTPACK WMI_ALLOW_AGGR_CMD;
2959 /* WMI_ADDBA_REQ_CMDID
2960 * f/w starts performing ADDBA negotiations with peer
2963 typedef PREPACK struct {
2965 } POSTPACK WMI_ADDBA_REQ_CMD;
2967 /* WMI_DELBA_REQ_CMDID
2968 * f/w would teardown BA with peer.
2969 * is_send_initiator indicates if it's or tx or rx side
2971 typedef PREPACK struct {
2973 u8 is_sender_initiator;
2975 } POSTPACK WMI_DELBA_REQ_CMD;
2977 #define PEER_NODE_JOIN_EVENT 0x00
2978 #define PEER_NODE_LEAVE_EVENT 0x01
2979 #define PEER_FIRST_NODE_JOIN_EVENT 0x10
2980 #define PEER_LAST_NODE_LEAVE_EVENT 0x11
2981 typedef PREPACK struct {
2983 u8 peerMacAddr[ATH_MAC_LEN];
2984 } POSTPACK WMI_PEER_NODE_EVENT;
2986 #define IEEE80211_FRAME_TYPE_MGT 0x00
2987 #define IEEE80211_FRAME_TYPE_CTL 0x04
2990 * Transmit complete event data structure(s)
2994 typedef PREPACK struct {
2995 #define TX_COMPLETE_STATUS_SUCCESS 0
2996 #define TX_COMPLETE_STATUS_RETRIES 1
2997 #define TX_COMPLETE_STATUS_NOLINK 2
2998 #define TX_COMPLETE_STATUS_TIMEOUT 3
2999 #define TX_COMPLETE_STATUS_OTHER 4
3001 u8 status; /* one of TX_COMPLETE_STATUS_... */
3002 u8 pktID; /* packet ID to identify parent packet */
3003 u8 rateIdx; /* rate index on successful transmission */
3004 u8 ackFailures; /* number of ACK failures in tx attempt */
3005 #if 0 /* optional params currently omitted. */
3006 u32 queueDelay; // usec delay measured Tx Start time - host delivery time
3007 u32 mediaDelay; // usec delay measured ACK rx time - host delivery time
3009 } POSTPACK TX_COMPLETE_MSG_V1; /* version 1 of tx complete msg */
3011 typedef PREPACK struct {
3012 u8 numMessages; /* number of tx comp msgs following this struct */
3013 u8 msgLen; /* length in bytes for each individual msg following this struct */
3014 u8 msgType; /* version of tx complete msg data following this struct */
3015 u8 reserved; /* individual messages follow this header */
3016 } POSTPACK WMI_TX_COMPLETE_EVENT;
3018 #define WMI_TXCOMPLETE_VERSION_1 (0x01)
3022 * ------- AP Mode definitions --------------
3027 * -Changing the following values needs compilation of both driver and firmware
3030 #define AP_MAX_NUM_STA 4
3032 #define AP_MAX_NUM_STA 8
3034 #define AP_ACL_SIZE 10
3035 #define IEEE80211_MAX_IE 256
3036 #define MCAST_AID 0xFF /* Spl. AID used to set DTIM flag in the beacons */
3037 #define DEF_AP_COUNTRY_CODE "US "
3038 #define DEF_AP_WMODE_G WMI_11G_MODE
3039 #define DEF_AP_WMODE_AG WMI_11AG_MODE
3040 #define DEF_AP_DTIM 5
3041 #define DEF_BEACON_INTERVAL 100
3043 /* AP mode disconnect reasons */
3044 #define AP_DISCONNECT_STA_LEFT 101
3045 #define AP_DISCONNECT_FROM_HOST 102
3046 #define AP_DISCONNECT_COMM_TIMEOUT 103
3049 * Used with WMI_AP_HIDDEN_SSID_CMDID
3051 #define HIDDEN_SSID_FALSE 0
3052 #define HIDDEN_SSID_TRUE 1
3053 typedef PREPACK struct {
3055 } POSTPACK WMI_AP_HIDDEN_SSID_CMD;
3058 * Used with WMI_AP_ACL_POLICY_CMDID
3060 #define AP_ACL_DISABLE 0x00
3061 #define AP_ACL_ALLOW_MAC 0x01
3062 #define AP_ACL_DENY_MAC 0x02
3063 #define AP_ACL_RETAIN_LIST_MASK 0x80
3064 typedef PREPACK struct {
3066 } POSTPACK WMI_AP_ACL_POLICY_CMD;
3069 * Used with WMI_AP_ACL_MAC_LIST_CMDID
3071 #define ADD_MAC_ADDR 1
3072 #define DEL_MAC_ADDR 2
3073 typedef PREPACK struct {
3076 u8 mac[ATH_MAC_LEN];
3078 } POSTPACK WMI_AP_ACL_MAC_CMD;
3080 typedef PREPACK struct {
3082 u8 acl_mac[AP_ACL_SIZE][ATH_MAC_LEN];
3083 u8 wildcard[AP_ACL_SIZE];
3085 } POSTPACK WMI_AP_ACL;
3088 * Used with WMI_AP_SET_NUM_STA_CMDID
3090 typedef PREPACK struct {
3092 } POSTPACK WMI_AP_SET_NUM_STA_CMD;
3095 * Used with WMI_AP_SET_MLME_CMDID
3097 typedef PREPACK struct {
3098 u8 mac[ATH_MAC_LEN];
3099 u16 reason; /* 802.11 reason code */
3100 u8 cmd; /* operation to perform */
3101 #define WMI_AP_MLME_ASSOC 1 /* associate station */
3102 #define WMI_AP_DISASSOC 2 /* disassociate station */
3103 #define WMI_AP_DEAUTH 3 /* deauthenticate station */
3104 #define WMI_AP_MLME_AUTHORIZE 4 /* authorize station */
3105 #define WMI_AP_MLME_UNAUTHORIZE 5 /* unauthorize station */
3106 } POSTPACK WMI_AP_SET_MLME_CMD;
3108 typedef PREPACK struct {
3110 } POSTPACK WMI_AP_CONN_INACT_CMD;
3112 typedef PREPACK struct {
3115 } POSTPACK WMI_AP_PROT_SCAN_TIME_CMD;
3117 typedef PREPACK struct {
3120 } POSTPACK WMI_AP_SET_PVB_CMD;
3122 #define WMI_DISABLE_REGULATORY_CODE "FF"
3124 typedef PREPACK struct {
3126 } POSTPACK WMI_AP_SET_COUNTRY_CMD;
3128 typedef PREPACK struct {
3130 } POSTPACK WMI_AP_SET_DTIM_CMD;
3132 typedef PREPACK struct {
3133 u8 band; /* specifies which band to apply these values */
3134 u8 enable; /* allows 11n to be disabled on a per band basis */
3135 u8 chan_width_40M_supported;
3138 u8 intolerance_40MHz;
3139 u8 max_ampdu_len_exp;
3140 } POSTPACK WMI_SET_HT_CAP_CMD;
3142 typedef PREPACK struct {
3144 } POSTPACK WMI_SET_HT_OP_CMD;
3146 typedef PREPACK struct {
3148 } POSTPACK WMI_SET_TX_SELECT_RATES_CMD;
3150 typedef PREPACK struct {
3153 } POSTPACK WMI_SET_TX_SGI_PARAM_CMD;
3155 #define DEFAULT_SGI_MASK 0x08080000
3156 #define DEFAULT_SGI_PER 10
3158 typedef PREPACK struct {
3159 u32 rateField; /* 1 bit per rate corresponding to index */
3163 u8 reserved; /* padding */
3164 } POSTPACK WMI_SET_RATE_POLICY_CMD;
3166 typedef PREPACK struct {
3167 u8 metaVersion; /* version of meta data for rx packets <0 = default> (0-7 = valid) */
3168 u8 dot11Hdr; /* 1 == leave .11 header intact , 0 == replace .11 header with .3 <default> */
3169 u8 defragOnHost; /* 1 == defragmentation is performed by host, 0 == performed by target <default> */
3170 u8 reserved[1]; /* alignment */
3171 } POSTPACK WMI_RX_FRAME_FORMAT_CMD;
3174 typedef PREPACK struct {
3175 u8 enable; /* 1 == device operates in thin mode , 0 == normal mode <default> */
3177 } POSTPACK WMI_SET_THIN_MODE_CMD;
3179 /* AP mode events */
3180 /* WMI_PS_POLL_EVENT */
3181 typedef PREPACK struct {
3183 } POSTPACK WMI_PSPOLL_EVENT;
3185 typedef PREPACK struct {
3195 } POSTPACK WMI_PER_STA_STAT;
3197 #define AP_GET_STATS 0
3198 #define AP_CLEAR_STATS 1
3200 typedef PREPACK struct {
3202 WMI_PER_STA_STAT sta[AP_MAX_NUM_STA+1];
3203 } POSTPACK WMI_AP_MODE_STAT;
3204 #define WMI_AP_MODE_STAT_SIZE(numSta) (sizeof(u32) + ((numSta + 1) * sizeof(WMI_PER_STA_STAT)))
3206 #define AP_11BG_RATESET1 1
3207 #define AP_11BG_RATESET2 2
3208 #define DEF_AP_11BG_RATESET AP_11BG_RATESET1
3209 typedef PREPACK struct {
3211 } POSTPACK WMI_AP_SET_11BG_RATESET_CMD;
3213 * End of AP mode definitions
3220 #endif /* _WMI_H_ */