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