staging: ath6kl: Convert A_INT32 to s32
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / drivers / staging / ath6kl / include / common / wmi.h
bloba03b4371519fb93386ec3bd5ac6baa112f58a7dd
1 //------------------------------------------------------------------------------
2 // Copyright (c) 2004-2010 Atheros Corporation. All rights reserved.
3 //
4 //
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.
8 //
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.
34 #ifndef _WMI_H_
35 #define _WMI_H_
37 #ifndef ATH_TARGET
38 #include "athstartpack.h"
39 #endif
41 #include "wmix.h"
42 #include "wlan_defs.h"
44 #ifdef __cplusplus
45 extern "C" {
46 #endif
48 #define HTC_PROTOCOL_VERSION 0x0002
49 #define HTC_PROTOCOL_REVISION 0x0000
51 #define WMI_PROTOCOL_VERSION 0x0002
52 #define WMI_PROTOCOL_REVISION 0x0000
54 #define ATH_MAC_LEN 6 /* length of mac in bytes */
55 #define WMI_CMD_MAX_LEN 100
56 #define WMI_CONTROL_MSG_MAX_LEN 256
57 #define WMI_OPT_CONTROL_MSG_MAX_LEN 1536
58 #define IS_ETHERTYPE(_typeOrLen) ((_typeOrLen) >= 0x0600)
59 #define RFC1042OUI {0x00, 0x00, 0x00}
61 #define IP_ETHERTYPE 0x0800
63 #define WMI_IMPLICIT_PSTREAM 0xFF
64 #define WMI_MAX_THINSTREAM 15
66 #ifdef AR6002_REV2
67 #define IBSS_MAX_NUM_STA 4
68 #else
69 #define IBSS_MAX_NUM_STA 8
70 #endif
72 PREPACK struct host_app_area_s {
73 u32 wmi_protocol_ver;
74 } POSTPACK;
77 * Data Path
79 typedef PREPACK struct {
80 u8 dstMac[ATH_MAC_LEN];
81 u8 srcMac[ATH_MAC_LEN];
82 u16 typeOrLen;
83 } POSTPACK ATH_MAC_HDR;
85 typedef PREPACK struct {
86 u8 dsap;
87 u8 ssap;
88 u8 cntl;
89 u8 orgCode[3];
90 u16 etherType;
91 } POSTPACK ATH_LLC_SNAP_HDR;
93 typedef enum {
94 DATA_MSGTYPE = 0x0,
95 CNTL_MSGTYPE,
96 SYNC_MSGTYPE,
97 OPT_MSGTYPE,
98 } WMI_MSG_TYPE;
102 * Macros for operating on WMI_DATA_HDR (info) field
105 #define WMI_DATA_HDR_MSG_TYPE_MASK 0x03
106 #define WMI_DATA_HDR_MSG_TYPE_SHIFT 0
107 #define WMI_DATA_HDR_UP_MASK 0x07
108 #define WMI_DATA_HDR_UP_SHIFT 2
109 /* In AP mode, the same bit (b5) is used to indicate Power save state in
110 * the Rx dir and More data bit state in the tx direction.
112 #define WMI_DATA_HDR_PS_MASK 0x1
113 #define WMI_DATA_HDR_PS_SHIFT 5
115 #define WMI_DATA_HDR_MORE_MASK 0x1
116 #define WMI_DATA_HDR_MORE_SHIFT 5
118 typedef enum {
119 WMI_DATA_HDR_DATA_TYPE_802_3 = 0,
120 WMI_DATA_HDR_DATA_TYPE_802_11,
121 WMI_DATA_HDR_DATA_TYPE_ACL,
122 } WMI_DATA_HDR_DATA_TYPE;
124 #define WMI_DATA_HDR_DATA_TYPE_MASK 0x3
125 #define WMI_DATA_HDR_DATA_TYPE_SHIFT 6
127 #define WMI_DATA_HDR_SET_MORE_BIT(h) ((h)->info |= (WMI_DATA_HDR_MORE_MASK << WMI_DATA_HDR_MORE_SHIFT))
129 #define WMI_DATA_HDR_IS_MSG_TYPE(h, t) (((h)->info & (WMI_DATA_HDR_MSG_TYPE_MASK)) == (t))
130 #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))
131 #define WMI_DATA_HDR_GET_UP(h) (((h)->info >> WMI_DATA_HDR_UP_SHIFT) & WMI_DATA_HDR_UP_MASK)
132 #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))
134 #define WMI_DATA_HDR_GET_DATA_TYPE(h) (((h)->info >> WMI_DATA_HDR_DATA_TYPE_SHIFT) & WMI_DATA_HDR_DATA_TYPE_MASK)
135 #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))
137 #define WMI_DATA_HDR_GET_DOT11(h) (WMI_DATA_HDR_GET_DATA_TYPE((h)) == WMI_DATA_HDR_DATA_TYPE_802_11)
138 #define WMI_DATA_HDR_SET_DOT11(h, p) WMI_DATA_HDR_SET_DATA_TYPE((h), (p))
140 /* Macros for operating on WMI_DATA_HDR (info2) field */
141 #define WMI_DATA_HDR_SEQNO_MASK 0xFFF
142 #define WMI_DATA_HDR_SEQNO_SHIFT 0
144 #define WMI_DATA_HDR_AMSDU_MASK 0x1
145 #define WMI_DATA_HDR_AMSDU_SHIFT 12
147 #define WMI_DATA_HDR_META_MASK 0x7
148 #define WMI_DATA_HDR_META_SHIFT 13
150 #define GET_SEQ_NO(_v) ((_v) & WMI_DATA_HDR_SEQNO_MASK)
151 #define GET_ISMSDU(_v) ((_v) & WMI_DATA_HDR_AMSDU_MASK)
153 #define WMI_DATA_HDR_GET_SEQNO(h) GET_SEQ_NO((h)->info2 >> WMI_DATA_HDR_SEQNO_SHIFT)
154 #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))
156 #define WMI_DATA_HDR_IS_AMSDU(h) GET_ISMSDU((h)->info2 >> WMI_DATA_HDR_AMSDU_SHIFT)
157 #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))
159 #define WMI_DATA_HDR_GET_META(h) (((h)->info2 >> WMI_DATA_HDR_META_SHIFT) & WMI_DATA_HDR_META_MASK)
160 #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))
162 typedef PREPACK struct {
163 s8 rssi;
164 u8 info; /* usage of 'info' field(8-bit):
165 * b1:b0 - WMI_MSG_TYPE
166 * b4:b3:b2 - UP(tid)
167 * b5 - Used in AP mode. More-data in tx dir, PS in rx.
168 * b7:b6 - Dot3 header(0),
169 * Dot11 Header(1),
170 * ACL data(2)
173 u16 info2; /* usage of 'info2' field(16-bit):
174 * b11:b0 - seq_no
175 * b12 - A-MSDU?
176 * b15:b13 - META_DATA_VERSION 0 - 7
178 u16 reserved;
179 } POSTPACK WMI_DATA_HDR;
182 * TX META VERSION DEFINITIONS
184 #define WMI_MAX_TX_META_SZ (12)
185 #define WMI_MAX_TX_META_VERSION (7)
186 #define WMI_META_VERSION_1 (0x01)
187 #define WMI_META_VERSION_2 (0X02)
189 #define WMI_ACL_TO_DOT11_HEADROOM 36
191 #if 0 /* removed to prevent compile errors for WM.. */
192 typedef PREPACK struct {
193 /* intentionally empty. Default version is no meta data. */
194 } POSTPACK WMI_TX_META_V0;
195 #endif
197 typedef PREPACK struct {
198 u8 pktID; /* The packet ID to identify the tx request */
199 u8 ratePolicyID; /* The rate policy to be used for the tx of this frame */
200 } POSTPACK WMI_TX_META_V1;
203 #define WMI_CSUM_DIR_TX (0x1)
204 #define TX_CSUM_CALC_FILL (0x1)
205 typedef PREPACK struct {
206 u8 csumStart; /*Offset from start of the WMI header for csum calculation to begin */
207 u8 csumDest; /*Offset from start of WMI header where final csum goes*/
208 u8 csumFlags; /*number of bytes over which csum is calculated*/
209 } POSTPACK WMI_TX_META_V2;
213 * RX META VERSION DEFINITIONS
215 /* if RX meta data is present at all then the meta data field
216 * will consume WMI_MAX_RX_META_SZ bytes of space between the
217 * WMI_DATA_HDR and the payload. How much of the available
218 * Meta data is actually used depends on which meta data
219 * version is active. */
220 #define WMI_MAX_RX_META_SZ (12)
221 #define WMI_MAX_RX_META_VERSION (7)
223 #define WMI_RX_STATUS_OK 0 /* success */
224 #define WMI_RX_STATUS_DECRYPT_ERR 1 /* decrypt error */
225 #define WMI_RX_STATUS_MIC_ERR 2 /* tkip MIC error */
226 #define WMI_RX_STATUS_ERR 3 /* undefined error */
228 #define WMI_RX_FLAGS_AGGR 0x0001 /* part of AGGR */
229 #define WMI_RX_FlAGS_STBC 0x0002 /* used STBC */
230 #define WMI_RX_FLAGS_SGI 0x0004 /* used SGI */
231 #define WMI_RX_FLAGS_HT 0x0008 /* is HT packet */
232 /* the flags field is also used to store the CRYPTO_TYPE of the frame
233 * that value is shifted by WMI_RX_FLAGS_CRYPTO_SHIFT */
234 #define WMI_RX_FLAGS_CRYPTO_SHIFT 4
235 #define WMI_RX_FLAGS_CRYPTO_MASK 0x1f
236 #define WMI_RX_META_GET_CRYPTO(flags) (((flags) >> WMI_RX_FLAGS_CRYPTO_SHIFT) & WMI_RX_FLAGS_CRYPTO_MASK)
238 #if 0 /* removed to prevent compile errors for WM.. */
239 typedef PREPACK struct {
240 /* intentionally empty. Default version is no meta data. */
241 } POSTPACK WMI_RX_META_VERSION_0;
242 #endif
244 typedef PREPACK struct {
245 u8 status; /* one of WMI_RX_STATUS_... */
246 u8 rix; /* rate index mapped to rate at which this packet was received. */
247 u8 rssi; /* rssi of packet */
248 u8 channel;/* rf channel during packet reception */
249 u16 flags; /* a combination of WMI_RX_FLAGS_... */
250 } POSTPACK WMI_RX_META_V1;
252 #define RX_CSUM_VALID_FLAG (0x1)
253 typedef PREPACK struct {
254 u16 csum;
255 u8 csumFlags;/* bit 0 set -partial csum valid
256 bit 1 set -test mode */
257 } POSTPACK WMI_RX_META_V2;
261 #define WMI_GET_DEVICE_ID(info1) ((info1) & 0xF)
264 * Control Path
266 typedef PREPACK struct {
267 u16 commandId;
269 * info1 - 16 bits
270 * b03:b00 - id
271 * b15:b04 - unused
273 u16 info1;
275 u16 reserved; /* For alignment */
276 } POSTPACK WMI_CMD_HDR; /* used for commands and events */
279 * List of Commnands
281 typedef enum {
282 WMI_CONNECT_CMDID = 0x0001,
283 WMI_RECONNECT_CMDID,
284 WMI_DISCONNECT_CMDID,
285 WMI_SYNCHRONIZE_CMDID,
286 WMI_CREATE_PSTREAM_CMDID,
287 WMI_DELETE_PSTREAM_CMDID,
288 WMI_START_SCAN_CMDID,
289 WMI_SET_SCAN_PARAMS_CMDID,
290 WMI_SET_BSS_FILTER_CMDID,
291 WMI_SET_PROBED_SSID_CMDID, /* 10 */
292 WMI_SET_LISTEN_INT_CMDID,
293 WMI_SET_BMISS_TIME_CMDID,
294 WMI_SET_DISC_TIMEOUT_CMDID,
295 WMI_GET_CHANNEL_LIST_CMDID,
296 WMI_SET_BEACON_INT_CMDID,
297 WMI_GET_STATISTICS_CMDID,
298 WMI_SET_CHANNEL_PARAMS_CMDID,
299 WMI_SET_POWER_MODE_CMDID,
300 WMI_SET_IBSS_PM_CAPS_CMDID,
301 WMI_SET_POWER_PARAMS_CMDID, /* 20 */
302 WMI_SET_POWERSAVE_TIMERS_POLICY_CMDID,
303 WMI_ADD_CIPHER_KEY_CMDID,
304 WMI_DELETE_CIPHER_KEY_CMDID,
305 WMI_ADD_KRK_CMDID,
306 WMI_DELETE_KRK_CMDID,
307 WMI_SET_PMKID_CMDID,
308 WMI_SET_TX_PWR_CMDID,
309 WMI_GET_TX_PWR_CMDID,
310 WMI_SET_ASSOC_INFO_CMDID,
311 WMI_ADD_BAD_AP_CMDID, /* 30 */
312 WMI_DELETE_BAD_AP_CMDID,
313 WMI_SET_TKIP_COUNTERMEASURES_CMDID,
314 WMI_RSSI_THRESHOLD_PARAMS_CMDID,
315 WMI_TARGET_ERROR_REPORT_BITMASK_CMDID,
316 WMI_SET_ACCESS_PARAMS_CMDID,
317 WMI_SET_RETRY_LIMITS_CMDID,
318 WMI_SET_OPT_MODE_CMDID,
319 WMI_OPT_TX_FRAME_CMDID,
320 WMI_SET_VOICE_PKT_SIZE_CMDID,
321 WMI_SET_MAX_SP_LEN_CMDID, /* 40 */
322 WMI_SET_ROAM_CTRL_CMDID,
323 WMI_GET_ROAM_TBL_CMDID,
324 WMI_GET_ROAM_DATA_CMDID,
325 WMI_ENABLE_RM_CMDID,
326 WMI_SET_MAX_OFFHOME_DURATION_CMDID,
327 WMI_EXTENSION_CMDID, /* Non-wireless extensions */
328 WMI_SNR_THRESHOLD_PARAMS_CMDID,
329 WMI_LQ_THRESHOLD_PARAMS_CMDID,
330 WMI_SET_LPREAMBLE_CMDID,
331 WMI_SET_RTS_CMDID, /* 50 */
332 WMI_CLR_RSSI_SNR_CMDID,
333 WMI_SET_FIXRATES_CMDID,
334 WMI_GET_FIXRATES_CMDID,
335 WMI_SET_AUTH_MODE_CMDID,
336 WMI_SET_REASSOC_MODE_CMDID,
337 WMI_SET_WMM_CMDID,
338 WMI_SET_WMM_TXOP_CMDID,
339 WMI_TEST_CMDID,
340 /* COEX AR6002 only*/
341 WMI_SET_BT_STATUS_CMDID,
342 WMI_SET_BT_PARAMS_CMDID, /* 60 */
344 WMI_SET_KEEPALIVE_CMDID,
345 WMI_GET_KEEPALIVE_CMDID,
346 WMI_SET_APPIE_CMDID,
347 WMI_GET_APPIE_CMDID,
348 WMI_SET_WSC_STATUS_CMDID,
350 /* Wake on Wireless */
351 WMI_SET_HOST_SLEEP_MODE_CMDID,
352 WMI_SET_WOW_MODE_CMDID,
353 WMI_GET_WOW_LIST_CMDID,
354 WMI_ADD_WOW_PATTERN_CMDID,
355 WMI_DEL_WOW_PATTERN_CMDID, /* 70 */
357 WMI_SET_FRAMERATES_CMDID,
358 WMI_SET_AP_PS_CMDID,
359 WMI_SET_QOS_SUPP_CMDID,
360 /* WMI_THIN_RESERVED_... mark the start and end
361 * values for WMI_THIN_RESERVED command IDs. These
362 * command IDs can be found in wmi_thin.h */
363 WMI_THIN_RESERVED_START = 0x8000,
364 WMI_THIN_RESERVED_END = 0x8fff,
366 * Developer commands starts at 0xF000
368 WMI_SET_BITRATE_CMDID = 0xF000,
369 WMI_GET_BITRATE_CMDID,
370 WMI_SET_WHALPARAM_CMDID,
373 /*Should add the new command to the tail for compatible with
374 * etna.
376 WMI_SET_MAC_ADDRESS_CMDID,
377 WMI_SET_AKMP_PARAMS_CMDID,
378 WMI_SET_PMKID_LIST_CMDID,
379 WMI_GET_PMKID_LIST_CMDID,
380 WMI_ABORT_SCAN_CMDID,
381 WMI_SET_TARGET_EVENT_REPORT_CMDID,
383 // Unused
384 WMI_UNUSED1,
385 WMI_UNUSED2,
388 * AP mode commands
390 WMI_AP_HIDDEN_SSID_CMDID,
391 WMI_AP_SET_NUM_STA_CMDID,
392 WMI_AP_ACL_POLICY_CMDID,
393 WMI_AP_ACL_MAC_LIST_CMDID,
394 WMI_AP_CONFIG_COMMIT_CMDID,
395 WMI_AP_SET_MLME_CMDID,
396 WMI_AP_SET_PVB_CMDID,
397 WMI_AP_CONN_INACT_CMDID,
398 WMI_AP_PROT_SCAN_TIME_CMDID,
399 WMI_AP_SET_COUNTRY_CMDID,
400 WMI_AP_SET_DTIM_CMDID,
401 WMI_AP_MODE_STAT_CMDID,
403 WMI_SET_IP_CMDID,
404 WMI_SET_PARAMS_CMDID,
405 WMI_SET_MCAST_FILTER_CMDID,
406 WMI_DEL_MCAST_FILTER_CMDID,
408 WMI_ALLOW_AGGR_CMDID,
409 WMI_ADDBA_REQ_CMDID,
410 WMI_DELBA_REQ_CMDID,
411 WMI_SET_HT_CAP_CMDID,
412 WMI_SET_HT_OP_CMDID,
413 WMI_SET_TX_SELECT_RATES_CMDID,
414 WMI_SET_TX_SGI_PARAM_CMDID,
415 WMI_SET_RATE_POLICY_CMDID,
417 WMI_HCI_CMD_CMDID,
418 WMI_RX_FRAME_FORMAT_CMDID,
419 WMI_SET_THIN_MODE_CMDID,
420 WMI_SET_BT_WLAN_CONN_PRECEDENCE_CMDID,
422 WMI_AP_SET_11BG_RATESET_CMDID,
423 WMI_SET_PMK_CMDID,
424 WMI_MCAST_FILTER_CMDID,
425 /* COEX CMDID AR6003*/
426 WMI_SET_BTCOEX_FE_ANT_CMDID,
427 WMI_SET_BTCOEX_COLOCATED_BT_DEV_CMDID,
428 WMI_SET_BTCOEX_SCO_CONFIG_CMDID,
429 WMI_SET_BTCOEX_A2DP_CONFIG_CMDID,
430 WMI_SET_BTCOEX_ACLCOEX_CONFIG_CMDID,
431 WMI_SET_BTCOEX_BTINQUIRY_PAGE_CONFIG_CMDID,
432 WMI_SET_BTCOEX_DEBUG_CMDID,
433 WMI_SET_BTCOEX_BT_OPERATING_STATUS_CMDID,
434 WMI_GET_BTCOEX_STATS_CMDID,
435 WMI_GET_BTCOEX_CONFIG_CMDID,
436 } WMI_COMMAND_ID;
439 * Frame Types
441 typedef enum {
442 WMI_FRAME_BEACON = 0,
443 WMI_FRAME_PROBE_REQ,
444 WMI_FRAME_PROBE_RESP,
445 WMI_FRAME_ASSOC_REQ,
446 WMI_FRAME_ASSOC_RESP,
447 WMI_NUM_MGMT_FRAME
448 } WMI_MGMT_FRAME_TYPE;
451 * Connect Command
453 typedef enum {
454 INFRA_NETWORK = 0x01,
455 ADHOC_NETWORK = 0x02,
456 ADHOC_CREATOR = 0x04,
457 AP_NETWORK = 0x10,
458 } NETWORK_TYPE;
460 typedef enum {
461 OPEN_AUTH = 0x01,
462 SHARED_AUTH = 0x02,
463 LEAP_AUTH = 0x04, /* different from IEEE_AUTH_MODE definitions */
464 } DOT11_AUTH_MODE;
466 typedef enum {
467 NONE_AUTH = 0x01,
468 WPA_AUTH = 0x02,
469 WPA2_AUTH = 0x04,
470 WPA_PSK_AUTH = 0x08,
471 WPA2_PSK_AUTH = 0x10,
472 WPA_AUTH_CCKM = 0x20,
473 WPA2_AUTH_CCKM = 0x40,
474 } AUTH_MODE;
476 typedef enum {
477 NONE_CRYPT = 0x01,
478 WEP_CRYPT = 0x02,
479 TKIP_CRYPT = 0x04,
480 AES_CRYPT = 0x08,
481 #ifdef WAPI_ENABLE
482 WAPI_CRYPT = 0x10,
483 #endif /*WAPI_ENABLE*/
484 } CRYPTO_TYPE;
486 #define WMI_MIN_CRYPTO_TYPE NONE_CRYPT
487 #define WMI_MAX_CRYPTO_TYPE (AES_CRYPT + 1)
489 #ifdef WAPI_ENABLE
490 #undef WMI_MAX_CRYPTO_TYPE
491 #define WMI_MAX_CRYPTO_TYPE (WAPI_CRYPT + 1)
492 #endif /* WAPI_ENABLE */
494 #ifdef WAPI_ENABLE
495 #define IW_ENCODE_ALG_SM4 0x20
496 #define IW_AUTH_WAPI_ENABLED 0x20
497 #endif
499 #define WMI_MIN_KEY_INDEX 0
500 #define WMI_MAX_KEY_INDEX 3
502 #ifdef WAPI_ENABLE
503 #undef WMI_MAX_KEY_INDEX
504 #define WMI_MAX_KEY_INDEX 7 /* wapi grpKey 0-3, prwKey 4-7 */
505 #endif /* WAPI_ENABLE */
507 #define WMI_MAX_KEY_LEN 32
509 #define WMI_MAX_SSID_LEN 32
511 typedef enum {
512 CONNECT_ASSOC_POLICY_USER = 0x0001,
513 CONNECT_SEND_REASSOC = 0x0002,
514 CONNECT_IGNORE_WPAx_GROUP_CIPHER = 0x0004,
515 CONNECT_PROFILE_MATCH_DONE = 0x0008,
516 CONNECT_IGNORE_AAC_BEACON = 0x0010,
517 CONNECT_CSA_FOLLOW_BSS = 0x0020,
518 CONNECT_DO_WPA_OFFLOAD = 0x0040,
519 CONNECT_DO_NOT_DEAUTH = 0x0080,
520 } WMI_CONNECT_CTRL_FLAGS_BITS;
522 #define DEFAULT_CONNECT_CTRL_FLAGS (CONNECT_CSA_FOLLOW_BSS)
524 typedef PREPACK struct {
525 u8 networkType;
526 u8 dot11AuthMode;
527 u8 authMode;
528 u8 pairwiseCryptoType;
529 u8 pairwiseCryptoLen;
530 u8 groupCryptoType;
531 u8 groupCryptoLen;
532 u8 ssidLength;
533 A_UCHAR ssid[WMI_MAX_SSID_LEN];
534 u16 channel;
535 u8 bssid[ATH_MAC_LEN];
536 u32 ctrl_flags;
537 } POSTPACK WMI_CONNECT_CMD;
540 * WMI_RECONNECT_CMDID
542 typedef PREPACK struct {
543 u16 channel; /* hint */
544 u8 bssid[ATH_MAC_LEN]; /* mandatory if set */
545 } POSTPACK WMI_RECONNECT_CMD;
547 #define WMI_PMK_LEN 32
548 typedef PREPACK struct {
549 u8 pmk[WMI_PMK_LEN];
550 } POSTPACK WMI_SET_PMK_CMD;
553 * WMI_ADD_CIPHER_KEY_CMDID
555 typedef enum {
556 PAIRWISE_USAGE = 0x00,
557 GROUP_USAGE = 0x01,
558 TX_USAGE = 0x02, /* default Tx Key - Static WEP only */
559 } KEY_USAGE;
562 * Bit Flag
563 * Bit 0 - Initialise TSC - default is Initialize
565 #define KEY_OP_INIT_TSC 0x01
566 #define KEY_OP_INIT_RSC 0x02
567 #ifdef WAPI_ENABLE
568 #define KEY_OP_INIT_WAPIPN 0x10
569 #endif /* WAPI_ENABLE */
571 #define KEY_OP_INIT_VAL 0x03 /* Default Initialise the TSC & RSC */
572 #define KEY_OP_VALID_MASK 0x03
574 typedef PREPACK struct {
575 u8 keyIndex;
576 u8 keyType;
577 u8 keyUsage; /* KEY_USAGE */
578 u8 keyLength;
579 u8 keyRSC[8]; /* key replay sequence counter */
580 u8 key[WMI_MAX_KEY_LEN];
581 u8 key_op_ctrl; /* Additional Key Control information */
582 u8 key_macaddr[ATH_MAC_LEN];
583 } POSTPACK WMI_ADD_CIPHER_KEY_CMD;
586 * WMI_DELETE_CIPHER_KEY_CMDID
588 typedef PREPACK struct {
589 u8 keyIndex;
590 } POSTPACK WMI_DELETE_CIPHER_KEY_CMD;
592 #define WMI_KRK_LEN 16
594 * WMI_ADD_KRK_CMDID
596 typedef PREPACK struct {
597 u8 krk[WMI_KRK_LEN];
598 } POSTPACK WMI_ADD_KRK_CMD;
601 * WMI_SET_TKIP_COUNTERMEASURES_CMDID
603 typedef enum {
604 WMI_TKIP_CM_DISABLE = 0x0,
605 WMI_TKIP_CM_ENABLE = 0x1,
606 } WMI_TKIP_CM_CONTROL;
608 typedef PREPACK struct {
609 u8 cm_en; /* WMI_TKIP_CM_CONTROL */
610 } POSTPACK WMI_SET_TKIP_COUNTERMEASURES_CMD;
613 * WMI_SET_PMKID_CMDID
616 #define WMI_PMKID_LEN 16
618 typedef enum {
619 PMKID_DISABLE = 0,
620 PMKID_ENABLE = 1,
621 } PMKID_ENABLE_FLG;
623 typedef PREPACK struct {
624 u8 bssid[ATH_MAC_LEN];
625 u8 enable; /* PMKID_ENABLE_FLG */
626 u8 pmkid[WMI_PMKID_LEN];
627 } POSTPACK WMI_SET_PMKID_CMD;
630 * WMI_START_SCAN_CMD
632 typedef enum {
633 WMI_LONG_SCAN = 0,
634 WMI_SHORT_SCAN = 1,
635 } WMI_SCAN_TYPE;
637 typedef PREPACK struct {
638 u32 forceFgScan;
639 u32 isLegacy; /* For Legacy Cisco AP compatibility */
640 u32 homeDwellTime; /* Maximum duration in the home channel(milliseconds) */
641 u32 forceScanInterval; /* Time interval between scans (milliseconds)*/
642 u8 scanType; /* WMI_SCAN_TYPE */
643 u8 numChannels; /* how many channels follow */
644 u16 channelList[1]; /* channels in Mhz */
645 } POSTPACK WMI_START_SCAN_CMD;
648 * WMI_SET_SCAN_PARAMS_CMDID
650 #define WMI_SHORTSCANRATIO_DEFAULT 3
652 * Warning: ScanCtrlFlag value of 0xFF is used to disable all flags in WMI_SCAN_PARAMS_CMD
653 * Do not add any more flags to WMI_SCAN_CTRL_FLAG_BITS
655 typedef enum {
656 CONNECT_SCAN_CTRL_FLAGS = 0x01, /* set if can scan in the Connect cmd */
657 SCAN_CONNECTED_CTRL_FLAGS = 0x02, /* set if scan for the SSID it is */
658 /* already connected to */
659 ACTIVE_SCAN_CTRL_FLAGS = 0x04, /* set if enable active scan */
660 ROAM_SCAN_CTRL_FLAGS = 0x08, /* set if enable roam scan when bmiss and lowrssi */
661 REPORT_BSSINFO_CTRL_FLAGS = 0x10, /* set if follows customer BSSINFO reporting rule */
662 ENABLE_AUTO_CTRL_FLAGS = 0x20, /* if disabled, target doesn't
663 scan after a disconnect event */
664 ENABLE_SCAN_ABORT_EVENT = 0x40 /* Scan complete event with canceled status will be generated when a scan is prempted before it gets completed */
665 } WMI_SCAN_CTRL_FLAGS_BITS;
667 #define CAN_SCAN_IN_CONNECT(flags) (flags & CONNECT_SCAN_CTRL_FLAGS)
668 #define CAN_SCAN_CONNECTED(flags) (flags & SCAN_CONNECTED_CTRL_FLAGS)
669 #define ENABLE_ACTIVE_SCAN(flags) (flags & ACTIVE_SCAN_CTRL_FLAGS)
670 #define ENABLE_ROAM_SCAN(flags) (flags & ROAM_SCAN_CTRL_FLAGS)
671 #define CONFIG_REPORT_BSSINFO(flags) (flags & REPORT_BSSINFO_CTRL_FLAGS)
672 #define IS_AUTO_SCAN_ENABLED(flags) (flags & ENABLE_AUTO_CTRL_FLAGS)
673 #define SCAN_ABORT_EVENT_ENABLED(flags) (flags & ENABLE_SCAN_ABORT_EVENT)
675 #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)
678 typedef PREPACK struct {
679 u16 fg_start_period; /* seconds */
680 u16 fg_end_period; /* seconds */
681 u16 bg_period; /* seconds */
682 u16 maxact_chdwell_time; /* msec */
683 u16 pas_chdwell_time; /* msec */
684 u8 shortScanRatio; /* how many shorts scan for one long */
685 u8 scanCtrlFlags;
686 u16 minact_chdwell_time; /* msec */
687 u16 maxact_scan_per_ssid; /* max active scans per ssid */
688 u32 max_dfsch_act_time; /* msecs */
689 } POSTPACK WMI_SCAN_PARAMS_CMD;
692 * WMI_SET_BSS_FILTER_CMDID
694 typedef enum {
695 NONE_BSS_FILTER = 0x0, /* no beacons forwarded */
696 ALL_BSS_FILTER, /* all beacons forwarded */
697 PROFILE_FILTER, /* only beacons matching profile */
698 ALL_BUT_PROFILE_FILTER, /* all but beacons matching profile */
699 CURRENT_BSS_FILTER, /* only beacons matching current BSS */
700 ALL_BUT_BSS_FILTER, /* all but beacons matching BSS */
701 PROBED_SSID_FILTER, /* beacons matching probed ssid */
702 LAST_BSS_FILTER, /* marker only */
703 } WMI_BSS_FILTER;
705 typedef PREPACK struct {
706 u8 bssFilter; /* see WMI_BSS_FILTER */
707 u8 reserved1; /* For alignment */
708 u16 reserved2; /* For alignment */
709 u32 ieMask;
710 } POSTPACK WMI_BSS_FILTER_CMD;
713 * WMI_SET_PROBED_SSID_CMDID
715 #define MAX_PROBED_SSID_INDEX 9
717 typedef enum {
718 DISABLE_SSID_FLAG = 0, /* disables entry */
719 SPECIFIC_SSID_FLAG = 0x01, /* probes specified ssid */
720 ANY_SSID_FLAG = 0x02, /* probes for any ssid */
721 } WMI_SSID_FLAG;
723 typedef PREPACK struct {
724 u8 entryIndex; /* 0 to MAX_PROBED_SSID_INDEX */
725 u8 flag; /* WMI_SSID_FLG */
726 u8 ssidLength;
727 u8 ssid[32];
728 } POSTPACK WMI_PROBED_SSID_CMD;
731 * WMI_SET_LISTEN_INT_CMDID
732 * The Listen interval is between 15 and 3000 TUs
734 #define MIN_LISTEN_INTERVAL 15
735 #define MAX_LISTEN_INTERVAL 5000
736 #define MIN_LISTEN_BEACONS 1
737 #define MAX_LISTEN_BEACONS 50
739 typedef PREPACK struct {
740 u16 listenInterval;
741 u16 numBeacons;
742 } POSTPACK WMI_LISTEN_INT_CMD;
745 * WMI_SET_BEACON_INT_CMDID
747 typedef PREPACK struct {
748 u16 beaconInterval;
749 } POSTPACK WMI_BEACON_INT_CMD;
752 * WMI_SET_BMISS_TIME_CMDID
753 * valid values are between 1000 and 5000 TUs
756 #define MIN_BMISS_TIME 1000
757 #define MAX_BMISS_TIME 5000
758 #define MIN_BMISS_BEACONS 1
759 #define MAX_BMISS_BEACONS 50
761 typedef PREPACK struct {
762 u16 bmissTime;
763 u16 numBeacons;
764 } POSTPACK WMI_BMISS_TIME_CMD;
767 * WMI_SET_POWER_MODE_CMDID
769 typedef enum {
770 REC_POWER = 0x01,
771 MAX_PERF_POWER,
772 } WMI_POWER_MODE;
774 typedef PREPACK struct {
775 u8 powerMode; /* WMI_POWER_MODE */
776 } POSTPACK WMI_POWER_MODE_CMD;
778 typedef PREPACK struct {
779 s8 status; /* WMI_SET_PARAMS_REPLY */
780 } POSTPACK WMI_SET_PARAMS_REPLY;
782 typedef PREPACK struct {
783 u32 opcode;
784 u32 length;
785 char buffer[1]; /* WMI_SET_PARAMS */
786 } POSTPACK WMI_SET_PARAMS_CMD;
788 typedef PREPACK struct {
789 u8 multicast_mac[ATH_MAC_LEN]; /* WMI_SET_MCAST_FILTER */
790 } POSTPACK WMI_SET_MCAST_FILTER_CMD;
792 typedef PREPACK struct {
793 u8 enable; /* WMI_MCAST_FILTER */
794 } POSTPACK WMI_MCAST_FILTER_CMD;
797 * WMI_SET_POWER_PARAMS_CMDID
799 typedef enum {
800 IGNORE_DTIM = 0x01,
801 NORMAL_DTIM = 0x02,
802 STICK_DTIM = 0x03,
803 AUTO_DTIM = 0x04,
804 } WMI_DTIM_POLICY;
806 /* Policy to determnine whether TX should wakeup WLAN if sleeping */
807 typedef enum {
808 TX_WAKEUP_UPON_SLEEP = 1,
809 TX_DONT_WAKEUP_UPON_SLEEP = 2
810 } WMI_TX_WAKEUP_POLICY_UPON_SLEEP;
813 * Policy to determnine whether power save failure event should be sent to
814 * host during scanning
816 typedef enum {
817 SEND_POWER_SAVE_FAIL_EVENT_ALWAYS = 1,
818 IGNORE_POWER_SAVE_FAIL_EVENT_DURING_SCAN = 2,
819 } POWER_SAVE_FAIL_EVENT_POLICY;
821 typedef PREPACK struct {
822 u16 idle_period; /* msec */
823 u16 pspoll_number;
824 u16 dtim_policy;
825 u16 tx_wakeup_policy;
826 u16 num_tx_to_wakeup;
827 u16 ps_fail_event_policy;
828 } POSTPACK WMI_POWER_PARAMS_CMD;
830 /* Adhoc power save types */
831 typedef enum {
832 ADHOC_PS_DISABLE=1,
833 ADHOC_PS_ATH=2,
834 ADHOC_PS_IEEE=3,
835 ADHOC_PS_OTHER=4,
836 } WMI_ADHOC_PS_TYPE;
838 typedef PREPACK struct {
839 u8 power_saving;
840 u8 ttl; /* number of beacon periods */
841 u16 atim_windows; /* msec */
842 u16 timeout_value; /* msec */
843 } POSTPACK WMI_IBSS_PM_CAPS_CMD;
845 /* AP power save types */
846 typedef enum {
847 AP_PS_DISABLE=1,
848 AP_PS_ATH=2,
849 } WMI_AP_PS_TYPE;
851 typedef PREPACK struct {
852 u32 idle_time; /* in msec */
853 u32 ps_period; /* in usec */
854 u8 sleep_period; /* in ps periods */
855 u8 psType;
856 } POSTPACK WMI_AP_PS_CMD;
859 * WMI_SET_POWERSAVE_TIMERS_POLICY_CMDID
861 typedef enum {
862 IGNORE_TIM_ALL_QUEUES_APSD = 0,
863 PROCESS_TIM_ALL_QUEUES_APSD = 1,
864 IGNORE_TIM_SIMULATED_APSD = 2,
865 PROCESS_TIM_SIMULATED_APSD = 3,
866 } APSD_TIM_POLICY;
868 typedef PREPACK struct {
869 u16 psPollTimeout; /* msec */
870 u16 triggerTimeout; /* msec */
871 u32 apsdTimPolicy; /* TIM behavior with ques APSD enabled. Default is IGNORE_TIM_ALL_QUEUES_APSD */
872 u32 simulatedAPSDTimPolicy; /* TIM behavior with simulated APSD enabled. Default is PROCESS_TIM_SIMULATED_APSD */
873 } POSTPACK WMI_POWERSAVE_TIMERS_POLICY_CMD;
876 * WMI_SET_VOICE_PKT_SIZE_CMDID
878 typedef PREPACK struct {
879 u16 voicePktSize;
880 } POSTPACK WMI_SET_VOICE_PKT_SIZE_CMD;
883 * WMI_SET_MAX_SP_LEN_CMDID
885 typedef enum {
886 DELIVER_ALL_PKT = 0x0,
887 DELIVER_2_PKT = 0x1,
888 DELIVER_4_PKT = 0x2,
889 DELIVER_6_PKT = 0x3,
890 } APSD_SP_LEN_TYPE;
892 typedef PREPACK struct {
893 u8 maxSPLen;
894 } POSTPACK WMI_SET_MAX_SP_LEN_CMD;
897 * WMI_SET_DISC_TIMEOUT_CMDID
899 typedef PREPACK struct {
900 u8 disconnectTimeout; /* seconds */
901 } POSTPACK WMI_DISC_TIMEOUT_CMD;
903 typedef enum {
904 UPLINK_TRAFFIC = 0,
905 DNLINK_TRAFFIC = 1,
906 BIDIR_TRAFFIC = 2,
907 } DIR_TYPE;
909 typedef enum {
910 DISABLE_FOR_THIS_AC = 0,
911 ENABLE_FOR_THIS_AC = 1,
912 ENABLE_FOR_ALL_AC = 2,
913 } VOICEPS_CAP_TYPE;
915 typedef enum {
916 TRAFFIC_TYPE_APERIODIC = 0,
917 TRAFFIC_TYPE_PERIODIC = 1,
918 }TRAFFIC_TYPE;
921 * WMI_SYNCHRONIZE_CMDID
923 typedef PREPACK struct {
924 u8 dataSyncMap;
925 } POSTPACK WMI_SYNC_CMD;
928 * WMI_CREATE_PSTREAM_CMDID
930 typedef PREPACK struct {
931 u32 minServiceInt; /* in milli-sec */
932 u32 maxServiceInt; /* in milli-sec */
933 u32 inactivityInt; /* in milli-sec */
934 u32 suspensionInt; /* in milli-sec */
935 u32 serviceStartTime;
936 u32 minDataRate; /* in bps */
937 u32 meanDataRate; /* in bps */
938 u32 peakDataRate; /* in bps */
939 u32 maxBurstSize;
940 u32 delayBound;
941 u32 minPhyRate; /* in bps */
942 u32 sba;
943 u32 mediumTime;
944 u16 nominalMSDU; /* in octects */
945 u16 maxMSDU; /* in octects */
946 u8 trafficClass;
947 u8 trafficDirection; /* DIR_TYPE */
948 u8 rxQueueNum;
949 u8 trafficType; /* TRAFFIC_TYPE */
950 u8 voicePSCapability; /* VOICEPS_CAP_TYPE */
951 u8 tsid;
952 u8 userPriority; /* 802.1D user priority */
953 u8 nominalPHY; /* nominal phy rate */
954 } POSTPACK WMI_CREATE_PSTREAM_CMD;
957 * WMI_DELETE_PSTREAM_CMDID
959 typedef PREPACK struct {
960 u8 txQueueNumber;
961 u8 rxQueueNumber;
962 u8 trafficDirection;
963 u8 trafficClass;
964 u8 tsid;
965 } POSTPACK WMI_DELETE_PSTREAM_CMD;
968 * WMI_SET_CHANNEL_PARAMS_CMDID
970 typedef enum {
971 WMI_11A_MODE = 0x1,
972 WMI_11G_MODE = 0x2,
973 WMI_11AG_MODE = 0x3,
974 WMI_11B_MODE = 0x4,
975 WMI_11GONLY_MODE = 0x5,
976 } WMI_PHY_MODE;
978 #define WMI_MAX_CHANNELS 32
980 typedef PREPACK struct {
981 u8 reserved1;
982 u8 scanParam; /* set if enable scan */
983 u8 phyMode; /* see WMI_PHY_MODE */
984 u8 numChannels; /* how many channels follow */
985 u16 channelList[1]; /* channels in Mhz */
986 } POSTPACK WMI_CHANNEL_PARAMS_CMD;
990 * WMI_RSSI_THRESHOLD_PARAMS_CMDID
991 * Setting the polltime to 0 would disable polling.
992 * Threshold values are in the ascending order, and should agree to:
993 * (lowThreshold_lowerVal < lowThreshold_upperVal < highThreshold_lowerVal
994 * < highThreshold_upperVal)
997 typedef PREPACK struct WMI_RSSI_THRESHOLD_PARAMS{
998 u32 pollTime; /* Polling time as a factor of LI */
999 s16 thresholdAbove1_Val; /* lowest of upper */
1000 s16 thresholdAbove2_Val;
1001 s16 thresholdAbove3_Val;
1002 s16 thresholdAbove4_Val;
1003 s16 thresholdAbove5_Val;
1004 s16 thresholdAbove6_Val; /* highest of upper */
1005 s16 thresholdBelow1_Val; /* lowest of bellow */
1006 s16 thresholdBelow2_Val;
1007 s16 thresholdBelow3_Val;
1008 s16 thresholdBelow4_Val;
1009 s16 thresholdBelow5_Val;
1010 s16 thresholdBelow6_Val; /* highest of bellow */
1011 u8 weight; /* "alpha" */
1012 u8 reserved[3];
1013 } POSTPACK WMI_RSSI_THRESHOLD_PARAMS_CMD;
1016 * WMI_SNR_THRESHOLD_PARAMS_CMDID
1017 * Setting the polltime to 0 would disable polling.
1020 typedef PREPACK struct WMI_SNR_THRESHOLD_PARAMS{
1021 u32 pollTime; /* Polling time as a factor of LI */
1022 u8 weight; /* "alpha" */
1023 u8 thresholdAbove1_Val; /* lowest of uppper*/
1024 u8 thresholdAbove2_Val;
1025 u8 thresholdAbove3_Val;
1026 u8 thresholdAbove4_Val; /* highest of upper */
1027 u8 thresholdBelow1_Val; /* lowest of bellow */
1028 u8 thresholdBelow2_Val;
1029 u8 thresholdBelow3_Val;
1030 u8 thresholdBelow4_Val; /* highest of bellow */
1031 u8 reserved[3];
1032 } POSTPACK WMI_SNR_THRESHOLD_PARAMS_CMD;
1035 * WMI_LQ_THRESHOLD_PARAMS_CMDID
1037 typedef PREPACK struct WMI_LQ_THRESHOLD_PARAMS {
1038 u8 enable;
1039 u8 thresholdAbove1_Val;
1040 u8 thresholdAbove2_Val;
1041 u8 thresholdAbove3_Val;
1042 u8 thresholdAbove4_Val;
1043 u8 thresholdBelow1_Val;
1044 u8 thresholdBelow2_Val;
1045 u8 thresholdBelow3_Val;
1046 u8 thresholdBelow4_Val;
1047 u8 reserved[3];
1048 } POSTPACK WMI_LQ_THRESHOLD_PARAMS_CMD;
1050 typedef enum {
1051 WMI_LPREAMBLE_DISABLED = 0,
1052 WMI_LPREAMBLE_ENABLED
1053 } WMI_LPREAMBLE_STATUS;
1055 typedef enum {
1056 WMI_IGNORE_BARKER_IN_ERP = 0,
1057 WMI_DONOT_IGNORE_BARKER_IN_ERP
1058 } WMI_PREAMBLE_POLICY;
1060 typedef PREPACK struct {
1061 u8 status;
1062 u8 preamblePolicy;
1063 }POSTPACK WMI_SET_LPREAMBLE_CMD;
1065 typedef PREPACK struct {
1066 u16 threshold;
1067 }POSTPACK WMI_SET_RTS_CMD;
1070 * WMI_TARGET_ERROR_REPORT_BITMASK_CMDID
1071 * Sets the error reporting event bitmask in target. Target clears it
1072 * upon an error. Subsequent errors are counted, but not reported
1073 * via event, unless the bitmask is set again.
1075 typedef PREPACK struct {
1076 u32 bitmask;
1077 } POSTPACK WMI_TARGET_ERROR_REPORT_BITMASK;
1080 * WMI_SET_TX_PWR_CMDID
1082 typedef PREPACK struct {
1083 u8 dbM; /* in dbM units */
1084 } POSTPACK WMI_SET_TX_PWR_CMD, WMI_TX_PWR_REPLY;
1087 * WMI_SET_ASSOC_INFO_CMDID
1089 * A maximum of 2 private IEs can be sent in the [Re]Assoc request.
1090 * A 3rd one, the CCX version IE can also be set from the host.
1092 #define WMI_MAX_ASSOC_INFO_TYPE 2
1093 #define WMI_CCX_VER_IE 2 /* ieType to set CCX Version IE */
1095 #define WMI_MAX_ASSOC_INFO_LEN 240
1097 typedef PREPACK struct {
1098 u8 ieType;
1099 u8 bufferSize;
1100 u8 assocInfo[1]; /* up to WMI_MAX_ASSOC_INFO_LEN */
1101 } POSTPACK WMI_SET_ASSOC_INFO_CMD;
1105 * WMI_GET_TX_PWR_CMDID does not take any parameters
1109 * WMI_ADD_BAD_AP_CMDID
1111 #define WMI_MAX_BAD_AP_INDEX 1
1113 typedef PREPACK struct {
1114 u8 badApIndex; /* 0 to WMI_MAX_BAD_AP_INDEX */
1115 u8 bssid[ATH_MAC_LEN];
1116 } POSTPACK WMI_ADD_BAD_AP_CMD;
1119 * WMI_DELETE_BAD_AP_CMDID
1121 typedef PREPACK struct {
1122 u8 badApIndex; /* 0 to WMI_MAX_BAD_AP_INDEX */
1123 } POSTPACK WMI_DELETE_BAD_AP_CMD;
1126 * WMI_SET_ACCESS_PARAMS_CMDID
1128 #define WMI_DEFAULT_TXOP_ACPARAM 0 /* implies one MSDU */
1129 #define WMI_DEFAULT_ECWMIN_ACPARAM 4 /* corresponds to CWmin of 15 */
1130 #define WMI_DEFAULT_ECWMAX_ACPARAM 10 /* corresponds to CWmax of 1023 */
1131 #define WMI_MAX_CW_ACPARAM 15 /* maximum eCWmin or eCWmax */
1132 #define WMI_DEFAULT_AIFSN_ACPARAM 2
1133 #define WMI_MAX_AIFSN_ACPARAM 15
1134 typedef PREPACK struct {
1135 u16 txop; /* in units of 32 usec */
1136 u8 eCWmin;
1137 u8 eCWmax;
1138 u8 aifsn;
1139 u8 ac;
1140 } POSTPACK WMI_SET_ACCESS_PARAMS_CMD;
1144 * WMI_SET_RETRY_LIMITS_CMDID
1146 * This command is used to customize the number of retries the
1147 * wlan device will perform on a given frame.
1149 #define WMI_MIN_RETRIES 2
1150 #define WMI_MAX_RETRIES 13
1151 typedef enum {
1152 MGMT_FRAMETYPE = 0,
1153 CONTROL_FRAMETYPE = 1,
1154 DATA_FRAMETYPE = 2
1155 } WMI_FRAMETYPE;
1157 typedef PREPACK struct {
1158 u8 frameType; /* WMI_FRAMETYPE */
1159 u8 trafficClass; /* applies only to DATA_FRAMETYPE */
1160 u8 maxRetries;
1161 u8 enableNotify;
1162 } POSTPACK WMI_SET_RETRY_LIMITS_CMD;
1165 * WMI_SET_ROAM_CTRL_CMDID
1167 * This command is used to influence the Roaming behaviour
1168 * Set the host biases of the BSSs before setting the roam mode as bias
1169 * based.
1173 * Different types of Roam Control
1176 typedef enum {
1177 WMI_FORCE_ROAM = 1, /* Roam to the specified BSSID */
1178 WMI_SET_ROAM_MODE = 2, /* default ,progd bias, no roam */
1179 WMI_SET_HOST_BIAS = 3, /* Set the Host Bias */
1180 WMI_SET_LOWRSSI_SCAN_PARAMS = 4, /* Set lowrssi Scan parameters */
1181 } WMI_ROAM_CTRL_TYPE;
1183 #define WMI_MIN_ROAM_CTRL_TYPE WMI_FORCE_ROAM
1184 #define WMI_MAX_ROAM_CTRL_TYPE WMI_SET_LOWRSSI_SCAN_PARAMS
1187 * ROAM MODES
1190 typedef enum {
1191 WMI_DEFAULT_ROAM_MODE = 1, /* RSSI based ROAM */
1192 WMI_HOST_BIAS_ROAM_MODE = 2, /* HOST BIAS based ROAM */
1193 WMI_LOCK_BSS_MODE = 3 /* Lock to the Current BSS - no Roam */
1194 } WMI_ROAM_MODE;
1197 * BSS HOST BIAS INFO
1200 typedef PREPACK struct {
1201 u8 bssid[ATH_MAC_LEN];
1202 s8 bias;
1203 } POSTPACK WMI_BSS_BIAS;
1205 typedef PREPACK struct {
1206 u8 numBss;
1207 WMI_BSS_BIAS bssBias[1];
1208 } POSTPACK WMI_BSS_BIAS_INFO;
1210 typedef PREPACK struct WMI_LOWRSSI_SCAN_PARAMS {
1211 u16 lowrssi_scan_period;
1212 s16 lowrssi_scan_threshold;
1213 s16 lowrssi_roam_threshold;
1214 u8 roam_rssi_floor;
1215 u8 reserved[1]; /* For alignment */
1216 } POSTPACK WMI_LOWRSSI_SCAN_PARAMS;
1218 typedef PREPACK struct {
1219 PREPACK union {
1220 u8 bssid[ATH_MAC_LEN]; /* WMI_FORCE_ROAM */
1221 u8 roamMode; /* WMI_SET_ROAM_MODE */
1222 WMI_BSS_BIAS_INFO bssBiasInfo; /* WMI_SET_HOST_BIAS */
1223 WMI_LOWRSSI_SCAN_PARAMS lrScanParams;
1224 } POSTPACK info;
1225 u8 roamCtrlType ;
1226 } POSTPACK WMI_SET_ROAM_CTRL_CMD;
1229 * WMI_SET_BT_WLAN_CONN_PRECEDENCE_CMDID
1231 typedef enum {
1232 BT_WLAN_CONN_PRECDENCE_WLAN=0, /* Default */
1233 BT_WLAN_CONN_PRECDENCE_PAL,
1234 } BT_WLAN_CONN_PRECEDENCE;
1236 typedef PREPACK struct {
1237 u8 precedence;
1238 } POSTPACK WMI_SET_BT_WLAN_CONN_PRECEDENCE;
1241 * WMI_ENABLE_RM_CMDID
1243 typedef PREPACK struct {
1244 u32 enable_radio_measurements;
1245 } POSTPACK WMI_ENABLE_RM_CMD;
1248 * WMI_SET_MAX_OFFHOME_DURATION_CMDID
1250 typedef PREPACK struct {
1251 u8 max_offhome_duration;
1252 } POSTPACK WMI_SET_MAX_OFFHOME_DURATION_CMD;
1254 typedef PREPACK struct {
1255 u32 frequency;
1256 u8 threshold;
1257 } POSTPACK WMI_SET_HB_CHALLENGE_RESP_PARAMS_CMD;
1258 /*---------------------- BTCOEX RELATED -------------------------------------*/
1259 /*----------------------COMMON to AR6002 and AR6003 -------------------------*/
1260 typedef enum {
1261 BT_STREAM_UNDEF = 0,
1262 BT_STREAM_SCO, /* SCO stream */
1263 BT_STREAM_A2DP, /* A2DP stream */
1264 BT_STREAM_SCAN, /* BT Discovery or Page */
1265 BT_STREAM_ESCO,
1266 BT_STREAM_MAX
1267 } BT_STREAM_TYPE;
1269 typedef enum {
1270 BT_PARAM_SCO_PSPOLL_LATENCY_ONE_FOURTH =1,
1271 BT_PARAM_SCO_PSPOLL_LATENCY_HALF,
1272 BT_PARAM_SCO_PSPOLL_LATENCY_THREE_FOURTH,
1273 } BT_PARAMS_SCO_PSPOLL_LATENCY;
1275 typedef enum {
1276 BT_PARAMS_SCO_STOMP_SCO_NEVER =1,
1277 BT_PARAMS_SCO_STOMP_SCO_ALWAYS,
1278 BT_PARAMS_SCO_STOMP_SCO_IN_LOWRSSI,
1279 } BT_PARAMS_SCO_STOMP_RULES;
1281 typedef enum {
1282 BT_STATUS_UNDEF = 0,
1283 BT_STATUS_ON,
1284 BT_STATUS_OFF,
1285 BT_STATUS_MAX
1286 } BT_STREAM_STATUS;
1288 typedef PREPACK struct {
1289 u8 streamType;
1290 u8 status;
1291 } POSTPACK WMI_SET_BT_STATUS_CMD;
1293 typedef enum {
1294 BT_ANT_TYPE_UNDEF=0,
1295 BT_ANT_TYPE_DUAL,
1296 BT_ANT_TYPE_SPLITTER,
1297 BT_ANT_TYPE_SWITCH,
1298 BT_ANT_TYPE_HIGH_ISO_DUAL
1299 } BT_ANT_FRONTEND_CONFIG;
1301 typedef enum {
1302 BT_COLOCATED_DEV_BTS4020=0,
1303 BT_COLCATED_DEV_CSR ,
1304 BT_COLOCATED_DEV_VALKYRIE
1305 } BT_COLOCATED_DEV_TYPE;
1307 /*********************** Applicable to AR6002 ONLY ******************************/
1309 typedef enum {
1310 BT_PARAM_SCO = 1, /* SCO stream parameters */
1311 BT_PARAM_A2DP ,
1312 BT_PARAM_ANTENNA_CONFIG,
1313 BT_PARAM_COLOCATED_BT_DEVICE,
1314 BT_PARAM_ACLCOEX,
1315 BT_PARAM_11A_SEPARATE_ANT,
1316 BT_PARAM_MAX
1317 } BT_PARAM_TYPE;
1320 #define BT_SCO_ALLOW_CLOSE_RANGE_OPT (1 << 0)
1321 #define BT_SCO_FORCE_AWAKE_OPT (1 << 1)
1322 #define BT_SCO_SET_RSSI_OVERRIDE(flags) ((flags) |= (1 << 2))
1323 #define BT_SCO_GET_RSSI_OVERRIDE(flags) (((flags) >> 2) & 0x1)
1324 #define BT_SCO_SET_RTS_OVERRIDE(flags) ((flags) |= (1 << 3))
1325 #define BT_SCO_GET_RTS_OVERRIDE(flags) (((flags) >> 3) & 0x1)
1326 #define BT_SCO_GET_MIN_LOW_RATE_CNT(flags) (((flags) >> 8) & 0xFF)
1327 #define BT_SCO_GET_MAX_LOW_RATE_CNT(flags) (((flags) >> 16) & 0xFF)
1328 #define BT_SCO_SET_MIN_LOW_RATE_CNT(flags,val) (flags) |= (((val) & 0xFF) << 8)
1329 #define BT_SCO_SET_MAX_LOW_RATE_CNT(flags,val) (flags) |= (((val) & 0xFF) << 16)
1331 typedef PREPACK struct {
1332 u32 numScoCyclesForceTrigger; /* Number SCO cycles after which
1333 force a pspoll. default = 10 */
1334 u32 dataResponseTimeout; /* Timeout Waiting for Downlink pkt
1335 in response for ps-poll,
1336 default = 10 msecs */
1337 u32 stompScoRules;
1338 u32 scoOptFlags; /* SCO Options Flags :
1339 bits: meaning:
1340 0 Allow Close Range Optimization
1341 1 Force awake during close range
1342 2 If set use host supplied RSSI for OPT
1343 3 If set use host supplied RTS COUNT for OPT
1344 4..7 Unused
1345 8..15 Low Data Rate Min Cnt
1346 16..23 Low Data Rate Max Cnt
1349 u8 stompDutyCyleVal; /* Sco cycles to limit ps-poll queuing
1350 if stomped */
1351 u8 stompDutyCyleMaxVal; /*firm ware increases stomp duty cycle
1352 gradually uptill this value on need basis*/
1353 u8 psPollLatencyFraction; /* Fraction of idle
1354 period, within which
1355 additional ps-polls
1356 can be queued */
1357 u8 noSCOSlots; /* Number of SCO Tx/Rx slots.
1358 HVx, EV3, 2EV3 = 2 */
1359 u8 noIdleSlots; /* Number of Bluetooth idle slots between
1360 consecutive SCO Tx/Rx slots
1361 HVx, EV3 = 4
1362 2EV3 = 10 */
1363 u8 scoOptOffRssi;/*RSSI value below which we go to ps poll*/
1364 u8 scoOptOnRssi; /*RSSI value above which we reenter opt mode*/
1365 u8 scoOptRtsCount;
1366 } POSTPACK BT_PARAMS_SCO;
1368 #define BT_A2DP_ALLOW_CLOSE_RANGE_OPT (1 << 0)
1369 #define BT_A2DP_FORCE_AWAKE_OPT (1 << 1)
1370 #define BT_A2DP_SET_RSSI_OVERRIDE(flags) ((flags) |= (1 << 2))
1371 #define BT_A2DP_GET_RSSI_OVERRIDE(flags) (((flags) >> 2) & 0x1)
1372 #define BT_A2DP_SET_RTS_OVERRIDE(flags) ((flags) |= (1 << 3))
1373 #define BT_A2DP_GET_RTS_OVERRIDE(flags) (((flags) >> 3) & 0x1)
1374 #define BT_A2DP_GET_MIN_LOW_RATE_CNT(flags) (((flags) >> 8) & 0xFF)
1375 #define BT_A2DP_GET_MAX_LOW_RATE_CNT(flags) (((flags) >> 16) & 0xFF)
1376 #define BT_A2DP_SET_MIN_LOW_RATE_CNT(flags,val) (flags) |= (((val) & 0xFF) << 8)
1377 #define BT_A2DP_SET_MAX_LOW_RATE_CNT(flags,val) (flags) |= (((val) & 0xFF) << 16)
1379 typedef PREPACK struct {
1380 u32 a2dpWlanUsageLimit; /* MAX time firmware uses the medium for
1381 wlan, after it identifies the idle time
1382 default (30 msecs) */
1383 u32 a2dpBurstCntMin; /* Minimum number of bluetooth data frames
1384 to replenish Wlan Usage limit (default 3) */
1385 u32 a2dpDataRespTimeout;
1386 u32 a2dpOptFlags; /* A2DP Option flags:
1387 bits: meaning:
1388 0 Allow Close Range Optimization
1389 1 Force awake during close range
1390 2 If set use host supplied RSSI for OPT
1391 3 If set use host supplied RTS COUNT for OPT
1392 4..7 Unused
1393 8..15 Low Data Rate Min Cnt
1394 16..23 Low Data Rate Max Cnt
1396 u8 isCoLocatedBtRoleMaster;
1397 u8 a2dpOptOffRssi;/*RSSI value below which we go to ps poll*/
1398 u8 a2dpOptOnRssi; /*RSSI value above which we reenter opt mode*/
1399 u8 a2dpOptRtsCount;
1400 }POSTPACK BT_PARAMS_A2DP;
1402 /* During BT ftp/ BT OPP or any another data based acl profile on bluetooth
1403 (non a2dp).*/
1404 typedef PREPACK struct {
1405 u32 aclWlanMediumUsageTime; /* Wlan usage time during Acl (non-a2dp)
1406 coexistence (default 30 msecs) */
1407 u32 aclBtMediumUsageTime; /* Bt usage time during acl coexistence
1408 (default 30 msecs)*/
1409 u32 aclDataRespTimeout;
1410 u32 aclDetectTimeout; /* ACL coexistence enabled if we get
1411 10 Pkts in X msec(default 100 msecs) */
1412 u32 aclmaxPktCnt; /* No of ACL pkts to receive before
1413 enabling ACL coex */
1415 }POSTPACK BT_PARAMS_ACLCOEX;
1417 typedef PREPACK struct {
1418 PREPACK union {
1419 BT_PARAMS_SCO scoParams;
1420 BT_PARAMS_A2DP a2dpParams;
1421 BT_PARAMS_ACLCOEX aclCoexParams;
1422 u8 antType; /* 0 -Disabled (default)
1423 1 - BT_ANT_TYPE_DUAL
1424 2 - BT_ANT_TYPE_SPLITTER
1425 3 - BT_ANT_TYPE_SWITCH */
1426 u8 coLocatedBtDev; /* 0 - BT_COLOCATED_DEV_BTS4020 (default)
1427 1 - BT_COLCATED_DEV_CSR
1428 2 - BT_COLOCATED_DEV_VALKYRIe
1430 } POSTPACK info;
1431 u8 paramType ;
1432 } POSTPACK WMI_SET_BT_PARAMS_CMD;
1434 /************************ END AR6002 BTCOEX *******************************/
1435 /*-----------------------AR6003 BTCOEX -----------------------------------*/
1437 /* ---------------WMI_SET_BTCOEX_FE_ANT_CMDID --------------------------*/
1438 /* Indicates front end antenna configuration. This command needs to be issued
1439 * right after initialization and after WMI_SET_BTCOEX_COLOCATED_BT_DEV_CMDID.
1440 * AR6003 enables coexistence and antenna switching based on the configuration.
1442 typedef enum {
1443 WMI_BTCOEX_NOT_ENABLED = 0,
1444 WMI_BTCOEX_FE_ANT_SINGLE =1,
1445 WMI_BTCOEX_FE_ANT_DUAL=2,
1446 WMI_BTCOEX_FE_ANT_DUAL_HIGH_ISO=3,
1447 WMI_BTCOEX_FE_ANT_TYPE_MAX
1448 }WMI_BTCOEX_FE_ANT_TYPE;
1450 typedef PREPACK struct {
1451 u8 btcoexFeAntType; /* 1 - WMI_BTCOEX_FE_ANT_SINGLE for single antenna front end
1452 2 - WMI_BTCOEX_FE_ANT_DUAL for dual antenna front end
1453 (for isolations less 35dB, for higher isolation there
1454 is not need to pass this command).
1455 (not implemented)
1457 }POSTPACK WMI_SET_BTCOEX_FE_ANT_CMD;
1459 /* -------------WMI_SET_BTCOEX_COLOCATED_BT_DEV_CMDID ----------------*/
1460 /* Indicate the bluetooth chip to the firmware. Firmware can have different algorithm based
1461 * bluetooth chip type.Based on bluetooth device, different coexistence protocol would be used.
1463 typedef PREPACK struct {
1464 u8 btcoexCoLocatedBTdev; /*1 - Qcom BT (3 -wire PTA)
1465 2 - CSR BT (3 wire PTA)
1466 3 - Atheros 3001 BT (3 wire PTA)
1467 4 - STE bluetooth (4-wire ePTA)
1468 5 - Atheros 3002 BT (4-wire MCI)
1469 defaults= 3 (Atheros 3001 BT )
1471 }POSTPACK WMI_SET_BTCOEX_COLOCATED_BT_DEV_CMD;
1473 /* -------------WMI_SET_BTCOEX_BTINQUIRY_PAGE_CONFIG_CMDID ------------*/
1474 /* Configuration parameters during bluetooth inquiry and page. Page configuration
1475 * is applicable only on interfaces which can distinguish page (applicable only for ePTA -
1476 * STE bluetooth).
1477 * Bluetooth inquiry start and end is indicated via WMI_SET_BTCOEX_BT_OPERATING_STATUS_CMDID.
1478 * During this the station will be power-save mode.
1480 typedef PREPACK struct {
1481 u32 btInquiryDataFetchFrequency;/* The frequency of querying the AP for data
1482 (via pspoll) is configured by this parameter.
1483 "default = 10 ms" */
1485 u32 protectBmissDurPostBtInquiry;/* The firmware will continue to be in inquiry state
1486 for configured duration, after inquiry completion
1487 . This is to ensure other bluetooth transactions
1488 (RDP, SDP profiles, link key exchange ...etc)
1489 goes through smoothly without wifi stomping.
1490 default = 10 secs*/
1492 u32 maxpageStomp; /*Applicable only for STE-BT interface. Currently not
1493 used */
1494 u32 btInquiryPageFlag; /* Not used */
1495 }POSTPACK WMI_SET_BTCOEX_BTINQUIRY_PAGE_CONFIG_CMD;
1497 /*---------------------WMI_SET_BTCOEX_SCO_CONFIG_CMDID ---------------*/
1498 /* Configure SCO parameters. These parameters would be used whenever firmware is indicated
1499 * of (e)SCO profile on bluetooth ( via WMI_SET_BTCOEX_BT_OPERATING_STATUS_CMDID).
1500 * Configration of BTCOEX_SCO_CONFIG data structure are common configuration and applies
1501 * ps-poll mode and opt mode.
1502 * Ps-poll Mode - Station is in power-save and retrieves downlink data between sco gaps.
1503 * Opt Mode - station is in awake state and access point can send data to station any time.
1504 * BTCOEX_PSPOLLMODE_SCO_CONFIG - Configuration applied only during ps-poll mode.
1505 * BTCOEX_OPTMODE_SCO_CONFIG - Configuration applied only during opt mode.
1507 #define WMI_SCO_CONFIG_FLAG_ALLOW_OPTIMIZATION (1 << 0)
1508 #define WMI_SCO_CONFIG_FLAG_IS_EDR_CAPABLE (1 << 1)
1509 #define WMI_SCO_CONFIG_FLAG_IS_BT_MASTER (1 << 2)
1510 #define WMI_SCO_CONFIG_FLAG_FW_DETECT_OF_PER (1 << 3)
1511 typedef PREPACK struct {
1512 u32 scoSlots; /* Number of SCO Tx/Rx slots.
1513 HVx, EV3, 2EV3 = 2 */
1514 u32 scoIdleSlots; /* Number of Bluetooth idle slots between
1515 consecutive SCO Tx/Rx slots
1516 HVx, EV3 = 4
1517 2EV3 = 10
1519 u32 scoFlags; /* SCO Options Flags :
1520 bits: meaning:
1521 0 Allow Close Range Optimization
1522 1 Is EDR capable or Not
1523 2 IS Co-located Bt role Master
1524 3 Firmware determines the periodicity of SCO.
1527 u32 linkId; /* applicable to STE-BT - not used */
1528 }POSTPACK BTCOEX_SCO_CONFIG;
1530 typedef PREPACK struct {
1531 u32 scoCyclesForceTrigger; /* Number SCO cycles after which
1532 force a pspoll. default = 10 */
1533 u32 scoDataResponseTimeout; /* Timeout Waiting for Downlink pkt
1534 in response for ps-poll,
1535 default = 20 msecs */
1537 u32 scoStompDutyCyleVal; /* not implemented */
1539 u32 scoStompDutyCyleMaxVal; /*Not implemented */
1541 u32 scoPsPollLatencyFraction; /* Fraction of idle
1542 period, within which
1543 additional ps-polls can be queued
1544 1 - 1/4 of idle duration
1545 2 - 1/2 of idle duration
1546 3 - 3/4 of idle duration
1547 default =2 (1/2)
1549 }POSTPACK BTCOEX_PSPOLLMODE_SCO_CONFIG;
1551 typedef PREPACK struct {
1552 u32 scoStompCntIn100ms;/*max number of SCO stomp in 100ms allowed in
1553 opt mode. If exceeds the configured value,
1554 switch to ps-poll mode
1555 default = 3 */
1557 u32 scoContStompMax; /* max number of continous stomp allowed in opt mode.
1558 if excedded switch to pspoll mode
1559 default = 3 */
1561 u32 scoMinlowRateMbps; /* Low rate threshold */
1563 u32 scoLowRateCnt; /* number of low rate pkts (< scoMinlowRateMbps) allowed in 100 ms.
1564 If exceeded switch/stay to ps-poll mode, lower stay in opt mode.
1565 default = 36
1568 u32 scoHighPktRatio; /*(Total Rx pkts in 100 ms + 1)/
1569 ((Total tx pkts in 100 ms - No of high rate pkts in 100 ms) + 1) in 100 ms,
1570 if exceeded switch/stay in opt mode and if lower switch/stay in pspoll mode.
1571 default = 5 (80% of high rates)
1574 u32 scoMaxAggrSize; /* Max number of Rx subframes allowed in this mode. (Firmware re-negogiates
1575 max number of aggregates if it was negogiated to higher value
1576 default = 1
1577 Recommended value Basic rate headsets = 1, EDR (2-EV3) =4.
1579 }POSTPACK BTCOEX_OPTMODE_SCO_CONFIG;
1581 typedef PREPACK struct {
1582 u32 scanInterval;
1583 u32 maxScanStompCnt;
1584 }POSTPACK BTCOEX_WLANSCAN_SCO_CONFIG;
1586 typedef PREPACK struct {
1587 BTCOEX_SCO_CONFIG scoConfig;
1588 BTCOEX_PSPOLLMODE_SCO_CONFIG scoPspollConfig;
1589 BTCOEX_OPTMODE_SCO_CONFIG scoOptModeConfig;
1590 BTCOEX_WLANSCAN_SCO_CONFIG scoWlanScanConfig;
1591 }POSTPACK WMI_SET_BTCOEX_SCO_CONFIG_CMD;
1593 /* ------------------WMI_SET_BTCOEX_A2DP_CONFIG_CMDID -------------------*/
1594 /* Configure A2DP profile parameters. These parameters would be used whenver firmware is indicated
1595 * of A2DP profile on bluetooth ( via WMI_SET_BTCOEX_BT_OPERATING_STATUS_CMDID).
1596 * Configuration of BTCOEX_A2DP_CONFIG data structure are common configuration and applies to
1597 * ps-poll mode and opt mode.
1598 * Ps-poll Mode - Station is in power-save and retrieves downlink data between a2dp data bursts.
1599 * Opt Mode - station is in power save during a2dp bursts and awake in the gaps.
1600 * BTCOEX_PSPOLLMODE_A2DP_CONFIG - Configuration applied only during ps-poll mode.
1601 * BTCOEX_OPTMODE_A2DP_CONFIG - Configuration applied only during opt mode.
1604 #define WMI_A2DP_CONFIG_FLAG_ALLOW_OPTIMIZATION (1 << 0)
1605 #define WMI_A2DP_CONFIG_FLAG_IS_EDR_CAPABLE (1 << 1)
1606 #define WMI_A2DP_CONFIG_FLAG_IS_BT_ROLE_MASTER (1 << 2)
1607 #define WMI_A2DP_CONFIG_FLAG_IS_A2DP_HIGH_PRI (1 << 3)
1608 #define WMI_A2DP_CONFIG_FLAG_FIND_BT_ROLE (1 << 4)
1610 typedef PREPACK struct {
1611 u32 a2dpFlags; /* A2DP Option flags:
1612 bits: meaning:
1613 0 Allow Close Range Optimization
1614 1 IS EDR capable
1615 2 IS Co-located Bt role Master
1616 3 a2dp traffic is high priority
1617 4 Fw detect the role of bluetooth.
1619 u32 linkId; /* Applicable only to STE-BT - not used */
1621 }POSTPACK BTCOEX_A2DP_CONFIG;
1623 typedef PREPACK struct {
1624 u32 a2dpWlanMaxDur; /* MAX time firmware uses the medium for
1625 wlan, after it identifies the idle time
1626 default (30 msecs) */
1628 u32 a2dpMinBurstCnt; /* Minimum number of bluetooth data frames
1629 to replenish Wlan Usage limit (default 3) */
1631 u32 a2dpDataRespTimeout; /* Max duration firmware waits for downlink
1632 by stomping on bluetooth
1633 after ps-poll is acknowledged.
1634 default = 20 ms
1636 }POSTPACK BTCOEX_PSPOLLMODE_A2DP_CONFIG;
1638 typedef PREPACK struct {
1639 u32 a2dpMinlowRateMbps; /* Low rate threshold */
1641 u32 a2dpLowRateCnt; /* number of low rate pkts (< a2dpMinlowRateMbps) allowed in 100 ms.
1642 If exceeded switch/stay to ps-poll mode, lower stay in opt mode.
1643 default = 36
1646 u32 a2dpHighPktRatio; /*(Total Rx pkts in 100 ms + 1)/
1647 ((Total tx pkts in 100 ms - No of high rate pkts in 100 ms) + 1) in 100 ms,
1648 if exceeded switch/stay in opt mode and if lower switch/stay in pspoll mode.
1649 default = 5 (80% of high rates)
1652 u32 a2dpMaxAggrSize; /* Max number of Rx subframes allowed in this mode. (Firmware re-negogiates
1653 max number of aggregates if it was negogiated to higher value
1654 default = 1
1655 Recommended value Basic rate headsets = 1, EDR (2-EV3) =8.
1657 u32 a2dpPktStompCnt; /*number of a2dp pkts that can be stomped per burst.
1658 default = 6*/
1660 }POSTPACK BTCOEX_OPTMODE_A2DP_CONFIG;
1662 typedef PREPACK struct {
1663 BTCOEX_A2DP_CONFIG a2dpConfig;
1664 BTCOEX_PSPOLLMODE_A2DP_CONFIG a2dppspollConfig;
1665 BTCOEX_OPTMODE_A2DP_CONFIG a2dpOptConfig;
1666 }POSTPACK WMI_SET_BTCOEX_A2DP_CONFIG_CMD;
1668 /*------------ WMI_SET_BTCOEX_ACLCOEX_CONFIG_CMDID---------------------*/
1669 /* Configure non-A2dp ACL profile parameters.The starts of ACL profile can either be
1670 * indicated via WMI_SET_BTCOEX_BT_OPERATING_STATUS_CMDID orenabled via firmware detection
1671 * which is configured via "aclCoexFlags".
1672 * Configration of BTCOEX_ACLCOEX_CONFIG data structure are common configuration and applies
1673 * ps-poll mode and opt mode.
1674 * Ps-poll Mode - Station is in power-save and retrieves downlink data during wlan medium.
1675 * Opt Mode - station is in power save during bluetooth medium time and awake during wlan duration.
1676 * (Not implemented yet)
1678 * BTCOEX_PSPOLLMODE_ACLCOEX_CONFIG - Configuration applied only during ps-poll mode.
1679 * BTCOEX_OPTMODE_ACLCOEX_CONFIG - Configuration applied only during opt mode.
1682 #define WMI_ACLCOEX_FLAGS_ALLOW_OPTIMIZATION (1 << 0)
1683 #define WMI_ACLCOEX_FLAGS_DISABLE_FW_DETECTION (1 << 1)
1685 typedef PREPACK struct {
1686 u32 aclWlanMediumDur; /* Wlan usage time during Acl (non-a2dp)
1687 coexistence (default 30 msecs)
1690 u32 aclBtMediumDur; /* Bt usage time during acl coexistence
1691 (default 30 msecs)
1694 u32 aclDetectTimeout; /* BT activity observation time limit.
1695 In this time duration, number of bt pkts are counted.
1696 If the Cnt reaches "aclPktCntLowerLimit" value
1697 for "aclIterToEnableCoex" iteration continuously,
1698 firmware gets into ACL coexistence mode.
1699 Similarly, if bt traffic count during ACL coexistence
1700 has not reached "aclPktCntLowerLimit" continuously
1701 for "aclIterToEnableCoex", then ACL coexistence is
1702 disabled.
1703 -default 100 msecs
1706 u32 aclPktCntLowerLimit; /* Acl Pkt Cnt to be received in duration of
1707 "aclDetectTimeout" for
1708 "aclIterForEnDis" times to enabling ACL coex.
1709 Similar logic is used to disable acl coexistence.
1710 (If "aclPktCntLowerLimit" cnt of acl pkts
1711 are not seen by the for "aclIterForEnDis"
1712 then acl coexistence is disabled).
1713 default = 10
1716 u32 aclIterForEnDis; /* number of Iteration of "aclPktCntLowerLimit" for Enabling and
1717 Disabling Acl Coexistence.
1718 default = 3
1721 u32 aclPktCntUpperLimit; /* This is upperBound limit, if there is more than
1722 "aclPktCntUpperLimit" seen in "aclDetectTimeout",
1723 ACL coexistence is enabled right away.
1724 - default 15*/
1726 u32 aclCoexFlags; /* A2DP Option flags:
1727 bits: meaning:
1728 0 Allow Close Range Optimization
1729 1 disable Firmware detection
1730 (Currently supported configuration is aclCoexFlags =0)
1732 u32 linkId; /* Applicable only for STE-BT - not used */
1734 }POSTPACK BTCOEX_ACLCOEX_CONFIG;
1736 typedef PREPACK struct {
1737 u32 aclDataRespTimeout; /* Max duration firmware waits for downlink
1738 by stomping on bluetooth
1739 after ps-poll is acknowledged.
1740 default = 20 ms */
1742 }POSTPACK BTCOEX_PSPOLLMODE_ACLCOEX_CONFIG;
1745 /* Not implemented yet*/
1746 typedef PREPACK struct {
1747 u32 aclCoexMinlowRateMbps;
1748 u32 aclCoexLowRateCnt;
1749 u32 aclCoexHighPktRatio;
1750 u32 aclCoexMaxAggrSize;
1751 u32 aclPktStompCnt;
1752 }POSTPACK BTCOEX_OPTMODE_ACLCOEX_CONFIG;
1754 typedef PREPACK struct {
1755 BTCOEX_ACLCOEX_CONFIG aclCoexConfig;
1756 BTCOEX_PSPOLLMODE_ACLCOEX_CONFIG aclCoexPspollConfig;
1757 BTCOEX_OPTMODE_ACLCOEX_CONFIG aclCoexOptConfig;
1758 }POSTPACK WMI_SET_BTCOEX_ACLCOEX_CONFIG_CMD;
1760 /* -----------WMI_SET_BTCOEX_BT_OPERATING_STATUS_CMDID ------------------*/
1761 typedef enum {
1762 WMI_BTCOEX_BT_PROFILE_SCO =1,
1763 WMI_BTCOEX_BT_PROFILE_A2DP,
1764 WMI_BTCOEX_BT_PROFILE_INQUIRY_PAGE,
1765 WMI_BTCOEX_BT_PROFILE_ACLCOEX,
1766 }WMI_BTCOEX_BT_PROFILE;
1768 typedef PREPACK struct {
1769 u32 btProfileType;
1770 u32 btOperatingStatus;
1771 u32 btLinkId;
1772 }WMI_SET_BTCOEX_BT_OPERATING_STATUS_CMD;
1774 /*--------------------- WMI_SET_BTCOEX_DEBUG_CMDID ---------------------*/
1775 /* Used for firmware development and debugging */
1776 typedef PREPACK struct {
1777 u32 btcoexDbgParam1;
1778 u32 btcoexDbgParam2;
1779 u32 btcoexDbgParam3;
1780 u32 btcoexDbgParam4;
1781 u32 btcoexDbgParam5;
1782 }WMI_SET_BTCOEX_DEBUG_CMD;
1784 /*---------------------WMI_GET_BTCOEX_CONFIG_CMDID --------------------- */
1785 /* Command to firmware to get configuration parameters of the bt profile
1786 * reported via WMI_BTCOEX_CONFIG_EVENTID */
1787 typedef PREPACK struct {
1788 u32 btProfileType; /* 1 - SCO
1789 2 - A2DP
1790 3 - INQUIRY_PAGE
1791 4 - ACLCOEX
1793 u32 linkId; /* not used */
1794 }WMI_GET_BTCOEX_CONFIG_CMD;
1796 /*------------------WMI_REPORT_BTCOEX_CONFIG_EVENTID------------------- */
1797 /* Event from firmware to host, sent in response to WMI_GET_BTCOEX_CONFIG_CMDID
1798 * */
1799 typedef PREPACK struct {
1800 u32 btProfileType;
1801 u32 linkId; /* not used */
1802 PREPACK union {
1803 WMI_SET_BTCOEX_SCO_CONFIG_CMD scoConfigCmd;
1804 WMI_SET_BTCOEX_A2DP_CONFIG_CMD a2dpConfigCmd;
1805 WMI_SET_BTCOEX_ACLCOEX_CONFIG_CMD aclcoexConfig;
1806 WMI_SET_BTCOEX_BTINQUIRY_PAGE_CONFIG_CMD btinquiryPageConfigCmd;
1807 } POSTPACK info;
1808 } POSTPACK WMI_BTCOEX_CONFIG_EVENT;
1810 /*------------- WMI_REPORT_BTCOEX_BTCOEX_STATS_EVENTID--------------------*/
1811 /* Used for firmware development and debugging*/
1812 typedef PREPACK struct {
1813 u32 highRatePktCnt;
1814 u32 firstBmissCnt;
1815 u32 psPollFailureCnt;
1816 u32 nullFrameFailureCnt;
1817 u32 optModeTransitionCnt;
1818 }BTCOEX_GENERAL_STATS;
1820 typedef PREPACK struct {
1821 u32 scoStompCntAvg;
1822 u32 scoStompIn100ms;
1823 u32 scoMaxContStomp;
1824 u32 scoAvgNoRetries;
1825 u32 scoMaxNoRetriesIn100ms;
1826 }BTCOEX_SCO_STATS;
1828 typedef PREPACK struct {
1829 u32 a2dpBurstCnt;
1830 u32 a2dpMaxBurstCnt;
1831 u32 a2dpAvgIdletimeIn100ms;
1832 u32 a2dpAvgStompCnt;
1833 }BTCOEX_A2DP_STATS;
1835 typedef PREPACK struct {
1836 u32 aclPktCntInBtTime;
1837 u32 aclStompCntInWlanTime;
1838 u32 aclPktCntIn100ms;
1839 }BTCOEX_ACLCOEX_STATS;
1841 typedef PREPACK struct {
1842 BTCOEX_GENERAL_STATS coexStats;
1843 BTCOEX_SCO_STATS scoStats;
1844 BTCOEX_A2DP_STATS a2dpStats;
1845 BTCOEX_ACLCOEX_STATS aclCoexStats;
1846 }WMI_BTCOEX_STATS_EVENT;
1849 /*--------------------------END OF BTCOEX -------------------------------------*/
1850 typedef PREPACK struct {
1851 u32 sleepState;
1852 }WMI_REPORT_SLEEP_STATE_EVENT;
1854 typedef enum {
1855 WMI_REPORT_SLEEP_STATUS_IS_DEEP_SLEEP =0,
1856 WMI_REPORT_SLEEP_STATUS_IS_AWAKE
1857 } WMI_REPORT_SLEEP_STATUS;
1858 typedef enum {
1859 DISCONN_EVT_IN_RECONN = 0, /* default */
1860 NO_DISCONN_EVT_IN_RECONN
1861 } TARGET_EVENT_REPORT_CONFIG;
1863 typedef PREPACK struct {
1864 u32 evtConfig;
1865 } POSTPACK WMI_SET_TARGET_EVENT_REPORT_CMD;
1868 typedef PREPACK struct {
1869 u16 cmd_buf_sz; /* HCI cmd buffer size */
1870 u8 buf[1]; /* Absolute HCI cmd */
1871 } POSTPACK WMI_HCI_CMD;
1874 * Command Replies
1878 * WMI_GET_CHANNEL_LIST_CMDID reply
1880 typedef PREPACK struct {
1881 u8 reserved1;
1882 u8 numChannels; /* number of channels in reply */
1883 u16 channelList[1]; /* channel in Mhz */
1884 } POSTPACK WMI_CHANNEL_LIST_REPLY;
1886 typedef enum {
1887 A_SUCCEEDED = A_OK,
1888 A_FAILED_DELETE_STREAM_DOESNOT_EXIST=250,
1889 A_SUCCEEDED_MODIFY_STREAM=251,
1890 A_FAILED_INVALID_STREAM = 252,
1891 A_FAILED_MAX_THINSTREAMS = 253,
1892 A_FAILED_CREATE_REMOVE_PSTREAM_FIRST = 254,
1893 } PSTREAM_REPLY_STATUS;
1895 typedef PREPACK struct {
1896 u8 status; /* PSTREAM_REPLY_STATUS */
1897 u8 txQueueNumber;
1898 u8 rxQueueNumber;
1899 u8 trafficClass;
1900 u8 trafficDirection; /* DIR_TYPE */
1901 } POSTPACK WMI_CRE_PRIORITY_STREAM_REPLY;
1903 typedef PREPACK struct {
1904 u8 status; /* PSTREAM_REPLY_STATUS */
1905 u8 txQueueNumber;
1906 u8 rxQueueNumber;
1907 u8 trafficDirection; /* DIR_TYPE */
1908 u8 trafficClass;
1909 } POSTPACK WMI_DEL_PRIORITY_STREAM_REPLY;
1912 * List of Events (target to host)
1914 typedef enum {
1915 WMI_READY_EVENTID = 0x1001,
1916 WMI_CONNECT_EVENTID,
1917 WMI_DISCONNECT_EVENTID,
1918 WMI_BSSINFO_EVENTID,
1919 WMI_CMDERROR_EVENTID,
1920 WMI_REGDOMAIN_EVENTID,
1921 WMI_PSTREAM_TIMEOUT_EVENTID,
1922 WMI_NEIGHBOR_REPORT_EVENTID,
1923 WMI_TKIP_MICERR_EVENTID,
1924 WMI_SCAN_COMPLETE_EVENTID, /* 0x100a */
1925 WMI_REPORT_STATISTICS_EVENTID,
1926 WMI_RSSI_THRESHOLD_EVENTID,
1927 WMI_ERROR_REPORT_EVENTID,
1928 WMI_OPT_RX_FRAME_EVENTID,
1929 WMI_REPORT_ROAM_TBL_EVENTID,
1930 WMI_EXTENSION_EVENTID,
1931 WMI_CAC_EVENTID,
1932 WMI_SNR_THRESHOLD_EVENTID,
1933 WMI_LQ_THRESHOLD_EVENTID,
1934 WMI_TX_RETRY_ERR_EVENTID, /* 0x1014 */
1935 WMI_REPORT_ROAM_DATA_EVENTID,
1936 WMI_TEST_EVENTID,
1937 WMI_APLIST_EVENTID,
1938 WMI_GET_WOW_LIST_EVENTID,
1939 WMI_GET_PMKID_LIST_EVENTID,
1940 WMI_CHANNEL_CHANGE_EVENTID,
1941 WMI_PEER_NODE_EVENTID,
1942 WMI_PSPOLL_EVENTID,
1943 WMI_DTIMEXPIRY_EVENTID,
1944 WMI_WLAN_VERSION_EVENTID,
1945 WMI_SET_PARAMS_REPLY_EVENTID,
1946 WMI_ADDBA_REQ_EVENTID, /*0x1020 */
1947 WMI_ADDBA_RESP_EVENTID,
1948 WMI_DELBA_REQ_EVENTID,
1949 WMI_TX_COMPLETE_EVENTID,
1950 WMI_HCI_EVENT_EVENTID,
1951 WMI_ACL_DATA_EVENTID,
1952 WMI_REPORT_SLEEP_STATE_EVENTID,
1953 #ifdef WAPI_ENABLE
1954 WMI_WAPI_REKEY_EVENTID,
1955 #endif
1956 WMI_REPORT_BTCOEX_STATS_EVENTID,
1957 WMI_REPORT_BTCOEX_CONFIG_EVENTID,
1958 WMI_ACM_REJECT_EVENTID,
1959 WMI_THIN_RESERVED_START_EVENTID = 0x8000,
1960 /* Events in this range are reserved for thinmode
1961 * See wmi_thin.h for actual definitions */
1962 WMI_THIN_RESERVED_END_EVENTID = 0x8fff,
1964 } WMI_EVENT_ID;
1967 typedef enum {
1968 WMI_11A_CAPABILITY = 1,
1969 WMI_11G_CAPABILITY = 2,
1970 WMI_11AG_CAPABILITY = 3,
1971 WMI_11NA_CAPABILITY = 4,
1972 WMI_11NG_CAPABILITY = 5,
1973 WMI_11NAG_CAPABILITY = 6,
1974 // END CAPABILITY
1975 WMI_11N_CAPABILITY_OFFSET = (WMI_11NA_CAPABILITY - WMI_11A_CAPABILITY),
1976 } WMI_PHY_CAPABILITY;
1978 typedef PREPACK struct {
1979 u8 macaddr[ATH_MAC_LEN];
1980 u8 phyCapability; /* WMI_PHY_CAPABILITY */
1981 } POSTPACK WMI_READY_EVENT_1;
1983 typedef PREPACK struct {
1984 u32 sw_version;
1985 u32 abi_version;
1986 u8 macaddr[ATH_MAC_LEN];
1987 u8 phyCapability; /* WMI_PHY_CAPABILITY */
1988 } POSTPACK WMI_READY_EVENT_2;
1990 #if defined(ATH_TARGET)
1991 #ifdef AR6002_REV2
1992 #define WMI_READY_EVENT WMI_READY_EVENT_1 /* AR6002_REV2 target code */
1993 #else
1994 #define WMI_READY_EVENT WMI_READY_EVENT_2 /* AR6001, AR6002_REV4, AR6002_REV5 */
1995 #endif
1996 #else
1997 #define WMI_READY_EVENT WMI_READY_EVENT_2 /* host code */
1998 #endif
2002 * Connect Event
2004 typedef PREPACK struct {
2005 u16 channel;
2006 u8 bssid[ATH_MAC_LEN];
2007 u16 listenInterval;
2008 u16 beaconInterval;
2009 u32 networkType;
2010 u8 beaconIeLen;
2011 u8 assocReqLen;
2012 u8 assocRespLen;
2013 u8 assocInfo[1];
2014 } POSTPACK WMI_CONNECT_EVENT;
2017 * Disconnect Event
2019 typedef enum {
2020 NO_NETWORK_AVAIL = 0x01,
2021 LOST_LINK = 0x02, /* bmiss */
2022 DISCONNECT_CMD = 0x03,
2023 BSS_DISCONNECTED = 0x04,
2024 AUTH_FAILED = 0x05,
2025 ASSOC_FAILED = 0x06,
2026 NO_RESOURCES_AVAIL = 0x07,
2027 CSERV_DISCONNECT = 0x08,
2028 INVALID_PROFILE = 0x0a,
2029 DOT11H_CHANNEL_SWITCH = 0x0b,
2030 PROFILE_MISMATCH = 0x0c,
2031 CONNECTION_EVICTED = 0x0d,
2032 IBSS_MERGE = 0xe,
2033 } WMI_DISCONNECT_REASON;
2035 typedef PREPACK struct {
2036 u16 protocolReasonStatus; /* reason code, see 802.11 spec. */
2037 u8 bssid[ATH_MAC_LEN]; /* set if known */
2038 u8 disconnectReason ; /* see WMI_DISCONNECT_REASON */
2039 u8 assocRespLen;
2040 u8 assocInfo[1];
2041 } POSTPACK WMI_DISCONNECT_EVENT;
2044 * BSS Info Event.
2045 * Mechanism used to inform host of the presence and characteristic of
2046 * wireless networks present. Consists of bss info header followed by
2047 * the beacon or probe-response frame body. The 802.11 header is not included.
2049 typedef enum {
2050 BEACON_FTYPE = 0x1,
2051 PROBERESP_FTYPE,
2052 ACTION_MGMT_FTYPE,
2053 PROBEREQ_FTYPE,
2054 } WMI_BI_FTYPE;
2056 enum {
2057 BSS_ELEMID_CHANSWITCH = 0x01,
2058 BSS_ELEMID_ATHEROS = 0x02,
2061 typedef PREPACK struct {
2062 u16 channel;
2063 u8 frameType; /* see WMI_BI_FTYPE */
2064 u8 snr;
2065 s16 rssi;
2066 u8 bssid[ATH_MAC_LEN];
2067 u32 ieMask;
2068 } POSTPACK WMI_BSS_INFO_HDR;
2071 * BSS INFO HDR version 2.0
2072 * With 6 bytes HTC header and 6 bytes of WMI header
2073 * WMI_BSS_INFO_HDR cannot be accomodated in the removed 802.11 management
2074 * header space.
2075 * - Reduce the ieMask to 2 bytes as only two bit flags are used
2076 * - Remove rssi and compute it on the host. rssi = snr - 95
2078 typedef PREPACK struct {
2079 u16 channel;
2080 u8 frameType; /* see WMI_BI_FTYPE */
2081 u8 snr;
2082 u8 bssid[ATH_MAC_LEN];
2083 u16 ieMask;
2084 } POSTPACK WMI_BSS_INFO_HDR2;
2087 * Command Error Event
2089 typedef enum {
2090 INVALID_PARAM = 0x01,
2091 ILLEGAL_STATE = 0x02,
2092 INTERNAL_ERROR = 0x03,
2093 } WMI_ERROR_CODE;
2095 typedef PREPACK struct {
2096 u16 commandId;
2097 u8 errorCode;
2098 } POSTPACK WMI_CMD_ERROR_EVENT;
2101 * New Regulatory Domain Event
2103 typedef PREPACK struct {
2104 u32 regDomain;
2105 } POSTPACK WMI_REG_DOMAIN_EVENT;
2107 typedef PREPACK struct {
2108 u8 txQueueNumber;
2109 u8 rxQueueNumber;
2110 u8 trafficDirection;
2111 u8 trafficClass;
2112 } POSTPACK WMI_PSTREAM_TIMEOUT_EVENT;
2114 typedef PREPACK struct {
2115 u8 reserve1;
2116 u8 reserve2;
2117 u8 reserve3;
2118 u8 trafficClass;
2119 } POSTPACK WMI_ACM_REJECT_EVENT;
2122 * The WMI_NEIGHBOR_REPORT Event is generated by the target to inform
2123 * the host of BSS's it has found that matches the current profile.
2124 * It can be used by the host to cache PMKs and/to initiate pre-authentication
2125 * if the BSS supports it. The first bssid is always the current associated
2126 * BSS.
2127 * The bssid and bssFlags information repeats according to the number
2128 * or APs reported.
2130 typedef enum {
2131 WMI_DEFAULT_BSS_FLAGS = 0x00,
2132 WMI_PREAUTH_CAPABLE_BSS = 0x01,
2133 WMI_PMKID_VALID_BSS = 0x02,
2134 } WMI_BSS_FLAGS;
2136 typedef PREPACK struct {
2137 u8 bssid[ATH_MAC_LEN];
2138 u8 bssFlags; /* see WMI_BSS_FLAGS */
2139 } POSTPACK WMI_NEIGHBOR_INFO;
2141 typedef PREPACK struct {
2142 s8 numberOfAps;
2143 WMI_NEIGHBOR_INFO neighbor[1];
2144 } POSTPACK WMI_NEIGHBOR_REPORT_EVENT;
2147 * TKIP MIC Error Event
2149 typedef PREPACK struct {
2150 u8 keyid;
2151 u8 ismcast;
2152 } POSTPACK WMI_TKIP_MICERR_EVENT;
2155 * WMI_SCAN_COMPLETE_EVENTID - no parameters (old), staus parameter (new)
2157 typedef PREPACK struct {
2158 s32 status;
2159 } POSTPACK WMI_SCAN_COMPLETE_EVENT;
2161 #define MAX_OPT_DATA_LEN 1400
2164 * WMI_SET_ADHOC_BSSID_CMDID
2166 typedef PREPACK struct {
2167 u8 bssid[ATH_MAC_LEN];
2168 } POSTPACK WMI_SET_ADHOC_BSSID_CMD;
2171 * WMI_SET_OPT_MODE_CMDID
2173 typedef enum {
2174 SPECIAL_OFF,
2175 SPECIAL_ON,
2176 } OPT_MODE_TYPE;
2178 typedef PREPACK struct {
2179 u8 optMode;
2180 } POSTPACK WMI_SET_OPT_MODE_CMD;
2183 * WMI_TX_OPT_FRAME_CMDID
2185 typedef enum {
2186 OPT_PROBE_REQ = 0x01,
2187 OPT_PROBE_RESP = 0x02,
2188 OPT_CPPP_START = 0x03,
2189 OPT_CPPP_STOP = 0x04,
2190 } WMI_OPT_FTYPE;
2192 typedef PREPACK struct {
2193 u16 optIEDataLen;
2194 u8 frmType;
2195 u8 dstAddr[ATH_MAC_LEN];
2196 u8 bssid[ATH_MAC_LEN];
2197 u8 reserved; /* For alignment */
2198 u8 optIEData[1];
2199 } POSTPACK WMI_OPT_TX_FRAME_CMD;
2202 * Special frame receive Event.
2203 * Mechanism used to inform host of the receiption of the special frames.
2204 * Consists of special frame info header followed by special frame body.
2205 * The 802.11 header is not included.
2207 typedef PREPACK struct {
2208 u16 channel;
2209 u8 frameType; /* see WMI_OPT_FTYPE */
2210 s8 snr;
2211 u8 srcAddr[ATH_MAC_LEN];
2212 u8 bssid[ATH_MAC_LEN];
2213 } POSTPACK WMI_OPT_RX_INFO_HDR;
2216 * Reporting statistics.
2218 typedef PREPACK struct {
2219 u32 tx_packets;
2220 u32 tx_bytes;
2221 u32 tx_unicast_pkts;
2222 u32 tx_unicast_bytes;
2223 u32 tx_multicast_pkts;
2224 u32 tx_multicast_bytes;
2225 u32 tx_broadcast_pkts;
2226 u32 tx_broadcast_bytes;
2227 u32 tx_rts_success_cnt;
2228 u32 tx_packet_per_ac[4];
2229 u32 tx_errors_per_ac[4];
2231 u32 tx_errors;
2232 u32 tx_failed_cnt;
2233 u32 tx_retry_cnt;
2234 u32 tx_mult_retry_cnt;
2235 u32 tx_rts_fail_cnt;
2236 s32 tx_unicast_rate;
2237 }POSTPACK tx_stats_t;
2239 typedef PREPACK struct {
2240 u32 rx_packets;
2241 u32 rx_bytes;
2242 u32 rx_unicast_pkts;
2243 u32 rx_unicast_bytes;
2244 u32 rx_multicast_pkts;
2245 u32 rx_multicast_bytes;
2246 u32 rx_broadcast_pkts;
2247 u32 rx_broadcast_bytes;
2248 u32 rx_fragment_pkt;
2250 u32 rx_errors;
2251 u32 rx_crcerr;
2252 u32 rx_key_cache_miss;
2253 u32 rx_decrypt_err;
2254 u32 rx_duplicate_frames;
2255 s32 rx_unicast_rate;
2256 }POSTPACK rx_stats_t;
2258 typedef PREPACK struct {
2259 u32 tkip_local_mic_failure;
2260 u32 tkip_counter_measures_invoked;
2261 u32 tkip_replays;
2262 u32 tkip_format_errors;
2263 u32 ccmp_format_errors;
2264 u32 ccmp_replays;
2265 }POSTPACK tkip_ccmp_stats_t;
2267 typedef PREPACK struct {
2268 u32 power_save_failure_cnt;
2269 u16 stop_tx_failure_cnt;
2270 u16 atim_tx_failure_cnt;
2271 u16 atim_rx_failure_cnt;
2272 u16 bcn_rx_failure_cnt;
2273 }POSTPACK pm_stats_t;
2275 typedef PREPACK struct {
2276 u32 cs_bmiss_cnt;
2277 u32 cs_lowRssi_cnt;
2278 u16 cs_connect_cnt;
2279 u16 cs_disconnect_cnt;
2280 s16 cs_aveBeacon_rssi;
2281 u16 cs_roam_count;
2282 s16 cs_rssi;
2283 u8 cs_snr;
2284 u8 cs_aveBeacon_snr;
2285 u8 cs_lastRoam_msec;
2286 } POSTPACK cserv_stats_t;
2288 typedef PREPACK struct {
2289 tx_stats_t tx_stats;
2290 rx_stats_t rx_stats;
2291 tkip_ccmp_stats_t tkipCcmpStats;
2292 }POSTPACK wlan_net_stats_t;
2294 typedef PREPACK struct {
2295 u32 arp_received;
2296 u32 arp_matched;
2297 u32 arp_replied;
2298 } POSTPACK arp_stats_t;
2300 typedef PREPACK struct {
2301 u32 wow_num_pkts_dropped;
2302 u16 wow_num_events_discarded;
2303 u8 wow_num_host_pkt_wakeups;
2304 u8 wow_num_host_event_wakeups;
2305 } POSTPACK wlan_wow_stats_t;
2307 typedef PREPACK struct {
2308 u32 lqVal;
2309 s32 noise_floor_calibation;
2310 pm_stats_t pmStats;
2311 wlan_net_stats_t txrxStats;
2312 wlan_wow_stats_t wowStats;
2313 arp_stats_t arpStats;
2314 cserv_stats_t cservStats;
2315 } POSTPACK WMI_TARGET_STATS;
2318 * WMI_RSSI_THRESHOLD_EVENTID.
2319 * Indicate the RSSI events to host. Events are indicated when we breach a
2320 * thresold value.
2322 typedef enum{
2323 WMI_RSSI_THRESHOLD1_ABOVE = 0,
2324 WMI_RSSI_THRESHOLD2_ABOVE,
2325 WMI_RSSI_THRESHOLD3_ABOVE,
2326 WMI_RSSI_THRESHOLD4_ABOVE,
2327 WMI_RSSI_THRESHOLD5_ABOVE,
2328 WMI_RSSI_THRESHOLD6_ABOVE,
2329 WMI_RSSI_THRESHOLD1_BELOW,
2330 WMI_RSSI_THRESHOLD2_BELOW,
2331 WMI_RSSI_THRESHOLD3_BELOW,
2332 WMI_RSSI_THRESHOLD4_BELOW,
2333 WMI_RSSI_THRESHOLD5_BELOW,
2334 WMI_RSSI_THRESHOLD6_BELOW
2335 }WMI_RSSI_THRESHOLD_VAL;
2337 typedef PREPACK struct {
2338 s16 rssi;
2339 u8 range;
2340 }POSTPACK WMI_RSSI_THRESHOLD_EVENT;
2343 * WMI_ERROR_REPORT_EVENTID
2345 typedef enum{
2346 WMI_TARGET_PM_ERR_FAIL = 0x00000001,
2347 WMI_TARGET_KEY_NOT_FOUND = 0x00000002,
2348 WMI_TARGET_DECRYPTION_ERR = 0x00000004,
2349 WMI_TARGET_BMISS = 0x00000008,
2350 WMI_PSDISABLE_NODE_JOIN = 0x00000010,
2351 WMI_TARGET_COM_ERR = 0x00000020,
2352 WMI_TARGET_FATAL_ERR = 0x00000040
2353 } WMI_TARGET_ERROR_VAL;
2355 typedef PREPACK struct {
2356 u32 errorVal;
2357 }POSTPACK WMI_TARGET_ERROR_REPORT_EVENT;
2359 typedef PREPACK struct {
2360 u8 retrys;
2361 }POSTPACK WMI_TX_RETRY_ERR_EVENT;
2363 typedef enum{
2364 WMI_SNR_THRESHOLD1_ABOVE = 1,
2365 WMI_SNR_THRESHOLD1_BELOW,
2366 WMI_SNR_THRESHOLD2_ABOVE,
2367 WMI_SNR_THRESHOLD2_BELOW,
2368 WMI_SNR_THRESHOLD3_ABOVE,
2369 WMI_SNR_THRESHOLD3_BELOW,
2370 WMI_SNR_THRESHOLD4_ABOVE,
2371 WMI_SNR_THRESHOLD4_BELOW
2372 } WMI_SNR_THRESHOLD_VAL;
2374 typedef PREPACK struct {
2375 u8 range; /* WMI_SNR_THRESHOLD_VAL */
2376 u8 snr;
2377 }POSTPACK WMI_SNR_THRESHOLD_EVENT;
2379 typedef enum{
2380 WMI_LQ_THRESHOLD1_ABOVE = 1,
2381 WMI_LQ_THRESHOLD1_BELOW,
2382 WMI_LQ_THRESHOLD2_ABOVE,
2383 WMI_LQ_THRESHOLD2_BELOW,
2384 WMI_LQ_THRESHOLD3_ABOVE,
2385 WMI_LQ_THRESHOLD3_BELOW,
2386 WMI_LQ_THRESHOLD4_ABOVE,
2387 WMI_LQ_THRESHOLD4_BELOW
2388 } WMI_LQ_THRESHOLD_VAL;
2390 typedef PREPACK struct {
2391 s32 lq;
2392 u8 range; /* WMI_LQ_THRESHOLD_VAL */
2393 }POSTPACK WMI_LQ_THRESHOLD_EVENT;
2395 * WMI_REPORT_ROAM_TBL_EVENTID
2397 #define MAX_ROAM_TBL_CAND 5
2399 typedef PREPACK struct {
2400 s32 roam_util;
2401 u8 bssid[ATH_MAC_LEN];
2402 s8 rssi;
2403 s8 rssidt;
2404 s8 last_rssi;
2405 s8 util;
2406 s8 bias;
2407 u8 reserved; /* For alignment */
2408 } POSTPACK WMI_BSS_ROAM_INFO;
2411 typedef PREPACK struct {
2412 u16 roamMode;
2413 u16 numEntries;
2414 WMI_BSS_ROAM_INFO bssRoamInfo[1];
2415 } POSTPACK WMI_TARGET_ROAM_TBL;
2418 * WMI_HCI_EVENT_EVENTID
2420 typedef PREPACK struct {
2421 u16 evt_buf_sz; /* HCI event buffer size */
2422 u8 buf[1]; /* HCI event */
2423 } POSTPACK WMI_HCI_EVENT;
2426 * WMI_CAC_EVENTID
2428 typedef enum {
2429 CAC_INDICATION_ADMISSION = 0x00,
2430 CAC_INDICATION_ADMISSION_RESP = 0x01,
2431 CAC_INDICATION_DELETE = 0x02,
2432 CAC_INDICATION_NO_RESP = 0x03,
2433 }CAC_INDICATION;
2435 #define WMM_TSPEC_IE_LEN 63
2437 typedef PREPACK struct {
2438 u8 ac;
2439 u8 cac_indication;
2440 u8 statusCode;
2441 u8 tspecSuggestion[WMM_TSPEC_IE_LEN];
2442 }POSTPACK WMI_CAC_EVENT;
2445 * WMI_APLIST_EVENTID
2448 typedef enum {
2449 APLIST_VER1 = 1,
2450 } APLIST_VER;
2452 typedef PREPACK struct {
2453 u8 bssid[ATH_MAC_LEN];
2454 u16 channel;
2455 } POSTPACK WMI_AP_INFO_V1;
2457 typedef PREPACK union {
2458 WMI_AP_INFO_V1 apInfoV1;
2459 } POSTPACK WMI_AP_INFO;
2461 typedef PREPACK struct {
2462 u8 apListVer;
2463 u8 numAP;
2464 WMI_AP_INFO apList[1];
2465 } POSTPACK WMI_APLIST_EVENT;
2468 * developer commands
2472 * WMI_SET_BITRATE_CMDID
2474 * Get bit rate cmd uses same definition as set bit rate cmd
2476 typedef enum {
2477 RATE_AUTO = -1,
2478 RATE_1Mb = 0,
2479 RATE_2Mb = 1,
2480 RATE_5_5Mb = 2,
2481 RATE_11Mb = 3,
2482 RATE_6Mb = 4,
2483 RATE_9Mb = 5,
2484 RATE_12Mb = 6,
2485 RATE_18Mb = 7,
2486 RATE_24Mb = 8,
2487 RATE_36Mb = 9,
2488 RATE_48Mb = 10,
2489 RATE_54Mb = 11,
2490 RATE_MCS_0_20 = 12,
2491 RATE_MCS_1_20 = 13,
2492 RATE_MCS_2_20 = 14,
2493 RATE_MCS_3_20 = 15,
2494 RATE_MCS_4_20 = 16,
2495 RATE_MCS_5_20 = 17,
2496 RATE_MCS_6_20 = 18,
2497 RATE_MCS_7_20 = 19,
2498 RATE_MCS_0_40 = 20,
2499 RATE_MCS_1_40 = 21,
2500 RATE_MCS_2_40 = 22,
2501 RATE_MCS_3_40 = 23,
2502 RATE_MCS_4_40 = 24,
2503 RATE_MCS_5_40 = 25,
2504 RATE_MCS_6_40 = 26,
2505 RATE_MCS_7_40 = 27,
2506 } WMI_BIT_RATE;
2508 typedef PREPACK struct {
2509 s8 rateIndex; /* see WMI_BIT_RATE */
2510 s8 mgmtRateIndex;
2511 s8 ctlRateIndex;
2512 } POSTPACK WMI_BIT_RATE_CMD;
2515 typedef PREPACK struct {
2516 s8 rateIndex; /* see WMI_BIT_RATE */
2517 } POSTPACK WMI_BIT_RATE_REPLY;
2521 * WMI_SET_FIXRATES_CMDID
2523 * Get fix rates cmd uses same definition as set fix rates cmd
2525 #define FIX_RATE_1Mb ((u32)0x1)
2526 #define FIX_RATE_2Mb ((u32)0x2)
2527 #define FIX_RATE_5_5Mb ((u32)0x4)
2528 #define FIX_RATE_11Mb ((u32)0x8)
2529 #define FIX_RATE_6Mb ((u32)0x10)
2530 #define FIX_RATE_9Mb ((u32)0x20)
2531 #define FIX_RATE_12Mb ((u32)0x40)
2532 #define FIX_RATE_18Mb ((u32)0x80)
2533 #define FIX_RATE_24Mb ((u32)0x100)
2534 #define FIX_RATE_36Mb ((u32)0x200)
2535 #define FIX_RATE_48Mb ((u32)0x400)
2536 #define FIX_RATE_54Mb ((u32)0x800)
2537 #define FIX_RATE_MCS_0_20 ((u32)0x1000)
2538 #define FIX_RATE_MCS_1_20 ((u32)0x2000)
2539 #define FIX_RATE_MCS_2_20 ((u32)0x4000)
2540 #define FIX_RATE_MCS_3_20 ((u32)0x8000)
2541 #define FIX_RATE_MCS_4_20 ((u32)0x10000)
2542 #define FIX_RATE_MCS_5_20 ((u32)0x20000)
2543 #define FIX_RATE_MCS_6_20 ((u32)0x40000)
2544 #define FIX_RATE_MCS_7_20 ((u32)0x80000)
2545 #define FIX_RATE_MCS_0_40 ((u32)0x100000)
2546 #define FIX_RATE_MCS_1_40 ((u32)0x200000)
2547 #define FIX_RATE_MCS_2_40 ((u32)0x400000)
2548 #define FIX_RATE_MCS_3_40 ((u32)0x800000)
2549 #define FIX_RATE_MCS_4_40 ((u32)0x1000000)
2550 #define FIX_RATE_MCS_5_40 ((u32)0x2000000)
2551 #define FIX_RATE_MCS_6_40 ((u32)0x4000000)
2552 #define FIX_RATE_MCS_7_40 ((u32)0x8000000)
2554 typedef PREPACK struct {
2555 u32 fixRateMask; /* see WMI_BIT_RATE */
2556 } POSTPACK WMI_FIX_RATES_CMD, WMI_FIX_RATES_REPLY;
2558 typedef PREPACK struct {
2559 u8 bEnableMask;
2560 u8 frameType; /*type and subtype*/
2561 u32 frameRateMask; /* see WMI_BIT_RATE */
2562 } POSTPACK WMI_FRAME_RATES_CMD, WMI_FRAME_RATES_REPLY;
2565 * WMI_SET_RECONNECT_AUTH_MODE_CMDID
2567 * Set authentication mode
2569 typedef enum {
2570 RECONN_DO_AUTH = 0x00,
2571 RECONN_NOT_AUTH = 0x01
2572 } WMI_AUTH_MODE;
2574 typedef PREPACK struct {
2575 u8 mode;
2576 } POSTPACK WMI_SET_AUTH_MODE_CMD;
2579 * WMI_SET_REASSOC_MODE_CMDID
2581 * Set authentication mode
2583 typedef enum {
2584 REASSOC_DO_DISASSOC = 0x00,
2585 REASSOC_DONOT_DISASSOC = 0x01
2586 } WMI_REASSOC_MODE;
2588 typedef PREPACK struct {
2589 u8 mode;
2590 }POSTPACK WMI_SET_REASSOC_MODE_CMD;
2592 typedef enum {
2593 ROAM_DATA_TIME = 1, /* Get The Roam Time Data */
2594 } ROAM_DATA_TYPE;
2596 typedef PREPACK struct {
2597 u32 disassoc_time;
2598 u32 no_txrx_time;
2599 u32 assoc_time;
2600 u32 allow_txrx_time;
2601 u8 disassoc_bssid[ATH_MAC_LEN];
2602 s8 disassoc_bss_rssi;
2603 u8 assoc_bssid[ATH_MAC_LEN];
2604 s8 assoc_bss_rssi;
2605 } POSTPACK WMI_TARGET_ROAM_TIME;
2607 typedef PREPACK struct {
2608 PREPACK union {
2609 WMI_TARGET_ROAM_TIME roamTime;
2610 } POSTPACK u;
2611 u8 roamDataType ;
2612 } POSTPACK WMI_TARGET_ROAM_DATA;
2614 typedef enum {
2615 WMI_WMM_DISABLED = 0,
2616 WMI_WMM_ENABLED
2617 } WMI_WMM_STATUS;
2619 typedef PREPACK struct {
2620 u8 status;
2621 }POSTPACK WMI_SET_WMM_CMD;
2623 typedef PREPACK struct {
2624 u8 status;
2625 }POSTPACK WMI_SET_QOS_SUPP_CMD;
2627 typedef enum {
2628 WMI_TXOP_DISABLED = 0,
2629 WMI_TXOP_ENABLED
2630 } WMI_TXOP_CFG;
2632 typedef PREPACK struct {
2633 u8 txopEnable;
2634 }POSTPACK WMI_SET_WMM_TXOP_CMD;
2636 typedef PREPACK struct {
2637 u8 keepaliveInterval;
2638 } POSTPACK WMI_SET_KEEPALIVE_CMD;
2640 typedef PREPACK struct {
2641 u32 configured;
2642 u8 keepaliveInterval;
2643 } POSTPACK WMI_GET_KEEPALIVE_CMD;
2646 * Add Application specified IE to a management frame
2648 #define WMI_MAX_IE_LEN 255
2650 typedef PREPACK struct {
2651 u8 mgmtFrmType; /* one of WMI_MGMT_FRAME_TYPE */
2652 u8 ieLen; /* Length of the IE that should be added to the MGMT frame */
2653 u8 ieInfo[1];
2654 } POSTPACK WMI_SET_APPIE_CMD;
2657 * Notify the WSC registration status to the target
2659 #define WSC_REG_ACTIVE 1
2660 #define WSC_REG_INACTIVE 0
2661 /* Generic Hal Interface for setting hal paramters. */
2662 /* Add new Set HAL Param cmdIds here for newer params */
2663 typedef enum {
2664 WHAL_SETCABTO_CMDID = 1,
2665 }WHAL_CMDID;
2667 typedef PREPACK struct {
2668 u8 cabTimeOut;
2669 } POSTPACK WHAL_SETCABTO_PARAM;
2671 typedef PREPACK struct {
2672 u8 whalCmdId;
2673 u8 data[1];
2674 } POSTPACK WHAL_PARAMCMD;
2677 #define WOW_MAX_FILTER_LISTS 1 /*4*/
2678 #define WOW_MAX_FILTERS_PER_LIST 4
2679 #define WOW_PATTERN_SIZE 64
2680 #define WOW_MASK_SIZE 64
2682 #define MAC_MAX_FILTERS_PER_LIST 4
2684 typedef PREPACK struct {
2685 u8 wow_valid_filter;
2686 u8 wow_filter_id;
2687 u8 wow_filter_size;
2688 u8 wow_filter_offset;
2689 u8 wow_filter_mask[WOW_MASK_SIZE];
2690 u8 wow_filter_pattern[WOW_PATTERN_SIZE];
2691 } POSTPACK WOW_FILTER;
2694 typedef PREPACK struct {
2695 u8 wow_valid_list;
2696 u8 wow_list_id;
2697 u8 wow_num_filters;
2698 u8 wow_total_list_size;
2699 WOW_FILTER list[WOW_MAX_FILTERS_PER_LIST];
2700 } POSTPACK WOW_FILTER_LIST;
2702 typedef PREPACK struct {
2703 u8 valid_filter;
2704 u8 mac_addr[ATH_MAC_LEN];
2705 } POSTPACK MAC_FILTER;
2708 typedef PREPACK struct {
2709 u8 total_list_size;
2710 u8 enable;
2711 MAC_FILTER list[MAC_MAX_FILTERS_PER_LIST];
2712 } POSTPACK MAC_FILTER_LIST;
2714 #define MAX_IP_ADDRS 2
2715 typedef PREPACK struct {
2716 u32 ips[MAX_IP_ADDRS]; /* IP in Network Byte Order */
2717 } POSTPACK WMI_SET_IP_CMD;
2719 typedef PREPACK struct {
2720 u32 awake;
2721 u32 asleep;
2722 } POSTPACK WMI_SET_HOST_SLEEP_MODE_CMD;
2724 typedef enum {
2725 WOW_FILTER_SSID = 0x1
2726 } WMI_WOW_FILTER;
2728 typedef PREPACK struct {
2729 u32 enable_wow;
2730 WMI_WOW_FILTER filter;
2731 u16 hostReqDelay;
2732 } POSTPACK WMI_SET_WOW_MODE_CMD;
2734 typedef PREPACK struct {
2735 u8 filter_list_id;
2736 } POSTPACK WMI_GET_WOW_LIST_CMD;
2739 * WMI_GET_WOW_LIST_CMD reply
2741 typedef PREPACK struct {
2742 u8 num_filters; /* number of patterns in reply */
2743 u8 this_filter_num; /* this is filter # x of total num_filters */
2744 u8 wow_mode;
2745 u8 host_mode;
2746 WOW_FILTER wow_filters[1];
2747 } POSTPACK WMI_GET_WOW_LIST_REPLY;
2749 typedef PREPACK struct {
2750 u8 filter_list_id;
2751 u8 filter_size;
2752 u8 filter_offset;
2753 u8 filter[1];
2754 } POSTPACK WMI_ADD_WOW_PATTERN_CMD;
2756 typedef PREPACK struct {
2757 u16 filter_list_id;
2758 u16 filter_id;
2759 } POSTPACK WMI_DEL_WOW_PATTERN_CMD;
2761 typedef PREPACK struct {
2762 u8 macaddr[ATH_MAC_LEN];
2763 } POSTPACK WMI_SET_MAC_ADDRESS_CMD;
2766 * WMI_SET_AKMP_PARAMS_CMD
2769 #define WMI_AKMP_MULTI_PMKID_EN 0x000001
2771 typedef PREPACK struct {
2772 u32 akmpInfo;
2773 } POSTPACK WMI_SET_AKMP_PARAMS_CMD;
2775 typedef PREPACK struct {
2776 u8 pmkid[WMI_PMKID_LEN];
2777 } POSTPACK WMI_PMKID;
2780 * WMI_SET_PMKID_LIST_CMD
2782 #define WMI_MAX_PMKID_CACHE 8
2784 typedef PREPACK struct {
2785 u32 numPMKID;
2786 WMI_PMKID pmkidList[WMI_MAX_PMKID_CACHE];
2787 } POSTPACK WMI_SET_PMKID_LIST_CMD;
2790 * WMI_GET_PMKID_LIST_CMD Reply
2791 * Following the Number of PMKIDs is the list of PMKIDs
2793 typedef PREPACK struct {
2794 u32 numPMKID;
2795 u8 bssidList[ATH_MAC_LEN][1];
2796 WMI_PMKID pmkidList[1];
2797 } POSTPACK WMI_PMKID_LIST_REPLY;
2799 typedef PREPACK struct {
2800 u16 oldChannel;
2801 u32 newChannel;
2802 } POSTPACK WMI_CHANNEL_CHANGE_EVENT;
2804 typedef PREPACK struct {
2805 u32 version;
2806 } POSTPACK WMI_WLAN_VERSION_EVENT;
2809 /* WMI_ADDBA_REQ_EVENTID */
2810 typedef PREPACK struct {
2811 u8 tid;
2812 u8 win_sz;
2813 u16 st_seq_no;
2814 u8 status; /* f/w response for ADDBA Req; OK(0) or failure(!=0) */
2815 } POSTPACK WMI_ADDBA_REQ_EVENT;
2817 /* WMI_ADDBA_RESP_EVENTID */
2818 typedef PREPACK struct {
2819 u8 tid;
2820 u8 status; /* OK(0), failure (!=0) */
2821 u16 amsdu_sz; /* Three values: Not supported(0), 3839, 8k */
2822 } POSTPACK WMI_ADDBA_RESP_EVENT;
2824 /* WMI_DELBA_EVENTID
2825 * f/w received a DELBA for peer and processed it.
2826 * Host is notified of this
2828 typedef PREPACK struct {
2829 u8 tid;
2830 u8 is_peer_initiator;
2831 u16 reason_code;
2832 } POSTPACK WMI_DELBA_EVENT;
2835 #ifdef WAPI_ENABLE
2836 #define WAPI_REKEY_UCAST 1
2837 #define WAPI_REKEY_MCAST 2
2838 typedef PREPACK struct {
2839 u8 type;
2840 u8 macAddr[ATH_MAC_LEN];
2841 } POSTPACK WMI_WAPIREKEY_EVENT;
2842 #endif
2845 /* WMI_ALLOW_AGGR_CMDID
2846 * Configures tid's to allow ADDBA negotiations
2847 * on each tid, in each direction
2849 typedef PREPACK struct {
2850 u16 tx_allow_aggr; /* 16-bit mask to allow uplink ADDBA negotiation - bit position indicates tid*/
2851 u16 rx_allow_aggr; /* 16-bit mask to allow donwlink ADDBA negotiation - bit position indicates tid*/
2852 } POSTPACK WMI_ALLOW_AGGR_CMD;
2854 /* WMI_ADDBA_REQ_CMDID
2855 * f/w starts performing ADDBA negotiations with peer
2856 * on the given tid
2858 typedef PREPACK struct {
2859 u8 tid;
2860 } POSTPACK WMI_ADDBA_REQ_CMD;
2862 /* WMI_DELBA_REQ_CMDID
2863 * f/w would teardown BA with peer.
2864 * is_send_initiator indicates if it's or tx or rx side
2866 typedef PREPACK struct {
2867 u8 tid;
2868 u8 is_sender_initiator;
2870 } POSTPACK WMI_DELBA_REQ_CMD;
2872 #define PEER_NODE_JOIN_EVENT 0x00
2873 #define PEER_NODE_LEAVE_EVENT 0x01
2874 #define PEER_FIRST_NODE_JOIN_EVENT 0x10
2875 #define PEER_LAST_NODE_LEAVE_EVENT 0x11
2876 typedef PREPACK struct {
2877 u8 eventCode;
2878 u8 peerMacAddr[ATH_MAC_LEN];
2879 } POSTPACK WMI_PEER_NODE_EVENT;
2881 #define IEEE80211_FRAME_TYPE_MGT 0x00
2882 #define IEEE80211_FRAME_TYPE_CTL 0x04
2885 * Transmit complete event data structure(s)
2889 typedef PREPACK struct {
2890 #define TX_COMPLETE_STATUS_SUCCESS 0
2891 #define TX_COMPLETE_STATUS_RETRIES 1
2892 #define TX_COMPLETE_STATUS_NOLINK 2
2893 #define TX_COMPLETE_STATUS_TIMEOUT 3
2894 #define TX_COMPLETE_STATUS_OTHER 4
2896 u8 status; /* one of TX_COMPLETE_STATUS_... */
2897 u8 pktID; /* packet ID to identify parent packet */
2898 u8 rateIdx; /* rate index on successful transmission */
2899 u8 ackFailures; /* number of ACK failures in tx attempt */
2900 #if 0 /* optional params currently ommitted. */
2901 u32 queueDelay; // usec delay measured Tx Start time - host delivery time
2902 u32 mediaDelay; // usec delay measured ACK rx time - host delivery time
2903 #endif
2904 } POSTPACK TX_COMPLETE_MSG_V1; /* version 1 of tx complete msg */
2906 typedef PREPACK struct {
2907 u8 numMessages; /* number of tx comp msgs following this struct */
2908 u8 msgLen; /* length in bytes for each individual msg following this struct */
2909 u8 msgType; /* version of tx complete msg data following this struct */
2910 u8 reserved; /* individual messages follow this header */
2911 } POSTPACK WMI_TX_COMPLETE_EVENT;
2913 #define WMI_TXCOMPLETE_VERSION_1 (0x01)
2917 * ------- AP Mode definitions --------------
2921 * !!! Warning !!!
2922 * -Changing the following values needs compilation of both driver and firmware
2924 #ifdef AR6002_REV2
2925 #define AP_MAX_NUM_STA 4
2926 #else
2927 #define AP_MAX_NUM_STA 8
2928 #endif
2929 #define AP_ACL_SIZE 10
2930 #define IEEE80211_MAX_IE 256
2931 #define MCAST_AID 0xFF /* Spl. AID used to set DTIM flag in the beacons */
2932 #define DEF_AP_COUNTRY_CODE "US "
2933 #define DEF_AP_WMODE_G WMI_11G_MODE
2934 #define DEF_AP_WMODE_AG WMI_11AG_MODE
2935 #define DEF_AP_DTIM 5
2936 #define DEF_BEACON_INTERVAL 100
2938 /* AP mode disconnect reasons */
2939 #define AP_DISCONNECT_STA_LEFT 101
2940 #define AP_DISCONNECT_FROM_HOST 102
2941 #define AP_DISCONNECT_COMM_TIMEOUT 103
2944 * Used with WMI_AP_HIDDEN_SSID_CMDID
2946 #define HIDDEN_SSID_FALSE 0
2947 #define HIDDEN_SSID_TRUE 1
2948 typedef PREPACK struct {
2949 u8 hidden_ssid;
2950 } POSTPACK WMI_AP_HIDDEN_SSID_CMD;
2953 * Used with WMI_AP_ACL_POLICY_CMDID
2955 #define AP_ACL_DISABLE 0x00
2956 #define AP_ACL_ALLOW_MAC 0x01
2957 #define AP_ACL_DENY_MAC 0x02
2958 #define AP_ACL_RETAIN_LIST_MASK 0x80
2959 typedef PREPACK struct {
2960 u8 policy;
2961 } POSTPACK WMI_AP_ACL_POLICY_CMD;
2964 * Used with WMI_AP_ACL_MAC_LIST_CMDID
2966 #define ADD_MAC_ADDR 1
2967 #define DEL_MAC_ADDR 2
2968 typedef PREPACK struct {
2969 u8 action;
2970 u8 index;
2971 u8 mac[ATH_MAC_LEN];
2972 u8 wildcard;
2973 } POSTPACK WMI_AP_ACL_MAC_CMD;
2975 typedef PREPACK struct {
2976 u16 index;
2977 u8 acl_mac[AP_ACL_SIZE][ATH_MAC_LEN];
2978 u8 wildcard[AP_ACL_SIZE];
2979 u8 policy;
2980 } POSTPACK WMI_AP_ACL;
2983 * Used with WMI_AP_SET_NUM_STA_CMDID
2985 typedef PREPACK struct {
2986 u8 num_sta;
2987 } POSTPACK WMI_AP_SET_NUM_STA_CMD;
2990 * Used with WMI_AP_SET_MLME_CMDID
2992 typedef PREPACK struct {
2993 u8 mac[ATH_MAC_LEN];
2994 u16 reason; /* 802.11 reason code */
2995 u8 cmd; /* operation to perform */
2996 #define WMI_AP_MLME_ASSOC 1 /* associate station */
2997 #define WMI_AP_DISASSOC 2 /* disassociate station */
2998 #define WMI_AP_DEAUTH 3 /* deauthenticate station */
2999 #define WMI_AP_MLME_AUTHORIZE 4 /* authorize station */
3000 #define WMI_AP_MLME_UNAUTHORIZE 5 /* unauthorize station */
3001 } POSTPACK WMI_AP_SET_MLME_CMD;
3003 typedef PREPACK struct {
3004 u32 period;
3005 } POSTPACK WMI_AP_CONN_INACT_CMD;
3007 typedef PREPACK struct {
3008 u32 period_min;
3009 u32 dwell_ms;
3010 } POSTPACK WMI_AP_PROT_SCAN_TIME_CMD;
3012 typedef PREPACK struct {
3013 u32 flag;
3014 u16 aid;
3015 } POSTPACK WMI_AP_SET_PVB_CMD;
3017 #define WMI_DISABLE_REGULATORY_CODE "FF"
3019 typedef PREPACK struct {
3020 A_UCHAR countryCode[3];
3021 } POSTPACK WMI_AP_SET_COUNTRY_CMD;
3023 typedef PREPACK struct {
3024 u8 dtim;
3025 } POSTPACK WMI_AP_SET_DTIM_CMD;
3027 typedef PREPACK struct {
3028 u8 band; /* specifies which band to apply these values */
3029 u8 enable; /* allows 11n to be disabled on a per band basis */
3030 u8 chan_width_40M_supported;
3031 u8 short_GI_20MHz;
3032 u8 short_GI_40MHz;
3033 u8 intolerance_40MHz;
3034 u8 max_ampdu_len_exp;
3035 } POSTPACK WMI_SET_HT_CAP_CMD;
3037 typedef PREPACK struct {
3038 u8 sta_chan_width;
3039 } POSTPACK WMI_SET_HT_OP_CMD;
3041 typedef PREPACK struct {
3042 u32 rateMasks[8];
3043 } POSTPACK WMI_SET_TX_SELECT_RATES_CMD;
3045 typedef PREPACK struct {
3046 u32 sgiMask;
3047 u8 sgiPERThreshold;
3048 } POSTPACK WMI_SET_TX_SGI_PARAM_CMD;
3050 #define DEFAULT_SGI_MASK 0x08080000
3051 #define DEFAULT_SGI_PER 10
3053 typedef PREPACK struct {
3054 u32 rateField; /* 1 bit per rate corresponding to index */
3055 u8 id;
3056 u8 shortTrys;
3057 u8 longTrys;
3058 u8 reserved; /* padding */
3059 } POSTPACK WMI_SET_RATE_POLICY_CMD;
3061 typedef PREPACK struct {
3062 u8 metaVersion; /* version of meta data for rx packets <0 = default> (0-7 = valid) */
3063 u8 dot11Hdr; /* 1 == leave .11 header intact , 0 == replace .11 header with .3 <default> */
3064 u8 defragOnHost; /* 1 == defragmentation is performed by host, 0 == performed by target <default> */
3065 u8 reserved[1]; /* alignment */
3066 } POSTPACK WMI_RX_FRAME_FORMAT_CMD;
3069 typedef PREPACK struct {
3070 u8 enable; /* 1 == device operates in thin mode , 0 == normal mode <default> */
3071 u8 reserved[3];
3072 } POSTPACK WMI_SET_THIN_MODE_CMD;
3074 /* AP mode events */
3075 /* WMI_PS_POLL_EVENT */
3076 typedef PREPACK struct {
3077 u16 aid;
3078 } POSTPACK WMI_PSPOLL_EVENT;
3080 typedef PREPACK struct {
3081 u32 tx_bytes;
3082 u32 tx_pkts;
3083 u32 tx_error;
3084 u32 tx_discard;
3085 u32 rx_bytes;
3086 u32 rx_pkts;
3087 u32 rx_error;
3088 u32 rx_discard;
3089 u32 aid;
3090 } POSTPACK WMI_PER_STA_STAT;
3092 #define AP_GET_STATS 0
3093 #define AP_CLEAR_STATS 1
3095 typedef PREPACK struct {
3096 u32 action;
3097 WMI_PER_STA_STAT sta[AP_MAX_NUM_STA+1];
3098 } POSTPACK WMI_AP_MODE_STAT;
3099 #define WMI_AP_MODE_STAT_SIZE(numSta) (sizeof(u32) + ((numSta + 1) * sizeof(WMI_PER_STA_STAT)))
3101 #define AP_11BG_RATESET1 1
3102 #define AP_11BG_RATESET2 2
3103 #define DEF_AP_11BG_RATESET AP_11BG_RATESET1
3104 typedef PREPACK struct {
3105 u8 rateset;
3106 } POSTPACK WMI_AP_SET_11BG_RATESET_CMD;
3108 * End of AP mode definitions
3111 #ifndef ATH_TARGET
3112 #include "athendpack.h"
3113 #endif
3115 #ifdef __cplusplus
3117 #endif
3119 #endif /* _WMI_H_ */