1/**************************************************************************** 2**+-----------------------------------------------------------------------+** 3**| |** 4**| Copyright(c) 1998 - 2008 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: osDot11.h */ 38/* */ 39/* Purpose: */ 40/* */ 41/*--------------------------------------------------------------------------*/ 42#ifndef __OSDOT11_H__ 43#define __OSDOT11_H__ 44 45#include "osTIType.h" 46#include "tiQosTypes.h" 47/*#include "public_types.h"*/ 48 49 50#define MAC_ADDR_LEN 6 51PACKED_STRUCT( macAddress_t, 52 53 UINT8 addr[MAC_ADDR_LEN]; 54); 55 56 57 58#define OS_STATUS_MEDIA_SPECIFIC_INDICATION ((NDIS_STATUS)0x40010012L) 59 60#define OS_802_11_REQUEST_REAUTH 0x01 61#define OS_802_11_REQUEST_KEYUPDATE 0x02 62#define OS_802_11_REQUEST_PAIRWISE_ERROR 0x06 63#define OS_802_11_REQUEST_GROUP_ERROR 0x0E 64 65/**/ 66/* Per-packet information for Ieee8021QInfo.*/ 67/**/ 68typedef struct _OS_PACKET_8021Q_INFO 69{ 70 union 71 { 72 struct 73 { 74 UINT32 UserPriority:3; /* 802.1p priority*/ 75 UINT32 CanonicalFormatId:1; /* always 0*/ 76 UINT32 VlanId:12; /* VLAN Identification*/ 77 UINT32 Reserved:16; /* set to 0*/ 78 } TagHeader; 79 80 PVOID Value; 81 }u; 82} OS_PACKET_8021Q_INFO, *POS_PACKET_8021Q_INFO; 83 84typedef tiUINT8 OS_802_11_MAC_ADDRESS[6]; 85 86typedef tiULONGLONG OS_802_11_KEY_RSC; 87 88PACKED_STRUCT( _OS_802_11_SSID, 89 90 tiUINT32 SsidLength; 91 tiUINT8 Ssid[32]; 92); 93typedef _OS_802_11_SSID OS_802_11_SSID, *POS_802_11_SSID; 94 95typedef enum _OS_802_11_NETWORK_TYPE 96{ 97 os802_11FH, 98 os802_11DS, 99 os802_11OFDM5, 100 os802_11OFDM24, 101 os802_11Automode, 102 os802_11NetworkTypeMax 103} OS_802_11_NETWORK_TYPE; 104 105PACKED_STRUCT( _OS_802_11_NETWORK_TYPE_LIST , 106 107 tiUINT32 NumberOfItems; 108 OS_802_11_NETWORK_TYPE NetworkType [1]; 109); 110typedef _OS_802_11_NETWORK_TYPE_LIST OS_802_11_NETWORK_TYPE_LIST, *POS_802_11_NETWORK_TYPE_LIST; 111 112typedef enum _OS_802_11_POWER_MODE 113{ 114 /*Continuous access mode (CAM). */ 115 /*When the power mode is set to CAM, the device is always on. */ 116 os802_11PowerModeCAM, 117 118 /*Specifies maximum (MAX) power saving. A power mode of MAX */ 119 /*results in the greatest power savings for the 802.11 NIC radio. */ 120 os802_11PowerModeMAX_PSP, 121 122 /*Specifies fast power-saving mode. This power mode provides */ 123 /*the best combination of network performance and power usage. */ 124 os802_11PowerModeFast_PSP, 125 os802_11PowerModeMax 126} OS_802_11_POWER_MODE; 127 128/*specified in milliwatts (mW).*/ 129typedef tiUINT32 OS_802_11_TX_POWER_LEVEL; 130 131/*Normal value from -10 and -200*/ 132typedef INT32 OS_802_11_RSSI; 133 134/*Length */ 135/* Specifies the length of the OS_802_11_CONFIGURATION_FH structure in bytes. */ 136/*HopPattern*/ 137/* Specifies the hop pattern used to determine the hop sequence. */ 138/* As defined by the 802.11 standard, the layer management entity (LME) of */ 139/* the physical layer uses a hop pattern to determine the hop sequence. */ 140/*HopSet*/ 141/* Specifies a set of patterns. The LME of the physical layer uses these */ 142/* patterns to determine the hop sequence. */ 143/*DwellTime*/ 144/* Specifies the maximum period of time during which the transmitter */ 145/* should remain fixed on a channel. This interval is described in Kµsec (1024 µsec). */ 146PACKED_STRUCT( _OS_802_11_CONFIGURATION_FH , 147 148 tiUINT32 Length; 149 tiUINT32 HopPattern; 150 tiUINT32 HopSet; 151 tiUINT32 DwellTime; 152); 153typedef _OS_802_11_CONFIGURATION_FH OS_802_11_CONFIGURATION_FH, *POS_802_11_CONFIGURATION_FH; 154 155/*Length */ 156/* Specifies the length of the NDIS_802_11_CONFIGURATION structure in bytes. */ 157/*BeaconPeriod */ 158/* Specifies the interval between beacon message transmissions. */ 159/* This value is specified in Kµsec (1024 µsec). */ 160/*ATIMWindow */ 161/* Specifies the announcement traffic information message (ATIM) window in */ 162/* Kµsec (1024 µsec). The ATIM window is a short time period immediately */ 163/* after the transmission of each beacon in an IBSS configuration. */ 164/* During the ATIM window, any station can indicate the need to transfer data */ 165/* to another station during the following data-transmission window. */ 166/*DSConfig */ 167/* Specifies the frequency of the selected channel in kHz. */ 168/*FHConfig */ 169/* Specifies the frequency hopping configuration in an OS_802_11_CONFIGURATION_FH structure. */ 170#ifdef _WINDOWS 171#else 172 PACKED_STRUCT( _OS_802_11_CONFIGURATION , 173 174 tiUINT32 Length; 175 tiUINT32 BeaconPeriod; 176 tiUINT32 ATIMWindow; 177 PACKED_UNION(Union, 178 tiUINT32 DSConfig; 179 tiUINT32 channel; 180 ); 181 182 OS_802_11_CONFIGURATION_FH FHConfig; 183 ); 184#endif 185 186typedef _OS_802_11_CONFIGURATION OS_802_11_CONFIGURATION, *POS_802_11_CONFIGURATION; 187 188/*Ndis802_11IBSS */ 189/* Specifies the independent basic service set (IBSS) mode. */ 190/* This mode is also known as ad hoc mode. */ 191/*Ndis802_11Infrastructure */ 192/* Specifies the infrastructure mode. */ 193/*Ndis802_11AutoUnknown */ 194/* Specifies an automatic mode. In this mode, the 802.11 NIC can switch */ 195/* between ad hoc and infrastructure modes as required. */ 196/*Ndis802_11HighSpeedIBSS*/ 197/* Specifies proprietary ad hoc mode that works only PBCC.*/ 198typedef enum _OS_802_11_NETWORK_MODE 199{ 200 os802_11IBSS, 201 os802_11Infrastructure, 202 os802_11AutoUnknown, 203 os802_11HighSpeedIBSS, 204 os802_11InfrastructureMax 205} OS_802_11_NETWORK_MODE, OS_802_11_NETWORK_INFRASTRUCTURE,*POS_802_11_NETWORK_INFRASTRUCTURE; 206 207/**/ 208/*The rates array contains a set of eight octets. */ 209/*Each octet contains a desired data rate in units of .5 Mbps.*/ 210/**/ 211typedef tiUINT8 OS_802_11_RATES[8]; 212 213typedef tiUINT8 OS_802_11_RATES_EX[16]; 214 215PACKED_STRUCT( _OS_802_11_FIXED_IEs , 216 217 tiUINT8 TimeStamp[8]; 218 tiUINT16 BeaconInterval; 219 tiUINT16 Capabilities; 220); 221typedef _OS_802_11_FIXED_IEs OS_802_11_FIXED_IEs, *POS_802_11_FIXED_IEs; 222 223PACKED_STRUCT( _OS_802_11_VARIABLE_IEs , 224 225 tiUINT8 ElementID; 226 tiUINT8 Length; /* Number of bytes in data field*/ 227 tiUINT8 data[1]; 228); 229typedef _OS_802_11_VARIABLE_IEs OS_802_11_VARIABLE_IEs, *POS_802_11_VARIABLE_IEs; 230 231/*#pragma pack(push)*/ 232#ifdef _WINDOWS 233#else 234 PACKED_STRUCT( _OS_802_11_BSSID , 235 tiUINT32 Length; 236 OS_802_11_MAC_ADDRESS MacAddress; 237 PACKED_UNION(Union, 238 tiUINT8 Reserved[2]; 239 tiUINT16 Capabilities; 240 ); 241 OS_802_11_SSID Ssid; 242 tiUINT32 Privacy; 243 OS_802_11_RSSI Rssi; 244 OS_802_11_NETWORK_TYPE NetworkTypeInUse; 245 OS_802_11_CONFIGURATION Configuration; 246 OS_802_11_NETWORK_MODE InfrastructureMode; 247 OS_802_11_RATES SupportedRates; 248 /*tiUINT32 channel;*/ 249 ); 250#endif 251typedef _OS_802_11_BSSID OS_802_11_BSSID, *POS_802_11_BSSID; 252 253PACKED_STRUCT( _OS_802_11_BSSID_LIST , 254 255 tiUINT32 NumberOfItems; 256 OS_802_11_BSSID Bssid[1]; 257); 258typedef _OS_802_11_BSSID_LIST OS_802_11_BSSID_LIST, *POS_802_11_BSSID_LIST; 259 260#ifdef _WINDOWS 261#else 262 263 PACKED_STRUCT( _OS_802_11_BSSID_EX , 264 265 tiUINT32 Length; 266 OS_802_11_MAC_ADDRESS MacAddress; 267 PACKED_UNION(Union, 268 tiUINT8 Reserved[2]; 269 tiUINT16 Capabilities; 270 ); 271 OS_802_11_SSID Ssid; 272 tiUINT32 Privacy; 273 OS_802_11_RSSI Rssi; 274 OS_802_11_NETWORK_TYPE NetworkTypeInUse; 275 OS_802_11_CONFIGURATION Configuration; 276 OS_802_11_NETWORK_MODE InfrastructureMode; 277 OS_802_11_RATES_EX SupportedRates; 278 tiUINT32 IELength; 279 tiUINT8 IEs[1]; 280 ); 281 282#endif 283 284typedef _OS_802_11_BSSID_EX OS_802_11_BSSID_EX, *POS_802_11_BSSID_EX, OS_WLAN_BSSID_EX, *POS_WLAN_BSSID_EX; 285 286 287PACKED_STRUCT( _OS_802_11_BSSID_LIST_EX , 288 289 tiUINT32 NumberOfItems; 290 OS_802_11_BSSID_EX Bssid[1]; 291); 292typedef _OS_802_11_BSSID_LIST_EX OS_802_11_BSSID_LIST_EX, *POS_802_11_BSSID_LIST_EX; 293 294/*#pragma pack(pop)*/ 295 296typedef tiUINT32 OS_802_11_FRAGMENTATION_THRESHOLD; 297typedef tiUINT32 OS_802_11_RTS_THRESHOLD; 298typedef tiUINT32 OS_802_11_ANTENNA; 299 300 301/*Length */ 302/* Specifies the length of the NDIS_802_11_WEP structure in bytes. */ 303/*KeyIndex */ 304/* Specifies which key to add or remove. The global keys are represented */ 305/* by values of zero to n. When the most significant bit is set to 1, */ 306/* it indicates the key used to transmit to the access point. */ 307/*KeyLength */ 308/* Specifies the length of the KeyMaterial character array in bytes. */ 309/*KeyMaterial */ 310/* Specifies an arraythat identifies the WEP key. The length of this array is */ 311/* variable and depends upon the value of the KeyLength member. */ 312 313typedef tiUINT32 OS_802_11_KEY_INDEX; 314 315PACKED_STRUCT( _OS_802_11_WEP , 316 317 tiUINT32 Length; 318 tiUINT32 KeyIndex; 319 tiUINT32 KeyLength; 320 tiUINT8 KeyMaterial [32]; 321); 322typedef _OS_802_11_WEP OS_802_11_WEP, *POS_802_11_WEP; 323 324/* Key mapping keys require a BSSID*/ 325/*typedef tiUINT64 OS_802_11_KEY_RSC;*/ 326 327/*#pragma pack(0)*/ 328typedef struct _OS_802_11_KEY 329{ 330 tiUINT32 Length; /* Length of this structure*/ 331 tiUINT32 KeyIndex; 332 tiUINT32 KeyLength; /* length of key in bytes*/ 333 OS_802_11_MAC_ADDRESS BSSID; 334 OS_802_11_KEY_RSC KeyRSC; 335 tiUINT8 KeyMaterial[32]; /* variable length depending on above field*/ 336} OS_802_11_KEY, *POS_802_11_KEY; 337/*#pragma pack()*/ 338 339/*#pragma pack(1)*/ 340PACKED_STRUCT( _OS_802_11_REMOVE_KEY , 341 342 tiUINT32 Length; /* Length of this structure*/ 343 tiUINT32 KeyIndex; 344 OS_802_11_MAC_ADDRESS BSSID; 345); 346typedef _OS_802_11_REMOVE_KEY OS_802_11_REMOVE_KEY, *POS_802_11_REMOVE_KEY; 347/*#pragma pack()*/ 348 349#define OS_802_11_AI_REQFI_CAPABILITIES 1 350#define OS_802_11_AI_REQFI_LISTENINTERVAL 2 351#define OS_802_11_AI_REQFI_CURRENTAPADDRESS 4 352 353 354#define OS_802_11_AI_RESFI_CAPABILITIES 1 355#define OS_802_11_AI_RESFI_STATUSCODE 2 356#define OS_802_11_AI_RESFI_ASSOCIATIONID 4 357 358#ifndef GWSI_LIB 359 360#ifndef _WINDOWS 361#pragma pack(1) 362#endif /* ifndef _WINDOWS */ 363 364#ifdef _WINDOWS // TRS:AS "reserved field added to OS_802_11_AI_REQFI and OS_802_11_AI_RESFI 365 // structures conflicts with WM expectations and cause a problem with WPA. 366#else /* ifdef _WINDOWS */ 367PACKED_STRUCT( OS_802_11_AI_REQFI , 368 369 tiUINT16 Capabilities; 370 tiUINT16 ListenInterval; 371 OS_802_11_MAC_ADDRESS CurrentAPAddress; 372 tiUINT16 reserved; /* added for packing */ 373); 374 375PACKED_STRUCT( OS_802_11_AI_RESFI , 376 377 tiUINT16 Capabilities; 378 tiUINT16 StatusCode; 379 tiUINT16 AssociationId; 380 tiUINT16 reserved; /* added for packing */ 381); 382#endif /* ifdef _WINDOWS */ 383 384PACKED_STRUCT( _OS_802_11_ASSOCIATION_INFORMATION , 385 tiUINT32 Length; 386 tiUINT16 AvailableRequestFixedIEs; 387/* struct _OS_802_11_AI_REQFI 388 { 389 tiUINT16 Capabilities; 390 tiUINT16 ListenInterval; 391 OS_802_11_MAC_ADDRESS CurrentAPAddress; 392 } RequestFixedIEs; 393*/ 394 OS_802_11_AI_REQFI RequestFixedIEs; 395 tiUINT32 RequestIELength; 396 tiUINT32 OffsetRequestIEs; 397 tiUINT16 AvailableResponseFixedIEs; 398/* struct _OS_802_11_AI_RESFI 399 { 400 tiUINT16 Capabilities; 401 tiUINT16 StatusCode; 402 tiUINT16 AssociationId; 403 } ResponseFixedIEs; 404*/ 405 OS_802_11_AI_RESFI ResponseFixedIEs; 406 tiUINT32 ResponseIELength; 407 tiUINT32 OffsetResponseIEs; 408 409); 410typedef _OS_802_11_ASSOCIATION_INFORMATION OS_802_11_ASSOCIATION_INFORMATION, *POS_802_11_ASSOCIATION_INFORMATION; 411#ifndef _WINDOWS 412#pragma pack() 413#endif /* ifndef _WINDOWS */ 414 415#endif 416 417/* supported EAP types*/ 418typedef enum _OS_802_11_EAP_TYPES 419{ 420 OS_EAP_TYPE_NONE = -1, 421 OS_EAP_TYPE_MD5_CHALLENGE = 4, 422 OS_EAP_TYPE_GENERIC_TOKEN_CARD = 6, 423 OS_EAP_TYPE_TLS = 13, 424 OS_EAP_TYPE_LEAP = 17, 425 OS_EAP_TYPE_TTLS = 21, 426 OS_EAP_TYPE_PEAP = 25, 427 OS_EAP_TYPE_MS_CHAP_V2 = 26, 428 OS_EAP_TYPE_FAST = 43 429} OS_802_11_EAP_TYPES; 430 431/* encryption type*/ 432typedef enum _OS_802_11_ENCRYPTION_TYPES 433{ 434 OS_ENCRYPTION_TYPE_NONE = 0, 435 OS_ENCRYPTION_TYPE_WEP, 436 OS_ENCRYPTION_TYPE_TKIP, 437 OS_ENCRYPTION_TYPE_AES 438} OS_802_11_ENCRYPTION_TYPES; 439 440/* Key type*/ 441typedef enum _OS_802_11_KEY_TYPES 442{ 443 OS_KEY_TYPE_STATIC = 0, 444 OS_KEY_TYPE_DYNAMIC 445} OS_802_11_KEY_TYPES; 446 447/* ELP mode*/ 448typedef enum _OS_802_11_ELP_MODES 449{ 450 OS_ELP_MODE_DISABLE, 451 OS_ELP_MODE_SYNC, 452 OS_ELP_MODE_NON_SYNC 453} OS_802_11_ELP_MODES; 454 455/* Roaming mode*/ 456typedef enum _OS_802_11_ROAMING_MODES 457{ 458 OS_ROAMING_MODE_DISABLE, 459 OS_ROAMING_MODE_ENABLE 460} OS_802_11_ROAMING_MODES; 461 462typedef enum _OS_802_11_POWER_PROFILE 463{ 464 OS_POWER_MODE_AUTO, 465 OS_POWER_MODE_ACTIVE, 466 OS_POWER_MODE_SHORT_DOZE, 467 OS_POWER_MODE_LONG_DOZE 468} OS_802_11_POWER_PROFILE; 469 470typedef enum _OS_802_11_POWER_LEVELS 471{ 472 OS_POWER_LEVEL_ELP, 473 OS_POWER_LEVEL_PD, 474 OS_POWER_LEVEL_AWAKE, 475} OS_802_11_POWER_LEVELS; 476 477 478typedef enum _OS_802_11_BEACON_FILTER_MODE 479{ 480 OS_BEACON_FILTER_MODE_INACTIVE, 481 OS_BEACON_FILTER_MODE_ACTIVE, 482} OS_802_11_BEACON_FILTER_MODE; 483 484typedef enum _OS_802_11_SCAN_TYPES 485{ 486 OS_SCAN_TYPE_PASSIVE, 487 OS_SCAN_TYPE_BROADCAST, 488 OS_SCAN_TYPE_UNICAST 489} OS_802_11_SCAN_TYPES; 490 491typedef enum _OS_802_11_VOICE_DELIVERY_PROTOCOL 492{ 493 OS_VOICE_DELIVERY_PROTOCOL_DISABLED, 494 OS_VOICE_DELIVERY_PROTOCOL_PS_POLL 495} OS_802_11_VOICE_DELIVERY_PROTOCOL; 496 497PACKED_STRUCT( _OS_802_11_TRAFFIC_INTENSITY_THRESHOLD_PARAMS , 498 499 tiUINT32 uHighThreshold; 500 tiUINT32 uLowThreshold; 501 tiUINT32 TestInterval; 502); 503typedef _OS_802_11_TRAFFIC_INTENSITY_THRESHOLD_PARAMS OS_802_11_TRAFFIC_INTENSITY_THRESHOLD_PARAMS; 504 505typedef struct{ 506 tiUINT32 uHighOrLowThresholdFlag; /* high or low */ 507 tiUINT32 uAboveOrBelowFlag; /* direction of crossing */ 508} OS_802_11_TRAFFIC_INTENSITY_THRESHOLD_CROSS_INDICATION_PARAMS; 509 510typedef tiUINT8 OS_802_11_PMKID_VALUE[16]; 511 512PACKED_STRUCT( _OS_BSSIDInfo , 513 514 OS_802_11_MAC_ADDRESS BSSID; 515 OS_802_11_PMKID_VALUE PMKID; 516); 517typedef _OS_BSSIDInfo OS_BSSIDInfo, *POS_BSSIDInfo; 518 519PACKED_STRUCT( _OS_802_11_PMKID , 520 521 tiUINT32 Length; 522 tiUINT32 BSSIDInfoCount; 523 OS_BSSIDInfo osBSSIDInfo[1]; 524); 525typedef _OS_802_11_PMKID OS_802_11_PMKID, *POS_802_11_PMKID; 526 527typedef enum _OS_802_11_WEP_STATUS 528{ 529 os802_11WEPEnabled = 0, 530 os802_11Encryption1Enabled = os802_11WEPEnabled, 531 os802_11WEPDisabled, 532 os802_11EncryptionDisabled = os802_11WEPDisabled, 533 os802_11WEPKeyAbsent, 534 os802_11Encryption1KeyAbsent = os802_11WEPKeyAbsent, 535 os802_11WEPNotSupported, 536 os802_11EncryptionNotSupported = os802_11WEPNotSupported, 537 os802_11Encryption2Enabled, 538 os802_11Encryption2KeyAbsent, 539 os802_11Encryption3Enabled, 540 os802_11Encryption3KeyAbsent 541} OS_802_11_WEP_STATUS, OS_802_11_ENCRYPTION_STATUS; 542 543/*os802_11AuthModeOpen */ 544/* Specifies 802.11 open authentication mode. There are no checks when accepting */ 545/* clients in this mode. */ 546/*os802_11AuthModeShared */ 547/* Specifies 802.11 shared authentication that uses a pre-shared wired equivalent */ 548/* privacy (WEP) key. */ 549/*os802_11AuthModeAutoSwitch */ 550/* Specifies auto-switch mode. When using auto-switch mode, the NIC tries 802.11 shared */ 551/* authentication mode first. If shared mode fails, the NIC attempts to use 802.11 open */ 552/* authentication mode. */ 553 554typedef enum _OS_802_11_AUTHENTICATION_MODE 555{ 556 os802_11AuthModeOpen, 557 os802_11AuthModeShared, 558 os802_11AuthModeAutoSwitch, 559 os802_11AuthModeWPA, 560 os802_11AuthModeWPAPSK, 561 os802_11AuthModeWPANone, 562 os802_11AuthModeWPA2, 563 os802_11AuthModeWPA2PSK, 564 os802_11AuthModeMax 565} OS_802_11_AUTHENTICATION_MODE; 566 567 568/*os802_11PrivFilterAcceptAll */ 569/* Specifies an open mode. In this mode, the NIC accepts any packet if the packet */ 570/* is not encrypted or if the NIC successfully decrypts it. */ 571/*os802_11PrivFilter8021xWEP */ 572/* Specifies a filtering mode. In the 802.1X filtering mode, 802.1X packets are */ 573/* accepted even if they are not encrypted. However, the NIC accepts nothing else */ 574/* unless it is encrypted using WEP. */ 575typedef enum _OS_802_11_PRIVACY_FILTER 576{ 577 os802_11PrivFilterAcceptAll, 578 os802_11PrivFilter8021xWEP 579} OS_802_11_PRIVACY_FILTER; 580 581typedef enum _OS_802_11_RELOAD_DEFAULTS 582{ 583 os802_11ReloadWEPKeys 584} OS_802_11_RELOAD_DEFAULTS, *POS_802_11_RELOAD_DEFAULTS; 585 586typedef enum _OS_802_11_STATUS_TYPE 587{ 588 os802_11StatusType_Authentication, 589 os802_11StatusType_PMKID_CandidateList = 2, 590 os802_11StatusTypeMax /* not a real type, defined as an upper bound */ 591} OS_802_11_STATUS_TYPE, *POS_802_11_STATUS_TYPE; 592 593PACKED_STRUCT( _OS_802_11_STATUS_INDICATION , 594 595 OS_802_11_STATUS_TYPE StatusType; 596); 597typedef _OS_802_11_STATUS_INDICATION OS_802_11_STATUS_INDICATION, *POS_802_11_STATUS_INDICATION; 598 599 600typedef struct _OS_802_11_AUTHENTICATION_REQUEST 601{ 602 tiUINT32 Length; /* Length of this structure*/ 603 OS_802_11_MAC_ADDRESS BSSID; 604 tiUINT32 Flags; 605}OS_802_11_AUTHENTICATION_REQUEST, *POS_802_11_AUTHENTICATION_REQUEST; 606 607typedef enum 608{ 609 OS_DISASSOC_STATUS_UNSPECIFIED = 0, 610 OS_DISASSOC_STATUS_AUTH_REJECT = 1, 611 OS_DISASSOC_STATUS_ASSOC_REJECT = 2, 612 OS_DISASSOC_STATUS_SECURITY_FAILURE = 3, 613 OS_DISASSOC_STATUS_AP_DEAUTHENTICATE = 4, 614 OS_DISASSOC_STATUS_AP_DISASSOCIATE = 5, 615 OS_DISASSOC_STATUS_ROAMING_TRIGGER = 6 616 617} OS_802_11_DISASSOCIATE_REASON_E; 618 619typedef struct 620{ 621 OS_802_11_DISASSOCIATE_REASON_E eDisAssocType; 622 UINT32 uStatusCode; 623} OS_802_11_DISASSOCIATE_REASON_T; 624 625#define OS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLE 0x01 626 627PACKED_STRUCT( _OS_802_11_PMKID_CANDIDATE , 628 629 OS_802_11_MAC_ADDRESS BSSID; 630 tiUINT32 Flags; 631); 632typedef _OS_802_11_PMKID_CANDIDATE OS_802_11_PMKID_CANDIDATE, *POS_802_11_PMKID_CANDIDATE; 633 634PACKED_STRUCT( _OS_802_11_PMKID_CANDIDATELIST , 635 636 tiUINT32 Version; /* Version of the structure*/ 637 tiUINT32 NumCandidates; /* No. of pmkid candidates*/ 638 OS_802_11_PMKID_CANDIDATE CandidateList[1]; 639); 640typedef _OS_802_11_PMKID_CANDIDATELIST OS_802_11_PMKID_CANDIDATELIST, *POS_802_11_PMKID_CANDIDATELIST; 641 642 643typedef UINT8 OS_802_11_MAC_PMKID_VALUE[16]; 644 645PACKED_STRUCT( _OS_802_11_BSSIDInfo , 646 647 OS_802_11_MAC_ADDRESS BSSID; 648 OS_802_11_MAC_PMKID_VALUE PMKID; 649); 650typedef _OS_802_11_BSSIDInfo OS_802_11_BSSIDInfo, *POS_802_11_BSSIDInfo; 651 652 653PACKED_STRUCT( _OS_802_11_AUTH_ENCRYPTION , 654 655 OS_802_11_AUTHENTICATION_MODE AuthModeSupported; 656 OS_802_11_ENCRYPTION_STATUS EncryptionStatusSupported; 657); 658typedef _OS_802_11_AUTH_ENCRYPTION OS_802_11_AUTH_ENCRYPTION, *POS_802_11_AUTH_ENCRYPTION; 659 660PACKED_STRUCT( _OS_802_11_CAPABILITY , 661 662 tiUINT32 Length; 663 tiUINT32 Version; 664 tiUINT32 NoOfPmKIDs; 665 tiUINT32 NoOfAuthEncryptPairsSupported; 666 OS_802_11_AUTH_ENCRYPTION AuthEncryptionSupported[1]; 667 668); 669typedef _OS_802_11_CAPABILITY OS_802_11_CAPABILITY, *POS_802_11_CAPABILITY; 670 671#define OID_CAPABILITY_VERSION 2 672 673 674 675typedef enum _OS_802_11_REG_DOMAIN 676{ 677 os802_11_Domain_FCC = 0x10, 678 os802_11_Domain_IC = 0x20, 679 os802_11_Domain_ETSI = 0x30, 680 os802_11_Domain_Spain = 0x31, 681 os802_11_Domain_France = 0x32, 682 os802_11_Domain_MKK = 0x40, 683 os802_11_Domain_MKK1 = 0x41, 684 os802_11_Domain_US = 0x50, 685 os802_11_Domain_WB = 0x51, 686 os802_11_Domain_EXWB = 0x52, 687} OS_802_11_REG_DOMAIN; 688 689 690 691#define MAX_SSID_LEN 32 692 693PACKED_STRUCT(ssid_t , 694 695 UINT8 len; 696 char ssidString[MAX_SSID_LEN]; 697); 698 699 700typedef enum 701{ 702 RADIO_BAND_2_4_GHZ = 0, 703 RADIO_BAND_5_0_GHZ = 1, 704 RADIO_BAND_DUAL = 2, 705 RADIO_BAND_NUM_OF_BANDS = 2 706} radioBand_e; 707 708 709 710 711#define OID_TI_VERSION 0xFF080001 712 713 714/* propritary OIDs used by FUNK supplicant for WPA Mixed mode support*/ 715/* WPA2 MIxed mode OIDs */ 716#define CGUID_FSW_802_11_AVAILABLE_OPTIONS {0x1a905534, 0xe71f, 0x46d1, {0xa2, 0xcb, 0xa5, 0x57, 0x01, 0x76, 0x38, 0xfd}} 717#define CGUID_FSW_802_11_OPTIONS {0xdc7a51b7, 0x2236, 0x467d, {0xb1, 0x55, 0x03, 0x50, 0x42, 0x04, 0xcf, 0x30}} 718 719#define OID_FSW_802_11_AVAILABLE_OPTIONS 0xFF010237 720#define OID_FSW_802_11_OPTIONS 0xFF010238 721 722 723 724/**/ 725/* IEEE 802.11 OIDs*/ 726/**/ 727#define OID_802_11_BSSID 0x0D010101 728#define OID_802_11_SSID 0x0D010102 729#define OID_802_11_INFRASTRUCTURE_MODE 0x0D010108 730#define OID_802_11_ADD_WEP 0x0D010113 731#define OID_802_11_REMOVE_WEP 0x0D010114 732#define OID_802_11_DISASSOCIATE 0x0D010115 733#define OID_802_11_AUTHENTICATION_MODE 0x0D010118 734#define OID_802_11_PRIVACY_FILTER 0x0D010119 735#define OID_802_11_BSSID_LIST_SCAN 0x0D01011A 736#define OID_802_11_WEP_STATUS 0x0D01011B 737#define OID_802_11_RELOAD_DEFAULTS 0x0D01011C 738#define OID_802_11_ADD_KEY 0x0D01011D 739#define OID_802_11_REMOVE_KEY 0x0D01011E 740#define OID_802_11_ASSOCIATION_INFORMATION 0x0D01011F 741#define OID_802_11_NETWORK_TYPES_SUPPORTED 0x0D010203 742#define OID_802_11_NETWORK_TYPE_IN_USE 0x0D010204 743#define OID_802_11_TX_POWER_LEVEL 0x0D010205 744#define OID_802_11_RSSI 0x0D010206 745#define OID_802_11_RSSI_TRIGGER 0x0D010207 746#define OID_802_11_FRAGMENTATION_THRESHOLD 0x0D010209 747#define OID_802_11_RTS_THRESHOLD 0x0D01020A 748#define OID_802_11_NUMBER_OF_ANTENNAS 0x0D01020B 749#define OID_802_11_RX_ANTENNA_SELECTED 0x0D01020C 750#define OID_802_11_TX_ANTENNA_SELECTED 0x0D01020D 751#define OID_802_11_SUPPORTED_RATES 0x0D01020E 752#define OID_802_11_DESIRED_RATES 0x0D010210 753#define OID_802_11_CONFIGURATION 0x0D010211 754#define OID_802_11_STATISTICS 0x0D020212 755#define OID_802_11_POWER_MODE 0x0D010216 756#define OID_802_11_BSSID_LIST 0x0D010217 757 758//#ifndef _USER_MODE 759//#define OID_802_11_CAPABILITY 0x0D010218 760//#define OID_802_11_PMKID 0x0D010219 761//#endif 762 763 764 765/* AnyWPA mode flags used in propritary FUNK suplicant OIDs*/ 766 767#define OS_802_11_OPTION_ENABLE_PROMOTE_MODE 0x00000001 /*bit 0*/ 768#define OS_802_11_OPTION_ENABLE_PROMOTE_CIPHER 0x00000002 /*bit 1*/ 769 770#define OS_802_11_OPTION_ENABLE_ALL 0x00000003 771 772 773#endif 774 775