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 typedef PREPACK
struct {
160 u8 info
; /* usage of 'info' field(8-bit):
161 * b1:b0 - WMI_MSG_TYPE
163 * b5 - Used in AP mode. More-data in tx dir, PS in rx.
164 * b7:b6 - Dot3 header(0),
169 u16 info2
; /* usage of 'info2' field(16-bit):
172 * b15:b13 - META_DATA_VERSION 0 - 7
175 } POSTPACK WMI_DATA_HDR
;
178 * TX META VERSION DEFINITIONS
180 #define WMI_MAX_TX_META_SZ (12)
181 #define WMI_MAX_TX_META_VERSION (7)
182 #define WMI_META_VERSION_1 (0x01)
183 #define WMI_META_VERSION_2 (0X02)
185 #define WMI_ACL_TO_DOT11_HEADROOM 36
187 #if 0 /* removed to prevent compile errors for WM.. */
188 typedef PREPACK
struct {
189 /* intentionally empty. Default version is no meta data. */
190 } POSTPACK WMI_TX_META_V0
;
193 typedef PREPACK
struct {
194 u8 pktID
; /* The packet ID to identify the tx request */
195 u8 ratePolicyID
; /* The rate policy to be used for the tx of this frame */
196 } POSTPACK WMI_TX_META_V1
;
199 #define WMI_CSUM_DIR_TX (0x1)
200 #define TX_CSUM_CALC_FILL (0x1)
201 typedef PREPACK
struct {
202 u8 csumStart
; /*Offset from start of the WMI header for csum calculation to begin */
203 u8 csumDest
; /*Offset from start of WMI header where final csum goes*/
204 u8 csumFlags
; /*number of bytes over which csum is calculated*/
205 } POSTPACK WMI_TX_META_V2
;
209 * RX META VERSION DEFINITIONS
211 /* if RX meta data is present at all then the meta data field
212 * will consume WMI_MAX_RX_META_SZ bytes of space between the
213 * WMI_DATA_HDR and the payload. How much of the available
214 * Meta data is actually used depends on which meta data
215 * version is active. */
216 #define WMI_MAX_RX_META_SZ (12)
217 #define WMI_MAX_RX_META_VERSION (7)
219 #define WMI_RX_STATUS_OK 0 /* success */
220 #define WMI_RX_STATUS_DECRYPT_ERR 1 /* decrypt error */
221 #define WMI_RX_STATUS_MIC_ERR 2 /* tkip MIC error */
222 #define WMI_RX_STATUS_ERR 3 /* undefined error */
224 #define WMI_RX_FLAGS_AGGR 0x0001 /* part of AGGR */
225 #define WMI_RX_FlAGS_STBC 0x0002 /* used STBC */
226 #define WMI_RX_FLAGS_SGI 0x0004 /* used SGI */
227 #define WMI_RX_FLAGS_HT 0x0008 /* is HT packet */
228 /* the flags field is also used to store the CRYPTO_TYPE of the frame
229 * that value is shifted by WMI_RX_FLAGS_CRYPTO_SHIFT */
230 #define WMI_RX_FLAGS_CRYPTO_SHIFT 4
231 #define WMI_RX_FLAGS_CRYPTO_MASK 0x1f
232 #define WMI_RX_META_GET_CRYPTO(flags) (((flags) >> WMI_RX_FLAGS_CRYPTO_SHIFT) & WMI_RX_FLAGS_CRYPTO_MASK)
234 #if 0 /* removed to prevent compile errors for WM.. */
235 typedef PREPACK
struct {
236 /* intentionally empty. Default version is no meta data. */
237 } POSTPACK WMI_RX_META_VERSION_0
;
240 typedef PREPACK
struct {
241 u8 status
; /* one of WMI_RX_STATUS_... */
242 u8 rix
; /* rate index mapped to rate at which this packet was received. */
243 u8 rssi
; /* rssi of packet */
244 u8 channel
;/* rf channel during packet reception */
245 u16 flags
; /* a combination of WMI_RX_FLAGS_... */
246 } POSTPACK WMI_RX_META_V1
;
248 #define RX_CSUM_VALID_FLAG (0x1)
249 typedef PREPACK
struct {
251 u8 csumFlags
;/* bit 0 set -partial csum valid
252 bit 1 set -test mode */
253 } POSTPACK WMI_RX_META_V2
;
257 #define WMI_GET_DEVICE_ID(info1) ((info1) & 0xF)
262 typedef PREPACK
struct {
271 u16 reserved
; /* For alignment */
272 } POSTPACK WMI_CMD_HDR
; /* used for commands and events */
278 WMI_CONNECT_CMDID
= 0x0001,
280 WMI_DISCONNECT_CMDID
,
281 WMI_SYNCHRONIZE_CMDID
,
282 WMI_CREATE_PSTREAM_CMDID
,
283 WMI_DELETE_PSTREAM_CMDID
,
284 WMI_START_SCAN_CMDID
,
285 WMI_SET_SCAN_PARAMS_CMDID
,
286 WMI_SET_BSS_FILTER_CMDID
,
287 WMI_SET_PROBED_SSID_CMDID
, /* 10 */
288 WMI_SET_LISTEN_INT_CMDID
,
289 WMI_SET_BMISS_TIME_CMDID
,
290 WMI_SET_DISC_TIMEOUT_CMDID
,
291 WMI_GET_CHANNEL_LIST_CMDID
,
292 WMI_SET_BEACON_INT_CMDID
,
293 WMI_GET_STATISTICS_CMDID
,
294 WMI_SET_CHANNEL_PARAMS_CMDID
,
295 WMI_SET_POWER_MODE_CMDID
,
296 WMI_SET_IBSS_PM_CAPS_CMDID
,
297 WMI_SET_POWER_PARAMS_CMDID
, /* 20 */
298 WMI_SET_POWERSAVE_TIMERS_POLICY_CMDID
,
299 WMI_ADD_CIPHER_KEY_CMDID
,
300 WMI_DELETE_CIPHER_KEY_CMDID
,
302 WMI_DELETE_KRK_CMDID
,
304 WMI_SET_TX_PWR_CMDID
,
305 WMI_GET_TX_PWR_CMDID
,
306 WMI_SET_ASSOC_INFO_CMDID
,
307 WMI_ADD_BAD_AP_CMDID
, /* 30 */
308 WMI_DELETE_BAD_AP_CMDID
,
309 WMI_SET_TKIP_COUNTERMEASURES_CMDID
,
310 WMI_RSSI_THRESHOLD_PARAMS_CMDID
,
311 WMI_TARGET_ERROR_REPORT_BITMASK_CMDID
,
312 WMI_SET_ACCESS_PARAMS_CMDID
,
313 WMI_SET_RETRY_LIMITS_CMDID
,
314 WMI_SET_OPT_MODE_CMDID
,
315 WMI_OPT_TX_FRAME_CMDID
,
316 WMI_SET_VOICE_PKT_SIZE_CMDID
,
317 WMI_SET_MAX_SP_LEN_CMDID
, /* 40 */
318 WMI_SET_ROAM_CTRL_CMDID
,
319 WMI_GET_ROAM_TBL_CMDID
,
320 WMI_GET_ROAM_DATA_CMDID
,
322 WMI_SET_MAX_OFFHOME_DURATION_CMDID
,
323 WMI_EXTENSION_CMDID
, /* Non-wireless extensions */
324 WMI_SNR_THRESHOLD_PARAMS_CMDID
,
325 WMI_LQ_THRESHOLD_PARAMS_CMDID
,
326 WMI_SET_LPREAMBLE_CMDID
,
327 WMI_SET_RTS_CMDID
, /* 50 */
328 WMI_CLR_RSSI_SNR_CMDID
,
329 WMI_SET_FIXRATES_CMDID
,
330 WMI_GET_FIXRATES_CMDID
,
331 WMI_SET_AUTH_MODE_CMDID
,
332 WMI_SET_REASSOC_MODE_CMDID
,
334 WMI_SET_WMM_TXOP_CMDID
,
336 /* COEX AR6002 only*/
337 WMI_SET_BT_STATUS_CMDID
,
338 WMI_SET_BT_PARAMS_CMDID
, /* 60 */
340 WMI_SET_KEEPALIVE_CMDID
,
341 WMI_GET_KEEPALIVE_CMDID
,
344 WMI_SET_WSC_STATUS_CMDID
,
346 /* Wake on Wireless */
347 WMI_SET_HOST_SLEEP_MODE_CMDID
,
348 WMI_SET_WOW_MODE_CMDID
,
349 WMI_GET_WOW_LIST_CMDID
,
350 WMI_ADD_WOW_PATTERN_CMDID
,
351 WMI_DEL_WOW_PATTERN_CMDID
, /* 70 */
353 WMI_SET_FRAMERATES_CMDID
,
355 WMI_SET_QOS_SUPP_CMDID
,
356 /* WMI_THIN_RESERVED_... mark the start and end
357 * values for WMI_THIN_RESERVED command IDs. These
358 * command IDs can be found in wmi_thin.h */
359 WMI_THIN_RESERVED_START
= 0x8000,
360 WMI_THIN_RESERVED_END
= 0x8fff,
362 * Developer commands starts at 0xF000
364 WMI_SET_BITRATE_CMDID
= 0xF000,
365 WMI_GET_BITRATE_CMDID
,
366 WMI_SET_WHALPARAM_CMDID
,
369 /*Should add the new command to the tail for compatible with
372 WMI_SET_MAC_ADDRESS_CMDID
,
373 WMI_SET_AKMP_PARAMS_CMDID
,
374 WMI_SET_PMKID_LIST_CMDID
,
375 WMI_GET_PMKID_LIST_CMDID
,
376 WMI_ABORT_SCAN_CMDID
,
377 WMI_SET_TARGET_EVENT_REPORT_CMDID
,
386 WMI_AP_HIDDEN_SSID_CMDID
,
387 WMI_AP_SET_NUM_STA_CMDID
,
388 WMI_AP_ACL_POLICY_CMDID
,
389 WMI_AP_ACL_MAC_LIST_CMDID
,
390 WMI_AP_CONFIG_COMMIT_CMDID
,
391 WMI_AP_SET_MLME_CMDID
,
392 WMI_AP_SET_PVB_CMDID
,
393 WMI_AP_CONN_INACT_CMDID
,
394 WMI_AP_PROT_SCAN_TIME_CMDID
,
395 WMI_AP_SET_COUNTRY_CMDID
,
396 WMI_AP_SET_DTIM_CMDID
,
397 WMI_AP_MODE_STAT_CMDID
,
400 WMI_SET_PARAMS_CMDID
,
401 WMI_SET_MCAST_FILTER_CMDID
,
402 WMI_DEL_MCAST_FILTER_CMDID
,
404 WMI_ALLOW_AGGR_CMDID
,
407 WMI_SET_HT_CAP_CMDID
,
409 WMI_SET_TX_SELECT_RATES_CMDID
,
410 WMI_SET_TX_SGI_PARAM_CMDID
,
411 WMI_SET_RATE_POLICY_CMDID
,
414 WMI_RX_FRAME_FORMAT_CMDID
,
415 WMI_SET_THIN_MODE_CMDID
,
416 WMI_SET_BT_WLAN_CONN_PRECEDENCE_CMDID
,
418 WMI_AP_SET_11BG_RATESET_CMDID
,
420 WMI_MCAST_FILTER_CMDID
,
421 /* COEX CMDID AR6003*/
422 WMI_SET_BTCOEX_FE_ANT_CMDID
,
423 WMI_SET_BTCOEX_COLOCATED_BT_DEV_CMDID
,
424 WMI_SET_BTCOEX_SCO_CONFIG_CMDID
,
425 WMI_SET_BTCOEX_A2DP_CONFIG_CMDID
,
426 WMI_SET_BTCOEX_ACLCOEX_CONFIG_CMDID
,
427 WMI_SET_BTCOEX_BTINQUIRY_PAGE_CONFIG_CMDID
,
428 WMI_SET_BTCOEX_DEBUG_CMDID
,
429 WMI_SET_BTCOEX_BT_OPERATING_STATUS_CMDID
,
430 WMI_GET_BTCOEX_STATS_CMDID
,
431 WMI_GET_BTCOEX_CONFIG_CMDID
,
433 WMI_SET_PASSPHRASE_CMDID
,
434 WMI_ENABLE_WAC_CMDID
,
435 WMI_WAC_SCAN_REPLY_CMDID
,
436 WMI_WAC_CTRL_REQ_CMDID
,
437 WMI_SET_DIV_PARAMS_CMDID
,
438 WMI_SET_EXCESS_TX_RETRY_THRES_CMDID
,
445 WMI_FRAME_BEACON
= 0,
447 WMI_FRAME_PROBE_RESP
,
449 WMI_FRAME_ASSOC_RESP
,
451 } WMI_MGMT_FRAME_TYPE
;
457 INFRA_NETWORK
= 0x01,
458 ADHOC_NETWORK
= 0x02,
459 ADHOC_CREATOR
= 0x04,
466 LEAP_AUTH
= 0x04, /* different from IEEE_AUTH_MODE definitions */
474 WPA2_PSK_AUTH
= 0x10,
475 WPA_AUTH_CCKM
= 0x20,
476 WPA2_AUTH_CCKM
= 0x40,
486 #endif /*WAPI_ENABLE*/
489 #define WMI_MIN_CRYPTO_TYPE NONE_CRYPT
490 #define WMI_MAX_CRYPTO_TYPE (AES_CRYPT + 1)
493 #undef WMI_MAX_CRYPTO_TYPE
494 #define WMI_MAX_CRYPTO_TYPE (WAPI_CRYPT + 1)
495 #endif /* WAPI_ENABLE */
498 #define IW_ENCODE_ALG_SM4 0x20
499 #define IW_AUTH_WAPI_ENABLED 0x20
502 #define WMI_MIN_KEY_INDEX 0
503 #define WMI_MAX_KEY_INDEX 3
506 #undef WMI_MAX_KEY_INDEX
507 #define WMI_MAX_KEY_INDEX 7 /* wapi grpKey 0-3, prwKey 4-7 */
508 #endif /* WAPI_ENABLE */
510 #define WMI_MAX_KEY_LEN 32
512 #define WMI_MAX_SSID_LEN 32
515 CONNECT_ASSOC_POLICY_USER
= 0x0001,
516 CONNECT_SEND_REASSOC
= 0x0002,
517 CONNECT_IGNORE_WPAx_GROUP_CIPHER
= 0x0004,
518 CONNECT_PROFILE_MATCH_DONE
= 0x0008,
519 CONNECT_IGNORE_AAC_BEACON
= 0x0010,
520 CONNECT_CSA_FOLLOW_BSS
= 0x0020,
521 CONNECT_DO_WPA_OFFLOAD
= 0x0040,
522 CONNECT_DO_NOT_DEAUTH
= 0x0080,
523 } WMI_CONNECT_CTRL_FLAGS_BITS
;
525 #define DEFAULT_CONNECT_CTRL_FLAGS (CONNECT_CSA_FOLLOW_BSS)
527 typedef PREPACK
struct {
531 u8 pairwiseCryptoType
;
532 u8 pairwiseCryptoLen
;
536 u8 ssid
[WMI_MAX_SSID_LEN
];
538 u8 bssid
[ATH_MAC_LEN
];
540 } POSTPACK WMI_CONNECT_CMD
;
543 * WMI_RECONNECT_CMDID
545 typedef PREPACK
struct {
546 u16 channel
; /* hint */
547 u8 bssid
[ATH_MAC_LEN
]; /* mandatory if set */
548 } POSTPACK WMI_RECONNECT_CMD
;
550 #define WMI_PMK_LEN 32
551 typedef PREPACK
struct {
553 } POSTPACK WMI_SET_PMK_CMD
;
556 * WMI_SET_EXCESS_TX_RETRY_THRES_CMDID
558 typedef PREPACK
struct {
560 } POSTPACK WMI_SET_EXCESS_TX_RETRY_THRES_CMD
;
563 * WMI_ADD_CIPHER_KEY_CMDID
566 PAIRWISE_USAGE
= 0x00,
568 TX_USAGE
= 0x02, /* default Tx Key - Static WEP only */
573 * Bit 0 - Initialise TSC - default is Initialize
575 #define KEY_OP_INIT_TSC 0x01
576 #define KEY_OP_INIT_RSC 0x02
578 #define KEY_OP_INIT_WAPIPN 0x10
579 #endif /* WAPI_ENABLE */
581 #define KEY_OP_INIT_VAL 0x03 /* Default Initialise the TSC & RSC */
582 #define KEY_OP_VALID_MASK 0x03
584 typedef PREPACK
struct {
587 u8 keyUsage
; /* KEY_USAGE */
589 u8 keyRSC
[8]; /* key replay sequence counter */
590 u8 key
[WMI_MAX_KEY_LEN
];
591 u8 key_op_ctrl
; /* Additional Key Control information */
592 u8 key_macaddr
[ATH_MAC_LEN
];
593 } POSTPACK WMI_ADD_CIPHER_KEY_CMD
;
596 * WMI_DELETE_CIPHER_KEY_CMDID
598 typedef PREPACK
struct {
600 } POSTPACK WMI_DELETE_CIPHER_KEY_CMD
;
602 #define WMI_KRK_LEN 16
606 typedef PREPACK
struct {
608 } POSTPACK WMI_ADD_KRK_CMD
;
611 * WMI_SET_TKIP_COUNTERMEASURES_CMDID
614 WMI_TKIP_CM_DISABLE
= 0x0,
615 WMI_TKIP_CM_ENABLE
= 0x1,
616 } WMI_TKIP_CM_CONTROL
;
618 typedef PREPACK
struct {
619 u8 cm_en
; /* WMI_TKIP_CM_CONTROL */
620 } POSTPACK WMI_SET_TKIP_COUNTERMEASURES_CMD
;
623 * WMI_SET_PMKID_CMDID
626 #define WMI_PMKID_LEN 16
633 typedef PREPACK
struct {
634 u8 bssid
[ATH_MAC_LEN
];
635 u8 enable
; /* PMKID_ENABLE_FLG */
636 u8 pmkid
[WMI_PMKID_LEN
];
637 } POSTPACK WMI_SET_PMKID_CMD
;
647 typedef PREPACK
struct {
649 u32 isLegacy
; /* For Legacy Cisco AP compatibility */
650 u32 homeDwellTime
; /* Maximum duration in the home channel(milliseconds) */
651 u32 forceScanInterval
; /* Time interval between scans (milliseconds)*/
652 u8 scanType
; /* WMI_SCAN_TYPE */
653 u8 numChannels
; /* how many channels follow */
654 u16 channelList
[1]; /* channels in Mhz */
655 } POSTPACK WMI_START_SCAN_CMD
;
658 * WMI_SET_SCAN_PARAMS_CMDID
660 #define WMI_SHORTSCANRATIO_DEFAULT 3
662 * Warning: ScanCtrlFlag value of 0xFF is used to disable all flags in WMI_SCAN_PARAMS_CMD
663 * Do not add any more flags to WMI_SCAN_CTRL_FLAG_BITS
666 CONNECT_SCAN_CTRL_FLAGS
= 0x01, /* set if can scan in the Connect cmd */
667 SCAN_CONNECTED_CTRL_FLAGS
= 0x02, /* set if scan for the SSID it is */
668 /* already connected to */
669 ACTIVE_SCAN_CTRL_FLAGS
= 0x04, /* set if enable active scan */
670 ROAM_SCAN_CTRL_FLAGS
= 0x08, /* set if enable roam scan when bmiss and lowrssi */
671 REPORT_BSSINFO_CTRL_FLAGS
= 0x10, /* set if follows customer BSSINFO reporting rule */
672 ENABLE_AUTO_CTRL_FLAGS
= 0x20, /* if disabled, target doesn't
673 scan after a disconnect event */
674 ENABLE_SCAN_ABORT_EVENT
= 0x40 /* Scan complete event with canceled status will be generated when a scan is prempted before it gets completed */
675 } WMI_SCAN_CTRL_FLAGS_BITS
;
677 #define CAN_SCAN_IN_CONNECT(flags) (flags & CONNECT_SCAN_CTRL_FLAGS)
678 #define CAN_SCAN_CONNECTED(flags) (flags & SCAN_CONNECTED_CTRL_FLAGS)
679 #define ENABLE_ACTIVE_SCAN(flags) (flags & ACTIVE_SCAN_CTRL_FLAGS)
680 #define ENABLE_ROAM_SCAN(flags) (flags & ROAM_SCAN_CTRL_FLAGS)
681 #define CONFIG_REPORT_BSSINFO(flags) (flags & REPORT_BSSINFO_CTRL_FLAGS)
682 #define IS_AUTO_SCAN_ENABLED(flags) (flags & ENABLE_AUTO_CTRL_FLAGS)
683 #define SCAN_ABORT_EVENT_ENABLED(flags) (flags & ENABLE_SCAN_ABORT_EVENT)
685 #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)
688 typedef PREPACK
struct {
689 u16 fg_start_period
; /* seconds */
690 u16 fg_end_period
; /* seconds */
691 u16 bg_period
; /* seconds */
692 u16 maxact_chdwell_time
; /* msec */
693 u16 pas_chdwell_time
; /* msec */
694 u8 shortScanRatio
; /* how many shorts scan for one long */
696 u16 minact_chdwell_time
; /* msec */
697 u16 maxact_scan_per_ssid
; /* max active scans per ssid */
698 u32 max_dfsch_act_time
; /* msecs */
699 } POSTPACK WMI_SCAN_PARAMS_CMD
;
702 * WMI_SET_BSS_FILTER_CMDID
705 NONE_BSS_FILTER
= 0x0, /* no beacons forwarded */
706 ALL_BSS_FILTER
, /* all beacons forwarded */
707 PROFILE_FILTER
, /* only beacons matching profile */
708 ALL_BUT_PROFILE_FILTER
, /* all but beacons matching profile */
709 CURRENT_BSS_FILTER
, /* only beacons matching current BSS */
710 ALL_BUT_BSS_FILTER
, /* all but beacons matching BSS */
711 PROBED_SSID_FILTER
, /* beacons matching probed ssid */
712 LAST_BSS_FILTER
, /* marker only */
715 typedef PREPACK
struct {
716 u8 bssFilter
; /* see WMI_BSS_FILTER */
717 u8 reserved1
; /* For alignment */
718 u16 reserved2
; /* For alignment */
720 } POSTPACK WMI_BSS_FILTER_CMD
;
723 * WMI_SET_PROBED_SSID_CMDID
725 #define MAX_PROBED_SSID_INDEX 9
728 DISABLE_SSID_FLAG
= 0, /* disables entry */
729 SPECIFIC_SSID_FLAG
= 0x01, /* probes specified ssid */
730 ANY_SSID_FLAG
= 0x02, /* probes for any ssid */
733 typedef PREPACK
struct {
734 u8 entryIndex
; /* 0 to MAX_PROBED_SSID_INDEX */
735 u8 flag
; /* WMI_SSID_FLG */
738 } POSTPACK WMI_PROBED_SSID_CMD
;
741 * WMI_SET_LISTEN_INT_CMDID
742 * The Listen interval is between 15 and 3000 TUs
744 #define MIN_LISTEN_INTERVAL 15
745 #define MAX_LISTEN_INTERVAL 5000
746 #define MIN_LISTEN_BEACONS 1
747 #define MAX_LISTEN_BEACONS 50
749 typedef PREPACK
struct {
752 } POSTPACK WMI_LISTEN_INT_CMD
;
755 * WMI_SET_BEACON_INT_CMDID
757 typedef PREPACK
struct {
759 } POSTPACK WMI_BEACON_INT_CMD
;
762 * WMI_SET_BMISS_TIME_CMDID
763 * valid values are between 1000 and 5000 TUs
766 #define MIN_BMISS_TIME 1000
767 #define MAX_BMISS_TIME 5000
768 #define MIN_BMISS_BEACONS 1
769 #define MAX_BMISS_BEACONS 50
771 typedef PREPACK
struct {
774 } POSTPACK WMI_BMISS_TIME_CMD
;
777 * WMI_SET_POWER_MODE_CMDID
784 typedef PREPACK
struct {
785 u8 powerMode
; /* WMI_POWER_MODE */
786 } POSTPACK WMI_POWER_MODE_CMD
;
788 typedef PREPACK
struct {
789 s8 status
; /* WMI_SET_PARAMS_REPLY */
790 } POSTPACK WMI_SET_PARAMS_REPLY
;
792 typedef PREPACK
struct {
795 char buffer
[1]; /* WMI_SET_PARAMS */
796 } POSTPACK WMI_SET_PARAMS_CMD
;
798 typedef PREPACK
struct {
799 u8 multicast_mac
[ATH_MAC_LEN
]; /* WMI_SET_MCAST_FILTER */
800 } POSTPACK WMI_SET_MCAST_FILTER_CMD
;
802 typedef PREPACK
struct {
803 u8 enable
; /* WMI_MCAST_FILTER */
804 } POSTPACK WMI_MCAST_FILTER_CMD
;
807 * WMI_SET_POWER_PARAMS_CMDID
816 /* Policy to determnine whether TX should wakeup WLAN if sleeping */
818 TX_WAKEUP_UPON_SLEEP
= 1,
819 TX_DONT_WAKEUP_UPON_SLEEP
= 2
820 } WMI_TX_WAKEUP_POLICY_UPON_SLEEP
;
823 * Policy to determnine whether power save failure event should be sent to
824 * host during scanning
827 SEND_POWER_SAVE_FAIL_EVENT_ALWAYS
= 1,
828 IGNORE_POWER_SAVE_FAIL_EVENT_DURING_SCAN
= 2,
829 } POWER_SAVE_FAIL_EVENT_POLICY
;
831 typedef PREPACK
struct {
832 u16 idle_period
; /* msec */
835 u16 tx_wakeup_policy
;
836 u16 num_tx_to_wakeup
;
837 u16 ps_fail_event_policy
;
838 } POSTPACK WMI_POWER_PARAMS_CMD
;
840 /* Adhoc power save types */
848 typedef PREPACK
struct {
850 u8 ttl
; /* number of beacon periods */
851 u16 atim_windows
; /* msec */
852 u16 timeout_value
; /* msec */
853 } POSTPACK WMI_IBSS_PM_CAPS_CMD
;
855 /* AP power save types */
861 typedef PREPACK
struct {
862 u32 idle_time
; /* in msec */
863 u32 ps_period
; /* in usec */
864 u8 sleep_period
; /* in ps periods */
866 } POSTPACK WMI_AP_PS_CMD
;
869 * WMI_SET_POWERSAVE_TIMERS_POLICY_CMDID
872 IGNORE_TIM_ALL_QUEUES_APSD
= 0,
873 PROCESS_TIM_ALL_QUEUES_APSD
= 1,
874 IGNORE_TIM_SIMULATED_APSD
= 2,
875 PROCESS_TIM_SIMULATED_APSD
= 3,
878 typedef PREPACK
struct {
879 u16 psPollTimeout
; /* msec */
880 u16 triggerTimeout
; /* msec */
881 u32 apsdTimPolicy
; /* TIM behavior with ques APSD enabled. Default is IGNORE_TIM_ALL_QUEUES_APSD */
882 u32 simulatedAPSDTimPolicy
; /* TIM behavior with simulated APSD enabled. Default is PROCESS_TIM_SIMULATED_APSD */
883 } POSTPACK WMI_POWERSAVE_TIMERS_POLICY_CMD
;
886 * WMI_SET_VOICE_PKT_SIZE_CMDID
888 typedef PREPACK
struct {
890 } POSTPACK WMI_SET_VOICE_PKT_SIZE_CMD
;
893 * WMI_SET_MAX_SP_LEN_CMDID
896 DELIVER_ALL_PKT
= 0x0,
902 typedef PREPACK
struct {
904 } POSTPACK WMI_SET_MAX_SP_LEN_CMD
;
907 * WMI_SET_DISC_TIMEOUT_CMDID
909 typedef PREPACK
struct {
910 u8 disconnectTimeout
; /* seconds */
911 } POSTPACK WMI_DISC_TIMEOUT_CMD
;
920 DISABLE_FOR_THIS_AC
= 0,
921 ENABLE_FOR_THIS_AC
= 1,
922 ENABLE_FOR_ALL_AC
= 2,
926 TRAFFIC_TYPE_APERIODIC
= 0,
927 TRAFFIC_TYPE_PERIODIC
= 1,
931 * WMI_SYNCHRONIZE_CMDID
933 typedef PREPACK
struct {
935 } POSTPACK WMI_SYNC_CMD
;
938 * WMI_CREATE_PSTREAM_CMDID
940 typedef PREPACK
struct {
941 u32 minServiceInt
; /* in milli-sec */
942 u32 maxServiceInt
; /* in milli-sec */
943 u32 inactivityInt
; /* in milli-sec */
944 u32 suspensionInt
; /* in milli-sec */
945 u32 serviceStartTime
;
946 u32 minDataRate
; /* in bps */
947 u32 meanDataRate
; /* in bps */
948 u32 peakDataRate
; /* in bps */
951 u32 minPhyRate
; /* in bps */
954 u16 nominalMSDU
; /* in octects */
955 u16 maxMSDU
; /* in octects */
957 u8 trafficDirection
; /* DIR_TYPE */
959 u8 trafficType
; /* TRAFFIC_TYPE */
960 u8 voicePSCapability
; /* VOICEPS_CAP_TYPE */
962 u8 userPriority
; /* 802.1D user priority */
963 u8 nominalPHY
; /* nominal phy rate */
964 } POSTPACK WMI_CREATE_PSTREAM_CMD
;
967 * WMI_DELETE_PSTREAM_CMDID
969 typedef PREPACK
struct {
975 } POSTPACK WMI_DELETE_PSTREAM_CMD
;
978 * WMI_SET_CHANNEL_PARAMS_CMDID
985 WMI_11GONLY_MODE
= 0x5,
988 #define WMI_MAX_CHANNELS 32
990 typedef PREPACK
struct {
992 u8 scanParam
; /* set if enable scan */
993 u8 phyMode
; /* see WMI_PHY_MODE */
994 u8 numChannels
; /* how many channels follow */
995 u16 channelList
[1]; /* channels in Mhz */
996 } POSTPACK WMI_CHANNEL_PARAMS_CMD
;
1000 * WMI_RSSI_THRESHOLD_PARAMS_CMDID
1001 * Setting the polltime to 0 would disable polling.
1002 * Threshold values are in the ascending order, and should agree to:
1003 * (lowThreshold_lowerVal < lowThreshold_upperVal < highThreshold_lowerVal
1004 * < highThreshold_upperVal)
1007 typedef PREPACK
struct WMI_RSSI_THRESHOLD_PARAMS
{
1008 u32 pollTime
; /* Polling time as a factor of LI */
1009 s16 thresholdAbove1_Val
; /* lowest of upper */
1010 s16 thresholdAbove2_Val
;
1011 s16 thresholdAbove3_Val
;
1012 s16 thresholdAbove4_Val
;
1013 s16 thresholdAbove5_Val
;
1014 s16 thresholdAbove6_Val
; /* highest of upper */
1015 s16 thresholdBelow1_Val
; /* lowest of bellow */
1016 s16 thresholdBelow2_Val
;
1017 s16 thresholdBelow3_Val
;
1018 s16 thresholdBelow4_Val
;
1019 s16 thresholdBelow5_Val
;
1020 s16 thresholdBelow6_Val
; /* highest of bellow */
1021 u8 weight
; /* "alpha" */
1023 } POSTPACK WMI_RSSI_THRESHOLD_PARAMS_CMD
;
1026 * WMI_SNR_THRESHOLD_PARAMS_CMDID
1027 * Setting the polltime to 0 would disable polling.
1030 typedef PREPACK
struct WMI_SNR_THRESHOLD_PARAMS
{
1031 u32 pollTime
; /* Polling time as a factor of LI */
1032 u8 weight
; /* "alpha" */
1033 u8 thresholdAbove1_Val
; /* lowest of uppper*/
1034 u8 thresholdAbove2_Val
;
1035 u8 thresholdAbove3_Val
;
1036 u8 thresholdAbove4_Val
; /* highest of upper */
1037 u8 thresholdBelow1_Val
; /* lowest of bellow */
1038 u8 thresholdBelow2_Val
;
1039 u8 thresholdBelow3_Val
;
1040 u8 thresholdBelow4_Val
; /* highest of bellow */
1042 } POSTPACK WMI_SNR_THRESHOLD_PARAMS_CMD
;
1045 * WMI_LQ_THRESHOLD_PARAMS_CMDID
1047 typedef PREPACK
struct WMI_LQ_THRESHOLD_PARAMS
{
1049 u8 thresholdAbove1_Val
;
1050 u8 thresholdAbove2_Val
;
1051 u8 thresholdAbove3_Val
;
1052 u8 thresholdAbove4_Val
;
1053 u8 thresholdBelow1_Val
;
1054 u8 thresholdBelow2_Val
;
1055 u8 thresholdBelow3_Val
;
1056 u8 thresholdBelow4_Val
;
1058 } POSTPACK WMI_LQ_THRESHOLD_PARAMS_CMD
;
1061 WMI_LPREAMBLE_DISABLED
= 0,
1062 WMI_LPREAMBLE_ENABLED
1063 } WMI_LPREAMBLE_STATUS
;
1066 WMI_IGNORE_BARKER_IN_ERP
= 0,
1067 WMI_DONOT_IGNORE_BARKER_IN_ERP
1068 } WMI_PREAMBLE_POLICY
;
1070 typedef PREPACK
struct {
1073 }POSTPACK WMI_SET_LPREAMBLE_CMD
;
1075 typedef PREPACK
struct {
1077 }POSTPACK WMI_SET_RTS_CMD
;
1080 * WMI_TARGET_ERROR_REPORT_BITMASK_CMDID
1081 * Sets the error reporting event bitmask in target. Target clears it
1082 * upon an error. Subsequent errors are counted, but not reported
1083 * via event, unless the bitmask is set again.
1085 typedef PREPACK
struct {
1087 } POSTPACK WMI_TARGET_ERROR_REPORT_BITMASK
;
1090 * WMI_SET_TX_PWR_CMDID
1092 typedef PREPACK
struct {
1093 u8 dbM
; /* in dbM units */
1094 } POSTPACK WMI_SET_TX_PWR_CMD
, WMI_TX_PWR_REPLY
;
1097 * WMI_SET_ASSOC_INFO_CMDID
1099 * A maximum of 2 private IEs can be sent in the [Re]Assoc request.
1100 * A 3rd one, the CCX version IE can also be set from the host.
1102 #define WMI_MAX_ASSOC_INFO_TYPE 2
1103 #define WMI_CCX_VER_IE 2 /* ieType to set CCX Version IE */
1105 #define WMI_MAX_ASSOC_INFO_LEN 240
1107 typedef PREPACK
struct {
1110 u8 assocInfo
[1]; /* up to WMI_MAX_ASSOC_INFO_LEN */
1111 } POSTPACK WMI_SET_ASSOC_INFO_CMD
;
1115 * WMI_GET_TX_PWR_CMDID does not take any parameters
1119 * WMI_ADD_BAD_AP_CMDID
1121 #define WMI_MAX_BAD_AP_INDEX 1
1123 typedef PREPACK
struct {
1124 u8 badApIndex
; /* 0 to WMI_MAX_BAD_AP_INDEX */
1125 u8 bssid
[ATH_MAC_LEN
];
1126 } POSTPACK WMI_ADD_BAD_AP_CMD
;
1129 * WMI_DELETE_BAD_AP_CMDID
1131 typedef PREPACK
struct {
1132 u8 badApIndex
; /* 0 to WMI_MAX_BAD_AP_INDEX */
1133 } POSTPACK WMI_DELETE_BAD_AP_CMD
;
1136 * WMI_SET_ACCESS_PARAMS_CMDID
1138 #define WMI_DEFAULT_TXOP_ACPARAM 0 /* implies one MSDU */
1139 #define WMI_DEFAULT_ECWMIN_ACPARAM 4 /* corresponds to CWmin of 15 */
1140 #define WMI_DEFAULT_ECWMAX_ACPARAM 10 /* corresponds to CWmax of 1023 */
1141 #define WMI_MAX_CW_ACPARAM 15 /* maximum eCWmin or eCWmax */
1142 #define WMI_DEFAULT_AIFSN_ACPARAM 2
1143 #define WMI_MAX_AIFSN_ACPARAM 15
1144 typedef PREPACK
struct {
1145 u16 txop
; /* in units of 32 usec */
1150 } POSTPACK WMI_SET_ACCESS_PARAMS_CMD
;
1154 * WMI_SET_RETRY_LIMITS_CMDID
1156 * This command is used to customize the number of retries the
1157 * wlan device will perform on a given frame.
1159 #define WMI_MIN_RETRIES 2
1160 #define WMI_MAX_RETRIES 13
1163 CONTROL_FRAMETYPE
= 1,
1167 typedef PREPACK
struct {
1168 u8 frameType
; /* WMI_FRAMETYPE */
1169 u8 trafficClass
; /* applies only to DATA_FRAMETYPE */
1172 } POSTPACK WMI_SET_RETRY_LIMITS_CMD
;
1175 * WMI_SET_ROAM_CTRL_CMDID
1177 * This command is used to influence the Roaming behaviour
1178 * Set the host biases of the BSSs before setting the roam mode as bias
1183 * Different types of Roam Control
1187 WMI_FORCE_ROAM
= 1, /* Roam to the specified BSSID */
1188 WMI_SET_ROAM_MODE
= 2, /* default ,progd bias, no roam */
1189 WMI_SET_HOST_BIAS
= 3, /* Set the Host Bias */
1190 WMI_SET_LOWRSSI_SCAN_PARAMS
= 4, /* Set lowrssi Scan parameters */
1191 } WMI_ROAM_CTRL_TYPE
;
1193 #define WMI_MIN_ROAM_CTRL_TYPE WMI_FORCE_ROAM
1194 #define WMI_MAX_ROAM_CTRL_TYPE WMI_SET_LOWRSSI_SCAN_PARAMS
1201 WMI_DEFAULT_ROAM_MODE
= 1, /* RSSI based ROAM */
1202 WMI_HOST_BIAS_ROAM_MODE
= 2, /* HOST BIAS based ROAM */
1203 WMI_LOCK_BSS_MODE
= 3 /* Lock to the Current BSS - no Roam */
1207 * BSS HOST BIAS INFO
1210 typedef PREPACK
struct {
1211 u8 bssid
[ATH_MAC_LEN
];
1213 } POSTPACK WMI_BSS_BIAS
;
1215 typedef PREPACK
struct {
1217 WMI_BSS_BIAS bssBias
[1];
1218 } POSTPACK WMI_BSS_BIAS_INFO
;
1220 typedef PREPACK
struct WMI_LOWRSSI_SCAN_PARAMS
{
1221 u16 lowrssi_scan_period
;
1222 s16 lowrssi_scan_threshold
;
1223 s16 lowrssi_roam_threshold
;
1225 u8 reserved
[1]; /* For alignment */
1226 } POSTPACK WMI_LOWRSSI_SCAN_PARAMS
;
1228 typedef PREPACK
struct {
1230 u8 bssid
[ATH_MAC_LEN
]; /* WMI_FORCE_ROAM */
1231 u8 roamMode
; /* WMI_SET_ROAM_MODE */
1232 WMI_BSS_BIAS_INFO bssBiasInfo
; /* WMI_SET_HOST_BIAS */
1233 WMI_LOWRSSI_SCAN_PARAMS lrScanParams
;
1236 } POSTPACK WMI_SET_ROAM_CTRL_CMD
;
1239 * WMI_SET_BT_WLAN_CONN_PRECEDENCE_CMDID
1242 BT_WLAN_CONN_PRECDENCE_WLAN
=0, /* Default */
1243 BT_WLAN_CONN_PRECDENCE_PAL
,
1244 } BT_WLAN_CONN_PRECEDENCE
;
1246 typedef PREPACK
struct {
1248 } POSTPACK WMI_SET_BT_WLAN_CONN_PRECEDENCE
;
1251 * WMI_ENABLE_RM_CMDID
1253 typedef PREPACK
struct {
1254 u32 enable_radio_measurements
;
1255 } POSTPACK WMI_ENABLE_RM_CMD
;
1258 * WMI_SET_MAX_OFFHOME_DURATION_CMDID
1260 typedef PREPACK
struct {
1261 u8 max_offhome_duration
;
1262 } POSTPACK WMI_SET_MAX_OFFHOME_DURATION_CMD
;
1264 typedef PREPACK
struct {
1267 } POSTPACK WMI_SET_HB_CHALLENGE_RESP_PARAMS_CMD
;
1268 /*---------------------- BTCOEX RELATED -------------------------------------*/
1269 /*----------------------COMMON to AR6002 and AR6003 -------------------------*/
1271 BT_STREAM_UNDEF
= 0,
1272 BT_STREAM_SCO
, /* SCO stream */
1273 BT_STREAM_A2DP
, /* A2DP stream */
1274 BT_STREAM_SCAN
, /* BT Discovery or Page */
1280 BT_PARAM_SCO_PSPOLL_LATENCY_ONE_FOURTH
=1,
1281 BT_PARAM_SCO_PSPOLL_LATENCY_HALF
,
1282 BT_PARAM_SCO_PSPOLL_LATENCY_THREE_FOURTH
,
1283 } BT_PARAMS_SCO_PSPOLL_LATENCY
;
1286 BT_PARAMS_SCO_STOMP_SCO_NEVER
=1,
1287 BT_PARAMS_SCO_STOMP_SCO_ALWAYS
,
1288 BT_PARAMS_SCO_STOMP_SCO_IN_LOWRSSI
,
1289 } BT_PARAMS_SCO_STOMP_RULES
;
1292 BT_STATUS_UNDEF
= 0,
1298 typedef PREPACK
struct {
1301 } POSTPACK WMI_SET_BT_STATUS_CMD
;
1304 BT_ANT_TYPE_UNDEF
=0,
1306 BT_ANT_TYPE_SPLITTER
,
1308 BT_ANT_TYPE_HIGH_ISO_DUAL
1309 } BT_ANT_FRONTEND_CONFIG
;
1312 BT_COLOCATED_DEV_BTS4020
=0,
1313 BT_COLCATED_DEV_CSR
,
1314 BT_COLOCATED_DEV_VALKYRIE
1315 } BT_COLOCATED_DEV_TYPE
;
1317 /*********************** Applicable to AR6002 ONLY ******************************/
1320 BT_PARAM_SCO
= 1, /* SCO stream parameters */
1322 BT_PARAM_ANTENNA_CONFIG
,
1323 BT_PARAM_COLOCATED_BT_DEVICE
,
1325 BT_PARAM_11A_SEPARATE_ANT
,
1330 #define BT_SCO_ALLOW_CLOSE_RANGE_OPT (1 << 0)
1331 #define BT_SCO_FORCE_AWAKE_OPT (1 << 1)
1332 #define BT_SCO_SET_RSSI_OVERRIDE(flags) ((flags) |= (1 << 2))
1333 #define BT_SCO_GET_RSSI_OVERRIDE(flags) (((flags) >> 2) & 0x1)
1334 #define BT_SCO_SET_RTS_OVERRIDE(flags) ((flags) |= (1 << 3))
1335 #define BT_SCO_GET_RTS_OVERRIDE(flags) (((flags) >> 3) & 0x1)
1336 #define BT_SCO_GET_MIN_LOW_RATE_CNT(flags) (((flags) >> 8) & 0xFF)
1337 #define BT_SCO_GET_MAX_LOW_RATE_CNT(flags) (((flags) >> 16) & 0xFF)
1338 #define BT_SCO_SET_MIN_LOW_RATE_CNT(flags,val) (flags) |= (((val) & 0xFF) << 8)
1339 #define BT_SCO_SET_MAX_LOW_RATE_CNT(flags,val) (flags) |= (((val) & 0xFF) << 16)
1341 typedef PREPACK
struct {
1342 u32 numScoCyclesForceTrigger
; /* Number SCO cycles after which
1343 force a pspoll. default = 10 */
1344 u32 dataResponseTimeout
; /* Timeout Waiting for Downlink pkt
1345 in response for ps-poll,
1346 default = 10 msecs */
1348 u32 scoOptFlags
; /* SCO Options Flags :
1350 0 Allow Close Range Optimization
1351 1 Force awake during close range
1352 2 If set use host supplied RSSI for OPT
1353 3 If set use host supplied RTS COUNT for OPT
1355 8..15 Low Data Rate Min Cnt
1356 16..23 Low Data Rate Max Cnt
1359 u8 stompDutyCyleVal
; /* Sco cycles to limit ps-poll queuing
1361 u8 stompDutyCyleMaxVal
; /*firm ware increases stomp duty cycle
1362 gradually uptill this value on need basis*/
1363 u8 psPollLatencyFraction
; /* Fraction of idle
1364 period, within which
1367 u8 noSCOSlots
; /* Number of SCO Tx/Rx slots.
1368 HVx, EV3, 2EV3 = 2 */
1369 u8 noIdleSlots
; /* Number of Bluetooth idle slots between
1370 consecutive SCO Tx/Rx slots
1373 u8 scoOptOffRssi
;/*RSSI value below which we go to ps poll*/
1374 u8 scoOptOnRssi
; /*RSSI value above which we reenter opt mode*/
1376 } POSTPACK BT_PARAMS_SCO
;
1378 #define BT_A2DP_ALLOW_CLOSE_RANGE_OPT (1 << 0)
1379 #define BT_A2DP_FORCE_AWAKE_OPT (1 << 1)
1380 #define BT_A2DP_SET_RSSI_OVERRIDE(flags) ((flags) |= (1 << 2))
1381 #define BT_A2DP_GET_RSSI_OVERRIDE(flags) (((flags) >> 2) & 0x1)
1382 #define BT_A2DP_SET_RTS_OVERRIDE(flags) ((flags) |= (1 << 3))
1383 #define BT_A2DP_GET_RTS_OVERRIDE(flags) (((flags) >> 3) & 0x1)
1384 #define BT_A2DP_GET_MIN_LOW_RATE_CNT(flags) (((flags) >> 8) & 0xFF)
1385 #define BT_A2DP_GET_MAX_LOW_RATE_CNT(flags) (((flags) >> 16) & 0xFF)
1386 #define BT_A2DP_SET_MIN_LOW_RATE_CNT(flags,val) (flags) |= (((val) & 0xFF) << 8)
1387 #define BT_A2DP_SET_MAX_LOW_RATE_CNT(flags,val) (flags) |= (((val) & 0xFF) << 16)
1389 typedef PREPACK
struct {
1390 u32 a2dpWlanUsageLimit
; /* MAX time firmware uses the medium for
1391 wlan, after it identifies the idle time
1392 default (30 msecs) */
1393 u32 a2dpBurstCntMin
; /* Minimum number of bluetooth data frames
1394 to replenish Wlan Usage limit (default 3) */
1395 u32 a2dpDataRespTimeout
;
1396 u32 a2dpOptFlags
; /* A2DP Option flags:
1398 0 Allow Close Range Optimization
1399 1 Force awake during close range
1400 2 If set use host supplied RSSI for OPT
1401 3 If set use host supplied RTS COUNT for OPT
1403 8..15 Low Data Rate Min Cnt
1404 16..23 Low Data Rate Max Cnt
1406 u8 isCoLocatedBtRoleMaster
;
1407 u8 a2dpOptOffRssi
;/*RSSI value below which we go to ps poll*/
1408 u8 a2dpOptOnRssi
; /*RSSI value above which we reenter opt mode*/
1410 }POSTPACK BT_PARAMS_A2DP
;
1412 /* During BT ftp/ BT OPP or any another data based acl profile on bluetooth
1414 typedef PREPACK
struct {
1415 u32 aclWlanMediumUsageTime
; /* Wlan usage time during Acl (non-a2dp)
1416 coexistence (default 30 msecs) */
1417 u32 aclBtMediumUsageTime
; /* Bt usage time during acl coexistence
1418 (default 30 msecs)*/
1419 u32 aclDataRespTimeout
;
1420 u32 aclDetectTimeout
; /* ACL coexistence enabled if we get
1421 10 Pkts in X msec(default 100 msecs) */
1422 u32 aclmaxPktCnt
; /* No of ACL pkts to receive before
1423 enabling ACL coex */
1425 }POSTPACK BT_PARAMS_ACLCOEX
;
1427 typedef PREPACK
struct {
1429 BT_PARAMS_SCO scoParams
;
1430 BT_PARAMS_A2DP a2dpParams
;
1431 BT_PARAMS_ACLCOEX aclCoexParams
;
1432 u8 antType
; /* 0 -Disabled (default)
1433 1 - BT_ANT_TYPE_DUAL
1434 2 - BT_ANT_TYPE_SPLITTER
1435 3 - BT_ANT_TYPE_SWITCH */
1436 u8 coLocatedBtDev
; /* 0 - BT_COLOCATED_DEV_BTS4020 (default)
1437 1 - BT_COLCATED_DEV_CSR
1438 2 - BT_COLOCATED_DEV_VALKYRIe
1442 } POSTPACK WMI_SET_BT_PARAMS_CMD
;
1444 /************************ END AR6002 BTCOEX *******************************/
1445 /*-----------------------AR6003 BTCOEX -----------------------------------*/
1447 /* ---------------WMI_SET_BTCOEX_FE_ANT_CMDID --------------------------*/
1448 /* Indicates front end antenna configuration. This command needs to be issued
1449 * right after initialization and after WMI_SET_BTCOEX_COLOCATED_BT_DEV_CMDID.
1450 * AR6003 enables coexistence and antenna switching based on the configuration.
1453 WMI_BTCOEX_NOT_ENABLED
= 0,
1454 WMI_BTCOEX_FE_ANT_SINGLE
=1,
1455 WMI_BTCOEX_FE_ANT_DUAL
=2,
1456 WMI_BTCOEX_FE_ANT_DUAL_HIGH_ISO
=3,
1457 WMI_BTCOEX_FE_ANT_TYPE_MAX
1458 }WMI_BTCOEX_FE_ANT_TYPE
;
1460 typedef PREPACK
struct {
1461 u8 btcoexFeAntType
; /* 1 - WMI_BTCOEX_FE_ANT_SINGLE for single antenna front end
1462 2 - WMI_BTCOEX_FE_ANT_DUAL for dual antenna front end
1463 (for isolations less 35dB, for higher isolation there
1464 is not need to pass this command).
1467 }POSTPACK WMI_SET_BTCOEX_FE_ANT_CMD
;
1469 /* -------------WMI_SET_BTCOEX_COLOCATED_BT_DEV_CMDID ----------------*/
1470 /* Indicate the bluetooth chip to the firmware. Firmware can have different algorithm based
1471 * bluetooth chip type.Based on bluetooth device, different coexistence protocol would be used.
1473 typedef PREPACK
struct {
1474 u8 btcoexCoLocatedBTdev
; /*1 - Qcom BT (3 -wire PTA)
1475 2 - CSR BT (3 wire PTA)
1476 3 - Atheros 3001 BT (3 wire PTA)
1477 4 - STE bluetooth (4-wire ePTA)
1478 5 - Atheros 3002 BT (4-wire MCI)
1479 defaults= 3 (Atheros 3001 BT )
1481 }POSTPACK WMI_SET_BTCOEX_COLOCATED_BT_DEV_CMD
;
1483 /* -------------WMI_SET_BTCOEX_BTINQUIRY_PAGE_CONFIG_CMDID ------------*/
1484 /* Configuration parameters during bluetooth inquiry and page. Page configuration
1485 * is applicable only on interfaces which can distinguish page (applicable only for ePTA -
1487 * Bluetooth inquiry start and end is indicated via WMI_SET_BTCOEX_BT_OPERATING_STATUS_CMDID.
1488 * During this the station will be power-save mode.
1490 typedef PREPACK
struct {
1491 u32 btInquiryDataFetchFrequency
;/* The frequency of querying the AP for data
1492 (via pspoll) is configured by this parameter.
1493 "default = 10 ms" */
1495 u32 protectBmissDurPostBtInquiry
;/* The firmware will continue to be in inquiry state
1496 for configured duration, after inquiry completion
1497 . This is to ensure other bluetooth transactions
1498 (RDP, SDP profiles, link key exchange ...etc)
1499 goes through smoothly without wifi stomping.
1502 u32 maxpageStomp
; /*Applicable only for STE-BT interface. Currently not
1504 u32 btInquiryPageFlag
; /* Not used */
1505 }POSTPACK WMI_SET_BTCOEX_BTINQUIRY_PAGE_CONFIG_CMD
;
1507 /*---------------------WMI_SET_BTCOEX_SCO_CONFIG_CMDID ---------------*/
1508 /* Configure SCO parameters. These parameters would be used whenever firmware is indicated
1509 * of (e)SCO profile on bluetooth ( via WMI_SET_BTCOEX_BT_OPERATING_STATUS_CMDID).
1510 * Configration of BTCOEX_SCO_CONFIG data structure are common configuration and applies
1511 * ps-poll mode and opt mode.
1512 * Ps-poll Mode - Station is in power-save and retrieves downlink data between sco gaps.
1513 * Opt Mode - station is in awake state and access point can send data to station any time.
1514 * BTCOEX_PSPOLLMODE_SCO_CONFIG - Configuration applied only during ps-poll mode.
1515 * BTCOEX_OPTMODE_SCO_CONFIG - Configuration applied only during opt mode.
1517 #define WMI_SCO_CONFIG_FLAG_ALLOW_OPTIMIZATION (1 << 0)
1518 #define WMI_SCO_CONFIG_FLAG_IS_EDR_CAPABLE (1 << 1)
1519 #define WMI_SCO_CONFIG_FLAG_IS_BT_MASTER (1 << 2)
1520 #define WMI_SCO_CONFIG_FLAG_FW_DETECT_OF_PER (1 << 3)
1521 typedef PREPACK
struct {
1522 u32 scoSlots
; /* Number of SCO Tx/Rx slots.
1523 HVx, EV3, 2EV3 = 2 */
1524 u32 scoIdleSlots
; /* Number of Bluetooth idle slots between
1525 consecutive SCO Tx/Rx slots
1529 u32 scoFlags
; /* SCO Options Flags :
1531 0 Allow Close Range Optimization
1532 1 Is EDR capable or Not
1533 2 IS Co-located Bt role Master
1534 3 Firmware determines the periodicity of SCO.
1537 u32 linkId
; /* applicable to STE-BT - not used */
1538 }POSTPACK BTCOEX_SCO_CONFIG
;
1540 typedef PREPACK
struct {
1541 u32 scoCyclesForceTrigger
; /* Number SCO cycles after which
1542 force a pspoll. default = 10 */
1543 u32 scoDataResponseTimeout
; /* Timeout Waiting for Downlink pkt
1544 in response for ps-poll,
1545 default = 20 msecs */
1547 u32 scoStompDutyCyleVal
; /* not implemented */
1549 u32 scoStompDutyCyleMaxVal
; /*Not implemented */
1551 u32 scoPsPollLatencyFraction
; /* Fraction of idle
1552 period, within which
1553 additional ps-polls can be queued
1554 1 - 1/4 of idle duration
1555 2 - 1/2 of idle duration
1556 3 - 3/4 of idle duration
1559 }POSTPACK BTCOEX_PSPOLLMODE_SCO_CONFIG
;
1561 typedef PREPACK
struct {
1562 u32 scoStompCntIn100ms
;/*max number of SCO stomp in 100ms allowed in
1563 opt mode. If exceeds the configured value,
1564 switch to ps-poll mode
1567 u32 scoContStompMax
; /* max number of continuous stomp allowed in opt mode.
1568 if exceeded switch to pspoll mode
1571 u32 scoMinlowRateMbps
; /* Low rate threshold */
1573 u32 scoLowRateCnt
; /* number of low rate pkts (< scoMinlowRateMbps) allowed in 100 ms.
1574 If exceeded switch/stay to ps-poll mode, lower stay in opt mode.
1578 u32 scoHighPktRatio
; /*(Total Rx pkts in 100 ms + 1)/
1579 ((Total tx pkts in 100 ms - No of high rate pkts in 100 ms) + 1) in 100 ms,
1580 if exceeded switch/stay in opt mode and if lower switch/stay in pspoll mode.
1581 default = 5 (80% of high rates)
1584 u32 scoMaxAggrSize
; /* Max number of Rx subframes allowed in this mode. (Firmware re-negogiates
1585 max number of aggregates if it was negogiated to higher value
1587 Recommended value Basic rate headsets = 1, EDR (2-EV3) =4.
1589 }POSTPACK BTCOEX_OPTMODE_SCO_CONFIG
;
1591 typedef PREPACK
struct {
1593 u32 maxScanStompCnt
;
1594 }POSTPACK BTCOEX_WLANSCAN_SCO_CONFIG
;
1596 typedef PREPACK
struct {
1597 BTCOEX_SCO_CONFIG scoConfig
;
1598 BTCOEX_PSPOLLMODE_SCO_CONFIG scoPspollConfig
;
1599 BTCOEX_OPTMODE_SCO_CONFIG scoOptModeConfig
;
1600 BTCOEX_WLANSCAN_SCO_CONFIG scoWlanScanConfig
;
1601 }POSTPACK WMI_SET_BTCOEX_SCO_CONFIG_CMD
;
1603 /* ------------------WMI_SET_BTCOEX_A2DP_CONFIG_CMDID -------------------*/
1604 /* Configure A2DP profile parameters. These parameters would be used whenver firmware is indicated
1605 * of A2DP profile on bluetooth ( via WMI_SET_BTCOEX_BT_OPERATING_STATUS_CMDID).
1606 * Configuration of BTCOEX_A2DP_CONFIG data structure are common configuration and applies to
1607 * ps-poll mode and opt mode.
1608 * Ps-poll Mode - Station is in power-save and retrieves downlink data between a2dp data bursts.
1609 * Opt Mode - station is in power save during a2dp bursts and awake in the gaps.
1610 * BTCOEX_PSPOLLMODE_A2DP_CONFIG - Configuration applied only during ps-poll mode.
1611 * BTCOEX_OPTMODE_A2DP_CONFIG - Configuration applied only during opt mode.
1614 #define WMI_A2DP_CONFIG_FLAG_ALLOW_OPTIMIZATION (1 << 0)
1615 #define WMI_A2DP_CONFIG_FLAG_IS_EDR_CAPABLE (1 << 1)
1616 #define WMI_A2DP_CONFIG_FLAG_IS_BT_ROLE_MASTER (1 << 2)
1617 #define WMI_A2DP_CONFIG_FLAG_IS_A2DP_HIGH_PRI (1 << 3)
1618 #define WMI_A2DP_CONFIG_FLAG_FIND_BT_ROLE (1 << 4)
1620 typedef PREPACK
struct {
1621 u32 a2dpFlags
; /* A2DP Option flags:
1623 0 Allow Close Range Optimization
1625 2 IS Co-located Bt role Master
1626 3 a2dp traffic is high priority
1627 4 Fw detect the role of bluetooth.
1629 u32 linkId
; /* Applicable only to STE-BT - not used */
1631 }POSTPACK BTCOEX_A2DP_CONFIG
;
1633 typedef PREPACK
struct {
1634 u32 a2dpWlanMaxDur
; /* MAX time firmware uses the medium for
1635 wlan, after it identifies the idle time
1636 default (30 msecs) */
1638 u32 a2dpMinBurstCnt
; /* Minimum number of bluetooth data frames
1639 to replenish Wlan Usage limit (default 3) */
1641 u32 a2dpDataRespTimeout
; /* Max duration firmware waits for downlink
1642 by stomping on bluetooth
1643 after ps-poll is acknowledged.
1646 }POSTPACK BTCOEX_PSPOLLMODE_A2DP_CONFIG
;
1648 typedef PREPACK
struct {
1649 u32 a2dpMinlowRateMbps
; /* Low rate threshold */
1651 u32 a2dpLowRateCnt
; /* number of low rate pkts (< a2dpMinlowRateMbps) allowed in 100 ms.
1652 If exceeded switch/stay to ps-poll mode, lower stay in opt mode.
1656 u32 a2dpHighPktRatio
; /*(Total Rx pkts in 100 ms + 1)/
1657 ((Total tx pkts in 100 ms - No of high rate pkts in 100 ms) + 1) in 100 ms,
1658 if exceeded switch/stay in opt mode and if lower switch/stay in pspoll mode.
1659 default = 5 (80% of high rates)
1662 u32 a2dpMaxAggrSize
; /* Max number of Rx subframes allowed in this mode. (Firmware re-negogiates
1663 max number of aggregates if it was negogiated to higher value
1665 Recommended value Basic rate headsets = 1, EDR (2-EV3) =8.
1667 u32 a2dpPktStompCnt
; /*number of a2dp pkts that can be stomped per burst.
1670 }POSTPACK BTCOEX_OPTMODE_A2DP_CONFIG
;
1672 typedef PREPACK
struct {
1673 BTCOEX_A2DP_CONFIG a2dpConfig
;
1674 BTCOEX_PSPOLLMODE_A2DP_CONFIG a2dppspollConfig
;
1675 BTCOEX_OPTMODE_A2DP_CONFIG a2dpOptConfig
;
1676 }POSTPACK WMI_SET_BTCOEX_A2DP_CONFIG_CMD
;
1678 /*------------ WMI_SET_BTCOEX_ACLCOEX_CONFIG_CMDID---------------------*/
1679 /* Configure non-A2dp ACL profile parameters.The starts of ACL profile can either be
1680 * indicated via WMI_SET_BTCOEX_BT_OPERATING_STATUS_CMDID orenabled via firmware detection
1681 * which is configured via "aclCoexFlags".
1682 * Configration of BTCOEX_ACLCOEX_CONFIG data structure are common configuration and applies
1683 * ps-poll mode and opt mode.
1684 * Ps-poll Mode - Station is in power-save and retrieves downlink data during wlan medium.
1685 * Opt Mode - station is in power save during bluetooth medium time and awake during wlan duration.
1686 * (Not implemented yet)
1688 * BTCOEX_PSPOLLMODE_ACLCOEX_CONFIG - Configuration applied only during ps-poll mode.
1689 * BTCOEX_OPTMODE_ACLCOEX_CONFIG - Configuration applied only during opt mode.
1692 #define WMI_ACLCOEX_FLAGS_ALLOW_OPTIMIZATION (1 << 0)
1693 #define WMI_ACLCOEX_FLAGS_DISABLE_FW_DETECTION (1 << 1)
1695 typedef PREPACK
struct {
1696 u32 aclWlanMediumDur
; /* Wlan usage time during Acl (non-a2dp)
1697 coexistence (default 30 msecs)
1700 u32 aclBtMediumDur
; /* Bt usage time during acl coexistence
1704 u32 aclDetectTimeout
; /* BT activity observation time limit.
1705 In this time duration, number of bt pkts are counted.
1706 If the Cnt reaches "aclPktCntLowerLimit" value
1707 for "aclIterToEnableCoex" iteration continuously,
1708 firmware gets into ACL coexistence mode.
1709 Similarly, if bt traffic count during ACL coexistence
1710 has not reached "aclPktCntLowerLimit" continuously
1711 for "aclIterToEnableCoex", then ACL coexistence is
1716 u32 aclPktCntLowerLimit
; /* Acl Pkt Cnt to be received in duration of
1717 "aclDetectTimeout" for
1718 "aclIterForEnDis" times to enabling ACL coex.
1719 Similar logic is used to disable acl coexistence.
1720 (If "aclPktCntLowerLimit" cnt of acl pkts
1721 are not seen by the for "aclIterForEnDis"
1722 then acl coexistence is disabled).
1726 u32 aclIterForEnDis
; /* number of Iteration of "aclPktCntLowerLimit" for Enabling and
1727 Disabling Acl Coexistence.
1731 u32 aclPktCntUpperLimit
; /* This is upperBound limit, if there is more than
1732 "aclPktCntUpperLimit" seen in "aclDetectTimeout",
1733 ACL coexistence is enabled right away.
1736 u32 aclCoexFlags
; /* A2DP Option flags:
1738 0 Allow Close Range Optimization
1739 1 disable Firmware detection
1740 (Currently supported configuration is aclCoexFlags =0)
1742 u32 linkId
; /* Applicable only for STE-BT - not used */
1744 }POSTPACK BTCOEX_ACLCOEX_CONFIG
;
1746 typedef PREPACK
struct {
1747 u32 aclDataRespTimeout
; /* Max duration firmware waits for downlink
1748 by stomping on bluetooth
1749 after ps-poll is acknowledged.
1752 }POSTPACK BTCOEX_PSPOLLMODE_ACLCOEX_CONFIG
;
1755 /* Not implemented yet*/
1756 typedef PREPACK
struct {
1757 u32 aclCoexMinlowRateMbps
;
1758 u32 aclCoexLowRateCnt
;
1759 u32 aclCoexHighPktRatio
;
1760 u32 aclCoexMaxAggrSize
;
1762 }POSTPACK BTCOEX_OPTMODE_ACLCOEX_CONFIG
;
1764 typedef PREPACK
struct {
1765 BTCOEX_ACLCOEX_CONFIG aclCoexConfig
;
1766 BTCOEX_PSPOLLMODE_ACLCOEX_CONFIG aclCoexPspollConfig
;
1767 BTCOEX_OPTMODE_ACLCOEX_CONFIG aclCoexOptConfig
;
1768 }POSTPACK WMI_SET_BTCOEX_ACLCOEX_CONFIG_CMD
;
1770 /* -----------WMI_SET_BTCOEX_BT_OPERATING_STATUS_CMDID ------------------*/
1772 WMI_BTCOEX_BT_PROFILE_SCO
=1,
1773 WMI_BTCOEX_BT_PROFILE_A2DP
,
1774 WMI_BTCOEX_BT_PROFILE_INQUIRY_PAGE
,
1775 WMI_BTCOEX_BT_PROFILE_ACLCOEX
,
1776 }WMI_BTCOEX_BT_PROFILE
;
1778 typedef PREPACK
struct {
1780 u32 btOperatingStatus
;
1782 }WMI_SET_BTCOEX_BT_OPERATING_STATUS_CMD
;
1784 /*--------------------- WMI_SET_BTCOEX_DEBUG_CMDID ---------------------*/
1785 /* Used for firmware development and debugging */
1786 typedef PREPACK
struct {
1787 u32 btcoexDbgParam1
;
1788 u32 btcoexDbgParam2
;
1789 u32 btcoexDbgParam3
;
1790 u32 btcoexDbgParam4
;
1791 u32 btcoexDbgParam5
;
1792 }WMI_SET_BTCOEX_DEBUG_CMD
;
1794 /*---------------------WMI_GET_BTCOEX_CONFIG_CMDID --------------------- */
1795 /* Command to firmware to get configuration parameters of the bt profile
1796 * reported via WMI_BTCOEX_CONFIG_EVENTID */
1797 typedef PREPACK
struct {
1798 u32 btProfileType
; /* 1 - SCO
1803 u32 linkId
; /* not used */
1804 }WMI_GET_BTCOEX_CONFIG_CMD
;
1806 /*------------------WMI_REPORT_BTCOEX_CONFIG_EVENTID------------------- */
1807 /* Event from firmware to host, sent in response to WMI_GET_BTCOEX_CONFIG_CMDID
1809 typedef PREPACK
struct {
1811 u32 linkId
; /* not used */
1813 WMI_SET_BTCOEX_SCO_CONFIG_CMD scoConfigCmd
;
1814 WMI_SET_BTCOEX_A2DP_CONFIG_CMD a2dpConfigCmd
;
1815 WMI_SET_BTCOEX_ACLCOEX_CONFIG_CMD aclcoexConfig
;
1816 WMI_SET_BTCOEX_BTINQUIRY_PAGE_CONFIG_CMD btinquiryPageConfigCmd
;
1818 } POSTPACK WMI_BTCOEX_CONFIG_EVENT
;
1820 /*------------- WMI_REPORT_BTCOEX_BTCOEX_STATS_EVENTID--------------------*/
1821 /* Used for firmware development and debugging*/
1822 typedef PREPACK
struct {
1825 u32 psPollFailureCnt
;
1826 u32 nullFrameFailureCnt
;
1827 u32 optModeTransitionCnt
;
1828 }BTCOEX_GENERAL_STATS
;
1830 typedef PREPACK
struct {
1832 u32 scoStompIn100ms
;
1833 u32 scoMaxContStomp
;
1834 u32 scoAvgNoRetries
;
1835 u32 scoMaxNoRetriesIn100ms
;
1838 typedef PREPACK
struct {
1840 u32 a2dpMaxBurstCnt
;
1841 u32 a2dpAvgIdletimeIn100ms
;
1842 u32 a2dpAvgStompCnt
;
1845 typedef PREPACK
struct {
1846 u32 aclPktCntInBtTime
;
1847 u32 aclStompCntInWlanTime
;
1848 u32 aclPktCntIn100ms
;
1849 }BTCOEX_ACLCOEX_STATS
;
1851 typedef PREPACK
struct {
1852 BTCOEX_GENERAL_STATS coexStats
;
1853 BTCOEX_SCO_STATS scoStats
;
1854 BTCOEX_A2DP_STATS a2dpStats
;
1855 BTCOEX_ACLCOEX_STATS aclCoexStats
;
1856 }WMI_BTCOEX_STATS_EVENT
;
1859 /*--------------------------END OF BTCOEX -------------------------------------*/
1860 typedef PREPACK
struct {
1862 }WMI_REPORT_SLEEP_STATE_EVENT
;
1865 WMI_REPORT_SLEEP_STATUS_IS_DEEP_SLEEP
=0,
1866 WMI_REPORT_SLEEP_STATUS_IS_AWAKE
1867 } WMI_REPORT_SLEEP_STATUS
;
1869 DISCONN_EVT_IN_RECONN
= 0, /* default */
1870 NO_DISCONN_EVT_IN_RECONN
1871 } TARGET_EVENT_REPORT_CONFIG
;
1873 typedef PREPACK
struct {
1875 } POSTPACK WMI_SET_TARGET_EVENT_REPORT_CMD
;
1878 typedef PREPACK
struct {
1879 u16 cmd_buf_sz
; /* HCI cmd buffer size */
1880 u8 buf
[1]; /* Absolute HCI cmd */
1881 } POSTPACK WMI_HCI_CMD
;
1888 * WMI_GET_CHANNEL_LIST_CMDID reply
1890 typedef PREPACK
struct {
1892 u8 numChannels
; /* number of channels in reply */
1893 u16 channelList
[1]; /* channel in Mhz */
1894 } POSTPACK WMI_CHANNEL_LIST_REPLY
;
1898 A_FAILED_DELETE_STREAM_DOESNOT_EXIST
=250,
1899 A_SUCCEEDED_MODIFY_STREAM
=251,
1900 A_FAILED_INVALID_STREAM
= 252,
1901 A_FAILED_MAX_THINSTREAMS
= 253,
1902 A_FAILED_CREATE_REMOVE_PSTREAM_FIRST
= 254,
1903 } PSTREAM_REPLY_STATUS
;
1905 typedef PREPACK
struct {
1906 u8 status
; /* PSTREAM_REPLY_STATUS */
1910 u8 trafficDirection
; /* DIR_TYPE */
1911 } POSTPACK WMI_CRE_PRIORITY_STREAM_REPLY
;
1913 typedef PREPACK
struct {
1914 u8 status
; /* PSTREAM_REPLY_STATUS */
1917 u8 trafficDirection
; /* DIR_TYPE */
1919 } POSTPACK WMI_DEL_PRIORITY_STREAM_REPLY
;
1922 * List of Events (target to host)
1925 WMI_READY_EVENTID
= 0x1001,
1926 WMI_CONNECT_EVENTID
,
1927 WMI_DISCONNECT_EVENTID
,
1928 WMI_BSSINFO_EVENTID
,
1929 WMI_CMDERROR_EVENTID
,
1930 WMI_REGDOMAIN_EVENTID
,
1931 WMI_PSTREAM_TIMEOUT_EVENTID
,
1932 WMI_NEIGHBOR_REPORT_EVENTID
,
1933 WMI_TKIP_MICERR_EVENTID
,
1934 WMI_SCAN_COMPLETE_EVENTID
, /* 0x100a */
1935 WMI_REPORT_STATISTICS_EVENTID
,
1936 WMI_RSSI_THRESHOLD_EVENTID
,
1937 WMI_ERROR_REPORT_EVENTID
,
1938 WMI_OPT_RX_FRAME_EVENTID
,
1939 WMI_REPORT_ROAM_TBL_EVENTID
,
1940 WMI_EXTENSION_EVENTID
,
1942 WMI_SNR_THRESHOLD_EVENTID
,
1943 WMI_LQ_THRESHOLD_EVENTID
,
1944 WMI_TX_RETRY_ERR_EVENTID
, /* 0x1014 */
1945 WMI_REPORT_ROAM_DATA_EVENTID
,
1948 WMI_GET_WOW_LIST_EVENTID
,
1949 WMI_GET_PMKID_LIST_EVENTID
,
1950 WMI_CHANNEL_CHANGE_EVENTID
,
1951 WMI_PEER_NODE_EVENTID
,
1953 WMI_DTIMEXPIRY_EVENTID
,
1954 WMI_WLAN_VERSION_EVENTID
,
1955 WMI_SET_PARAMS_REPLY_EVENTID
,
1956 WMI_ADDBA_REQ_EVENTID
, /*0x1020 */
1957 WMI_ADDBA_RESP_EVENTID
,
1958 WMI_DELBA_REQ_EVENTID
,
1959 WMI_TX_COMPLETE_EVENTID
,
1960 WMI_HCI_EVENT_EVENTID
,
1961 WMI_ACL_DATA_EVENTID
,
1962 WMI_REPORT_SLEEP_STATE_EVENTID
,
1964 WMI_WAPI_REKEY_EVENTID
,
1966 WMI_REPORT_BTCOEX_STATS_EVENTID
,
1967 WMI_REPORT_BTCOEX_CONFIG_EVENTID
,
1968 WMI_ACM_REJECT_EVENTID
,
1969 WMI_THIN_RESERVED_START_EVENTID
= 0x8000,
1970 /* Events in this range are reserved for thinmode
1971 * See wmi_thin.h for actual definitions */
1972 WMI_THIN_RESERVED_END_EVENTID
= 0x8fff,
1978 WMI_11A_CAPABILITY
= 1,
1979 WMI_11G_CAPABILITY
= 2,
1980 WMI_11AG_CAPABILITY
= 3,
1981 WMI_11NA_CAPABILITY
= 4,
1982 WMI_11NG_CAPABILITY
= 5,
1983 WMI_11NAG_CAPABILITY
= 6,
1985 WMI_11N_CAPABILITY_OFFSET
= (WMI_11NA_CAPABILITY
- WMI_11A_CAPABILITY
),
1986 } WMI_PHY_CAPABILITY
;
1988 typedef PREPACK
struct {
1989 u8 macaddr
[ATH_MAC_LEN
];
1990 u8 phyCapability
; /* WMI_PHY_CAPABILITY */
1991 } POSTPACK WMI_READY_EVENT_1
;
1993 typedef PREPACK
struct {
1996 u8 macaddr
[ATH_MAC_LEN
];
1997 u8 phyCapability
; /* WMI_PHY_CAPABILITY */
1998 } POSTPACK WMI_READY_EVENT_2
;
2000 #if defined(ATH_TARGET)
2002 #define WMI_READY_EVENT WMI_READY_EVENT_1 /* AR6002_REV2 target code */
2004 #define WMI_READY_EVENT WMI_READY_EVENT_2 /* AR6001, AR6002_REV4, AR6002_REV5 */
2007 #define WMI_READY_EVENT WMI_READY_EVENT_2 /* host code */
2014 typedef PREPACK
struct {
2016 u8 bssid
[ATH_MAC_LEN
];
2024 } POSTPACK WMI_CONNECT_EVENT
;
2030 NO_NETWORK_AVAIL
= 0x01,
2031 LOST_LINK
= 0x02, /* bmiss */
2032 DISCONNECT_CMD
= 0x03,
2033 BSS_DISCONNECTED
= 0x04,
2035 ASSOC_FAILED
= 0x06,
2036 NO_RESOURCES_AVAIL
= 0x07,
2037 CSERV_DISCONNECT
= 0x08,
2038 INVALID_PROFILE
= 0x0a,
2039 DOT11H_CHANNEL_SWITCH
= 0x0b,
2040 PROFILE_MISMATCH
= 0x0c,
2041 CONNECTION_EVICTED
= 0x0d,
2043 } WMI_DISCONNECT_REASON
;
2045 typedef PREPACK
struct {
2046 u16 protocolReasonStatus
; /* reason code, see 802.11 spec. */
2047 u8 bssid
[ATH_MAC_LEN
]; /* set if known */
2048 u8 disconnectReason
; /* see WMI_DISCONNECT_REASON */
2051 } POSTPACK WMI_DISCONNECT_EVENT
;
2055 * Mechanism used to inform host of the presence and characteristic of
2056 * wireless networks present. Consists of bss info header followed by
2057 * the beacon or probe-response frame body. The 802.11 header is not included.
2067 BSS_ELEMID_CHANSWITCH
= 0x01,
2068 BSS_ELEMID_ATHEROS
= 0x02,
2071 typedef PREPACK
struct {
2073 u8 frameType
; /* see WMI_BI_FTYPE */
2076 u8 bssid
[ATH_MAC_LEN
];
2078 } POSTPACK WMI_BSS_INFO_HDR
;
2081 * BSS INFO HDR version 2.0
2082 * With 6 bytes HTC header and 6 bytes of WMI header
2083 * WMI_BSS_INFO_HDR cannot be accommodated in the removed 802.11 management
2085 * - Reduce the ieMask to 2 bytes as only two bit flags are used
2086 * - Remove rssi and compute it on the host. rssi = snr - 95
2088 typedef PREPACK
struct {
2090 u8 frameType
; /* see WMI_BI_FTYPE */
2092 u8 bssid
[ATH_MAC_LEN
];
2094 } POSTPACK WMI_BSS_INFO_HDR2
;
2097 * Command Error Event
2100 INVALID_PARAM
= 0x01,
2101 ILLEGAL_STATE
= 0x02,
2102 INTERNAL_ERROR
= 0x03,
2105 typedef PREPACK
struct {
2108 } POSTPACK WMI_CMD_ERROR_EVENT
;
2111 * New Regulatory Domain Event
2113 typedef PREPACK
struct {
2115 } POSTPACK WMI_REG_DOMAIN_EVENT
;
2117 typedef PREPACK
struct {
2120 u8 trafficDirection
;
2122 } POSTPACK WMI_PSTREAM_TIMEOUT_EVENT
;
2124 typedef PREPACK
struct {
2129 } POSTPACK WMI_ACM_REJECT_EVENT
;
2132 * The WMI_NEIGHBOR_REPORT Event is generated by the target to inform
2133 * the host of BSS's it has found that matches the current profile.
2134 * It can be used by the host to cache PMKs and/to initiate pre-authentication
2135 * if the BSS supports it. The first bssid is always the current associated
2137 * The bssid and bssFlags information repeats according to the number
2141 WMI_DEFAULT_BSS_FLAGS
= 0x00,
2142 WMI_PREAUTH_CAPABLE_BSS
= 0x01,
2143 WMI_PMKID_VALID_BSS
= 0x02,
2146 typedef PREPACK
struct {
2147 u8 bssid
[ATH_MAC_LEN
];
2148 u8 bssFlags
; /* see WMI_BSS_FLAGS */
2149 } POSTPACK WMI_NEIGHBOR_INFO
;
2151 typedef PREPACK
struct {
2153 WMI_NEIGHBOR_INFO neighbor
[1];
2154 } POSTPACK WMI_NEIGHBOR_REPORT_EVENT
;
2157 * TKIP MIC Error Event
2159 typedef PREPACK
struct {
2162 } POSTPACK WMI_TKIP_MICERR_EVENT
;
2165 * WMI_SCAN_COMPLETE_EVENTID - no parameters (old), staus parameter (new)
2167 typedef PREPACK
struct {
2169 } POSTPACK WMI_SCAN_COMPLETE_EVENT
;
2171 #define MAX_OPT_DATA_LEN 1400
2174 * WMI_SET_ADHOC_BSSID_CMDID
2176 typedef PREPACK
struct {
2177 u8 bssid
[ATH_MAC_LEN
];
2178 } POSTPACK WMI_SET_ADHOC_BSSID_CMD
;
2181 * WMI_SET_OPT_MODE_CMDID
2188 typedef PREPACK
struct {
2190 } POSTPACK WMI_SET_OPT_MODE_CMD
;
2193 * WMI_TX_OPT_FRAME_CMDID
2196 OPT_PROBE_REQ
= 0x01,
2197 OPT_PROBE_RESP
= 0x02,
2198 OPT_CPPP_START
= 0x03,
2199 OPT_CPPP_STOP
= 0x04,
2202 typedef PREPACK
struct {
2205 u8 dstAddr
[ATH_MAC_LEN
];
2206 u8 bssid
[ATH_MAC_LEN
];
2207 u8 reserved
; /* For alignment */
2209 } POSTPACK WMI_OPT_TX_FRAME_CMD
;
2212 * Special frame receive Event.
2213 * Mechanism used to inform host of the receiption of the special frames.
2214 * Consists of special frame info header followed by special frame body.
2215 * The 802.11 header is not included.
2217 typedef PREPACK
struct {
2219 u8 frameType
; /* see WMI_OPT_FTYPE */
2221 u8 srcAddr
[ATH_MAC_LEN
];
2222 u8 bssid
[ATH_MAC_LEN
];
2223 } POSTPACK WMI_OPT_RX_INFO_HDR
;
2226 * Reporting statistics.
2228 typedef PREPACK
struct {
2231 u32 tx_unicast_pkts
;
2232 u32 tx_unicast_bytes
;
2233 u32 tx_multicast_pkts
;
2234 u32 tx_multicast_bytes
;
2235 u32 tx_broadcast_pkts
;
2236 u32 tx_broadcast_bytes
;
2237 u32 tx_rts_success_cnt
;
2238 u32 tx_packet_per_ac
[4];
2239 u32 tx_errors_per_ac
[4];
2244 u32 tx_mult_retry_cnt
;
2245 u32 tx_rts_fail_cnt
;
2246 s32 tx_unicast_rate
;
2247 }POSTPACK tx_stats_t
;
2249 typedef PREPACK
struct {
2252 u32 rx_unicast_pkts
;
2253 u32 rx_unicast_bytes
;
2254 u32 rx_multicast_pkts
;
2255 u32 rx_multicast_bytes
;
2256 u32 rx_broadcast_pkts
;
2257 u32 rx_broadcast_bytes
;
2258 u32 rx_fragment_pkt
;
2262 u32 rx_key_cache_miss
;
2264 u32 rx_duplicate_frames
;
2265 s32 rx_unicast_rate
;
2266 }POSTPACK rx_stats_t
;
2268 typedef PREPACK
struct {
2269 u32 tkip_local_mic_failure
;
2270 u32 tkip_counter_measures_invoked
;
2272 u32 tkip_format_errors
;
2273 u32 ccmp_format_errors
;
2275 }POSTPACK tkip_ccmp_stats_t
;
2277 typedef PREPACK
struct {
2278 u32 power_save_failure_cnt
;
2279 u16 stop_tx_failure_cnt
;
2280 u16 atim_tx_failure_cnt
;
2281 u16 atim_rx_failure_cnt
;
2282 u16 bcn_rx_failure_cnt
;
2283 }POSTPACK pm_stats_t
;
2285 typedef PREPACK
struct {
2289 u16 cs_disconnect_cnt
;
2290 s16 cs_aveBeacon_rssi
;
2294 u8 cs_aveBeacon_snr
;
2295 u8 cs_lastRoam_msec
;
2296 } POSTPACK cserv_stats_t
;
2298 typedef PREPACK
struct {
2299 tx_stats_t tx_stats
;
2300 rx_stats_t rx_stats
;
2301 tkip_ccmp_stats_t tkipCcmpStats
;
2302 }POSTPACK wlan_net_stats_t
;
2304 typedef PREPACK
struct {
2308 } POSTPACK arp_stats_t
;
2310 typedef PREPACK
struct {
2311 u32 wow_num_pkts_dropped
;
2312 u16 wow_num_events_discarded
;
2313 u8 wow_num_host_pkt_wakeups
;
2314 u8 wow_num_host_event_wakeups
;
2315 } POSTPACK wlan_wow_stats_t
;
2317 typedef PREPACK
struct {
2319 s32 noise_floor_calibation
;
2321 wlan_net_stats_t txrxStats
;
2322 wlan_wow_stats_t wowStats
;
2323 arp_stats_t arpStats
;
2324 cserv_stats_t cservStats
;
2325 } POSTPACK WMI_TARGET_STATS
;
2328 * WMI_RSSI_THRESHOLD_EVENTID.
2329 * Indicate the RSSI events to host. Events are indicated when we breach a
2333 WMI_RSSI_THRESHOLD1_ABOVE
= 0,
2334 WMI_RSSI_THRESHOLD2_ABOVE
,
2335 WMI_RSSI_THRESHOLD3_ABOVE
,
2336 WMI_RSSI_THRESHOLD4_ABOVE
,
2337 WMI_RSSI_THRESHOLD5_ABOVE
,
2338 WMI_RSSI_THRESHOLD6_ABOVE
,
2339 WMI_RSSI_THRESHOLD1_BELOW
,
2340 WMI_RSSI_THRESHOLD2_BELOW
,
2341 WMI_RSSI_THRESHOLD3_BELOW
,
2342 WMI_RSSI_THRESHOLD4_BELOW
,
2343 WMI_RSSI_THRESHOLD5_BELOW
,
2344 WMI_RSSI_THRESHOLD6_BELOW
2345 }WMI_RSSI_THRESHOLD_VAL
;
2347 typedef PREPACK
struct {
2350 }POSTPACK WMI_RSSI_THRESHOLD_EVENT
;
2353 * WMI_ERROR_REPORT_EVENTID
2356 WMI_TARGET_PM_ERR_FAIL
= 0x00000001,
2357 WMI_TARGET_KEY_NOT_FOUND
= 0x00000002,
2358 WMI_TARGET_DECRYPTION_ERR
= 0x00000004,
2359 WMI_TARGET_BMISS
= 0x00000008,
2360 WMI_PSDISABLE_NODE_JOIN
= 0x00000010,
2361 WMI_TARGET_COM_ERR
= 0x00000020,
2362 WMI_TARGET_FATAL_ERR
= 0x00000040
2363 } WMI_TARGET_ERROR_VAL
;
2365 typedef PREPACK
struct {
2367 }POSTPACK WMI_TARGET_ERROR_REPORT_EVENT
;
2369 typedef PREPACK
struct {
2371 }POSTPACK WMI_TX_RETRY_ERR_EVENT
;
2374 WMI_SNR_THRESHOLD1_ABOVE
= 1,
2375 WMI_SNR_THRESHOLD1_BELOW
,
2376 WMI_SNR_THRESHOLD2_ABOVE
,
2377 WMI_SNR_THRESHOLD2_BELOW
,
2378 WMI_SNR_THRESHOLD3_ABOVE
,
2379 WMI_SNR_THRESHOLD3_BELOW
,
2380 WMI_SNR_THRESHOLD4_ABOVE
,
2381 WMI_SNR_THRESHOLD4_BELOW
2382 } WMI_SNR_THRESHOLD_VAL
;
2384 typedef PREPACK
struct {
2385 u8 range
; /* WMI_SNR_THRESHOLD_VAL */
2387 }POSTPACK WMI_SNR_THRESHOLD_EVENT
;
2390 WMI_LQ_THRESHOLD1_ABOVE
= 1,
2391 WMI_LQ_THRESHOLD1_BELOW
,
2392 WMI_LQ_THRESHOLD2_ABOVE
,
2393 WMI_LQ_THRESHOLD2_BELOW
,
2394 WMI_LQ_THRESHOLD3_ABOVE
,
2395 WMI_LQ_THRESHOLD3_BELOW
,
2396 WMI_LQ_THRESHOLD4_ABOVE
,
2397 WMI_LQ_THRESHOLD4_BELOW
2398 } WMI_LQ_THRESHOLD_VAL
;
2400 typedef PREPACK
struct {
2402 u8 range
; /* WMI_LQ_THRESHOLD_VAL */
2403 }POSTPACK WMI_LQ_THRESHOLD_EVENT
;
2405 * WMI_REPORT_ROAM_TBL_EVENTID
2407 #define MAX_ROAM_TBL_CAND 5
2409 typedef PREPACK
struct {
2411 u8 bssid
[ATH_MAC_LEN
];
2417 u8 reserved
; /* For alignment */
2418 } POSTPACK WMI_BSS_ROAM_INFO
;
2421 typedef PREPACK
struct {
2424 WMI_BSS_ROAM_INFO bssRoamInfo
[1];
2425 } POSTPACK WMI_TARGET_ROAM_TBL
;
2428 * WMI_HCI_EVENT_EVENTID
2430 typedef PREPACK
struct {
2431 u16 evt_buf_sz
; /* HCI event buffer size */
2432 u8 buf
[1]; /* HCI event */
2433 } POSTPACK WMI_HCI_EVENT
;
2439 CAC_INDICATION_ADMISSION
= 0x00,
2440 CAC_INDICATION_ADMISSION_RESP
= 0x01,
2441 CAC_INDICATION_DELETE
= 0x02,
2442 CAC_INDICATION_NO_RESP
= 0x03,
2445 #define WMM_TSPEC_IE_LEN 63
2447 typedef PREPACK
struct {
2451 u8 tspecSuggestion
[WMM_TSPEC_IE_LEN
];
2452 }POSTPACK WMI_CAC_EVENT
;
2455 * WMI_APLIST_EVENTID
2462 typedef PREPACK
struct {
2463 u8 bssid
[ATH_MAC_LEN
];
2465 } POSTPACK WMI_AP_INFO_V1
;
2467 typedef PREPACK
union {
2468 WMI_AP_INFO_V1 apInfoV1
;
2469 } POSTPACK WMI_AP_INFO
;
2471 typedef PREPACK
struct {
2474 WMI_AP_INFO apList
[1];
2475 } POSTPACK WMI_APLIST_EVENT
;
2478 * developer commands
2482 * WMI_SET_BITRATE_CMDID
2484 * Get bit rate cmd uses same definition as set bit rate cmd
2518 typedef PREPACK
struct {
2519 s8 rateIndex
; /* see WMI_BIT_RATE */
2522 } POSTPACK WMI_BIT_RATE_CMD
;
2525 typedef PREPACK
struct {
2526 s8 rateIndex
; /* see WMI_BIT_RATE */
2527 } POSTPACK WMI_BIT_RATE_REPLY
;
2531 * WMI_SET_FIXRATES_CMDID
2533 * Get fix rates cmd uses same definition as set fix rates cmd
2535 #define FIX_RATE_1Mb ((u32)0x1)
2536 #define FIX_RATE_2Mb ((u32)0x2)
2537 #define FIX_RATE_5_5Mb ((u32)0x4)
2538 #define FIX_RATE_11Mb ((u32)0x8)
2539 #define FIX_RATE_6Mb ((u32)0x10)
2540 #define FIX_RATE_9Mb ((u32)0x20)
2541 #define FIX_RATE_12Mb ((u32)0x40)
2542 #define FIX_RATE_18Mb ((u32)0x80)
2543 #define FIX_RATE_24Mb ((u32)0x100)
2544 #define FIX_RATE_36Mb ((u32)0x200)
2545 #define FIX_RATE_48Mb ((u32)0x400)
2546 #define FIX_RATE_54Mb ((u32)0x800)
2547 #define FIX_RATE_MCS_0_20 ((u32)0x1000)
2548 #define FIX_RATE_MCS_1_20 ((u32)0x2000)
2549 #define FIX_RATE_MCS_2_20 ((u32)0x4000)
2550 #define FIX_RATE_MCS_3_20 ((u32)0x8000)
2551 #define FIX_RATE_MCS_4_20 ((u32)0x10000)
2552 #define FIX_RATE_MCS_5_20 ((u32)0x20000)
2553 #define FIX_RATE_MCS_6_20 ((u32)0x40000)
2554 #define FIX_RATE_MCS_7_20 ((u32)0x80000)
2555 #define FIX_RATE_MCS_0_40 ((u32)0x100000)
2556 #define FIX_RATE_MCS_1_40 ((u32)0x200000)
2557 #define FIX_RATE_MCS_2_40 ((u32)0x400000)
2558 #define FIX_RATE_MCS_3_40 ((u32)0x800000)
2559 #define FIX_RATE_MCS_4_40 ((u32)0x1000000)
2560 #define FIX_RATE_MCS_5_40 ((u32)0x2000000)
2561 #define FIX_RATE_MCS_6_40 ((u32)0x4000000)
2562 #define FIX_RATE_MCS_7_40 ((u32)0x8000000)
2564 typedef PREPACK
struct {
2565 u32 fixRateMask
; /* see WMI_BIT_RATE */
2566 } POSTPACK WMI_FIX_RATES_CMD
, WMI_FIX_RATES_REPLY
;
2568 typedef PREPACK
struct {
2570 u8 frameType
; /*type and subtype*/
2571 u32 frameRateMask
; /* see WMI_BIT_RATE */
2572 } POSTPACK WMI_FRAME_RATES_CMD
, WMI_FRAME_RATES_REPLY
;
2575 * WMI_SET_RECONNECT_AUTH_MODE_CMDID
2577 * Set authentication mode
2580 RECONN_DO_AUTH
= 0x00,
2581 RECONN_NOT_AUTH
= 0x01
2584 typedef PREPACK
struct {
2586 } POSTPACK WMI_SET_AUTH_MODE_CMD
;
2589 * WMI_SET_REASSOC_MODE_CMDID
2591 * Set authentication mode
2594 REASSOC_DO_DISASSOC
= 0x00,
2595 REASSOC_DONOT_DISASSOC
= 0x01
2598 typedef PREPACK
struct {
2600 }POSTPACK WMI_SET_REASSOC_MODE_CMD
;
2603 ROAM_DATA_TIME
= 1, /* Get The Roam Time Data */
2606 typedef PREPACK
struct {
2610 u32 allow_txrx_time
;
2611 u8 disassoc_bssid
[ATH_MAC_LEN
];
2612 s8 disassoc_bss_rssi
;
2613 u8 assoc_bssid
[ATH_MAC_LEN
];
2615 } POSTPACK WMI_TARGET_ROAM_TIME
;
2617 typedef PREPACK
struct {
2619 WMI_TARGET_ROAM_TIME roamTime
;
2622 } POSTPACK WMI_TARGET_ROAM_DATA
;
2625 WMI_WMM_DISABLED
= 0,
2629 typedef PREPACK
struct {
2631 }POSTPACK WMI_SET_WMM_CMD
;
2633 typedef PREPACK
struct {
2635 }POSTPACK WMI_SET_QOS_SUPP_CMD
;
2638 WMI_TXOP_DISABLED
= 0,
2642 typedef PREPACK
struct {
2644 }POSTPACK WMI_SET_WMM_TXOP_CMD
;
2646 typedef PREPACK
struct {
2647 u8 keepaliveInterval
;
2648 } POSTPACK WMI_SET_KEEPALIVE_CMD
;
2650 typedef PREPACK
struct {
2652 u8 keepaliveInterval
;
2653 } POSTPACK WMI_GET_KEEPALIVE_CMD
;
2656 * Add Application specified IE to a management frame
2658 #define WMI_MAX_IE_LEN 255
2660 typedef PREPACK
struct {
2661 u8 mgmtFrmType
; /* one of WMI_MGMT_FRAME_TYPE */
2662 u8 ieLen
; /* Length of the IE that should be added to the MGMT frame */
2664 } POSTPACK WMI_SET_APPIE_CMD
;
2667 * Notify the WSC registration status to the target
2669 #define WSC_REG_ACTIVE 1
2670 #define WSC_REG_INACTIVE 0
2671 /* Generic Hal Interface for setting hal paramters. */
2672 /* Add new Set HAL Param cmdIds here for newer params */
2674 WHAL_SETCABTO_CMDID
= 1,
2677 typedef PREPACK
struct {
2679 } POSTPACK WHAL_SETCABTO_PARAM
;
2681 typedef PREPACK
struct {
2684 } POSTPACK WHAL_PARAMCMD
;
2687 #define WOW_MAX_FILTER_LISTS 1 /*4*/
2688 #define WOW_MAX_FILTERS_PER_LIST 4
2689 #define WOW_PATTERN_SIZE 64
2690 #define WOW_MASK_SIZE 64
2692 #define MAC_MAX_FILTERS_PER_LIST 4
2694 typedef PREPACK
struct {
2695 u8 wow_valid_filter
;
2698 u8 wow_filter_offset
;
2699 u8 wow_filter_mask
[WOW_MASK_SIZE
];
2700 u8 wow_filter_pattern
[WOW_PATTERN_SIZE
];
2701 } POSTPACK WOW_FILTER
;
2704 typedef PREPACK
struct {
2708 u8 wow_total_list_size
;
2709 WOW_FILTER list
[WOW_MAX_FILTERS_PER_LIST
];
2710 } POSTPACK WOW_FILTER_LIST
;
2712 typedef PREPACK
struct {
2714 u8 mac_addr
[ATH_MAC_LEN
];
2715 } POSTPACK MAC_FILTER
;
2718 typedef PREPACK
struct {
2721 MAC_FILTER list
[MAC_MAX_FILTERS_PER_LIST
];
2722 } POSTPACK MAC_FILTER_LIST
;
2724 #define MAX_IP_ADDRS 2
2725 typedef PREPACK
struct {
2726 u32 ips
[MAX_IP_ADDRS
]; /* IP in Network Byte Order */
2727 } POSTPACK WMI_SET_IP_CMD
;
2729 typedef PREPACK
struct {
2732 } POSTPACK WMI_SET_HOST_SLEEP_MODE_CMD
;
2735 WOW_FILTER_SSID
= 0x1
2738 typedef PREPACK
struct {
2740 WMI_WOW_FILTER filter
;
2742 } POSTPACK WMI_SET_WOW_MODE_CMD
;
2744 typedef PREPACK
struct {
2746 } POSTPACK WMI_GET_WOW_LIST_CMD
;
2749 * WMI_GET_WOW_LIST_CMD reply
2751 typedef PREPACK
struct {
2752 u8 num_filters
; /* number of patterns in reply */
2753 u8 this_filter_num
; /* this is filter # x of total num_filters */
2756 WOW_FILTER wow_filters
[1];
2757 } POSTPACK WMI_GET_WOW_LIST_REPLY
;
2759 typedef PREPACK
struct {
2764 } POSTPACK WMI_ADD_WOW_PATTERN_CMD
;
2766 typedef PREPACK
struct {
2769 } POSTPACK WMI_DEL_WOW_PATTERN_CMD
;
2771 typedef PREPACK
struct {
2772 u8 macaddr
[ATH_MAC_LEN
];
2773 } POSTPACK WMI_SET_MAC_ADDRESS_CMD
;
2776 * WMI_SET_AKMP_PARAMS_CMD
2779 #define WMI_AKMP_MULTI_PMKID_EN 0x000001
2781 typedef PREPACK
struct {
2783 } POSTPACK WMI_SET_AKMP_PARAMS_CMD
;
2785 typedef PREPACK
struct {
2786 u8 pmkid
[WMI_PMKID_LEN
];
2787 } POSTPACK WMI_PMKID
;
2790 * WMI_SET_PMKID_LIST_CMD
2792 #define WMI_MAX_PMKID_CACHE 8
2794 typedef PREPACK
struct {
2796 WMI_PMKID pmkidList
[WMI_MAX_PMKID_CACHE
];
2797 } POSTPACK WMI_SET_PMKID_LIST_CMD
;
2800 * WMI_GET_PMKID_LIST_CMD Reply
2801 * Following the Number of PMKIDs is the list of PMKIDs
2803 typedef PREPACK
struct {
2805 u8 bssidList
[ATH_MAC_LEN
][1];
2806 WMI_PMKID pmkidList
[1];
2807 } POSTPACK WMI_PMKID_LIST_REPLY
;
2809 typedef PREPACK
struct {
2812 } POSTPACK WMI_CHANNEL_CHANGE_EVENT
;
2814 typedef PREPACK
struct {
2816 } POSTPACK WMI_WLAN_VERSION_EVENT
;
2819 /* WMI_ADDBA_REQ_EVENTID */
2820 typedef PREPACK
struct {
2824 u8 status
; /* f/w response for ADDBA Req; OK(0) or failure(!=0) */
2825 } POSTPACK WMI_ADDBA_REQ_EVENT
;
2827 /* WMI_ADDBA_RESP_EVENTID */
2828 typedef PREPACK
struct {
2830 u8 status
; /* OK(0), failure (!=0) */
2831 u16 amsdu_sz
; /* Three values: Not supported(0), 3839, 8k */
2832 } POSTPACK WMI_ADDBA_RESP_EVENT
;
2834 /* WMI_DELBA_EVENTID
2835 * f/w received a DELBA for peer and processed it.
2836 * Host is notified of this
2838 typedef PREPACK
struct {
2840 u8 is_peer_initiator
;
2842 } POSTPACK WMI_DELBA_EVENT
;
2846 #define WAPI_REKEY_UCAST 1
2847 #define WAPI_REKEY_MCAST 2
2848 typedef PREPACK
struct {
2850 u8 macAddr
[ATH_MAC_LEN
];
2851 } POSTPACK WMI_WAPIREKEY_EVENT
;
2855 /* WMI_ALLOW_AGGR_CMDID
2856 * Configures tid's to allow ADDBA negotiations
2857 * on each tid, in each direction
2859 typedef PREPACK
struct {
2860 u16 tx_allow_aggr
; /* 16-bit mask to allow uplink ADDBA negotiation - bit position indicates tid*/
2861 u16 rx_allow_aggr
; /* 16-bit mask to allow donwlink ADDBA negotiation - bit position indicates tid*/
2862 } POSTPACK WMI_ALLOW_AGGR_CMD
;
2864 /* WMI_ADDBA_REQ_CMDID
2865 * f/w starts performing ADDBA negotiations with peer
2868 typedef PREPACK
struct {
2870 } POSTPACK WMI_ADDBA_REQ_CMD
;
2872 /* WMI_DELBA_REQ_CMDID
2873 * f/w would teardown BA with peer.
2874 * is_send_initiator indicates if it's or tx or rx side
2876 typedef PREPACK
struct {
2878 u8 is_sender_initiator
;
2880 } POSTPACK WMI_DELBA_REQ_CMD
;
2882 #define PEER_NODE_JOIN_EVENT 0x00
2883 #define PEER_NODE_LEAVE_EVENT 0x01
2884 #define PEER_FIRST_NODE_JOIN_EVENT 0x10
2885 #define PEER_LAST_NODE_LEAVE_EVENT 0x11
2886 typedef PREPACK
struct {
2888 u8 peerMacAddr
[ATH_MAC_LEN
];
2889 } POSTPACK WMI_PEER_NODE_EVENT
;
2891 #define IEEE80211_FRAME_TYPE_MGT 0x00
2892 #define IEEE80211_FRAME_TYPE_CTL 0x04
2895 * Transmit complete event data structure(s)
2899 typedef PREPACK
struct {
2900 #define TX_COMPLETE_STATUS_SUCCESS 0
2901 #define TX_COMPLETE_STATUS_RETRIES 1
2902 #define TX_COMPLETE_STATUS_NOLINK 2
2903 #define TX_COMPLETE_STATUS_TIMEOUT 3
2904 #define TX_COMPLETE_STATUS_OTHER 4
2906 u8 status
; /* one of TX_COMPLETE_STATUS_... */
2907 u8 pktID
; /* packet ID to identify parent packet */
2908 u8 rateIdx
; /* rate index on successful transmission */
2909 u8 ackFailures
; /* number of ACK failures in tx attempt */
2910 #if 0 /* optional params currently omitted. */
2911 u32 queueDelay
; // usec delay measured Tx Start time - host delivery time
2912 u32 mediaDelay
; // usec delay measured ACK rx time - host delivery time
2914 } POSTPACK TX_COMPLETE_MSG_V1
; /* version 1 of tx complete msg */
2916 typedef PREPACK
struct {
2917 u8 numMessages
; /* number of tx comp msgs following this struct */
2918 u8 msgLen
; /* length in bytes for each individual msg following this struct */
2919 u8 msgType
; /* version of tx complete msg data following this struct */
2920 u8 reserved
; /* individual messages follow this header */
2921 } POSTPACK WMI_TX_COMPLETE_EVENT
;
2923 #define WMI_TXCOMPLETE_VERSION_1 (0x01)
2927 * ------- AP Mode definitions --------------
2932 * -Changing the following values needs compilation of both driver and firmware
2935 #define AP_MAX_NUM_STA 4
2937 #define AP_MAX_NUM_STA 8
2939 #define AP_ACL_SIZE 10
2940 #define IEEE80211_MAX_IE 256
2941 #define MCAST_AID 0xFF /* Spl. AID used to set DTIM flag in the beacons */
2942 #define DEF_AP_COUNTRY_CODE "US "
2943 #define DEF_AP_WMODE_G WMI_11G_MODE
2944 #define DEF_AP_WMODE_AG WMI_11AG_MODE
2945 #define DEF_AP_DTIM 5
2946 #define DEF_BEACON_INTERVAL 100
2948 /* AP mode disconnect reasons */
2949 #define AP_DISCONNECT_STA_LEFT 101
2950 #define AP_DISCONNECT_FROM_HOST 102
2951 #define AP_DISCONNECT_COMM_TIMEOUT 103
2954 * Used with WMI_AP_HIDDEN_SSID_CMDID
2956 #define HIDDEN_SSID_FALSE 0
2957 #define HIDDEN_SSID_TRUE 1
2958 typedef PREPACK
struct {
2960 } POSTPACK WMI_AP_HIDDEN_SSID_CMD
;
2963 * Used with WMI_AP_ACL_POLICY_CMDID
2965 #define AP_ACL_DISABLE 0x00
2966 #define AP_ACL_ALLOW_MAC 0x01
2967 #define AP_ACL_DENY_MAC 0x02
2968 #define AP_ACL_RETAIN_LIST_MASK 0x80
2969 typedef PREPACK
struct {
2971 } POSTPACK WMI_AP_ACL_POLICY_CMD
;
2974 * Used with WMI_AP_ACL_MAC_LIST_CMDID
2976 #define ADD_MAC_ADDR 1
2977 #define DEL_MAC_ADDR 2
2978 typedef PREPACK
struct {
2981 u8 mac
[ATH_MAC_LEN
];
2983 } POSTPACK WMI_AP_ACL_MAC_CMD
;
2985 typedef PREPACK
struct {
2987 u8 acl_mac
[AP_ACL_SIZE
][ATH_MAC_LEN
];
2988 u8 wildcard
[AP_ACL_SIZE
];
2990 } POSTPACK WMI_AP_ACL
;
2993 * Used with WMI_AP_SET_NUM_STA_CMDID
2995 typedef PREPACK
struct {
2997 } POSTPACK WMI_AP_SET_NUM_STA_CMD
;
3000 * Used with WMI_AP_SET_MLME_CMDID
3002 typedef PREPACK
struct {
3003 u8 mac
[ATH_MAC_LEN
];
3004 u16 reason
; /* 802.11 reason code */
3005 u8 cmd
; /* operation to perform */
3006 #define WMI_AP_MLME_ASSOC 1 /* associate station */
3007 #define WMI_AP_DISASSOC 2 /* disassociate station */
3008 #define WMI_AP_DEAUTH 3 /* deauthenticate station */
3009 #define WMI_AP_MLME_AUTHORIZE 4 /* authorize station */
3010 #define WMI_AP_MLME_UNAUTHORIZE 5 /* unauthorize station */
3011 } POSTPACK WMI_AP_SET_MLME_CMD
;
3013 typedef PREPACK
struct {
3015 } POSTPACK WMI_AP_CONN_INACT_CMD
;
3017 typedef PREPACK
struct {
3020 } POSTPACK WMI_AP_PROT_SCAN_TIME_CMD
;
3022 typedef PREPACK
struct {
3025 } POSTPACK WMI_AP_SET_PVB_CMD
;
3027 #define WMI_DISABLE_REGULATORY_CODE "FF"
3029 typedef PREPACK
struct {
3031 } POSTPACK WMI_AP_SET_COUNTRY_CMD
;
3033 typedef PREPACK
struct {
3035 } POSTPACK WMI_AP_SET_DTIM_CMD
;
3037 typedef PREPACK
struct {
3038 u8 band
; /* specifies which band to apply these values */
3039 u8 enable
; /* allows 11n to be disabled on a per band basis */
3040 u8 chan_width_40M_supported
;
3043 u8 intolerance_40MHz
;
3044 u8 max_ampdu_len_exp
;
3045 } POSTPACK WMI_SET_HT_CAP_CMD
;
3047 typedef PREPACK
struct {
3049 } POSTPACK WMI_SET_HT_OP_CMD
;
3051 typedef PREPACK
struct {
3053 } POSTPACK WMI_SET_TX_SELECT_RATES_CMD
;
3055 typedef PREPACK
struct {
3058 } POSTPACK WMI_SET_TX_SGI_PARAM_CMD
;
3060 #define DEFAULT_SGI_MASK 0x08080000
3061 #define DEFAULT_SGI_PER 10
3063 typedef PREPACK
struct {
3064 u32 rateField
; /* 1 bit per rate corresponding to index */
3068 u8 reserved
; /* padding */
3069 } POSTPACK WMI_SET_RATE_POLICY_CMD
;
3071 typedef PREPACK
struct {
3072 u8 metaVersion
; /* version of meta data for rx packets <0 = default> (0-7 = valid) */
3073 u8 dot11Hdr
; /* 1 == leave .11 header intact , 0 == replace .11 header with .3 <default> */
3074 u8 defragOnHost
; /* 1 == defragmentation is performed by host, 0 == performed by target <default> */
3075 u8 reserved
[1]; /* alignment */
3076 } POSTPACK WMI_RX_FRAME_FORMAT_CMD
;
3079 typedef PREPACK
struct {
3080 u8 enable
; /* 1 == device operates in thin mode , 0 == normal mode <default> */
3082 } POSTPACK WMI_SET_THIN_MODE_CMD
;
3084 /* AP mode events */
3085 /* WMI_PS_POLL_EVENT */
3086 typedef PREPACK
struct {
3088 } POSTPACK WMI_PSPOLL_EVENT
;
3090 typedef PREPACK
struct {
3100 } POSTPACK WMI_PER_STA_STAT
;
3102 #define AP_GET_STATS 0
3103 #define AP_CLEAR_STATS 1
3105 typedef PREPACK
struct {
3107 WMI_PER_STA_STAT sta
[AP_MAX_NUM_STA
+1];
3108 } POSTPACK WMI_AP_MODE_STAT
;
3109 #define WMI_AP_MODE_STAT_SIZE(numSta) (sizeof(u32) + ((numSta + 1) * sizeof(WMI_PER_STA_STAT)))
3111 #define AP_11BG_RATESET1 1
3112 #define AP_11BG_RATESET2 2
3113 #define DEF_AP_11BG_RATESET AP_11BG_RATESET1
3114 typedef PREPACK
struct {
3116 } POSTPACK WMI_AP_SET_11BG_RATESET_CMD
;
3118 * End of AP mode definitions
3125 #endif /* _WMI_H_ */