2 *************************************************************************
4 * 5F., No.36, Taiyuan St., Jhubei City,
8 * (c) Copyright 2002-2007, Ralink Technology, Inc.
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
15 * This program is distributed in the hope that it will be useful, *
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
18 * GNU General Public License for more details. *
20 * You should have received a copy of the GNU General Public License *
21 * along with this program; if not, write to the *
22 * Free Software Foundation, Inc., *
23 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
25 *************************************************************************
34 -------- ---------- ----------------------------------------------
35 Name Date Modification logs
43 // IEEE 802.11 Structures and definitions
45 #define MAX_TX_POWER_LEVEL 100 /* mW */
46 #define MAX_RSSI_TRIGGER -10 /* dBm */
47 #define MIN_RSSI_TRIGGER -200 /* dBm */
48 #define MAX_FRAG_THRESHOLD 2346 /* byte count */
49 #define MIN_FRAG_THRESHOLD 256 /* byte count */
50 #define MAX_RTS_THRESHOLD 2347 /* byte count */
52 // new types for Media Specific Indications
53 // Extension channel offset
55 #define EXTCHA_ABOVE 0x1
56 #define EXTCHA_BELOW 0x3
59 #define BAND_WIDTH_20 0
60 #define BAND_WIDTH_40 1
61 #define BAND_WIDTH_BOTH 2
62 #define BAND_WIDTH_10 3 // 802.11j has 10MHz. This definition is for internal usage. doesn't fill in the IE or other field.
64 #define GAP_INTERVAL_400 1 // only support in HT mode
65 #define GAP_INTERVAL_800 0
66 #define GAP_INTERVAL_BOTH 2
68 #define NdisMediaStateConnected 1
69 #define NdisMediaStateDisconnected 0
71 #define NDIS_802_11_LENGTH_SSID 32
72 #define NDIS_802_11_LENGTH_RATES 8
73 #define NDIS_802_11_LENGTH_RATES_EX 16
74 #define MAC_ADDR_LENGTH 6
75 #define MAX_NUM_OF_CHS 49 // 14 channels @2.4G + 12@UNII + 4 @MMAC + 11 @HiperLAN2 + 7 @Japan + 1 as NULL terminationc
76 #define MAX_NUMBER_OF_EVENT 10 // entry # in EVENT table
77 #define MAX_NUMBER_OF_MAC 32 // if MAX_MBSSID_NUM is 8, this value can't be larger than 211
78 #define MAX_NUMBER_OF_ACL 64
79 #define MAX_LENGTH_OF_SUPPORT_RATES 12 // 1, 2, 5.5, 11, 6, 9, 12, 18, 24, 36, 48, 54
80 #define MAX_NUMBER_OF_DLS_ENTRY 4
83 // OID definition, since NDIS 5.0 didn't define these, we need to define for our own
84 //#if _WIN32_WINNT<=0x0500
86 #define OID_GEN_MACHINE_NAME 0x0001021A
89 #define RT_QUERY_ATE_TXDONE_COUNT 0x0401
90 #endif // RALINK_ATE //
91 #define RT_QUERY_SIGNAL_CONTEXT 0x0402
92 #define RT_SET_IAPP_PID 0x0404
93 #define RT_SET_APD_PID 0x0405
94 #define RT_SET_DEL_MAC_ENTRY 0x0406
99 #define OID_GET_SET_TOGGLE 0x8000
101 #define OID_802_11_NETWORK_TYPES_SUPPORTED 0x0103
102 #define OID_802_11_NETWORK_TYPE_IN_USE 0x0104
103 #define OID_802_11_RSSI_TRIGGER 0x0107
104 #define RT_OID_802_11_RSSI 0x0108 //rt2860 only , kathy
105 #define RT_OID_802_11_RSSI_1 0x0109 //rt2860 only , kathy
106 #define RT_OID_802_11_RSSI_2 0x010A //rt2860 only , kathy
107 #define OID_802_11_NUMBER_OF_ANTENNAS 0x010B
108 #define OID_802_11_RX_ANTENNA_SELECTED 0x010C
109 #define OID_802_11_TX_ANTENNA_SELECTED 0x010D
110 #define OID_802_11_SUPPORTED_RATES 0x010E
111 #define OID_802_11_ADD_WEP 0x0112
112 #define OID_802_11_REMOVE_WEP 0x0113
113 #define OID_802_11_DISASSOCIATE 0x0114
114 #define OID_802_11_PRIVACY_FILTER 0x0118
115 #define OID_802_11_ASSOCIATION_INFORMATION 0x011E
116 #define OID_802_11_TEST 0x011F
117 #define RT_OID_802_11_COUNTRY_REGION 0x0507
118 #define OID_802_11_BSSID_LIST_SCAN 0x0508
119 #define OID_802_11_SSID 0x0509
120 #define OID_802_11_BSSID 0x050A
121 #define RT_OID_802_11_RADIO 0x050B
122 #define RT_OID_802_11_PHY_MODE 0x050C
123 #define RT_OID_802_11_STA_CONFIG 0x050D
124 #define OID_802_11_DESIRED_RATES 0x050E
125 #define RT_OID_802_11_PREAMBLE 0x050F
126 #define OID_802_11_WEP_STATUS 0x0510
127 #define OID_802_11_AUTHENTICATION_MODE 0x0511
128 #define OID_802_11_INFRASTRUCTURE_MODE 0x0512
129 #define RT_OID_802_11_RESET_COUNTERS 0x0513
130 #define OID_802_11_RTS_THRESHOLD 0x0514
131 #define OID_802_11_FRAGMENTATION_THRESHOLD 0x0515
132 #define OID_802_11_POWER_MODE 0x0516
133 #define OID_802_11_TX_POWER_LEVEL 0x0517
134 #define RT_OID_802_11_ADD_WPA 0x0518
135 #define OID_802_11_REMOVE_KEY 0x0519
136 #define OID_802_11_ADD_KEY 0x0520
137 #define OID_802_11_CONFIGURATION 0x0521
138 #define OID_802_11_TX_PACKET_BURST 0x0522
139 #define RT_OID_802_11_QUERY_NOISE_LEVEL 0x0523
140 #define RT_OID_802_11_EXTRA_INFO 0x0524
142 #define RT_OID_802_11_HARDWARE_REGISTER 0x0525
144 #define OID_802_11_ENCRYPTION_STATUS OID_802_11_WEP_STATUS
145 #define OID_802_11_DEAUTHENTICATION 0x0526
146 #define OID_802_11_DROP_UNENCRYPTED 0x0527
147 #define OID_802_11_MIC_FAILURE_REPORT_FRAME 0x0528
149 // For 802.1x daemin using to require current driver configuration
150 #define OID_802_11_RADIUS_QUERY_SETTING 0x0540
152 #define RT_OID_DEVICE_NAME 0x0607
153 #define RT_OID_VERSION_INFO 0x0608
154 #define OID_802_11_BSSID_LIST 0x0609
155 #define OID_802_3_CURRENT_ADDRESS 0x060A
156 #define OID_GEN_MEDIA_CONNECT_STATUS 0x060B
157 #define RT_OID_802_11_QUERY_LINK_STATUS 0x060C
158 #define OID_802_11_RSSI 0x060D
159 #define OID_802_11_STATISTICS 0x060E
160 #define OID_GEN_RCV_OK 0x060F
161 #define OID_GEN_RCV_NO_BUFFER 0x0610
162 #define RT_OID_802_11_QUERY_EEPROM_VERSION 0x0611
163 #define RT_OID_802_11_QUERY_FIRMWARE_VERSION 0x0612
164 #define RT_OID_802_11_QUERY_LAST_RX_RATE 0x0613
165 #define RT_OID_802_11_TX_POWER_LEVEL_1 0x0614
166 #define RT_OID_802_11_QUERY_PIDVID 0x0615
167 //for WPA_SUPPLICANT_SUPPORT
168 #define OID_SET_COUNTERMEASURES 0x0616
169 #define OID_802_11_SET_IEEE8021X 0x0617
170 #define OID_802_11_SET_IEEE8021X_REQUIRE_KEY 0x0618
171 #define OID_802_11_PMKID 0x0620
172 #define RT_OID_WPA_SUPPLICANT_SUPPORT 0x0621
173 #define RT_OID_WE_VERSION_COMPILED 0x0622
174 #define RT_OID_NEW_DRIVER 0x0623
178 #define RT_OID_802_11_SNR_0 0x0630
179 #define RT_OID_802_11_SNR_1 0x0631
180 #define RT_OID_802_11_QUERY_LAST_TX_RATE 0x0632
181 #define RT_OID_802_11_QUERY_HT_PHYMODE 0x0633
182 #define RT_OID_802_11_SET_HT_PHYMODE 0x0634
183 #define OID_802_11_RELOAD_DEFAULTS 0x0635
184 #define RT_OID_802_11_QUERY_APSD_SETTING 0x0636
185 #define RT_OID_802_11_SET_APSD_SETTING 0x0637
186 #define RT_OID_802_11_QUERY_APSD_PSM 0x0638
187 #define RT_OID_802_11_SET_APSD_PSM 0x0639
188 #define RT_OID_802_11_QUERY_DLS 0x063A
189 #define RT_OID_802_11_SET_DLS 0x063B
190 #define RT_OID_802_11_QUERY_DLS_PARAM 0x063C
191 #define RT_OID_802_11_SET_DLS_PARAM 0x063D
192 #define RT_OID_802_11_QUERY_WMM 0x063E
193 #define RT_OID_802_11_SET_WMM 0x063F
194 #define RT_OID_802_11_QUERY_IMME_BA_CAP 0x0640
195 #define RT_OID_802_11_SET_IMME_BA_CAP 0x0641
196 #define RT_OID_802_11_QUERY_BATABLE 0x0642
197 #define RT_OID_802_11_ADD_IMME_BA 0x0643
198 #define RT_OID_802_11_TEAR_IMME_BA 0x0644
199 #define RT_OID_DRIVER_DEVICE_NAME 0x0645
200 #define RT_OID_802_11_QUERY_DAT_HT_PHYMODE 0x0646
201 #define RT_OID_QUERY_MULTIPLE_CARD_SUPPORT 0x0647
203 // Ralink defined OIDs
204 // Dennis Lee move to platform specific
206 #define RT_OID_802_11_BSSID (OID_GET_SET_TOGGLE | OID_802_11_BSSID)
207 #define RT_OID_802_11_SSID (OID_GET_SET_TOGGLE | OID_802_11_SSID)
208 #define RT_OID_802_11_INFRASTRUCTURE_MODE (OID_GET_SET_TOGGLE | OID_802_11_INFRASTRUCTURE_MODE)
209 #define RT_OID_802_11_ADD_WEP (OID_GET_SET_TOGGLE | OID_802_11_ADD_WEP)
210 #define RT_OID_802_11_ADD_KEY (OID_GET_SET_TOGGLE | OID_802_11_ADD_KEY)
211 #define RT_OID_802_11_REMOVE_WEP (OID_GET_SET_TOGGLE | OID_802_11_REMOVE_WEP)
212 #define RT_OID_802_11_REMOVE_KEY (OID_GET_SET_TOGGLE | OID_802_11_REMOVE_KEY)
213 #define RT_OID_802_11_DISASSOCIATE (OID_GET_SET_TOGGLE | OID_802_11_DISASSOCIATE)
214 #define RT_OID_802_11_AUTHENTICATION_MODE (OID_GET_SET_TOGGLE | OID_802_11_AUTHENTICATION_MODE)
215 #define RT_OID_802_11_PRIVACY_FILTER (OID_GET_SET_TOGGLE | OID_802_11_PRIVACY_FILTER)
216 #define RT_OID_802_11_BSSID_LIST_SCAN (OID_GET_SET_TOGGLE | OID_802_11_BSSID_LIST_SCAN)
217 #define RT_OID_802_11_WEP_STATUS (OID_GET_SET_TOGGLE | OID_802_11_WEP_STATUS)
218 #define RT_OID_802_11_RELOAD_DEFAULTS (OID_GET_SET_TOGGLE | OID_802_11_RELOAD_DEFAULTS)
219 #define RT_OID_802_11_NETWORK_TYPE_IN_USE (OID_GET_SET_TOGGLE | OID_802_11_NETWORK_TYPE_IN_USE)
220 #define RT_OID_802_11_TX_POWER_LEVEL (OID_GET_SET_TOGGLE | OID_802_11_TX_POWER_LEVEL)
221 #define RT_OID_802_11_RSSI_TRIGGER (OID_GET_SET_TOGGLE | OID_802_11_RSSI_TRIGGER)
222 #define RT_OID_802_11_FRAGMENTATION_THRESHOLD (OID_GET_SET_TOGGLE | OID_802_11_FRAGMENTATION_THRESHOLD)
223 #define RT_OID_802_11_RTS_THRESHOLD (OID_GET_SET_TOGGLE | OID_802_11_RTS_THRESHOLD)
224 #define RT_OID_802_11_RX_ANTENNA_SELECTED (OID_GET_SET_TOGGLE | OID_802_11_RX_ANTENNA_SELECTED)
225 #define RT_OID_802_11_TX_ANTENNA_SELECTED (OID_GET_SET_TOGGLE | OID_802_11_TX_ANTENNA_SELECTED)
226 #define RT_OID_802_11_SUPPORTED_RATES (OID_GET_SET_TOGGLE | OID_802_11_SUPPORTED_RATES)
227 #define RT_OID_802_11_DESIRED_RATES (OID_GET_SET_TOGGLE | OID_802_11_DESIRED_RATES)
228 #define RT_OID_802_11_CONFIGURATION (OID_GET_SET_TOGGLE | OID_802_11_CONFIGURATION)
229 #define RT_OID_802_11_POWER_MODE (OID_GET_SET_TOGGLE | OID_802_11_POWER_MODE)
231 typedef enum _NDIS_802_11_STATUS_TYPE
233 Ndis802_11StatusType_Authentication,
234 Ndis802_11StatusType_MediaStreamMode,
235 Ndis802_11StatusType_PMKID_CandidateList,
236 Ndis802_11StatusTypeMax // not a real type, defined as an upper bound
237 } NDIS_802_11_STATUS_TYPE, *PNDIS_802_11_STATUS_TYPE;
239 typedef UCHAR NDIS_802_11_MAC_ADDRESS[6];
241 typedef struct _NDIS_802_11_STATUS_INDICATION
243 NDIS_802_11_STATUS_TYPE StatusType;
244 } NDIS_802_11_STATUS_INDICATION, *PNDIS_802_11_STATUS_INDICATION;
246 // mask for authentication/integrity fields
247 #define NDIS_802_11_AUTH_REQUEST_AUTH_FIELDS 0x0f
249 #define NDIS_802_11_AUTH_REQUEST_REAUTH 0x01
250 #define NDIS_802_11_AUTH_REQUEST_KEYUPDATE 0x02
251 #define NDIS_802_11_AUTH_REQUEST_PAIRWISE_ERROR 0x06
252 #define NDIS_802_11_AUTH_REQUEST_GROUP_ERROR 0x0E
254 typedef struct _NDIS_802_11_AUTHENTICATION_REQUEST
256 ULONG Length; // Length of structure
257 NDIS_802_11_MAC_ADDRESS Bssid;
259 } NDIS_802_11_AUTHENTICATION_REQUEST, *PNDIS_802_11_AUTHENTICATION_REQUEST;
261 //Added new types for PMKID Candidate lists.
262 typedef struct _PMKID_CANDIDATE {
263 NDIS_802_11_MAC_ADDRESS BSSID;
265 } PMKID_CANDIDATE, *PPMKID_CANDIDATE;
267 typedef struct _NDIS_802_11_PMKID_CANDIDATE_LIST
269 ULONG Version; // Version of the structure
270 ULONG NumCandidates; // No. of pmkid candidates
271 PMKID_CANDIDATE CandidateList[1];
272 } NDIS_802_11_PMKID_CANDIDATE_LIST, *PNDIS_802_11_PMKID_CANDIDATE_LIST;
274 //Flags for PMKID Candidate list structure
275 #define NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED 0x01
277 // Added new types for OFDM 5G and 2.4G
278 typedef enum _NDIS_802_11_NETWORK_TYPE
287 Ndis802_11NetworkTypeMax // not a real type, defined as an upper bound
288 } NDIS_802_11_NETWORK_TYPE, *PNDIS_802_11_NETWORK_TYPE;
290 typedef struct _NDIS_802_11_NETWORK_TYPE_LIST
292 UINT NumberOfItems; // in list below, at least 1
293 NDIS_802_11_NETWORK_TYPE NetworkType [1];
294 } NDIS_802_11_NETWORK_TYPE_LIST, *PNDIS_802_11_NETWORK_TYPE_LIST;
296 typedef enum _NDIS_802_11_POWER_MODE
298 Ndis802_11PowerModeCAM,
299 Ndis802_11PowerModeMAX_PSP,
300 Ndis802_11PowerModeFast_PSP,
301 Ndis802_11PowerModeLegacy_PSP,
302 Ndis802_11PowerModeMax // not a real mode, defined as an upper bound
303 } NDIS_802_11_POWER_MODE, *PNDIS_802_11_POWER_MODE;
305 typedef ULONG NDIS_802_11_TX_POWER_LEVEL; // in milliwatts
308 // Received Signal Strength Indication
310 typedef LONG NDIS_802_11_RSSI; // in dBm
312 typedef struct _NDIS_802_11_CONFIGURATION_FH
314 ULONG Length; // Length of structure
315 ULONG HopPattern; // As defined by 802.11, MSB set
316 ULONG HopSet; // to one if non-802.11
317 ULONG DwellTime; // units are Kusec
318 } NDIS_802_11_CONFIGURATION_FH, *PNDIS_802_11_CONFIGURATION_FH;
320 typedef struct _NDIS_802_11_CONFIGURATION
322 ULONG Length; // Length of structure
323 ULONG BeaconPeriod; // units are Kusec
324 ULONG ATIMWindow; // units are Kusec
325 ULONG DSConfig; // Frequency, units are kHz
326 NDIS_802_11_CONFIGURATION_FH FHConfig;
327 } NDIS_802_11_CONFIGURATION, *PNDIS_802_11_CONFIGURATION;
329 typedef struct _NDIS_802_11_STATISTICS
331 ULONG Length; // Length of structure
332 LARGE_INTEGER TransmittedFragmentCount;
333 LARGE_INTEGER MulticastTransmittedFrameCount;
334 LARGE_INTEGER FailedCount;
335 LARGE_INTEGER RetryCount;
336 LARGE_INTEGER MultipleRetryCount;
337 LARGE_INTEGER RTSSuccessCount;
338 LARGE_INTEGER RTSFailureCount;
339 LARGE_INTEGER ACKFailureCount;
340 LARGE_INTEGER FrameDuplicateCount;
341 LARGE_INTEGER ReceivedFragmentCount;
342 LARGE_INTEGER MulticastReceivedFrameCount;
343 LARGE_INTEGER FCSErrorCount;
344 LARGE_INTEGER TKIPLocalMICFailures;
345 LARGE_INTEGER TKIPRemoteMICErrors;
346 LARGE_INTEGER TKIPICVErrors;
347 LARGE_INTEGER TKIPCounterMeasuresInvoked;
348 LARGE_INTEGER TKIPReplays;
349 LARGE_INTEGER CCMPFormatErrors;
350 LARGE_INTEGER CCMPReplays;
351 LARGE_INTEGER CCMPDecryptErrors;
352 LARGE_INTEGER FourWayHandshakeFailures;
353 } NDIS_802_11_STATISTICS, *PNDIS_802_11_STATISTICS;
355 typedef ULONG NDIS_802_11_KEY_INDEX;
356 typedef ULONGLONG NDIS_802_11_KEY_RSC;
358 #define MAX_RADIUS_SRV_NUM 2 // 802.1x failover number
360 typedef struct PACKED _RADIUS_SRV_INFO {
363 UCHAR radius_key[64];
364 UCHAR radius_key_len;
365 } RADIUS_SRV_INFO, *PRADIUS_SRV_INFO;
367 typedef struct PACKED _RADIUS_KEY_INFO
369 UCHAR radius_srv_num;
370 RADIUS_SRV_INFO radius_srv_info[MAX_RADIUS_SRV_NUM];
371 UCHAR ieee8021xWEP; // dynamic WEP
373 UCHAR key_length; // length of key in bytes
374 UCHAR key_material[13];
375 } RADIUS_KEY_INFO, *PRADIUS_KEY_INFO;
377 // It's used by 802.1x daemon to require relative configuration
378 typedef struct PACKED _RADIUS_CONF
380 UINT32 Length; // Length of this structure
381 UCHAR mbss_num; // indicate multiple BSS number
383 UINT32 retry_interval;
384 UINT32 session_timeout_interval;
385 UCHAR EAPifname[IFNAMSIZ];
387 UCHAR PreAuthifname[IFNAMSIZ];
388 UCHAR PreAuthifname_len;
389 RADIUS_KEY_INFO RadiusInfo[8/*MAX_MBSSID_NUM*/];
390 } RADIUS_CONF, *PRADIUS_CONF;
394 #ifdef CONFIG_STA_SUPPORT
395 // Key mapping keys require a BSSID
396 typedef struct _NDIS_802_11_KEY
398 UINT Length; // Length of this structure
400 UINT KeyLength; // length of key in bytes
401 NDIS_802_11_MAC_ADDRESS BSSID;
402 NDIS_802_11_KEY_RSC KeyRSC;
403 UCHAR KeyMaterial[1]; // variable length depending on above field
404 } NDIS_802_11_KEY, *PNDIS_802_11_KEY;
405 #endif // CONFIG_STA_SUPPORT //
407 typedef struct _NDIS_802_11_REMOVE_KEY
409 UINT Length; // Length of this structure
411 NDIS_802_11_MAC_ADDRESS BSSID;
412 } NDIS_802_11_REMOVE_KEY, *PNDIS_802_11_REMOVE_KEY;
414 typedef struct _NDIS_802_11_WEP
416 UINT Length; // Length of this structure
417 UINT KeyIndex; // 0 is the per-client key, 1-N are the
419 UINT KeyLength; // length of key in bytes
420 UCHAR KeyMaterial[1];// variable length depending on above field
421 } NDIS_802_11_WEP, *PNDIS_802_11_WEP;
424 typedef enum _NDIS_802_11_NETWORK_INFRASTRUCTURE
427 Ndis802_11Infrastructure,
428 Ndis802_11AutoUnknown,
430 Ndis802_11InfrastructureMax // Not a real value, defined as upper bound
431 } NDIS_802_11_NETWORK_INFRASTRUCTURE, *PNDIS_802_11_NETWORK_INFRASTRUCTURE;
433 // Add new authentication modes
434 typedef enum _NDIS_802_11_AUTHENTICATION_MODE
436 Ndis802_11AuthModeOpen,
437 Ndis802_11AuthModeShared,
438 Ndis802_11AuthModeAutoSwitch,
439 Ndis802_11AuthModeWPA,
440 Ndis802_11AuthModeWPAPSK,
441 Ndis802_11AuthModeWPANone,
442 Ndis802_11AuthModeWPA2,
443 Ndis802_11AuthModeWPA2PSK,
444 Ndis802_11AuthModeWPA1WPA2,
445 Ndis802_11AuthModeWPA1PSKWPA2PSK,
446 Ndis802_11AuthModeMax // Not a real mode, defined as upper bound
447 } NDIS_802_11_AUTHENTICATION_MODE, *PNDIS_802_11_AUTHENTICATION_MODE;
449 typedef UCHAR NDIS_802_11_RATES[NDIS_802_11_LENGTH_RATES]; // Set of 8 data rates
450 typedef UCHAR NDIS_802_11_RATES_EX[NDIS_802_11_LENGTH_RATES_EX]; // Set of 16 data rates
452 typedef struct PACKED _NDIS_802_11_SSID
454 UINT SsidLength; // length of SSID field below, in bytes;
456 UCHAR Ssid[NDIS_802_11_LENGTH_SSID]; // SSID information field
457 } NDIS_802_11_SSID, *PNDIS_802_11_SSID;
460 typedef struct PACKED _NDIS_WLAN_BSSID
462 ULONG Length; // Length of this structure
463 NDIS_802_11_MAC_ADDRESS MacAddress; // BSSID
465 NDIS_802_11_SSID Ssid; // SSID
466 ULONG Privacy; // WEP encryption requirement
467 NDIS_802_11_RSSI Rssi; // receive signal strength in dBm
468 NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;
469 NDIS_802_11_CONFIGURATION Configuration;
470 NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode;
471 NDIS_802_11_RATES SupportedRates;
472 } NDIS_WLAN_BSSID, *PNDIS_WLAN_BSSID;
474 typedef struct PACKED _NDIS_802_11_BSSID_LIST
476 UINT NumberOfItems; // in list below, at least 1
477 NDIS_WLAN_BSSID Bssid[1];
478 } NDIS_802_11_BSSID_LIST, *PNDIS_802_11_BSSID_LIST;
480 // Added Capabilities, IELength and IEs for each BSSID
481 typedef struct PACKED _NDIS_WLAN_BSSID_EX
483 ULONG Length; // Length of this structure
484 NDIS_802_11_MAC_ADDRESS MacAddress; // BSSID
486 NDIS_802_11_SSID Ssid; // SSID
487 UINT Privacy; // WEP encryption requirement
488 NDIS_802_11_RSSI Rssi; // receive signal
490 NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;
491 NDIS_802_11_CONFIGURATION Configuration;
492 NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode;
493 NDIS_802_11_RATES_EX SupportedRates;
496 } NDIS_WLAN_BSSID_EX, *PNDIS_WLAN_BSSID_EX;
498 typedef struct PACKED _NDIS_802_11_BSSID_LIST_EX
500 UINT NumberOfItems; // in list below, at least 1
501 NDIS_WLAN_BSSID_EX Bssid[1];
502 } NDIS_802_11_BSSID_LIST_EX, *PNDIS_802_11_BSSID_LIST_EX;
504 typedef struct PACKED _NDIS_802_11_FIXED_IEs
507 USHORT BeaconInterval;
509 } NDIS_802_11_FIXED_IEs, *PNDIS_802_11_FIXED_IEs;
511 typedef struct _NDIS_802_11_VARIABLE_IEs
514 UCHAR Length; // Number of bytes in data field
516 } NDIS_802_11_VARIABLE_IEs, *PNDIS_802_11_VARIABLE_IEs;
518 typedef ULONG NDIS_802_11_FRAGMENTATION_THRESHOLD;
520 typedef ULONG NDIS_802_11_RTS_THRESHOLD;
522 typedef ULONG NDIS_802_11_ANTENNA;
524 typedef enum _NDIS_802_11_PRIVACY_FILTER
526 Ndis802_11PrivFilterAcceptAll,
527 Ndis802_11PrivFilter8021xWEP
528 } NDIS_802_11_PRIVACY_FILTER, *PNDIS_802_11_PRIVACY_FILTER;
530 // Added new encryption types
531 // Also aliased typedef to new name
532 typedef enum _NDIS_802_11_WEP_STATUS
534 Ndis802_11WEPEnabled,
535 Ndis802_11Encryption1Enabled = Ndis802_11WEPEnabled,
536 Ndis802_11WEPDisabled,
537 Ndis802_11EncryptionDisabled = Ndis802_11WEPDisabled,
538 Ndis802_11WEPKeyAbsent,
539 Ndis802_11Encryption1KeyAbsent = Ndis802_11WEPKeyAbsent,
540 Ndis802_11WEPNotSupported,
541 Ndis802_11EncryptionNotSupported = Ndis802_11WEPNotSupported,
542 Ndis802_11Encryption2Enabled,
543 Ndis802_11Encryption2KeyAbsent,
544 Ndis802_11Encryption3Enabled,
545 Ndis802_11Encryption3KeyAbsent,
546 Ndis802_11Encryption4Enabled, // TKIP or AES mix
547 Ndis802_11Encryption4KeyAbsent,
548 Ndis802_11GroupWEP40Enabled,
549 Ndis802_11GroupWEP104Enabled,
550 } NDIS_802_11_WEP_STATUS, *PNDIS_802_11_WEP_STATUS,
551 NDIS_802_11_ENCRYPTION_STATUS, *PNDIS_802_11_ENCRYPTION_STATUS;
553 typedef enum _NDIS_802_11_RELOAD_DEFAULTS
555 Ndis802_11ReloadWEPKeys
556 } NDIS_802_11_RELOAD_DEFAULTS, *PNDIS_802_11_RELOAD_DEFAULTS;
558 #define NDIS_802_11_AI_REQFI_CAPABILITIES 1
559 #define NDIS_802_11_AI_REQFI_LISTENINTERVAL 2
560 #define NDIS_802_11_AI_REQFI_CURRENTAPADDRESS 4
562 #define NDIS_802_11_AI_RESFI_CAPABILITIES 1
563 #define NDIS_802_11_AI_RESFI_STATUSCODE 2
564 #define NDIS_802_11_AI_RESFI_ASSOCIATIONID 4
566 typedef struct _NDIS_802_11_AI_REQFI
569 USHORT ListenInterval;
570 NDIS_802_11_MAC_ADDRESS CurrentAPAddress;
571 } NDIS_802_11_AI_REQFI, *PNDIS_802_11_AI_REQFI;
573 typedef struct _NDIS_802_11_AI_RESFI
577 USHORT AssociationId;
578 } NDIS_802_11_AI_RESFI, *PNDIS_802_11_AI_RESFI;
580 typedef struct _NDIS_802_11_ASSOCIATION_INFORMATION
583 USHORT AvailableRequestFixedIEs;
584 NDIS_802_11_AI_REQFI RequestFixedIEs;
585 ULONG RequestIELength;
586 ULONG OffsetRequestIEs;
587 USHORT AvailableResponseFixedIEs;
588 NDIS_802_11_AI_RESFI ResponseFixedIEs;
589 ULONG ResponseIELength;
590 ULONG OffsetResponseIEs;
591 } NDIS_802_11_ASSOCIATION_INFORMATION, *PNDIS_802_11_ASSOCIATION_INFORMATION;
593 typedef struct _NDIS_802_11_AUTHENTICATION_EVENT
595 NDIS_802_11_STATUS_INDICATION Status;
596 NDIS_802_11_AUTHENTICATION_REQUEST Request[1];
597 } NDIS_802_11_AUTHENTICATION_EVENT, *PNDIS_802_11_AUTHENTICATION_EVENT;
600 typedef struct _NDIS_802_11_TEST
606 NDIS_802_11_AUTHENTICATION_EVENT AuthenticationEvent;
607 NDIS_802_11_RSSI RssiTrigger;
609 } NDIS_802_11_TEST, *PNDIS_802_11_TEST;
612 // 802.11 Media stream constraints, associated with OID_802_11_MEDIA_STREAM_MODE
613 typedef enum _NDIS_802_11_MEDIA_STREAM_MODE
615 Ndis802_11MediaStreamOff,
616 Ndis802_11MediaStreamOn,
617 } NDIS_802_11_MEDIA_STREAM_MODE, *PNDIS_802_11_MEDIA_STREAM_MODE;
620 typedef UCHAR NDIS_802_11_PMKID_VALUE[16];
622 #ifdef CONFIG_STA_SUPPORT
623 typedef struct _BSSID_INFO
625 NDIS_802_11_MAC_ADDRESS BSSID;
626 NDIS_802_11_PMKID_VALUE PMKID;
627 } BSSID_INFO, *PBSSID_INFO;
629 typedef struct _NDIS_802_11_PMKID
633 BSSID_INFO BSSIDInfo[1];
634 } NDIS_802_11_PMKID, *PNDIS_802_11_PMKID;
635 #endif // CONFIG_STA_SUPPORT //
638 typedef struct _NDIS_802_11_AUTHENTICATION_ENCRYPTION
640 NDIS_802_11_AUTHENTICATION_MODE AuthModeSupported;
641 NDIS_802_11_ENCRYPTION_STATUS EncryptStatusSupported;
642 } NDIS_802_11_AUTHENTICATION_ENCRYPTION, *PNDIS_802_11_AUTHENTICATION_ENCRYPTION;
644 typedef struct _NDIS_802_11_CAPABILITY
649 ULONG NoOfAuthEncryptPairsSupported;
650 NDIS_802_11_AUTHENTICATION_ENCRYPTION AuthenticationEncryptionSupported[1];
651 } NDIS_802_11_CAPABILITY, *PNDIS_802_11_CAPABILITY;
656 #if WIRELESS_EXT <= 11
657 #ifndef SIOCDEVPRIVATE
658 #define SIOCDEVPRIVATE 0x8BE0
660 #define SIOCIWFIRSTPRIV SIOCDEVPRIVATE
663 #ifdef CONFIG_STA_SUPPORT
664 #define RTPRIV_IOCTL_SET (SIOCIWFIRSTPRIV + 0x02)
667 #define RTPRIV_IOCTL_BBP (SIOCIWFIRSTPRIV + 0x03)
668 #define RTPRIV_IOCTL_MAC (SIOCIWFIRSTPRIV + 0x05)
669 #define RTPRIV_IOCTL_E2P (SIOCIWFIRSTPRIV + 0x07)
673 #ifdef RALINK_28xx_QA
674 #define RTPRIV_IOCTL_ATE (SIOCIWFIRSTPRIV + 0x08)
675 #endif // RALINK_28xx_QA //
676 #endif // RALINK_ATE //
678 #define RTPRIV_IOCTL_STATISTICS (SIOCIWFIRSTPRIV + 0x09)
679 #define RTPRIV_IOCTL_ADD_PMKID_CACHE (SIOCIWFIRSTPRIV + 0x0A)
680 #define RTPRIV_IOCTL_RADIUS_DATA (SIOCIWFIRSTPRIV + 0x0C)
681 #define RTPRIV_IOCTL_GSITESURVEY (SIOCIWFIRSTPRIV + 0x0D)
682 #define RT_PRIV_IOCTL (SIOCIWFIRSTPRIV + 0x0E) // Sync. with RT61 (for wpa_supplicant)
683 #define RTPRIV_IOCTL_GET_MAC_TABLE (SIOCIWFIRSTPRIV + 0x0F)
685 #define RTPRIV_IOCTL_SHOW (SIOCIWFIRSTPRIV + 0x11)
687 SHOW_CONN_STATUS = 4,
688 SHOW_DRVIER_VERION = 5,
692 SHOW_RXBULK_INFO = 8,
693 SHOW_TXBULK_INFO = 9,
697 #ifdef QOS_DLS_SUPPORT
698 SHOW_DLS_ENTRY_INFO = 19,
699 #endif // QOS_DLS_SUPPORT //
701 SHOW_ADHOC_ENTRY_INFO = 21,
705 #endif // CONFIG_STA_SUPPORT //
708 //SNMP ieee 802dot11, kathy , 2008_0220
710 #define RT_OID_802_11_MANUFACTUREROUI 0x0700
711 #define RT_OID_802_11_MANUFACTURERNAME 0x0701
712 #define RT_OID_802_11_RESOURCETYPEIDNAME 0x0702
715 #define RT_OID_802_11_PRIVACYOPTIONIMPLEMENTED 0x0703
716 #define RT_OID_802_11_POWERMANAGEMENTMODE 0x0704
717 #define OID_802_11_WEPDEFAULTKEYVALUE 0x0705 // read , write
718 #define OID_802_11_WEPDEFAULTKEYID 0x0706
719 #define RT_OID_802_11_WEPKEYMAPPINGLENGTH 0x0707
720 #define OID_802_11_SHORTRETRYLIMIT 0x0708
721 #define OID_802_11_LONGRETRYLIMIT 0x0709
722 #define RT_OID_802_11_PRODUCTID 0x0710
723 #define RT_OID_802_11_MANUFACTUREID 0x0711
726 #define OID_802_11_CURRENTCHANNEL 0x0712
729 #define RT_OID_802_11_MAC_ADDRESS 0x0713
730 #endif // SNMP_SUPPORT //
732 #define OID_802_11_BUILD_CHANNEL_EX 0x0714
733 #define OID_802_11_GET_CH_LIST 0x0715
734 #define OID_802_11_GET_COUNTRY_CODE 0x0716
735 #define OID_802_11_GET_CHANNEL_GEOGRAPHY 0x0717
738 // for consistency with RT61
739 #define RT_OID_GET_PHY_MODE 0x761
740 #endif // LLTD_SUPPORT //
742 // MIMO Tx parameter, ShortGI, MCS, STBC, etc. these are fields in TXWI. Don't change this definition!!!
743 typedef union _HTTRANSMIT_SETTING {
746 USHORT MODE:2; // Use definition MODE_xxx.
750 USHORT STBC:2; //SPACE
752 USHORT BW:1; //channel bandwidth 20MHz or 40 MHz
758 USHORT BW:1; //channel bandwidth 20MHz or 40 MHz
760 USHORT STBC:2; //SPACE
764 USHORT MODE:2; // Use definition MODE_xxx.
768 } HTTRANSMIT_SETTING, *PHTTRANSMIT_SETTING;
770 typedef enum _RT_802_11_PREAMBLE {
771 Rt802_11PreambleLong,
772 Rt802_11PreambleShort,
774 } RT_802_11_PREAMBLE, *PRT_802_11_PREAMBLE;
776 // Only for STA, need to sync with AP
777 typedef enum _RT_802_11_PHY_MODE {
783 #ifdef DOT11_N_SUPPORT
784 PHY_11ABGN_MIXED, // both band 5
785 PHY_11N_2_4G, // 11n-only with 2.4G band 6
786 PHY_11GN_MIXED, // 2.4G band 7
787 PHY_11AN_MIXED, // 5G band 8
788 PHY_11BGN_MIXED, // if check 802.11b. 9
789 PHY_11AGN_MIXED, // if check 802.11b. 10
790 PHY_11N_5G, // 11n-only with 5G band 11
791 #endif // DOT11_N_SUPPORT //
792 } RT_802_11_PHY_MODE;
794 // put all proprietery for-query objects here to reduce # of Query_OID
795 typedef struct _RT_802_11_LINK_STATUS {
796 ULONG CurrTxRate; // in units of 0.5Mbps
797 ULONG ChannelQuality; // 0..100 %
798 ULONG TxByteCount; // both ok and fail
799 ULONG RxByteCount; // both ok and fail
800 ULONG CentralChannel; // 40MHz central channel number
801 } RT_802_11_LINK_STATUS, *PRT_802_11_LINK_STATUS;
803 typedef struct _RT_802_11_EVENT_LOG {
804 LARGE_INTEGER SystemTime; // timestammp via NdisGetCurrentSystemTime()
805 UCHAR Addr[MAC_ADDR_LENGTH];
806 USHORT Event; // EVENT_xxx
807 } RT_802_11_EVENT_LOG, *PRT_802_11_EVENT_LOG;
809 typedef struct _RT_802_11_EVENT_TABLE {
811 ULONG Rsv; // to align Log[] at LARGE_INEGER boundary
812 RT_802_11_EVENT_LOG Log[MAX_NUMBER_OF_EVENT];
813 } RT_802_11_EVENT_TABLE, PRT_802_11_EVENT_TABLE;
815 // MIMO Tx parameter, ShortGI, MCS, STBC, etc. these are fields in TXWI. Don't change this definition!!!
816 typedef union _MACHTTRANSMIT_SETTING {
819 USHORT BW:1; //channel bandwidth 20MHz or 40 MHz
821 USHORT STBC:2; //SPACE
823 USHORT MODE:2; // Use definition MODE_xxx.
826 } MACHTTRANSMIT_SETTING, *PMACHTTRANSMIT_SETTING;
828 typedef struct _RT_802_11_MAC_ENTRY {
829 UCHAR Addr[MAC_ADDR_LENGTH];
831 UCHAR Psm; // 0:PWR_ACTIVE, 1:PWR_SAVE
832 UCHAR MimoPs; // 0:MMPS_STATIC, 1:MMPS_DYNAMIC, 3:MMPS_Enabled
836 UINT32 ConnectedTime;
837 MACHTTRANSMIT_SETTING TxRate;
838 } RT_802_11_MAC_ENTRY, *PRT_802_11_MAC_ENTRY;
840 typedef struct _RT_802_11_MAC_TABLE {
842 RT_802_11_MAC_ENTRY Entry[MAX_NUMBER_OF_MAC];
843 } RT_802_11_MAC_TABLE, *PRT_802_11_MAC_TABLE;
845 // structure for query/set hardware register - MAC, BBP, RF register
846 typedef struct _RT_802_11_HARDWARE_REGISTER {
847 ULONG HardwareType; // 0:MAC, 1:BBP, 2:RF register, 3:EEPROM
848 ULONG Offset; // Q/S register offset addr
849 ULONG Data; // R/W data buffer
850 } RT_802_11_HARDWARE_REGISTER, *PRT_802_11_HARDWARE_REGISTER;
852 // structure to tune BBP R17 "RX AGC VGC init"
853 //typedef struct _RT_802_11_RX_AGC_VGC_TUNING {
854 // UCHAR FalseCcaLowerThreshold; // 0-255, def 10
855 // UCHAR FalseCcaUpperThreshold; // 0-255, def 100
856 // UCHAR VgcDelta; // R17 +-= VgcDelta whenever flase CCA over UpprThreshold
857 // // or lower than LowerThresholdupper threshold
858 // UCHAR VgcUpperBound; // max value of R17
859 //} RT_802_11_RX_AGC_VGC_TUNING, *PRT_802_11_RX_AGC_VGC_TUNING;
861 typedef struct _RT_802_11_AP_CONFIG {
862 ULONG EnableTxBurst; // 0-disable, 1-enable
863 ULONG EnableTurboRate; // 0-disable, 1-enable 72/100mbps turbo rate
864 ULONG IsolateInterStaTraffic; // 0-disable, 1-enable isolation
865 ULONG HideSsid; // 0-disable, 1-enable hiding
866 ULONG UseBGProtection; // 0-AUTO, 1-always ON, 2-always OFF
867 ULONG UseShortSlotTime; // 0-no use, 1-use 9-us short slot time
868 ULONG Rsv1; // must be 0
869 ULONG SystemErrorBitmap; // ignore upon SET, return system error upon QUERY
870 } RT_802_11_AP_CONFIG, *PRT_802_11_AP_CONFIG;
872 // structure to query/set STA_CONFIG
873 typedef struct _RT_802_11_STA_CONFIG {
874 ULONG EnableTxBurst; // 0-disable, 1-enable
875 ULONG EnableTurboRate; // 0-disable, 1-enable 72/100mbps turbo rate
876 ULONG UseBGProtection; // 0-AUTO, 1-always ON, 2-always OFF
877 ULONG UseShortSlotTime; // 0-no use, 1-use 9-us short slot time when applicable
878 ULONG AdhocMode; // 0-11b rates only (WIFI spec), 1 - b/g mixed, 2 - g only
879 ULONG HwRadioStatus; // 0-OFF, 1-ON, default is 1, Read-Only
880 ULONG Rsv1; // must be 0
881 ULONG SystemErrorBitmap; // ignore upon SET, return system error upon QUERY
882 } RT_802_11_STA_CONFIG, *PRT_802_11_STA_CONFIG;
885 // For OID Query or Set about BA structure
887 typedef struct _OID_BACAP_STRUC {
890 UCHAR Policy; // 0: DELAY_BA 1:IMMED_BA (//BA Policy subfiled value in ADDBA frame) 2:BA-not use. other value invalid
891 UCHAR MpduDensity; // 0: DELAY_BA 1:IMMED_BA (//BA Policy subfiled value in ADDBA frame) 2:BA-not use. other value invalid
892 UCHAR AmsduEnable; //Enable AMSDU transmisstion
893 UCHAR AmsduSize; // 0:3839, 1:7935 bytes. UINT MSDUSizeToBytes[] = { 3839, 7935};
894 UCHAR MMPSmode; // MIMO power save more, 0:static, 1:dynamic, 2:rsv, 3:mimo enable
895 BOOLEAN AutoBA; // Auto BA will automatically
896 } OID_BACAP_STRUC, *POID_BACAP_STRUC;
898 typedef struct _RT_802_11_ACL_ENTRY {
899 UCHAR Addr[MAC_ADDR_LENGTH];
901 } RT_802_11_ACL_ENTRY, *PRT_802_11_ACL_ENTRY;
903 typedef struct PACKED _RT_802_11_ACL {
904 ULONG Policy; // 0-disable, 1-positive list, 2-negative list
906 RT_802_11_ACL_ENTRY Entry[MAX_NUMBER_OF_ACL];
907 } RT_802_11_ACL, *PRT_802_11_ACL;
909 typedef struct _RT_802_11_WDS {
911 NDIS_802_11_MAC_ADDRESS Entry[24/*MAX_NUM_OF_WDS_LINK*/];
913 UCHAR KeyMaterial[32];
914 } RT_802_11_WDS, *PRT_802_11_WDS;
916 typedef struct _RT_802_11_TX_RATES_ {
918 UCHAR SupRate[MAX_LENGTH_OF_SUPPORT_RATES];
920 UCHAR ExtRate[MAX_LENGTH_OF_SUPPORT_RATES];
921 } RT_802_11_TX_RATES, *PRT_802_11_TX_RATES;
924 // Definition of extra information code
925 #define GENERAL_LINK_UP 0x0 // Link is Up
926 #define GENERAL_LINK_DOWN 0x1 // Link is Down
927 #define HW_RADIO_OFF 0x2 // Hardware radio off
928 #define SW_RADIO_OFF 0x3 // Software radio off
929 #define AUTH_FAIL 0x4 // Open authentication fail
930 #define AUTH_FAIL_KEYS 0x5 // Shared authentication fail
931 #define ASSOC_FAIL 0x6 // Association failed
932 #define EAP_MIC_FAILURE 0x7 // Deauthencation because MIC failure
933 #define EAP_4WAY_TIMEOUT 0x8 // Deauthencation on 4-way handshake timeout
934 #define EAP_GROUP_KEY_TIMEOUT 0x9 // Deauthencation on group key handshake timeout
935 #define EAP_SUCCESS 0xa // EAP succeed
936 #define DETECT_RADAR_SIGNAL 0xb // Radar signal occur in current channel
937 #define EXTRA_INFO_MAX 0xb // Indicate Last OID
939 #define EXTRA_INFO_CLEAR 0xffffffff
941 // This is OID setting structure. So only GF or MM as Mode. This is valid when our wirelss mode has 802.11n in use.
943 RT_802_11_PHY_MODE PhyMode; //
945 UCHAR HtMode; //HTMODE_GF or HTMODE_MM
946 UCHAR ExtOffset; //extension channel above or below
952 } OID_SET_HT_PHYMODE, *POID_SET_HT_PHYMODE;
955 #define NINTENDO_MAX_ENTRY 16
956 #define NINTENDO_SSID_NAME_LN 8
957 #define NINTENDO_SSID_NAME "NWCUSBAP"
958 #define NINTENDO_PROBE_REQ_FLAG_MASK 0x03
959 #define NINTENDO_PROBE_REQ_ON 0x01
960 #define NINTENDO_PROBE_REQ_SIGNAL 0x02
961 #define NINTENDO_PROBE_RSP_ON 0x01
962 #define NINTENDO_SSID_NICKNAME_LN 20
964 #define NINTENDO_WEPKEY_LN 13
966 typedef struct _NINTENDO_SSID
968 UCHAR NINTENDOFixChar[NINTENDO_SSID_NAME_LN];
973 UCHAR NICKname[NINTENDO_SSID_NICKNAME_LN];
974 } RT_NINTENDO_SSID, *PRT_NINTENDO_SSID;
976 typedef struct _NINTENDO_ENTRY
978 UCHAR NICKname[NINTENDO_SSID_NICKNAME_LN];
979 UCHAR DS_Addr[ETH_LENGTH_OF_ADDRESS];
982 } RT_NINTENDO_ENTRY, *PRT_NINTENDO_ENTRY;
984 //RTPRIV_IOCTL_NINTENDO_GET_TABLE
985 //RTPRIV_IOCTL_NINTENDO_SET_TABLE
986 typedef struct _NINTENDO_TABLE
989 RT_NINTENDO_ENTRY entry[NINTENDO_MAX_ENTRY];
990 } RT_NINTENDO_TABLE, *PRT_NINTENDO_TABLE;
992 //RTPRIV_IOCTL_NINTENDO_SEED_WEPKEY
993 typedef struct _NINTENDO_SEED_WEPKEY
995 UCHAR seed[NINTENDO_SSID_NICKNAME_LN];
996 UCHAR wepkey[16];//use 13 for 104 bits wep key
997 } RT_NINTENDO_SEED_WEPKEY, *PRT_NINTENDO_SEED_WEPKEY;
998 #endif // NINTENDO_AP //
1001 typedef struct _RT_LLTD_ASSOICATION_ENTRY {
1002 UCHAR Addr[ETH_LENGTH_OF_ADDRESS];
1003 unsigned short MOR; // maximum operational rate
1005 } RT_LLTD_ASSOICATION_ENTRY, *PRT_LLTD_ASSOICATION_ENTRY;
1007 typedef struct _RT_LLTD_ASSOICATION_TABLE {
1009 RT_LLTD_ASSOICATION_ENTRY Entry[MAX_NUMBER_OF_MAC];
1010 } RT_LLTD_ASSOICATION_TABLE, *PRT_LLTD_ASSOICATION_TABLE;
1011 #endif // LLTD_SUPPORT //
1013 #ifdef CONFIG_STA_SUPPORT
1014 #ifdef QOS_DLS_SUPPORT
1015 //rt2860, kathy 2007-0118
1016 // structure for DLS
1017 typedef struct _RT_802_11_DLS_UI {
1018 USHORT TimeOut; // unit: second , set by UI
1019 USHORT CountDownTimer; // unit: second , used by driver only
1020 NDIS_802_11_MAC_ADDRESS MacAddr; // set by UI
1021 UCHAR Status; // 0: none , 1: wait STAkey, 2: finish DLS setup , set by driver only
1022 BOOLEAN Valid; // 1: valid , 0: invalid , set by UI, use to setup or tear down DLS link
1023 } RT_802_11_DLS_UI, *PRT_802_11_DLS_UI;
1025 typedef struct _RT_802_11_DLS_INFO {
1026 RT_802_11_DLS_UI Entry[MAX_NUMBER_OF_DLS_ENTRY];
1028 } RT_802_11_DLS_INFO, *PRT_802_11_DLS_INFO;
1030 typedef enum _RT_802_11_DLS_MODE {
1034 } RT_802_11_DLS_MODE;
1035 #endif // QOS_DLS_SUPPORT //
1037 #ifdef WPA_SUPPLICANT_SUPPORT
1038 #ifndef NATIVE_WPA_SUPPLICANT_SUPPORT
1039 #define RT_ASSOC_EVENT_FLAG 0x0101
1040 #define RT_DISASSOC_EVENT_FLAG 0x0102
1041 #define RT_REQIE_EVENT_FLAG 0x0103
1042 #define RT_RESPIE_EVENT_FLAG 0x0104
1043 #define RT_ASSOCINFO_EVENT_FLAG 0x0105
1044 #define RT_PMKIDCAND_FLAG 0x0106
1045 #define RT_INTERFACE_DOWN 0x0107
1046 #define RT_INTERFACE_UP 0x0108
1047 #endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
1048 #endif // WPA_SUPPLICANT_SUPPORT //
1049 #endif // CONFIG_STA_SUPPORT //
1052 #define MAX_CUSTOM_LEN 128
1054 #ifdef CONFIG_STA_SUPPORT
1055 typedef enum _RT_802_11_D_CLIENT_MODE
1058 Rt802_11_D_Flexible,
1060 } RT_802_11_D_CLIENT_MODE, *PRT_802_11_D_CLIENT_MODE;
1061 #endif // CONFIG_STA_SUPPORT //
1063 typedef struct _RT_CHANNEL_LIST_INFO
1065 UCHAR ChannelList[MAX_NUM_OF_CHS]; // list all supported channels for site survey
1066 UCHAR ChannelListNum; // number of channel in ChannelList[]
1067 } RT_CHANNEL_LIST_INFO, *PRT_CHANNEL_LIST_INFO;
1069 // WSC configured credential
1070 typedef struct _WSC_CREDENTIAL
1072 NDIS_802_11_SSID SSID; // mandatory
1073 USHORT AuthType; // mandatory, 1: open, 2: wpa-psk, 4: shared, 8:wpa, 0x10: wpa2, 0x20: wpa2-psk
1074 USHORT EncrType; // mandatory, 1: none, 2: wep, 4: tkip, 8: aes
1075 UCHAR Key[64]; // mandatory, Maximum 64 byte
1077 UCHAR MacAddr[6]; // mandatory, AP MAC address
1078 UCHAR KeyIndex; // optional, default is 1
1079 UCHAR Rsvd[3]; // Make alignment
1080 } WSC_CREDENTIAL, *PWSC_CREDENTIAL;
1082 // WSC configured profiles
1083 typedef struct _WSC_PROFILE
1086 WSC_CREDENTIAL Profile[8]; // Support up to 8 profiles
1087 } WSC_PROFILE, *PWSC_PROFILE;