3 // SME task global CONSTANTS, STRUCTURES, variables
6 //////////////////////////////////////////////////////////////////////////
7 //define the msg type of SME module
8 // 0x00~0x1F : MSG from GUI dispatch
9 // 0x20~0x3F : MSG from MLME
10 // 0x40~0x5F : MSG from SCAN
11 // 0x60~0x6F : MSG from TX/RX
12 // 0x70~0x7F : MSG from ROAMING
13 // 0x80~0x8F : MSG from ISR
17 #define SMEMSG_SCAN_REQ 0x01
18 //#define SMEMSG_PASSIVE_SCAN_REQ 0x02
19 #define SMEMSG_JOIN_REQ 0x03
20 #define SMEMSG_START_IBSS 0x04
21 #define SMEMSG_DISCONNECT_REQ 0x05
22 #define SMEMSG_AUTHEN_REQ 0x06
23 #define SMEMSG_DEAUTHEN_REQ 0x07
24 #define SMEMSG_ASSOC_REQ 0x08
25 #define SMEMSG_REASSOC_REQ 0x09
26 #define SMEMSG_DISASSOC_REQ 0x0a
27 #define SMEMSG_POWERSAVE_REQ 0x0b
31 #define SMEMSG_AUTHEN_CFM 0x21
32 #define SMEMSG_AUTHEN_IND 0x22
33 #define SMEMSG_ASSOC_CFM 0x23
34 #define SMEMSG_DEAUTHEN_IND 0x24
35 #define SMEMSG_DISASSOC_IND 0x25
37 #define SMEMSG_SCAN_CFM 0x41
38 #define SMEMSG_START_IBSS_CFM 0x42
39 // from MTO, function call to set SME parameters
41 // 0x60~0x6F : MSG from TX/RX
42 //#define SMEMSG_IBSS_JOIN_UPDATE_BSSID 0x61
43 #define SMEMSG_COUNTERMEASURE_MICFAIL_TIMEOUT 0x62
44 #define SMEMSG_COUNTERMEASURE_BLOCK_TIMEOUT 0x63
46 #define SMEMSG_HANDOVER_JOIN_REQ 0x71
47 #define SMEMSG_END_ROAMING 0x72
48 #define SMEMSG_SCAN_JOIN_REQ 0x73
50 #define SMEMSG_TSF_SYNC_IND 0x81
52 #define SMEMSG_TIMEOUT 0x91
56 #define MAX_PMKID_Accunt 16
57 //@added by ws 04/22/05
58 #define Cipher_Disabled 0
64 ///////////////////////////////////////////////////////////////////////////
67 ///////////////////////////////////////////////////////////////////////////
68 //Global data structures
70 #define NUMOFWEPENTRIES 64
72 typedef enum _WEPKeyMode
78 } WEPKEYMODE, *pWEPKEYMODE;
82 typedef struct _BSSInfo
88 typedef struct _PMKID_Table //added by ws 05/05/04
92 BSSID_Info BSSIDInfo[16];
96 #endif //end def _WPA2_
98 #define MAX_BASIC_RATE_SET 15
99 #define MAX_OPT_RATE_SET MAX_BASIC_RATE_SET
102 typedef struct _SME_PARAMETERS
106 u8 bDesiredPowerSave;
108 // SME timer and timeout value
109 //NDIS_MINIPORT_TIMER nTimer;
113 u8 boAuthRetryActive;
116 u32 AuthenRetryTimerVal; // NOTE: Assoc don't fail timeout
117 u32 JoinFailTimerVal; // 10*Beacon-Interval
120 u8 BSSBasicRateSet[(MAX_BASIC_RATE_SET + 3) & ~0x03 ]; // BSS basic rate set
121 u8 OperationalRateSet[(MAX_OPT_RATE_SET + 3) & ~0x03 ]; // Operational rate set
123 u8 NumOfBSSBasicRate;
124 u8 NumOfOperationalRate;
130 // System parameters Set by GUI
131 //-------------------- start IBSS parameter ---------------------------//
132 u32 boStartIBSS; //Start IBSS toggle
137 ChanInfo IbssChan; // 2B //channel setting when start IBSS
141 u16 wDesiredJoinBSS; // BSS index which desire to join
142 u8 boJoinReq; //Join request toggle
143 u8 bDesiredBSSType; //for Join request
145 u16 wCapabilityInfo; // Used when invoking the MLME_Associate_request().
146 u16 wNonERPcapabilityInfo;
148 struct SSID_Element sDesiredSSID; // 34 B
151 u8 abDesiredBSSID[MAC_ADDR_LENGTH + 2];
153 u8 bJoinScanCount; // the time of scan-join action need to do
154 u8 bDesiredAuthMode; // AUTH_OPEN_SYSTEM or AUTH_SHARED_KEY
157 // Encryption parameters
158 u8 _dot11PrivacyInvoked;
159 u8 _dot11PrivacyOptionImplemented;
164 u8 encrypt_status; //ENCRYPT_DISABLE, ENCRYPT_WEP, ENCRYPT_WEP_NOKEY, ENCRYPT_TKIP, ...
169 u8 wpa_ok; // indicate the control port of 802.1x is open or close
170 u8 pairwise_key_type;
173 u32 _dot11WEPDefaultKeyID;
175 u8 tx_mic_key[8]; // TODO: 0627 kevin-TKIP
176 u8 rx_mic_key[8]; // TODO: 0627 kevin-TKIP
177 u8 group_tx_mic_key[8];
178 u8 group_rx_mic_key[8];
181 u8 AssocReqVarIE[200];
182 u8 AssocRespVarIE[200];
186 u8 boReassoc; //use assoc. or reassoc.
188 u16 AssocRespCapability;
195 #endif //end def _WPA2_
197 } SME_PARAMETERS, *PSME_PARAMETERS;
199 #define psSME (&(Adapter->sSmePara))
201 #define wSMEGetCurrentSTAState(Adapter) ((u16)(Adapter)->sSmePara.wState)
205 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
207 // Define the related definitions of SME module
208 // history -- 01/14/03' created
210 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
212 //Define the state of SME module
217 #define JOIN_PENDING 4
219 #define AUTHENTICATE_PENDING 6
220 #define AUTHENTICATED 7
222 //#define EAP_STARTING 9
223 //#define EAPOL_AUTHEN_PENDING 10
224 //#define SECURE_CONNECTED 11