1 /* 2 * 802_11Defs.h 3 * 4 * Copyright(c) 1998 - 2010 Texas Instruments. All rights reserved. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions 9 * are met: 10 * 11 * * Redistributions of source code must retain the above copyright 12 * notice, this list of conditions and the following disclaimer. 13 * * Redistributions in binary form must reproduce the above copyright 14 * notice, this list of conditions and the following disclaimer in 15 * the documentation and/or other materials provided with the 16 * distribution. 17 * * Neither the name Texas Instruments nor the names of its 18 * contributors may be used to endorse or promote products derived 19 * from this software without specific prior written permission. 20 * 21 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 22 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 24 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 25 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 26 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 27 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 31 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 */ 33 34 35 /**************************************************************************** 36 * 37 * MODULE: 802_11Defs.h 38 * PURPOSE: Contains 802.11 defines/structures 39 * 40 ****************************************************************************/ 41 42 #ifndef _802_11_INFO_DEFS_H 43 #define _802_11_INFO_DEFS_H 44 45 #include "tidef.h" 46 #include "osDot11.h" 47 #ifdef XCC_MODULE_INCLUDED 48 #include "osDot11XCC.h" 49 #endif 50 51 #define DOT11_OUI_LEN 4 52 #define DOT11_COUNTRY_STRING_LEN 3 53 #define DOT11_MAX_SUPPORTED_RATES 32 54 55 /* Maximum size of beacon or probe-request information element */ 56 #define DOT11_WSC_PROBE_REQ_MAX_LENGTH 80 57 58 59 typedef enum 60 { 61 DOT11_B_MODE = 1, 62 DOT11_A_MODE = 2, 63 DOT11_G_MODE = 3, 64 DOT11_DUAL_MODE = 4, 65 DOT11_N_MODE = 5, 66 67 DOT11_MAX_MODE 68 69 } EDot11Mode; 70 71 72 /* FrameControl field of the 802.11 header */ 73 74 /**/ 75 /* bit 15 14 13 12 11 10 9 8 7-4 3-2 1-0*/ 76 /* +-------+-----+------+-----+-------+------+------+----+---------+------+----------+*/ 77 /* | Order | WEP | More | Pwr | Retry | More | From | To | Subtype | Type | Protocol |*/ 78 /* | | | Data | Mgmt| | Frag | DS | DS | | | Version |*/ 79 /* +-------+-----+------+-----+-------+------+------+----+---------+------+----------+*/ 80 /* 1 1 1 1 1 1 1 1 4 2 2*/ 81 82 83 #define DOT11_FC_PROT_VERSION_MASK ( 3 << 0 ) 84 #define DOT11_FC_PROT_VERSION ( 0 << 0 ) 85 86 #define DOT11_FC_TYPE_MASK ( 3 << 2 ) 87 typedef enum 88 { 89 DOT11_FC_TYPE_MGMT = ( 0 << 2 ), 90 DOT11_FC_TYPE_CTRL = ( 1 << 2 ), 91 DOT11_FC_TYPE_DATA = ( 2 << 2 ) 92 } dot11_Fc_Type_e; 93 94 #define DOT11_FC_SUB_MASK ( 0x0f << 4 ) 95 typedef enum 96 { 97 /* Management subtypes */ 98 DOT11_FC_SUB_ASSOC_REQ = ( 0 << 4 ), 99 DOT11_FC_SUB_ASSOC_RESP = ( 1 << 4 ), 100 DOT11_FC_SUB_REASSOC_REQ = ( 2 << 4 ), 101 DOT11_FC_SUB_REASSOC_RESP = ( 3 << 4 ), 102 DOT11_FC_SUB_PROBE_REQ = ( 4 << 4 ), 103 DOT11_FC_SUB_PROBE_RESP = ( 5 << 4 ), 104 DOT11_FC_SUB_BEACON = ( 8 << 4 ), 105 DOT11_FC_SUB_ATIM = ( 9 << 4 ), 106 DOT11_FC_SUB_DISASSOC = ( 10 << 4 ), 107 DOT11_FC_SUB_AUTH = ( 11 << 4 ), 108 DOT11_FC_SUB_DEAUTH = ( 12 << 4 ), 109 DOT11_FC_SUB_ACTION = ( 13 << 4 ), 110 111 /* Control subtypes */ 112 DOT11_FC_SUB_BAR = ( 8 << 4 ), 113 DOT11_FC_SUB_BA = ( 9 << 4 ), 114 DOT11_FC_SUB_PS_POLL = ( 10 << 4 ), 115 DOT11_FC_SUB_RTS = ( 11 << 4 ), 116 DOT11_FC_SUB_CTS = ( 12 << 4 ), 117 DOT11_FC_SUB_ACK = ( 13 << 4 ), 118 DOT11_FC_SUB_CF_END = ( 14 << 4 ), 119 DOT11_FC_SUB_CF_END_CF_ACK = ( 15 << 4 ), 120 121 /* Data subtypes */ 122 DOT11_FC_SUB_DATA = ( 0 << 4 ), 123 DOT11_FC_SUB_DATA_CF_ACK = ( 1 << 4 ), 124 DOT11_FC_SUB_DATA_CF_POLL = ( 2 << 4 ), 125 DOT11_FC_SUB_DATA_CF_ACK_CF_POLL = ( 3 << 4 ), 126 DOT11_FC_SUB_NULL_FUNCTION = ( 4 << 4 ), 127 DOT11_FC_SUB_CF_ACK = ( 5 << 4 ), 128 DOT11_FC_SUB_CF_POLL = ( 6 << 4 ), 129 DOT11_FC_SUB_CF_ACK_CF_POLL = ( 7 << 4 ), 130 DOT11_FC_SUB_DATA_QOS = ( 8 << 4 ), 131 DOT11_FC_SUB_DATA_NULL_QOS = ( 12 << 4 ) 132 } dot11_Fc_Sub_Type_e; 133 134 #define DOT11_FC_TYPESUBTYPE_MASK ( DOT11_FC_TYPE_MASK | DOT11_FC_SUB_MASK ) 135 typedef enum 136 { 137 DOT11_FC_ASSOC_REQ = ( DOT11_FC_TYPE_MGMT | DOT11_FC_SUB_ASSOC_REQ ), 138 DOT11_FC_ASSOC_RESP = ( DOT11_FC_TYPE_MGMT | DOT11_FC_SUB_ASSOC_RESP ), 139 DOT11_FC_REASSOC_REQ = ( DOT11_FC_TYPE_MGMT | DOT11_FC_SUB_REASSOC_REQ ), 140 DOT11_FC_REASSOC_RESP = ( DOT11_FC_TYPE_MGMT | DOT11_FC_SUB_REASSOC_RESP ), 141 DOT11_FC_PROBE_REQ = ( DOT11_FC_TYPE_MGMT | DOT11_FC_SUB_PROBE_REQ ), 142 DOT11_FC_PROBE_RESP = ( DOT11_FC_TYPE_MGMT | DOT11_FC_SUB_PROBE_RESP ), 143 DOT11_FC_BEACON = ( DOT11_FC_TYPE_MGMT | DOT11_FC_SUB_BEACON ), 144 DOT11_FC_ATIM = ( DOT11_FC_TYPE_MGMT | DOT11_FC_SUB_ATIM ), 145 DOT11_FC_DISASSOC = ( DOT11_FC_TYPE_MGMT | DOT11_FC_SUB_DISASSOC ), 146 DOT11_FC_AUTH = ( DOT11_FC_TYPE_MGMT | DOT11_FC_SUB_AUTH ), 147 DOT11_FC_DEAUTH = ( DOT11_FC_TYPE_MGMT | DOT11_FC_SUB_DEAUTH ), 148 DOT11_FC_ACTION = ( DOT11_FC_TYPE_MGMT | DOT11_FC_SUB_ACTION ), 149 DOT11_FC_PS_POLL = ( DOT11_FC_TYPE_CTRL | DOT11_FC_SUB_PS_POLL ), 150 DOT11_FC_RTS = ( DOT11_FC_TYPE_CTRL | DOT11_FC_SUB_RTS ), 151 DOT11_FC_CTS = ( DOT11_FC_TYPE_CTRL | DOT11_FC_SUB_CTS ), 152 DOT11_FC_ACK = ( DOT11_FC_TYPE_CTRL | DOT11_FC_SUB_ACK ), 153 DOT11_FC_CF_END = ( DOT11_FC_TYPE_CTRL | DOT11_FC_SUB_CF_END ), 154 DOT11_FC_CF_END_CF_ACK = ( DOT11_FC_TYPE_CTRL | DOT11_FC_SUB_CF_END_CF_ACK ), 155 DOT11_FC_DATA = ( DOT11_FC_TYPE_DATA | DOT11_FC_SUB_DATA ), 156 DOT11_FC_DATA_CF_ACK = ( DOT11_FC_TYPE_DATA | DOT11_FC_SUB_DATA_CF_ACK ), 157 DOT11_FC_DATA_CF_POLL = ( DOT11_FC_TYPE_DATA | DOT11_FC_SUB_DATA_CF_POLL ), 158 DOT11_FC_DATA_CF_ACK_CF_POLL = ( DOT11_FC_TYPE_DATA | DOT11_FC_SUB_DATA_CF_ACK_CF_POLL ), 159 DOT11_FC_DATA_NULL_FUNCTION = ( DOT11_FC_TYPE_DATA | DOT11_FC_SUB_NULL_FUNCTION ), 160 DOT11_FC_CF_ACK = ( DOT11_FC_TYPE_DATA | DOT11_FC_SUB_CF_ACK ), 161 DOT11_FC_CF_POLL = ( DOT11_FC_TYPE_DATA | DOT11_FC_SUB_CF_POLL ), 162 DOT11_FC_CF_ACK_CF_POLL = ( DOT11_FC_TYPE_DATA | DOT11_FC_SUB_CF_ACK_CF_POLL ), 163 DOT11_FC_DATA_QOS = ( DOT11_FC_TYPE_DATA | DOT11_FC_SUB_DATA_QOS ), 164 DOT11_FC_DATA_NULL_QOS = ( DOT11_FC_TYPE_DATA | DOT11_FC_SUB_DATA_NULL_QOS ) 165 } dot11_Fc_Type_Sub_Type_e; 166 167 typedef enum 168 { 169 DOT11_FC_TO_DS = ( 1 << 8 ), 170 DOT11_FC_FROM_DS = ( 1 << 9 ), 171 DOT11_FC_MORE_FRAG = ( 1 << 10 ), 172 DOT11_FC_RETRY = ( 1 << 11 ), 173 DOT11_FC_PWR_MGMT = ( 1 << 12 ), 174 DOT11_FC_MORE_DATA = ( 1 << 13 ), 175 DOT11_FC_WEP = ( 1 << 14 ), 176 DOT11_FC_ORDER = ( 1 << 15 ) 177 } dot11_Fc_Other_e; 178 179 typedef enum 180 { 181 DOT11_CAPABILITY_ESS = ( 1 ), 182 DOT11_CAPABILITY_IESS = ( 1 << 1 ), 183 DOT11_CAPABILITY_CF_POLLABE = ( 1 << 2 ), 184 DOT11_CAPABILITY_CF_POLL_REQ = ( 1 << 3 ), 185 DOT11_CAPABILITY_PRIVACY = ( 1 << 4 ), 186 DOT11_CAPABILITY_PREAMBLE = ( 1 << 5 ), 187 DOT11_CAPABILITY_PBCC = ( 1 << 6 ), 188 DOT11_CAPABILITY_AGILE = ( 1 << 7 ) 189 } dot11_Capability_e; 190 191 #define DOT11_FC_TO_DS_SHIFT 8 192 #define DOT11_FC_FROM_DS_SHIFT 9 193 #define DOT11_FC_MORE_FRAG_SHIFT 10 194 #define DOT11_FC_RETRY_SHIFT 11 195 #define DOT11_FC_PWR_MGMT_SHIFT 12 196 #define DOT11_FC_MORE_DATA_SHIFT 13 197 #define DOT11_FC_WEP_SHIFT 14 198 #define DOT11_FC_ORDER_SHIFT 15 199 200 #define IS_WEP_ON(fc) ((1 << DOT11_FC_WEP_SHIFT) & (fc)) 201 #define IS_DATA(fc) (((DOT11_FC_TYPE_MASK) & (fc)) == DOT11_FC_TYPE_DATA) 202 #define IS_CTRL(fc) (((DOT11_FC_TYPE_MASK) & (fc)) == DOT11_FC_TYPE_CTRL) 203 #define IS_MGMT(fc) (((DOT11_FC_TYPE_MASK) & (fc)) == DOT11_FC_TYPE_MGMT) 204 #define IS_LEGACY_DATA(fc) (((DOT11_FC_TYPESUBTYPE_MASK) & (fc)) == DOT11_FC_DATA) 205 #define IS_AUTH(fc) (((DOT11_FC_AUTH) & (fc)) == DOT11_FC_AUTH) 206 #define IS_QOS_FRAME(fc) ((((fc) & (DOT11_FC_TYPESUBTYPE_MASK)) == DOT11_FC_DATA_QOS) || \ 207 (((fc) & (DOT11_FC_TYPESUBTYPE_MASK)) == DOT11_FC_DATA_NULL_QOS) ) 208 #define IS_HT_FRAME(fc) ((fc) & (DOT11_FC_ORDER)) 209 210 211 212 #define TUs_TO_MSECs(x) (((x) << 10) / 1000) 213 214 #define TIME_STAMP_LEN 8 215 216 /* SequenceControl field of the 802.11 header */ 217 /**/ 218 /* bit 15 - 4 3 - 0*/ 219 /* +-------------------+-----------+*/ 220 /* | Sequence Number | Fragment |*/ 221 /* | | Number |*/ 222 /* +-------------------+-----------+*/ 223 /* 12 4*/ 224 225 typedef enum 226 { 227 DOT11_SC_FRAG_NUM_MASK = ( 0xf << 0 ), 228 DOT11_SC_SEQ_NUM_MASK = ( 0xfff << 4 ) 229 } dot11_Sc_t; 230 231 /* QoS Control field of the 802.11 header */ 232 #define DOT11_QOS_CONTROL_FIELD_TID_BITS 0x000f 233 #define DOT11_QOS_CONTROL_FIELD_A_MSDU_BITS 0x0080 234 235 #define DOT11_QOS_CONTROL_ACK 0x0000 236 #define DOT11_QOS_CONTROL_DONT_ACK 0x0020 237 238 typedef struct 239 { 240 TI_UINT16 fc; 241 TI_UINT16 duration; 242 TMacAddr address1; 243 TMacAddr address2; 244 TMacAddr address3; 245 TI_UINT16 seqCtrl; 246 TI_UINT16 qosControl; 247 /* TMacAddr address4;*/ 248 } dot11_header_t; 249 250 typedef struct 251 { 252 TI_UINT16 fc; 253 TI_UINT16 duration; 254 TMacAddr address1; 255 TMacAddr address2; 256 TMacAddr address3; 257 TI_UINT16 seqCtrl; 258 } legacy_dot11_header_t; 259 260 261 262 typedef struct 263 { 264 TI_UINT16 fc; 265 TI_UINT16 duration; 266 TMacAddr DA; 267 TMacAddr SA; 268 TMacAddr BSSID; 269 TI_UINT16 seqCtrl; 270 } dot11_mgmtHeader_t; 271 272 typedef struct 273 { 274 TI_UINT8 DSAP; 275 TI_UINT8 SSAP; 276 TI_UINT8 Control; 277 TI_UINT8 OUI[3]; 278 TI_UINT16 Type; 279 } Wlan_LlcHeader_T; 280 281 typedef struct 282 { 283 TI_UINT16 fc; 284 TI_UINT16 AID; 285 TMacAddr BSSID; 286 TMacAddr TA; 287 } dot11_PsPollFrameHeader_t; 288 289 typedef struct 290 { 291 TI_UINT16 fc; 292 TI_UINT16 duration; 293 TMacAddr RA; 294 TMacAddr TA; 295 } dot11_BarFrameHeader_t; 296 297 298 #define FCS_SIZE 4 299 300 #define WLAN_HDR_LEN 24 301 #define WLAN_HT_HDR_LEN 28 302 #define WLAN_QOS_HDR_LEN 26 303 #define WLAN_QOS_HT_HDR_LEN 30 304 #define WLAN_QOS_HT_CONTROL_FIELD_LEN 4 305 #define WLAN_SNAP_HDR_LEN 8 306 #define WLAN_WITH_SNAP_HEADER_MAX_SIZE (WLAN_HDR_LEN + WLAN_SNAP_HDR_LEN) 307 #define WLAN_WITH_SNAP_QOS_HEADER_MAX_SIZE (WLAN_QOS_HDR_LEN + WLAN_SNAP_HDR_LEN) 308 309 #define GET_MAX_HEADER_SIZE(macHeaderPointer,headerSize) \ 310 if (IS_QOS_FRAME(*(TI_UINT16*)(macHeaderPointer))) \ 311 {\ 312 if (IS_HT_FRAME(*(TI_UINT16*)(macHeaderPointer))) \ 313 *headerSize = WLAN_QOS_HT_HDR_LEN; \ 314 else \ 315 *headerSize = WLAN_QOS_HDR_LEN; \ 316 }\ 317 else \ 318 {\ 319 if (IS_HT_FRAME(*(TI_UINT16*)(macHeaderPointer))) \ 320 *headerSize = WLAN_HT_HDR_LEN; \ 321 else \ 322 *headerSize = WLAN_HDR_LEN; \ 323 } 324 325 /**************************************************************************************** 326 The next table is defined in 802.11 spec section 7.2.2 for the address field contents : 327 To DS From DS Address 1 Address 2 Address 3 Address 4 328 ------------------------------------------------------------------- 329 0 0 DA SA BSSID N/A 330 0 1 DA BSSID SA N/A 331 1 0 BSSID SA DA N/A 332 1 1 RA TA DA SA 333 334 NOTE: We only support packets coming from within the DS (i.e. From DS = 0) 335 *****************************************************************************************/ 336 /* return the destination address used in *dot11_header_t */ 337 #define GET_DA_FROM_DOT11_HEADER_T(pDot11Hdr) ((pDot11Hdr->fc & DOT11_FC_TO_DS) ? (pDot11Hdr->address3) : (pDot11Hdr->address1)) 338 339 340 /* 341 * MANAGEMENT 342 * ----------------- 343 */ 344 345 /* mgmt body max length */ 346 #define MAX_MGMT_BODY_LENGTH 2312 347 /* maximal length of beacon body - note that actual beacons may actually be longer 348 than this size, at least according to the spec, but so far no larger beacon was seen 349 Note: 1500 is the recommended size by the Motorola Standard team. TI recommendation is 700*/ 350 #define MAX_BEACON_BODY_LENGTH 1500 351 352 /* general mgmt frame structure */ 353 typedef struct 354 { 355 dot11_mgmtHeader_t hdr; 356 TI_UINT8 body[MAX_MGMT_BODY_LENGTH]; 357 } dot11_mgmtFrame_t; 358 359 /* Capabilities Information Field - IN THE AIR */ 360 /**/ 361 /* bit 15 14 13 12 11 10 9 8 7 - 0*/ 362 /* +----------+------+----------+---------+----------+---------+------+-----+---------------+*/ 363 /* | Channel | | Short | Privacy | CF Poll | CF | | | RESERVED | */ 364 /* | Agility | PBCC | Preamble | | Request | Pollable| IBSS | ESS | |*/ 365 /* +----------+------+----------+---------+----------+---------+------+-----+---------------+ */ 366 /* 1 1 1 1 1 1 1 1*/ 367 368 369 /* Capabilities Information Field - IN THE MGMT SOFTWARE AFTER THE SWAP */ 370 /**/ 371 /* bit 15 - 8 7 6 5 4 3 2 1 0*/ 372 /* +------------+----------+------+----------+---------+----------+---------+------+-----+*/ 373 /* | | Channel | | Short | Privacy | CF Poll | CF | | |*/ 374 /* | Reserved | Agility | PBCC | Preamble | | Request | Pollable| IBSS | ESS |*/ 375 /* +------------+----------+------+----------+---------+----------+---------+------+-----+*/ 376 /* 8 1 1 1 1 1 1 1 1*/ 377 378 379 380 typedef enum 381 { 382 DOT11_CAPS_ESS = ( 1 << 0 ), 383 DOT11_CAPS_IBSS = ( 1 << 1 ), 384 DOT11_CAPS_CF_POLLABLE = ( 1 << 2 ), 385 DOT11_CAPS_CF_POLL_REQUEST = ( 1 << 3 ), 386 DOT11_CAPS_PRIVACY = ( 1 << 4 ), 387 DOT11_CAPS_SHORT_PREAMBLE = ( 1 << 5 ), 388 DOT11_CAPS_PBCC = ( 1 << 6 ), 389 DOT11_CAPS_CHANNEL_AGILITY = ( 1 << 7 ), 390 DOT11_SPECTRUM_MANAGEMENT = ( 1 << 8 ), 391 DOT11_CAPS_QOS_SUPPORTED = ( 1 << 9 ), 392 DOT11_CAPS_SHORT_SLOT_TIME = (1 << 10), 393 394 DOT11_CAPS_APSD_SUPPORT = ( 1 << 11), 395 396 DOT11_CAPS_DELAYED_BA = ( 1 << 14), 397 DOT11_CAPS_IMMEDIATE_BA = ( 1 << 15) 398 399 } dot11_capabilities_e; 400 401 typedef enum 402 { 403 /* ESS */ 404 CAP_ESS_MASK = 1, 405 CAP_ESS_SHIFT = 0, 406 407 /* IBSS */ 408 CAP_IBSS_MASK = 1, 409 CAP_IBSS_SHIFT = 1, 410 411 /* CF Pollable */ 412 CAP_CF_POLL_MASK = 1, 413 CAP_CF_POLL_SHIFT = 2, 414 415 /* CF Poll request */ 416 CAP_CF_REQ_MASK = 1, 417 CAP_CF_REQ_SHIFT = 3, 418 419 /* Privacy */ 420 CAP_PRIVACY_MASK = 1, 421 CAP_PRIVACY_SHIFT = 4, 422 423 /* Short Preamble*/ 424 CAP_PREAMBLE_MASK = 1, 425 CAP_PREAMBLE_SHIFT = 5, 426 427 /* PBCC */ 428 CAP_PBCC_MASK = 1, 429 CAP_PBCC_SHIFT = 6, 430 431 /* Agile */ 432 CAP_AGILE_MASK = 1, 433 CAP_AGILE_SHIFT = 7, 434 435 /* Slot time */ 436 CAP_SLOT_TIME_MASK = 1, 437 CAP_SLOT_TIME_SHIFT = 10, 438 439 /* APSD */ 440 CAP_APSD_MASK = 1, 441 CAP_APSD_SHIFT = 11 442 443 444 } wdrv_mgmtCapabilities_e; 445 446 447 /* 448 * 802.11 Information elements 449 * --------------------------- 450 */ 451 452 typedef TI_UINT8 dot11_eleHdr_t[2]; /* Byte-0: IE-ID, Byte-1: IE-Length */ 453 454 /* fixed fields lengths, except of currentAP & timestamp*/ 455 #define FIX_FIELD_LEN 2 456 457 /* SSID Information Element */ 458 #define DOT11_SSID_ELE_ID 0 459 460 /* Max SSID length */ 461 #define MAX_SSID_LEN 32 462 463 typedef struct 464 { 465 dot11_eleHdr_t hdr; 466 char serviceSetId[MAX_SSID_LEN]; 467 } dot11_SSID_t; 468 469 470 /* Supportted rates Information Element */ 471 #define DOT11_SUPPORTED_RATES_ELE_ID 1 472 #define DOT11_EXT_SUPPORTED_RATES_ELE_ID 50 473 typedef struct 474 { 475 dot11_eleHdr_t hdr; 476 TI_UINT8 rates[DOT11_MAX_SUPPORTED_RATES]; 477 } dot11_RATES_t; 478 479 480 #define ERP_IE_NON_ERP_PRESENT_MASK 0x1 481 #define ERP_IE_USE_PROTECTION_MASK 0x2 482 #define ERP_IE_BARKER_PREAMBLE_MODE_MASK 0x4 483 #define DOT11_ERP_IE_ID 42 484 typedef struct 485 { 486 dot11_eleHdr_t hdr; 487 TI_UINT8 ctrl; 488 } dot11_ERP_t; 489 490 /* RSN Information Element */ 491 #define MAX_RSN_IE 3 492 #define DOT11_RSN_MAX 255 493 typedef struct 494 { 495 dot11_eleHdr_t hdr; 496 TI_UINT8 rsnIeData[DOT11_RSN_MAX]; 497 } dot11_RSN_t; 498 499 /* General definitions needed by rsn.c */ 500 #define IV_FIELD_SIZE 4 501 #define ICV_FIELD_SIZE 4 502 #define MIC_FIELD_SIZE 8 503 #define EIV_FIELD_SIZE 4 504 #define WEP_AFTER_HEADER_FIELD_SIZE IV_FIELD_SIZE 505 #define TKIP_AFTER_HEADER_FIELD_SIZE (IV_FIELD_SIZE + EIV_FIELD_SIZE) 506 #define AES_AFTER_HEADER_FIELD_SIZE 8 507 508 /* DS params Information Element */ 509 #define DOT11_DS_PARAMS_ELE_ID 3 510 #define DOT11_DS_PARAMS_ELE_LEN 1 511 typedef struct 512 { 513 dot11_eleHdr_t hdr; 514 TI_UINT8 currChannel; 515 } dot11_DS_PARAMS_t; 516 517 518 /* DS params Information Element */ 519 #define DOT11_IBSS_PARAMS_ELE_ID 6 520 #define DOT11_IBSS_PARAMS_ELE_LEN 2 521 typedef struct 522 { 523 dot11_eleHdr_t hdr; 524 TI_UINT16 atimWindow; 525 } dot11_IBSS_PARAMS_t; 526 527 #define DOT11_FH_PARAMS_ELE_ID 2 528 #define DOT11_FH_PARAMS_ELE_LEN 5 529 typedef struct 530 { 531 dot11_eleHdr_t hdr; 532 TI_UINT16 dwellTime; 533 TI_UINT8 hopSet; 534 TI_UINT8 hopPattern; 535 TI_UINT8 hopIndex; 536 } dot11_FH_PARAMS_t; 537 538 /* tim Information Element */ 539 #define DOT11_TIM_ELE_ID 5 540 #define DOT11_PARTIAL_VIRTUAL_BITMAP_MAX 251 541 typedef struct 542 { 543 dot11_eleHdr_t hdr; 544 TI_UINT8 dtimCount; 545 TI_UINT8 dtimPeriod; 546 TI_UINT8 bmapControl; 547 TI_UINT8 partialVirtualBmap[DOT11_PARTIAL_VIRTUAL_BITMAP_MAX]; 548 } dot11_TIM_t; 549 550 /* tim Information Element */ 551 #define DOT11_CF_ELE_ID 4 552 #define DOT11_CF_PARAMS_ELE_LEN 6 553 typedef struct 554 { 555 dot11_eleHdr_t hdr; 556 TI_UINT8 cfpCount; 557 TI_UINT8 cfpPeriod; 558 TI_UINT16 cfpMaxDuration; 559 TI_UINT16 cfpDurRemain; 560 } dot11_CF_PARAMS_t; 561 562 /* Challenge text Information Element */ 563 #define DOT11_CHALLENGE_TEXT_ELE_ID 16 564 #define DOT11_CHALLENGE_TEXT_MAX 253 565 typedef struct 566 { 567 dot11_eleHdr_t hdr; 568 TI_UINT8 text[ DOT11_CHALLENGE_TEXT_MAX ]; 569 } dot11_CHALLENGE_t; 570 571 572 #define DOT11_NUM_OF_MAX_TRIPLET_CHANNEL 37 573 574 typedef struct 575 { 576 TI_UINT8 firstChannelNumber; 577 TI_UINT8 numberOfChannels; 578 TI_UINT8 maxTxPowerLevel; 579 } dot11_TripletChannel_t; 580 581 typedef struct 582 { 583 TI_UINT8 CountryString[DOT11_COUNTRY_STRING_LEN]; 584 dot11_TripletChannel_t tripletChannels[DOT11_NUM_OF_MAX_TRIPLET_CHANNEL]; 585 } dot11_countryIE_t; 586 587 588 /* Country Inforamtion Element */ 589 #define DOT11_COUNTRY_ELE_ID 7 590 #define DOT11_COUNTRY_ELE_LEN_MAX ( ((DOT11_NUM_OF_MAX_TRIPLET_CHANNEL+1)*3) + !((DOT11_NUM_OF_MAX_TRIPLET_CHANNEL&0x1))) 591 typedef struct 592 { 593 dot11_eleHdr_t hdr; 594 dot11_countryIE_t countryIE; 595 } dot11_COUNTRY_t; 596 597 598 /* Power Constraint Information Element */ 599 #define DOT11_POWER_CONSTRAINT_ELE_ID (32) 600 #define DOT11_POWER_CONSTRAINT_ELE_LEN (1) 601 typedef struct 602 { 603 dot11_eleHdr_t hdr; 604 TI_UINT8 powerConstraint; 605 } dot11_POWER_CONSTRAINT_t; 606 607 608 609 /* Power Capability Information Element */ 610 #define DOT11_CAPABILITY_ELE_ID (33) 611 #define DOT11_CAPABILITY_ELE_LEN (2) 612 typedef struct 613 { 614 dot11_eleHdr_t hdr; 615 TI_UINT8 minTxPower; 616 TI_UINT8 maxTxPower; 617 } dot11_CAPABILITY_t; 618 619 /* TPC request Information Element */ 620 #define DOT11_TPC_REQUEST_ELE_ID (34) 621 #define DOT11_TPC_REQUEST_ELE_LEN (0) 622 typedef struct 623 { 624 dot11_eleHdr_t hdr; 625 } dot11_TPC_REQUEST_t; 626 627 /* TPC report Information Element */ 628 #define DOT11_TPC_REPORT_ELE_ID (35) 629 #define DOT11_TPC_REPORT_ELE_LEN (2) 630 typedef struct 631 { 632 dot11_eleHdr_t hdr; 633 TI_UINT8 transmitPower; 634 TI_UINT8 linkMargin; 635 } dot11_TPC_REPORT_t; 636 637 638 #ifdef XCC_MODULE_INCLUDED 639 640 /* Cell Transmit Power Information Element */ 641 #define DOT11_CELL_TP_ELE_ID (150) 642 #define DOT11_CELL_TP_ELE_LEN (6) 643 644 typedef struct 645 { 646 dot11_eleHdr_t hdr; 647 TI_UINT8 oui[4]; 648 TI_UINT8 power; 649 TI_UINT8 reserved; 650 } dot11_CELL_TP_t; 651 652 #define DOT11_CELL_TP \ 653 dot11_CELL_TP_t *cellTP; 654 655 #else /* XCC_MODULE_INCLUDED */ 656 657 #define DOT11_CELL_TP 658 659 #endif /* XCC_MODULE_INCLUDED */ 660 661 662 /* Channel Supported Information Element */ 663 #define DOT11_CHANNEL_SUPPORTED_ELE_ID (36) 664 #define DOT11_CHANNEL_SUPPORTED_ELE_LEN (26) 665 typedef struct 666 { 667 dot11_eleHdr_t hdr; 668 TI_UINT8 supportedChannel[DOT11_CHANNEL_SUPPORTED_ELE_LEN]; 669 670 } dot11_CHANNEL_SUPPORTED_t; 671 672 /* Channel Switch Announcement Information Element */ 673 #define DOT11_CHANNEL_SWITCH_ELE_ID (37) 674 #define DOT11_CHANNEL_SWITCH_ELE_LEN (3) 675 typedef struct 676 { 677 dot11_eleHdr_t hdr; 678 TI_UINT8 channelSwitchMode; 679 TI_UINT8 channelNumber; 680 TI_UINT8 channelSwitchCount; 681 } dot11_CHANNEL_SWITCH_t; 682 683 #define MAX_NUM_REQ (16) 684 685 /* Measurement request Information Element */ 686 #define DOT11_MEASUREMENT_REQUEST_ELE_ID (38) 687 #define DOT11_MEASUREMENT_REQUEST_LEN (2) 688 #define DOT11_MEASUREMENT_REQUEST_ELE_LEN (3 + DOT11_MEASUREMENT_REQUEST_LEN*MAX_NUM_REQ) 689 typedef struct 690 { 691 dot11_eleHdr_t hdr; 692 TI_UINT8 measurementToken; 693 TI_UINT8 measurementMode; 694 TI_UINT8 measurementType; 695 TI_UINT8 measurementRequests[DOT11_MEASUREMENT_REQUEST_LEN*MAX_NUM_REQ]; 696 } dot11_MEASUREMENT_REQUEST_t; 697 698 699 /* Quiet Information Element */ 700 #define DOT11_QUIET_ELE_ID (40) 701 #define DOT11_QUIET_ELE_LEN (6) 702 typedef struct 703 { 704 dot11_eleHdr_t hdr; 705 TI_UINT8 quietCount; 706 TI_UINT8 quietPeriod; 707 TI_UINT16 quietDuration; 708 TI_UINT16 quietOffset; 709 } dot11_QUIET_t; 710 711 712 /* QoS Capability Information Element */ 713 #define DOT11_QOS_CAPABILITY_ELE_ID (46) 714 #define DOT11_QOS_CAPABILITY_ELE_LEN (1) 715 716 #define AC_APSD_FLAGS_MASK (1) 717 #define Q_ACK_BITG_MASK (1) 718 #define MAX_SP_LENGTH_MASK (3) 719 #define MORE_DATA_ACK_MASK (1) 720 721 #define AC_VO_APSD_FLAGS_SHIFT (0) 722 #define AC_VI_APSD_FLAGS_SHIFT (1) 723 #define AC_BK_APSD_FLAGS_SHIFT (2) 724 #define AC_BE_APSD_FLAGS_SHIFT (3) 725 #define Q_ACK_FLAGS_SHIFT (4) 726 #define MAX_SP_LENGTH_SHIFT (5) 727 #define MORE_DATA_ACK_SHIFT (7) 728 729 #define QOS_CONTROL_UP_SHIFT (0) 730 731 #define AP_QOS_INFO_UAPSD_MASK (1) 732 #define AP_QOS_INFO_UAPSD_SHIFT (7) 733 734 typedef struct 735 { 736 dot11_eleHdr_t hdr; 737 TI_UINT8 QosInfoField; 738 } dot11_QOS_CAPABILITY_IE_t; 739 740 /* WPS Information Element */ 741 #define DOT11_WPS_ELE_ID (221) 742 #define DOT11_WPS_OUI {0x00, 0x50, 0xF2, 0x04} 743 #define DOT11_WPS_OUI_LEN 4 744 745 /* WME Information Element */ 746 #define DOT11_WME_ELE_ID (221) 747 #define DOT11_WME_ELE_LEN (7) 748 typedef struct 749 { 750 dot11_eleHdr_t hdr; 751 TI_UINT8 OUI[3]; 752 TI_UINT8 OUIType; 753 TI_UINT8 OUISubType; 754 TI_UINT8 version; 755 TI_UINT8 ACInfoField; 756 } dot11_WME_IE_t; 757 758 759 typedef struct 760 { 761 TI_UINT8 ACI_AIFSN; 762 TI_UINT8 ECWmin_ECWmax; 763 TI_UINT16 TXOPLimit; 764 } dot11_QOS_AC_IE_ParametersRecord_t; 765 766 typedef struct 767 { 768 dot11_QOS_AC_IE_ParametersRecord_t ACBEParametersRecord; 769 dot11_QOS_AC_IE_ParametersRecord_t ACBKParametersRecord; 770 dot11_QOS_AC_IE_ParametersRecord_t ACVIParametersRecord; 771 dot11_QOS_AC_IE_ParametersRecord_t ACVOParametersRecord; 772 } dot11_ACParameters_t; 773 774 775 /* WME Parameter Information Element */ 776 #define DOT11_WME_PARAM_ELE_ID (221) 777 #define DOT11_WME_PARAM_ELE_LEN (24) 778 typedef struct 779 { 780 dot11_eleHdr_t hdr; 781 TI_UINT8 OUI[3]; 782 TI_UINT8 OUIType; 783 TI_UINT8 OUISubType; 784 TI_UINT8 version; 785 TI_UINT8 ACInfoField; 786 TI_UINT8 reserved; 787 dot11_ACParameters_t WME_ACParameteres; 788 } dot11_WME_PARAM_t; 789 790 791 /* 802.11n HT Information Element */ 792 #define DOT11_HT_CAPABILITIES_ELE_LEN (26) 793 #define DOT11_HT_INFORMATION_ELE_LEN (22) 794 795 #define DOT11_HT_CAPABILITIES_MCS_RATE_OFFSET (3) 796 #define DOT11_HT_INFORMATION_MCS_RATE_OFFSET (6) 797 798 typedef struct 799 { 800 dot11_eleHdr_t tHdr; 801 TI_UINT8 aHtCapabilitiesIe[DOT11_HT_CAPABILITIES_ELE_LEN]; /* HT capabilities IE unparsed */ 802 } Tdot11HtCapabilitiesUnparse; 803 804 typedef struct 805 { 806 dot11_eleHdr_t tHdr; 807 TI_UINT8 aHtInformationIe[DOT11_HT_INFORMATION_ELE_LEN]; /* HT Information IE unparsed */ 808 } Tdot11HtInformationUnparse; 809 810 /* BA session bits mask */ 811 #define DOT11_BAR_CONTROL_FIELD_TID_BITS 0xf000 812 #define DOT11_BA_PARAMETER_SET_FIELD_TID_BITS 0x003C 813 #define DOT11_BA_PARAMETER_SET_FIELD_WINSIZE_BITS 0xffC0 814 #define DOT11_DELBA_PARAMETER_FIELD_TID_BITS 0xf000 815 816 /* action field BA frames */ 817 typedef enum 818 { 819 DOT11_BA_ACTION_ADDBA = 0, 820 DOT11_BA_ACTION_DELBA = 2 821 } Edot11BaAction; 822 823 824 /* WiFi Simple Config Information Element */ 825 #define DOT11_WSC_PARAM_ELE_ID (221) 826 827 #define DOT11_WSC_SELECTED_REGISTRAR_CONFIG_METHODS 0x1053 828 #define DOT11_WSC_SELECTED_REGISTRAR_CONFIG_METHODS_PIN 0xC 829 #define DOT11_WSC_SELECTED_REGISTRAR_CONFIG_METHODS_PBC 0x80 830 831 #define DOT11_WSC_DEVICE_PASSWORD_ID 0x1012 832 #define DOT11_WSC_DEVICE_PASSWORD_ID_PIN 0x0000 833 #define DOT11_WSC_DEVICE_PASSWORD_ID_PBC 0x0004 834 835 /* WiFi Simple Config Parameter Information Element */ 836 #define DOT11_WSC_PROBE_REQ_PARAM_ELE_LEN (22) 837 #define DOT11_WSC_BEACON_MAX_LENGTH 160 838 839 typedef struct 840 { 841 dot11_eleHdr_t hdr; 842 TI_UINT8 OUI[3]; 843 TI_UINT8 OUIType; 844 TI_UINT8 WSCBeaconOrProbIE[DOT11_WSC_BEACON_MAX_LENGTH]; 845 } dot11_WSC_t; 846 847 #define dot11_WPA_OUI_TYPE (1) 848 #define dot11_WME_OUI_TYPE (2) 849 #define dot11_WSC_OUI_TYPE (4) 850 #define dot11_WME_OUI_SUB_TYPE_IE (0) 851 #define dot11_WME_OUI_SUB_TYPE_PARAMS_IE (1) 852 #define dot11_WME_VERSION (1) 853 #define dot11_WME_ACINFO_MASK 0x0f 854 855 /* -------------------- TSPEC ----------------- */ 856 857 typedef struct 858 { 859 TI_UINT8 tsInfoArr[3]; 860 861 } tsInfo_t; 862 863 864 865 /* This structure is part of the TSPEC structure. It was seperated since there are some cases (such as DEL_TS), which we dont need 866 to send ALL the TSPEC structure, but only as far as TsInfo. The TSPEC structure contains this smaller structure */ 867 typedef struct 868 { 869 dot11_eleHdr_t hdr; 870 871 TI_UINT8 OUI[3]; 872 TI_UINT8 oui_type; 873 TI_UINT8 oui_subtype; 874 TI_UINT8 version; 875 876 tsInfo_t tsInfoField; 877 } dot11_WME_TSPEC_IE_hdr_t; 878 879 typedef struct 880 { 881 882 dot11_WME_TSPEC_IE_hdr_t tHdr; 883 884 TI_UINT16 nominalMSDUSize; 885 TI_UINT16 maximumMSDUSize; 886 TI_UINT32 minimumServiceInterval; 887 TI_UINT32 maximumServiceInterval; 888 TI_UINT32 inactivityInterval; 889 TI_UINT32 suspensionInterval; 890 TI_UINT32 serviceStartTime; 891 TI_UINT32 minimumDataRate; 892 TI_UINT32 meanDataRate; 893 TI_UINT32 peakDataRate; 894 TI_UINT32 maximumBurstSize; 895 TI_UINT32 delayBound; 896 TI_UINT32 minimumPHYRate; 897 TI_UINT16 surplusBandwidthAllowance; 898 TI_UINT16 mediumTime; 899 900 } dot11_WME_TSPEC_IE_t; 901 902 903 #define WME_TSPEC_IE_ID 221 904 #define WME_TSPEC_IE_LEN 61 905 #define WME_TSPEC_IE_TSINFO_LEN 9 906 #define WME_TSPEC_IE_OUI_TYPE 0x02 907 #define WME_TSPEC_IE_OUI_SUB_TYPE 0x02 908 #define WME_TSPEC_IE_VERSION 0x01 909 910 /* OUI TYPE values that can be present in management packets inside Cisco vendor specific IE */ 911 typedef enum 912 { 913 TS_METRIX_OUI_TYPE = 0x07, 914 TS_RATE_SET_OUI_TYPE = 0x08, 915 EDCA_LIFETIME_OUI_TYPE = 0x09 916 } XCC_IE_OUI_TYPE_t; 917 918 #define ADDTS_REQUEST_ACTION 0x00 919 #define ADDTS_RESPONSE_ACTION 0x01 920 #define DELTS_ACTION 0x02 921 922 #define ADDTS_STATUS_CODE_SUCCESS 0x00 923 #define DELTS_CODE_SUCCESS 0x00 924 925 926 #define TS_INFO_0_TRAFFIC_TYPE_MASK 0x01 927 #define TS_INFO_0_TSID_MASK 0x1E 928 #define TS_INFO_0_DIRECTION_MASK 0x60 929 #define TS_INFO_0_ACCESS_POLICY_MASK 0x80 930 931 #define TS_INFO_1_ACCESS_POLICY_MASK 0x01 932 #define TS_INFO_1_AGGREGATION_MASK 0x02 933 #define TS_INFO_1_APSD_MASK 0x04 934 #define TS_INFO_1_USER_PRIORITY_MASK 0x38 935 #define TS_INFO_1_TSINFO_ACK_POLICY_MASK 0xC0 936 937 #define TS_INFO_2_SCHEDULE_MASK 0x01 938 #define TS_INFO_2_RESERVED_MASK 0xF7 939 940 #define TRAFFIC_TYPE_SHIFT 0 941 #define TSID_SHIFT 1 942 #define DIRECTION_SHIFT 5 943 #define ACCESS_POLICY_SHIFT 7 944 #define AGGREGATION_SHIFT 1 945 #define APSD_SHIFT 2 946 #define USER_PRIORITY_SHIFT 3 947 #define TSINFO_ACK_POLICY_SHIFT 6 948 #define SCHEDULE_SHIFT 0 949 #define RESERVED_SHIFT 1 950 #define SURPLUS_BANDWIDTH_ALLOW 13 951 952 #define TS_INFO_0_ACCESS_POLICY_EDCA 0x1 953 #define NORMAL_ACKNOWLEDGEMENT 0x00 954 #define NO_SCHEDULE 0x00 955 #define PS_UPSD 0x01 956 #define EDCA_MODE 0x08 957 #define FIX_MSDU_SIZE 0x8000 958 959 #define WPA_IE_OUI {0x00, 0x50, 0xf2} 960 #define XCC_OUI {0x00, 0x40, 0x96} 961 962 /* Action field structure 963 used for extended management action such as spectrum management */ 964 typedef TI_UINT8 dot11_ACTION_FIELD_t[2]; 965 966 967 /* Management frames sub types */ 968 typedef enum 969 { 970 ASSOC_REQUEST = 0, 971 ASSOC_RESPONSE = 1, 972 RE_ASSOC_REQUEST = 2, 973 RE_ASSOC_RESPONSE = 3, 974 PROBE_REQUEST = 4, 975 PROBE_RESPONSE = 5, 976 BEACON = 8, 977 ATIM = 9, 978 DIS_ASSOC = 10, 979 AUTH = 11, 980 DE_AUTH = 12, 981 ACTION = 13 982 } dot11MgmtSubType_e; 983 984 /* Management frames element IDs */ 985 typedef enum 986 { 987 SSID_IE_ID = 0, 988 SUPPORTED_RATES_IE_ID = 1, 989 FH_PARAMETER_SET_IE_ID = 2, 990 DS_PARAMETER_SET_IE_ID = 3, 991 CF_PARAMETER_SET_IE_ID = 4, 992 TIM_IE_ID = 5, 993 IBSS_PARAMETER_SET_IE_ID = 6, 994 COUNTRY_IE_ID = 7, 995 CHALLANGE_TEXT_IE_ID = 16, 996 POWER_CONSTRAINT_IE_ID = 32, 997 TPC_REPORT_IE_ID = 35, 998 CHANNEL_SWITCH_ANNOUNCEMENT_IE_ID = 37, 999 QUIET_IE_ID = 40, 1000 ERP_IE_ID = 42, 1001 HT_CAPABILITIES_IE_ID = 45, 1002 QOS_CAPABILITY_IE_ID = 46, 1003 RSN_IE_ID = 48, 1004 EXT_SUPPORTED_RATES_IE_ID = 50, 1005 HT_INFORMATION_IE_ID = 61, 1006 XCC_EXT_1_IE_ID = 133, 1007 XCC_EXT_2_IE_ID = 149, 1008 CELL_POWER_IE = 150, /*XCC*/ 1009 WPA_IE_ID = 221 1010 1011 } dot11MgmtIeId_e; 1012 1013 /* Spectrum Management Action fields */ 1014 typedef enum 1015 { 1016 MEASUREMENT_REQUEST = 0, 1017 MEASUREMENT_REPORT = 1, 1018 TPC_REQUEST = 2, 1019 TPC_REPORT = 3, 1020 CHANNEL_SWITCH_ANNOUNCEMENT = 4 1021 } dot11ActionFrameTypes_e; 1022 1023 /* Category fields (such as apectrum management)*/ 1024 typedef enum 1025 { 1026 CATAGORY_SPECTRUM_MANAGEMENT = 0, 1027 CATAGORY_QOS = 1, 1028 WME_CATAGORY_QOS = 17, 1029 CATAGORY_SPECTRUM_MANAGEMENT_ERROR = 128 1030 } dot11CategoryTypes_e; 1031 1032 1033 /* 1034 * Management templates to set to the HAL: 1035 */ 1036 1037 #ifdef XCC_MODULE_INCLUDED 1038 1039 typedef struct 1040 { 1041 dot11_mgmtHeader_t hdr; 1042 char infoElements[sizeof( dot11_SSID_t ) + 1043 sizeof( dot11_RATES_t ) + 1044 sizeof( dot11_RATES_t ) + 1045 sizeof( Tdot11HtCapabilitiesUnparse ) + 1046 DOT11_WSC_PROBE_REQ_MAX_LENGTH + 1047 sizeof( XCC_radioManagmentCapability_IE_t ) 1048 ]; 1049 } probeReqTemplate_t; 1050 1051 #else /* XCC_MODULE_INCLUDED */ 1052 1053 typedef struct 1054 { 1055 dot11_mgmtHeader_t hdr; 1056 char infoElements[sizeof( dot11_SSID_t ) + 1057 sizeof( dot11_RATES_t ) + 1058 sizeof( dot11_RATES_t ) + 1059 sizeof( Tdot11HtCapabilitiesUnparse ) + 1060 DOT11_WSC_PROBE_REQ_MAX_LENGTH 1061 ]; 1062 } probeReqTemplate_t; 1063 1064 #endif /* XCC_MODULE_INCLUDED */ 1065 1066 1067 typedef struct 1068 { 1069 dot11_mgmtHeader_t hdr; 1070 TI_UINT8 timeStamp[TIME_STAMP_LEN]; 1071 TI_UINT16 beaconInterval; 1072 TI_UINT16 capabilities; 1073 char infoElements[ sizeof( dot11_SSID_t ) + 1074 sizeof( dot11_RATES_t ) + 1075 sizeof( dot11_RATES_t ) + 1076 sizeof( dot11_DS_PARAMS_t ) + 1077 sizeof( dot11_COUNTRY_t) ]; 1078 } probeRspTemplate_t; 1079 1080 typedef struct 1081 { 1082 dot11_mgmtHeader_t hdr; 1083 } nullDataTemplate_t; 1084 1085 typedef struct 1086 { 1087 dot11_mgmtHeader_t hdr; 1088 TI_UINT16 disconnReason; 1089 } disconnTemplate_t; /* Deauth or Disassoc */ 1090 1091 typedef struct 1092 { 1093 dot11_header_t hdr; 1094 TI_UINT8 securityOverhead[AES_AFTER_HEADER_FIELD_SIZE]; 1095 Wlan_LlcHeader_T LLC; 1096 TI_UINT16 hardType; 1097 TI_UINT16 protType; 1098 TI_UINT8 hardSize; 1099 TI_UINT8 protSize; 1100 TI_UINT16 op; 1101 TMacAddr StaMac; 1102 TIpAddr StaIp; 1103 TMacAddr TargMac; 1104 TIpAddr TargIp; 1105 } ArpRspTemplate_t; /* for auto ArpRsp sending by FW */ 1106 1107 typedef struct 1108 { 1109 dot11_PsPollFrameHeader_t hdr; 1110 } psPollTemplate_t; 1111 1112 typedef struct 1113 { 1114 dot11_header_t hdr; 1115 } QosNullDataTemplate_t; 1116 1117 /* Traffic Stream Rate Set (TSRS) info-elements */ 1118 typedef struct 1119 { 1120 dot11_eleHdr_t hdr; 1121 TI_UINT8 OUI[3]; 1122 TI_UINT8 oui_type; 1123 TI_UINT8 tsid; 1124 TI_UINT8 tsNominalRate; 1125 } dot11_TSRS_STA_IE_t; 1126 1127 typedef struct 1128 { 1129 dot11_eleHdr_t hdr; 1130 TI_UINT8 OUI[3]; 1131 TI_UINT8 oui_type; 1132 TI_UINT8 tsid; 1133 TI_UINT8 tsRates[8]; 1134 } dot11_TSRS_IE_t; 1135 1136 /* MSDU lifetime info-element */ 1137 typedef struct 1138 { 1139 dot11_eleHdr_t hdr; 1140 TI_UINT8 OUI[3]; 1141 TI_UINT8 oui_type; 1142 TI_UINT8 tsid; 1143 TI_UINT16 msduLifeTime; 1144 } dot11_MSDU_LIFE_TIME_IE_t; 1145 1146 typedef struct 1147 { 1148 dot11_eleHdr_t hdr; 1149 TI_UINT8 OUI[3]; 1150 TI_UINT8 oui_type; 1151 TI_UINT8 tsid; 1152 TI_UINT8 state; 1153 TI_UINT16 measureInterval; 1154 } dot11_TS_METRICS_IE_t; 1155 1156 typedef struct 1157 { 1158 dot11_TSRS_IE_t *trafficStreamParameter; 1159 dot11_MSDU_LIFE_TIME_IE_t *edcaLifetimeParameter; 1160 dot11_TS_METRICS_IE_t *tsMetrixParameter; 1161 } XCCv4IEs_t; 1162 1163 1164 /* Measurement Report message frame structure */ 1165 #define DOT11_MEASUREMENT_REPORT_ELE_ID (39) 1166 #define DOT11_MAX_MEASUREMENT_REPORT_LEN (4) 1167 #define DOT11_MIN_MEASUREMENT_REPORT_IE_LEN (3) 1168 #define DOT11_MEASUREMENT_REPORT_ELE_IE_LEN (DOT11_MIN_MEASUREMENT_REPORT_IE_LEN + DOT11_MAX_MEASUREMENT_REPORT_LEN*MAX_NUM_REQ) 1169 1170 typedef struct 1171 { 1172 dot11_ACTION_FIELD_t actionField; 1173 TI_UINT8 dialogToken; 1174 1175 dot11_eleHdr_t hdr; 1176 TI_UINT8 measurementToken; 1177 TI_UINT8 measurementMode; 1178 TI_UINT8 measurementType; 1179 TI_UINT8 measurementReports[DOT11_MAX_MEASUREMENT_REPORT_LEN*MAX_NUM_REQ]; 1180 } MeasurementReportFrame_t; 1181 1182 1183 1184 typedef enum 1185 { 1186 STATUS_SUCCESSFUL = 0, 1187 STATUS_UNSPECIFIED, 1188 STATUS_AUTH_REJECT, 1189 STATUS_ASSOC_REJECT, 1190 STATUS_SECURITY_FAILURE, 1191 STATUS_AP_DEAUTHENTICATE, 1192 STATUS_AP_DISASSOCIATE, 1193 STATUS_ROAMING_TRIGGER, 1194 STATUS_DISCONNECT_DURING_CONNECT, 1195 STATUS_SG_RESELECT, 1196 STATUS_MIC_FAILURE = 14, 1197 MGMT_STATUS_MAX_NUM = 15 1198 } mgmtStatus_e; 1199 1200 /* Used as a status code in case of STATUS_AUTH_REJECT or STATUS_ASSOC_REJECT that was not received at all */ 1201 #define STATUS_PACKET_REJ_TIMEOUT 0xFFFF 1202 1203 /* As defined in 802.11 spec section 7.3.1 - status codes for deAuth packet */ 1204 #define STATUS_CODE_802_1X_AUTHENTICATION_FAILED 23 1205 1206 /* map field included in measurement report IE (only in basic report) */ 1207 typedef enum 1208 { 1209 DOT11_BSS_ONLY = (0x01), 1210 DOT11_OFDM_ONLY = (0x02), 1211 DOT11_RADAR_AND_UNIDENTIFIED = (0x0C) 1212 } dot11_Map_Sub_Field_e; 1213 1214 1215 typedef struct 1216 { 1217 legacy_dot11_header_t dot11Header; 1218 Wlan_LlcHeader_T snapHeader; 1219 } legacy_dot11_DataMsduHeader_t; 1220 1221 1222 #define WLAN_HEADER_TYPE_CONCATENATION 0x01 1223 #define WLAN_CONCAT_HEADER_LEN 2 1224 1225 1226 #endif /* _802_11_INFO_DEFS_H */ 1227