blob: dfd2fbc4edef0fa4fd6592f060dc2eb87bc54000 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
|
//
// SME_S.H -
// SME task global CONSTANTS, STRUCTURES, variables
//
//////////////////////////////////////////////////////////////////////////
//define the msg type of SME module
// 0x00~0x1F : MSG from GUI dispatch
// 0x20~0x3F : MSG from MLME
// 0x40~0x5F : MSG from SCAN
// 0x60~0x6F : MSG from TX/RX
// 0x70~0x7F : MSG from ROAMING
// 0x80~0x8F : MSG from ISR
// 0x90 : MSG TimeOut
// from GUI
#define SMEMSG_SCAN_REQ 0x01
//#define SMEMSG_PASSIVE_SCAN_REQ 0x02
#define SMEMSG_JOIN_REQ 0x03
#define SMEMSG_START_IBSS 0x04
#define SMEMSG_DISCONNECT_REQ 0x05
#define SMEMSG_AUTHEN_REQ 0x06
#define SMEMSG_DEAUTHEN_REQ 0x07
#define SMEMSG_ASSOC_REQ 0x08
#define SMEMSG_REASSOC_REQ 0x09
#define SMEMSG_DISASSOC_REQ 0x0a
#define SMEMSG_POWERSAVE_REQ 0x0b
// from MLME
#define SMEMSG_AUTHEN_CFM 0x21
#define SMEMSG_AUTHEN_IND 0x22
#define SMEMSG_ASSOC_CFM 0x23
#define SMEMSG_DEAUTHEN_IND 0x24
#define SMEMSG_DISASSOC_IND 0x25
// from SCAN
#define SMEMSG_SCAN_CFM 0x41
#define SMEMSG_START_IBSS_CFM 0x42
// from MTO, function call to set SME parameters
// 0x60~0x6F : MSG from TX/RX
//#define SMEMSG_IBSS_JOIN_UPDATE_BSSID 0x61
#define SMEMSG_COUNTERMEASURE_MICFAIL_TIMEOUT 0x62
#define SMEMSG_COUNTERMEASURE_BLOCK_TIMEOUT 0x63
// from ROAMING
#define SMEMSG_HANDOVER_JOIN_REQ 0x71
#define SMEMSG_END_ROAMING 0x72
#define SMEMSG_SCAN_JOIN_REQ 0x73
// from ISR
#define SMEMSG_TSF_SYNC_IND 0x81
// from TimeOut
#define SMEMSG_TIMEOUT 0x91
#define MAX_PMKID_Accunt 16
//@added by ws 04/22/05
#define Cipher_Disabled 0
#define Cipher_Wep 1
#define Cipher_Tkip 2
#define Cipher_Ccmp 4
///////////////////////////////////////////////////////////////////////////
//Constants
///////////////////////////////////////////////////////////////////////////
//Global data structures
#define NUMOFWEPENTRIES 64
typedef enum _WEPKeyMode
{
WEPKEY_DISABLED = 0,
WEPKEY_64 = 1,
WEPKEY_128 = 2
} WEPKEYMODE, *pWEPKEYMODE;
#ifdef _WPA2_
typedef struct _BSSInfo
{
u8 PreAuthBssID[6];
PMKID pmkid_value;
}BSSID_Info;
typedef struct _PMKID_Table //added by ws 05/05/04
{
u32 Length;
u32 BSSIDInfoCount;
BSSID_Info BSSIDInfo[16];
} PMKID_Table;
#endif //end def _WPA2_
#define MAX_BASIC_RATE_SET 15
#define MAX_OPT_RATE_SET MAX_BASIC_RATE_SET
typedef struct _SME_PARAMETERS
{
u16 wState;
u8 boDUTmode;
u8 bDesiredPowerSave;
// SME timer and timeout value
//NDIS_MINIPORT_TIMER nTimer;
OS_TIMER nTimer;
u8 boInTimerHandler;
u8 boAuthRetryActive;
u8 reserved_0[2];
u32 AuthenRetryTimerVal; // NOTE: Assoc don't fail timeout
u32 JoinFailTimerVal; // 10*Beacon-Interval
//Rates
u8 BSSBasicRateSet[(MAX_BASIC_RATE_SET + 3) & ~0x03 ]; // BSS basic rate set
u8 OperationalRateSet[(MAX_OPT_RATE_SET + 3) & ~0x03 ]; // Operational rate set
u8 NumOfBSSBasicRate;
u8 NumOfOperationalRate;
u8 reserved_1[2];
u32 BasicRateBitmap;
u32 OpRateBitmap;
// System parameters Set by GUI
//-------------------- start IBSS parameter ---------------------------//
u32 boStartIBSS; //Start IBSS toggle
u16 wBeaconPeriod;
u16 wATIM_Window;
ChanInfo IbssChan; // 2B //channel setting when start IBSS
u8 reserved_2[2];
// Join related
u16 wDesiredJoinBSS; // BSS index which desire to join
u8 boJoinReq; //Join request toggle
u8 bDesiredBSSType; //for Join request
u16 wCapabilityInfo; // Used when invoking the MLME_Associate_request().
u16 wNonERPcapabilityInfo;
struct SSID_Element sDesiredSSID; // 34 B
u8 reserved_3[2];
u8 abDesiredBSSID[MAC_ADDR_LENGTH + 2];
u8 bJoinScanCount; // the time of scan-join action need to do
u8 bDesiredAuthMode; // AUTH_OPEN_SYSTEM or AUTH_SHARED_KEY
u8 reserved_4[2];
// Encryption parameters
u8 _dot11PrivacyInvoked;
u8 _dot11PrivacyOptionImplemented;
u8 reserved_5[2];
//@ ws added
u8 DesiredEncrypt;
u8 encrypt_status; //ENCRYPT_DISABLE, ENCRYPT_WEP, ENCRYPT_WEP_NOKEY, ENCRYPT_TKIP, ...
u8 key_length;
u8 pairwise_key_ok;
u8 group_key_ok;
u8 wpa_ok; // indicate the control port of 802.1x is open or close
u8 pairwise_key_type;
u8 group_key_type;
u32 _dot11WEPDefaultKeyID;
u8 tx_mic_key[8]; // TODO: 0627 kevin-TKIP
u8 rx_mic_key[8]; // TODO: 0627 kevin-TKIP
u8 group_tx_mic_key[8];
u8 group_rx_mic_key[8];
// #ifdef _WPA_
u8 AssocReqVarIE[200];
u8 AssocRespVarIE[200];
u16 AssocReqVarLen;
u16 AssocRespVarLen;
u8 boReassoc; //use assoc. or reassoc.
u8 reserved_6[3];
u16 AssocRespCapability;
u16 AssocRespStatus;
// #endif
#ifdef _WPA2_
u8 PmkIdTable[256];
u32 PmkidTableIndex;
#endif //end def _WPA2_
} SME_PARAMETERS, *PSME_PARAMETERS;
#define psSME (&(Adapter->sSmePara))
#define wSMEGetCurrentSTAState(Adapter) ((u16)(Adapter)->sSmePara.wState)
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
// SmeModule.h
// Define the related definitions of SME module
// history -- 01/14/03' created
//
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//Define the state of SME module
#define DISABLED 0
#define INIT_SCAN 1
#define SCAN_READY 2
#define START_IBSS 3
#define JOIN_PENDING 4
#define JOIN_CFM 5
#define AUTHENTICATE_PENDING 6
#define AUTHENTICATED 7
#define CONNECTED 8
//#define EAP_STARTING 9
//#define EAPOL_AUTHEN_PENDING 10
//#define SECURE_CONNECTED 11
// Static function
|