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
40 //#include <linux/wireless.h>
46 // IEEE 802.11 Structures and definitions
48 #define MAX_TX_POWER_LEVEL 100 /* mW */
49 #define MAX_RSSI_TRIGGER -10 /* dBm */
50 #define MIN_RSSI_TRIGGER -200 /* dBm */
51 #define MAX_FRAG_THRESHOLD 2346 /* byte count */
52 #define MIN_FRAG_THRESHOLD 256 /* byte count */
53 #define MAX_RTS_THRESHOLD 2347 /* byte count */
55 // new types for Media Specific Indications
56 // Extension channel offset
58 #define EXTCHA_ABOVE 0x1
59 #define EXTCHA_BELOW 0x3
62 #define BAND_WIDTH_20 0
63 #define BAND_WIDTH_40 1
64 #define BAND_WIDTH_BOTH 2
65 #define BAND_WIDTH_10 3 // 802.11j has 10MHz. This definition is for internal usage. doesn't fill in the IE or other field.
67 #define GAP_INTERVAL_400 1 // only support in HT mode
68 #define GAP_INTERVAL_800 0
69 #define GAP_INTERVAL_BOTH 2
71 #define NdisMediaStateConnected 1
72 #define NdisMediaStateDisconnected 0
74 #define NDIS_802_11_LENGTH_SSID 32
75 #define NDIS_802_11_LENGTH_RATES 8
76 #define NDIS_802_11_LENGTH_RATES_EX 16
77 #define MAC_ADDR_LENGTH 6
78 #define MAX_NUM_OF_CHS 49 // 14 channels @2.4G + 12@UNII + 4 @MMAC + 11 @HiperLAN2 + 7 @Japan + 1 as NULL terminationc
79 #define MAX_NUMBER_OF_EVENT 10 // entry # in EVENT table
80 #define MAX_NUMBER_OF_MAC 32 // if MAX_MBSSID_NUM is 8, this value can't be larger than 211
81 #define MAX_NUMBER_OF_ACL 64
82 #define MAX_LENGTH_OF_SUPPORT_RATES 12 // 1, 2, 5.5, 11, 6, 9, 12, 18, 24, 36, 48, 54
83 #define MAX_NUMBER_OF_DLS_ENTRY 4
88 // OID definition, since NDIS 5.0 didn't define these, we need to define for our own
89 //#if _WIN32_WINNT<=0x0500
91 #define OID_GEN_MACHINE_NAME 0x0001021A
94 #define RT_QUERY_ATE_TXDONE_COUNT 0x0401
95 #endif // RALINK_ATE //
96 #define RT_QUERY_SIGNAL_CONTEXT 0x0402
97 #define RT_SET_IAPP_PID 0x0404
98 #define RT_SET_APD_PID 0x0405
99 #define RT_SET_DEL_MAC_ENTRY 0x0406
104 #define OID_GET_SET_TOGGLE 0x8000
106 #define OID_802_11_NETWORK_TYPES_SUPPORTED 0x0103
107 #define OID_802_11_NETWORK_TYPE_IN_USE 0x0104
108 #define OID_802_11_RSSI_TRIGGER 0x0107
109 #define RT_OID_802_11_RSSI 0x0108 //rt2860 only , kathy
110 #define RT_OID_802_11_RSSI_1 0x0109 //rt2860 only , kathy
111 #define RT_OID_802_11_RSSI_2 0x010A //rt2860 only , kathy
112 #define OID_802_11_NUMBER_OF_ANTENNAS 0x010B
113 #define OID_802_11_RX_ANTENNA_SELECTED 0x010C
114 #define OID_802_11_TX_ANTENNA_SELECTED 0x010D
115 #define OID_802_11_SUPPORTED_RATES 0x010E
116 #define OID_802_11_ADD_WEP 0x0112
117 #define OID_802_11_REMOVE_WEP 0x0113
118 #define OID_802_11_DISASSOCIATE 0x0114
119 #define OID_802_11_PRIVACY_FILTER 0x0118
120 #define OID_802_11_ASSOCIATION_INFORMATION 0x011E
121 #define OID_802_11_TEST 0x011F
122 #define RT_OID_802_11_COUNTRY_REGION 0x0507
123 #define OID_802_11_BSSID_LIST_SCAN 0x0508
124 #define OID_802_11_SSID 0x0509
125 #define OID_802_11_BSSID 0x050A
126 #define RT_OID_802_11_RADIO 0x050B
127 #define RT_OID_802_11_PHY_MODE 0x050C
128 #define RT_OID_802_11_STA_CONFIG 0x050D
129 #define OID_802_11_DESIRED_RATES 0x050E
130 #define RT_OID_802_11_PREAMBLE 0x050F
131 #define OID_802_11_WEP_STATUS 0x0510
132 #define OID_802_11_AUTHENTICATION_MODE 0x0511
133 #define OID_802_11_INFRASTRUCTURE_MODE 0x0512
134 #define RT_OID_802_11_RESET_COUNTERS 0x0513
135 #define OID_802_11_RTS_THRESHOLD 0x0514
136 #define OID_802_11_FRAGMENTATION_THRESHOLD 0x0515
137 #define OID_802_11_POWER_MODE 0x0516
138 #define OID_802_11_TX_POWER_LEVEL 0x0517
139 #define RT_OID_802_11_ADD_WPA 0x0518
140 #define OID_802_11_REMOVE_KEY 0x0519
141 #define OID_802_11_ADD_KEY 0x0520
142 #define OID_802_11_CONFIGURATION 0x0521
143 #define OID_802_11_TX_PACKET_BURST 0x0522
144 #define RT_OID_802_11_QUERY_NOISE_LEVEL 0x0523
145 #define RT_OID_802_11_EXTRA_INFO 0x0524
147 #define RT_OID_802_11_HARDWARE_REGISTER 0x0525
149 #define OID_802_11_ENCRYPTION_STATUS OID_802_11_WEP_STATUS
150 #define OID_802_11_DEAUTHENTICATION 0x0526
151 #define OID_802_11_DROP_UNENCRYPTED 0x0527
152 #define OID_802_11_MIC_FAILURE_REPORT_FRAME 0x0528
154 // For 802.1x daemin using to require current driver configuration
155 #define OID_802_11_RADIUS_QUERY_SETTING 0x0540
157 #define RT_OID_DEVICE_NAME 0x0607
158 #define RT_OID_VERSION_INFO 0x0608
159 #define OID_802_11_BSSID_LIST 0x0609
160 #define OID_802_3_CURRENT_ADDRESS 0x060A
161 #define OID_GEN_MEDIA_CONNECT_STATUS 0x060B
162 #define RT_OID_802_11_QUERY_LINK_STATUS 0x060C
163 #define OID_802_11_RSSI 0x060D
164 #define OID_802_11_STATISTICS 0x060E
165 #define OID_GEN_RCV_OK 0x060F
166 #define OID_GEN_RCV_NO_BUFFER 0x0610
167 #define RT_OID_802_11_QUERY_EEPROM_VERSION 0x0611
168 #define RT_OID_802_11_QUERY_FIRMWARE_VERSION 0x0612
169 #define RT_OID_802_11_QUERY_LAST_RX_RATE 0x0613
170 #define RT_OID_802_11_TX_POWER_LEVEL_1 0x0614
171 #define RT_OID_802_11_QUERY_PIDVID 0x0615
172 //for WPA_SUPPLICANT_SUPPORT
173 #define OID_SET_COUNTERMEASURES 0x0616
174 #define OID_802_11_SET_IEEE8021X 0x0617
175 #define OID_802_11_SET_IEEE8021X_REQUIRE_KEY 0x0618
176 #define OID_802_11_PMKID 0x0620
177 #define RT_OID_WPA_SUPPLICANT_SUPPORT 0x0621
178 #define RT_OID_WE_VERSION_COMPILED 0x0622
179 #define RT_OID_NEW_DRIVER 0x0623
183 #define RT_OID_802_11_SNR_0 0x0630
184 #define RT_OID_802_11_SNR_1 0x0631
185 #define RT_OID_802_11_QUERY_LAST_TX_RATE 0x0632
186 #define RT_OID_802_11_QUERY_HT_PHYMODE 0x0633
187 #define RT_OID_802_11_SET_HT_PHYMODE 0x0634
188 #define OID_802_11_RELOAD_DEFAULTS 0x0635
189 #define RT_OID_802_11_QUERY_APSD_SETTING 0x0636
190 #define RT_OID_802_11_SET_APSD_SETTING 0x0637
191 #define RT_OID_802_11_QUERY_APSD_PSM 0x0638
192 #define RT_OID_802_11_SET_APSD_PSM 0x0639
193 #define RT_OID_802_11_QUERY_DLS 0x063A
194 #define RT_OID_802_11_SET_DLS 0x063B
195 #define RT_OID_802_11_QUERY_DLS_PARAM 0x063C
196 #define RT_OID_802_11_SET_DLS_PARAM 0x063D
197 #define RT_OID_802_11_QUERY_WMM 0x063E
198 #define RT_OID_802_11_SET_WMM 0x063F
199 #define RT_OID_802_11_QUERY_IMME_BA_CAP 0x0640
200 #define RT_OID_802_11_SET_IMME_BA_CAP 0x0641
201 #define RT_OID_802_11_QUERY_BATABLE 0x0642
202 #define RT_OID_802_11_ADD_IMME_BA 0x0643
203 #define RT_OID_802_11_TEAR_IMME_BA 0x0644
204 #define RT_OID_DRIVER_DEVICE_NAME 0x0645
205 #define RT_OID_802_11_QUERY_DAT_HT_PHYMODE 0x0646
206 #define RT_OID_QUERY_MULTIPLE_CARD_SUPPORT 0x0647
208 // Ralink defined OIDs
209 // Dennis Lee move to platform specific
211 #define RT_OID_802_11_BSSID (OID_GET_SET_TOGGLE | OID_802_11_BSSID)
212 #define RT_OID_802_11_SSID (OID_GET_SET_TOGGLE | OID_802_11_SSID)
213 #define RT_OID_802_11_INFRASTRUCTURE_MODE (OID_GET_SET_TOGGLE | OID_802_11_INFRASTRUCTURE_MODE)
214 #define RT_OID_802_11_ADD_WEP (OID_GET_SET_TOGGLE | OID_802_11_ADD_WEP)
215 #define RT_OID_802_11_ADD_KEY (OID_GET_SET_TOGGLE | OID_802_11_ADD_KEY)
216 #define RT_OID_802_11_REMOVE_WEP (OID_GET_SET_TOGGLE | OID_802_11_REMOVE_WEP)
217 #define RT_OID_802_11_REMOVE_KEY (OID_GET_SET_TOGGLE | OID_802_11_REMOVE_KEY)
218 #define RT_OID_802_11_DISASSOCIATE (OID_GET_SET_TOGGLE | OID_802_11_DISASSOCIATE)
219 #define RT_OID_802_11_AUTHENTICATION_MODE (OID_GET_SET_TOGGLE | OID_802_11_AUTHENTICATION_MODE)
220 #define RT_OID_802_11_PRIVACY_FILTER (OID_GET_SET_TOGGLE | OID_802_11_PRIVACY_FILTER)
221 #define RT_OID_802_11_BSSID_LIST_SCAN (OID_GET_SET_TOGGLE | OID_802_11_BSSID_LIST_SCAN)
222 #define RT_OID_802_11_WEP_STATUS (OID_GET_SET_TOGGLE | OID_802_11_WEP_STATUS)
223 #define RT_OID_802_11_RELOAD_DEFAULTS (OID_GET_SET_TOGGLE | OID_802_11_RELOAD_DEFAULTS)
224 #define RT_OID_802_11_NETWORK_TYPE_IN_USE (OID_GET_SET_TOGGLE | OID_802_11_NETWORK_TYPE_IN_USE)
225 #define RT_OID_802_11_TX_POWER_LEVEL (OID_GET_SET_TOGGLE | OID_802_11_TX_POWER_LEVEL)
226 #define RT_OID_802_11_RSSI_TRIGGER (OID_GET_SET_TOGGLE | OID_802_11_RSSI_TRIGGER)
227 #define RT_OID_802_11_FRAGMENTATION_THRESHOLD (OID_GET_SET_TOGGLE | OID_802_11_FRAGMENTATION_THRESHOLD)
228 #define RT_OID_802_11_RTS_THRESHOLD (OID_GET_SET_TOGGLE | OID_802_11_RTS_THRESHOLD)
229 #define RT_OID_802_11_RX_ANTENNA_SELECTED (OID_GET_SET_TOGGLE | OID_802_11_RX_ANTENNA_SELECTED)
230 #define RT_OID_802_11_TX_ANTENNA_SELECTED (OID_GET_SET_TOGGLE | OID_802_11_TX_ANTENNA_SELECTED)
231 #define RT_OID_802_11_SUPPORTED_RATES (OID_GET_SET_TOGGLE | OID_802_11_SUPPORTED_RATES)
232 #define RT_OID_802_11_DESIRED_RATES (OID_GET_SET_TOGGLE | OID_802_11_DESIRED_RATES)
233 #define RT_OID_802_11_CONFIGURATION (OID_GET_SET_TOGGLE | OID_802_11_CONFIGURATION)
234 #define RT_OID_802_11_POWER_MODE (OID_GET_SET_TOGGLE | OID_802_11_POWER_MODE)
238 typedef enum _NDIS_802_11_STATUS_TYPE
240 Ndis802_11StatusType_Authentication,
241 Ndis802_11StatusType_MediaStreamMode,
242 Ndis802_11StatusType_PMKID_CandidateList,
243 Ndis802_11StatusTypeMax // not a real type, defined as an upper bound
244 } NDIS_802_11_STATUS_TYPE, *PNDIS_802_11_STATUS_TYPE;
246 typedef UCHAR NDIS_802_11_MAC_ADDRESS[6];
248 typedef struct _NDIS_802_11_STATUS_INDICATION
250 NDIS_802_11_STATUS_TYPE StatusType;
251 } NDIS_802_11_STATUS_INDICATION, *PNDIS_802_11_STATUS_INDICATION;
253 // mask for authentication/integrity fields
254 #define NDIS_802_11_AUTH_REQUEST_AUTH_FIELDS 0x0f
256 #define NDIS_802_11_AUTH_REQUEST_REAUTH 0x01
257 #define NDIS_802_11_AUTH_REQUEST_KEYUPDATE 0x02
258 #define NDIS_802_11_AUTH_REQUEST_PAIRWISE_ERROR 0x06
259 #define NDIS_802_11_AUTH_REQUEST_GROUP_ERROR 0x0E
261 typedef struct _NDIS_802_11_AUTHENTICATION_REQUEST
263 ULONG Length; // Length of structure
264 NDIS_802_11_MAC_ADDRESS Bssid;
266 } NDIS_802_11_AUTHENTICATION_REQUEST, *PNDIS_802_11_AUTHENTICATION_REQUEST;
268 //Added new types for PMKID Candidate lists.
269 typedef struct _PMKID_CANDIDATE {
270 NDIS_802_11_MAC_ADDRESS BSSID;
272 } PMKID_CANDIDATE, *PPMKID_CANDIDATE;
274 typedef struct _NDIS_802_11_PMKID_CANDIDATE_LIST
276 ULONG Version; // Version of the structure
277 ULONG NumCandidates; // No. of pmkid candidates
278 PMKID_CANDIDATE CandidateList[1];
279 } NDIS_802_11_PMKID_CANDIDATE_LIST, *PNDIS_802_11_PMKID_CANDIDATE_LIST;
281 //Flags for PMKID Candidate list structure
282 #define NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED 0x01
284 // Added new types for OFDM 5G and 2.4G
285 typedef enum _NDIS_802_11_NETWORK_TYPE
294 Ndis802_11NetworkTypeMax // not a real type, defined as an upper bound
295 } NDIS_802_11_NETWORK_TYPE, *PNDIS_802_11_NETWORK_TYPE;
297 typedef struct _NDIS_802_11_NETWORK_TYPE_LIST
299 UINT NumberOfItems; // in list below, at least 1
300 NDIS_802_11_NETWORK_TYPE NetworkType [1];
301 } NDIS_802_11_NETWORK_TYPE_LIST, *PNDIS_802_11_NETWORK_TYPE_LIST;
303 typedef enum _NDIS_802_11_POWER_MODE
305 Ndis802_11PowerModeCAM,
306 Ndis802_11PowerModeMAX_PSP,
307 Ndis802_11PowerModeFast_PSP,
308 Ndis802_11PowerModeLegacy_PSP,
309 Ndis802_11PowerModeMax // not a real mode, defined as an upper bound
310 } NDIS_802_11_POWER_MODE, *PNDIS_802_11_POWER_MODE;
312 typedef ULONG NDIS_802_11_TX_POWER_LEVEL; // in milliwatts
315 // Received Signal Strength Indication
317 typedef LONG NDIS_802_11_RSSI; // in dBm
319 typedef struct _NDIS_802_11_CONFIGURATION_FH
321 ULONG Length; // Length of structure
322 ULONG HopPattern; // As defined by 802.11, MSB set
323 ULONG HopSet; // to one if non-802.11
324 ULONG DwellTime; // units are Kusec
325 } NDIS_802_11_CONFIGURATION_FH, *PNDIS_802_11_CONFIGURATION_FH;
327 typedef struct _NDIS_802_11_CONFIGURATION
329 ULONG Length; // Length of structure
330 ULONG BeaconPeriod; // units are Kusec
331 ULONG ATIMWindow; // units are Kusec
332 ULONG DSConfig; // Frequency, units are kHz
333 NDIS_802_11_CONFIGURATION_FH FHConfig;
334 } NDIS_802_11_CONFIGURATION, *PNDIS_802_11_CONFIGURATION;
336 typedef struct _NDIS_802_11_STATISTICS
338 ULONG Length; // Length of structure
339 LARGE_INTEGER TransmittedFragmentCount;
340 LARGE_INTEGER MulticastTransmittedFrameCount;
341 LARGE_INTEGER FailedCount;
342 LARGE_INTEGER RetryCount;
343 LARGE_INTEGER MultipleRetryCount;
344 LARGE_INTEGER RTSSuccessCount;
345 LARGE_INTEGER RTSFailureCount;
346 LARGE_INTEGER ACKFailureCount;
347 LARGE_INTEGER FrameDuplicateCount;
348 LARGE_INTEGER ReceivedFragmentCount;
349 LARGE_INTEGER MulticastReceivedFrameCount;
350 LARGE_INTEGER FCSErrorCount;
351 LARGE_INTEGER TKIPLocalMICFailures;
352 LARGE_INTEGER TKIPRemoteMICErrors;
353 LARGE_INTEGER TKIPICVErrors;
354 LARGE_INTEGER TKIPCounterMeasuresInvoked;
355 LARGE_INTEGER TKIPReplays;
356 LARGE_INTEGER CCMPFormatErrors;
357 LARGE_INTEGER CCMPReplays;
358 LARGE_INTEGER CCMPDecryptErrors;
359 LARGE_INTEGER FourWayHandshakeFailures;
360 } NDIS_802_11_STATISTICS, *PNDIS_802_11_STATISTICS;
362 typedef ULONG NDIS_802_11_KEY_INDEX;
363 typedef ULONGLONG NDIS_802_11_KEY_RSC;
365 #define MAX_RADIUS_SRV_NUM 2 // 802.1x failover number
367 typedef struct PACKED _RADIUS_SRV_INFO {
370 UCHAR radius_key[64];
371 UCHAR radius_key_len;
372 } RADIUS_SRV_INFO, *PRADIUS_SRV_INFO;
374 typedef struct PACKED _RADIUS_KEY_INFO
376 UCHAR radius_srv_num;
377 RADIUS_SRV_INFO radius_srv_info[MAX_RADIUS_SRV_NUM];
378 UCHAR ieee8021xWEP; // dynamic WEP
380 UCHAR key_length; // length of key in bytes
381 UCHAR key_material[13];
382 } RADIUS_KEY_INFO, *PRADIUS_KEY_INFO;
384 // It's used by 802.1x daemon to require relative configuration
385 typedef struct PACKED _RADIUS_CONF
387 UINT32 Length; // Length of this structure
388 UCHAR mbss_num; // indicate multiple BSS number
390 UINT32 retry_interval;
391 UINT32 session_timeout_interval;
392 UCHAR EAPifname[IFNAMSIZ];
394 UCHAR PreAuthifname[IFNAMSIZ];
395 UCHAR PreAuthifname_len;
396 RADIUS_KEY_INFO RadiusInfo[8/*MAX_MBSSID_NUM*/];
397 } RADIUS_CONF, *PRADIUS_CONF;
401 #ifdef CONFIG_STA_SUPPORT
402 // Key mapping keys require a BSSID
403 typedef struct _NDIS_802_11_KEY
405 UINT Length; // Length of this structure
407 UINT KeyLength; // length of key in bytes
408 NDIS_802_11_MAC_ADDRESS BSSID;
409 NDIS_802_11_KEY_RSC KeyRSC;
410 UCHAR KeyMaterial[1]; // variable length depending on above field
411 } NDIS_802_11_KEY, *PNDIS_802_11_KEY;
412 #endif // CONFIG_STA_SUPPORT //
414 typedef struct _NDIS_802_11_REMOVE_KEY
416 UINT Length; // Length of this structure
418 NDIS_802_11_MAC_ADDRESS BSSID;
419 } NDIS_802_11_REMOVE_KEY, *PNDIS_802_11_REMOVE_KEY;
421 typedef struct _NDIS_802_11_WEP
423 UINT Length; // Length of this structure
424 UINT KeyIndex; // 0 is the per-client key, 1-N are the
426 UINT KeyLength; // length of key in bytes
427 UCHAR KeyMaterial[1];// variable length depending on above field
428 } NDIS_802_11_WEP, *PNDIS_802_11_WEP;
431 typedef enum _NDIS_802_11_NETWORK_INFRASTRUCTURE
434 Ndis802_11Infrastructure,
435 Ndis802_11AutoUnknown,
437 Ndis802_11InfrastructureMax // Not a real value, defined as upper bound
438 } NDIS_802_11_NETWORK_INFRASTRUCTURE, *PNDIS_802_11_NETWORK_INFRASTRUCTURE;
440 // Add new authentication modes
441 typedef enum _NDIS_802_11_AUTHENTICATION_MODE
443 Ndis802_11AuthModeOpen,
444 Ndis802_11AuthModeShared,
445 Ndis802_11AuthModeAutoSwitch,
446 Ndis802_11AuthModeWPA,
447 Ndis802_11AuthModeWPAPSK,
448 Ndis802_11AuthModeWPANone,
449 Ndis802_11AuthModeWPA2,
450 Ndis802_11AuthModeWPA2PSK,
451 Ndis802_11AuthModeWPA1WPA2,
452 Ndis802_11AuthModeWPA1PSKWPA2PSK,
453 Ndis802_11AuthModeMax // Not a real mode, defined as upper bound
454 } NDIS_802_11_AUTHENTICATION_MODE, *PNDIS_802_11_AUTHENTICATION_MODE;
456 typedef UCHAR NDIS_802_11_RATES[NDIS_802_11_LENGTH_RATES]; // Set of 8 data rates
457 typedef UCHAR NDIS_802_11_RATES_EX[NDIS_802_11_LENGTH_RATES_EX]; // Set of 16 data rates
459 typedef struct PACKED _NDIS_802_11_SSID
461 UINT SsidLength; // length of SSID field below, in bytes;
463 UCHAR Ssid[NDIS_802_11_LENGTH_SSID]; // SSID information field
464 } NDIS_802_11_SSID, *PNDIS_802_11_SSID;
467 typedef struct PACKED _NDIS_WLAN_BSSID
469 ULONG Length; // Length of this structure
470 NDIS_802_11_MAC_ADDRESS MacAddress; // BSSID
472 NDIS_802_11_SSID Ssid; // SSID
473 ULONG Privacy; // WEP encryption requirement
474 NDIS_802_11_RSSI Rssi; // receive signal strength in dBm
475 NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;
476 NDIS_802_11_CONFIGURATION Configuration;
477 NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode;
478 NDIS_802_11_RATES SupportedRates;
479 } NDIS_WLAN_BSSID, *PNDIS_WLAN_BSSID;
481 typedef struct PACKED _NDIS_802_11_BSSID_LIST
483 UINT NumberOfItems; // in list below, at least 1
484 NDIS_WLAN_BSSID Bssid[1];
485 } NDIS_802_11_BSSID_LIST, *PNDIS_802_11_BSSID_LIST;
487 // Added Capabilities, IELength and IEs for each BSSID
488 typedef struct PACKED _NDIS_WLAN_BSSID_EX
490 ULONG Length; // Length of this structure
491 NDIS_802_11_MAC_ADDRESS MacAddress; // BSSID
493 NDIS_802_11_SSID Ssid; // SSID
494 UINT Privacy; // WEP encryption requirement
495 NDIS_802_11_RSSI Rssi; // receive signal
497 NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;
498 NDIS_802_11_CONFIGURATION Configuration;
499 NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode;
500 NDIS_802_11_RATES_EX SupportedRates;
503 } NDIS_WLAN_BSSID_EX, *PNDIS_WLAN_BSSID_EX;
505 typedef struct PACKED _NDIS_802_11_BSSID_LIST_EX
507 UINT NumberOfItems; // in list below, at least 1
508 NDIS_WLAN_BSSID_EX Bssid[1];
509 } NDIS_802_11_BSSID_LIST_EX, *PNDIS_802_11_BSSID_LIST_EX;
511 typedef struct PACKED _NDIS_802_11_FIXED_IEs
514 USHORT BeaconInterval;
516 } NDIS_802_11_FIXED_IEs, *PNDIS_802_11_FIXED_IEs;
518 typedef struct _NDIS_802_11_VARIABLE_IEs
521 UCHAR Length; // Number of bytes in data field
523 } NDIS_802_11_VARIABLE_IEs, *PNDIS_802_11_VARIABLE_IEs;
525 typedef ULONG NDIS_802_11_FRAGMENTATION_THRESHOLD;
527 typedef ULONG NDIS_802_11_RTS_THRESHOLD;
529 typedef ULONG NDIS_802_11_ANTENNA;
531 typedef enum _NDIS_802_11_PRIVACY_FILTER
533 Ndis802_11PrivFilterAcceptAll,
534 Ndis802_11PrivFilter8021xWEP
535 } NDIS_802_11_PRIVACY_FILTER, *PNDIS_802_11_PRIVACY_FILTER;
537 // Added new encryption types
538 // Also aliased typedef to new name
539 typedef enum _NDIS_802_11_WEP_STATUS
541 Ndis802_11WEPEnabled,
542 Ndis802_11Encryption1Enabled = Ndis802_11WEPEnabled,
543 Ndis802_11WEPDisabled,
544 Ndis802_11EncryptionDisabled = Ndis802_11WEPDisabled,
545 Ndis802_11WEPKeyAbsent,
546 Ndis802_11Encryption1KeyAbsent = Ndis802_11WEPKeyAbsent,
547 Ndis802_11WEPNotSupported,
548 Ndis802_11EncryptionNotSupported = Ndis802_11WEPNotSupported,
549 Ndis802_11Encryption2Enabled,
550 Ndis802_11Encryption2KeyAbsent,
551 Ndis802_11Encryption3Enabled,
552 Ndis802_11Encryption3KeyAbsent,
553 Ndis802_11Encryption4Enabled, // TKIP or AES mix
554 Ndis802_11Encryption4KeyAbsent,
555 } NDIS_802_11_WEP_STATUS, *PNDIS_802_11_WEP_STATUS,
556 NDIS_802_11_ENCRYPTION_STATUS, *PNDIS_802_11_ENCRYPTION_STATUS;
558 typedef enum _NDIS_802_11_RELOAD_DEFAULTS
560 Ndis802_11ReloadWEPKeys
561 } NDIS_802_11_RELOAD_DEFAULTS, *PNDIS_802_11_RELOAD_DEFAULTS;
563 #define NDIS_802_11_AI_REQFI_CAPABILITIES 1
564 #define NDIS_802_11_AI_REQFI_LISTENINTERVAL 2
565 #define NDIS_802_11_AI_REQFI_CURRENTAPADDRESS 4
567 #define NDIS_802_11_AI_RESFI_CAPABILITIES 1
568 #define NDIS_802_11_AI_RESFI_STATUSCODE 2
569 #define NDIS_802_11_AI_RESFI_ASSOCIATIONID 4
571 typedef struct _NDIS_802_11_AI_REQFI
574 USHORT ListenInterval;
575 NDIS_802_11_MAC_ADDRESS CurrentAPAddress;
576 } NDIS_802_11_AI_REQFI, *PNDIS_802_11_AI_REQFI;
578 typedef struct _NDIS_802_11_AI_RESFI
582 USHORT AssociationId;
583 } NDIS_802_11_AI_RESFI, *PNDIS_802_11_AI_RESFI;
585 typedef struct _NDIS_802_11_ASSOCIATION_INFORMATION
588 USHORT AvailableRequestFixedIEs;
589 NDIS_802_11_AI_REQFI RequestFixedIEs;
590 ULONG RequestIELength;
591 ULONG OffsetRequestIEs;
592 USHORT AvailableResponseFixedIEs;
593 NDIS_802_11_AI_RESFI ResponseFixedIEs;
594 ULONG ResponseIELength;
595 ULONG OffsetResponseIEs;
596 } NDIS_802_11_ASSOCIATION_INFORMATION, *PNDIS_802_11_ASSOCIATION_INFORMATION;
598 typedef struct _NDIS_802_11_AUTHENTICATION_EVENT
600 NDIS_802_11_STATUS_INDICATION Status;
601 NDIS_802_11_AUTHENTICATION_REQUEST Request[1];
602 } NDIS_802_11_AUTHENTICATION_EVENT, *PNDIS_802_11_AUTHENTICATION_EVENT;
605 typedef struct _NDIS_802_11_TEST
611 NDIS_802_11_AUTHENTICATION_EVENT AuthenticationEvent;
612 NDIS_802_11_RSSI RssiTrigger;
614 } NDIS_802_11_TEST, *PNDIS_802_11_TEST;
617 // 802.11 Media stream constraints, associated with OID_802_11_MEDIA_STREAM_MODE
618 typedef enum _NDIS_802_11_MEDIA_STREAM_MODE
620 Ndis802_11MediaStreamOff,
621 Ndis802_11MediaStreamOn,
622 } NDIS_802_11_MEDIA_STREAM_MODE, *PNDIS_802_11_MEDIA_STREAM_MODE;
625 typedef UCHAR NDIS_802_11_PMKID_VALUE[16];
627 #ifdef CONFIG_STA_SUPPORT
628 typedef struct _BSSID_INFO
630 NDIS_802_11_MAC_ADDRESS BSSID;
631 NDIS_802_11_PMKID_VALUE PMKID;
632 } BSSID_INFO, *PBSSID_INFO;
634 typedef struct _NDIS_802_11_PMKID
638 BSSID_INFO BSSIDInfo[1];
639 } NDIS_802_11_PMKID, *PNDIS_802_11_PMKID;
640 #endif // CONFIG_STA_SUPPORT //
643 typedef struct _NDIS_802_11_AUTHENTICATION_ENCRYPTION
645 NDIS_802_11_AUTHENTICATION_MODE AuthModeSupported;
646 NDIS_802_11_ENCRYPTION_STATUS EncryptStatusSupported;
647 } NDIS_802_11_AUTHENTICATION_ENCRYPTION, *PNDIS_802_11_AUTHENTICATION_ENCRYPTION;
649 typedef struct _NDIS_802_11_CAPABILITY
654 ULONG NoOfAuthEncryptPairsSupported;
655 NDIS_802_11_AUTHENTICATION_ENCRYPTION AuthenticationEncryptionSupported[1];
656 } NDIS_802_11_CAPABILITY, *PNDIS_802_11_CAPABILITY;
661 #if WIRELESS_EXT <= 11
662 #ifndef SIOCDEVPRIVATE
663 #define SIOCDEVPRIVATE 0x8BE0
665 #define SIOCIWFIRSTPRIV SIOCDEVPRIVATE
668 #ifdef CONFIG_STA_SUPPORT
669 #define RT_PRIV_IOCTL_EXT (SIOCIWFIRSTPRIV + 0x01) // Sync. with AP for wsc upnp daemon
670 #define RTPRIV_IOCTL_SET (SIOCIWFIRSTPRIV + 0x02)
673 #define RTPRIV_IOCTL_BBP (SIOCIWFIRSTPRIV + 0x03)
674 #define RTPRIV_IOCTL_MAC (SIOCIWFIRSTPRIV + 0x05)
675 #define RTPRIV_IOCTL_RF (SIOCIWFIRSTPRIV + 0x13)
676 #define RTPRIV_IOCTL_E2P (SIOCIWFIRSTPRIV + 0x07)
680 #ifdef RALINK_28xx_QA
681 #define RTPRIV_IOCTL_ATE (SIOCIWFIRSTPRIV + 0x08)
682 #endif // RALINK_28xx_QA //
683 #endif // RALINK_ATE //
685 #define RTPRIV_IOCTL_STATISTICS (SIOCIWFIRSTPRIV + 0x09)
686 #define RTPRIV_IOCTL_ADD_PMKID_CACHE (SIOCIWFIRSTPRIV + 0x0A)
687 #define RTPRIV_IOCTL_RADIUS_DATA (SIOCIWFIRSTPRIV + 0x0C)
688 #define RTPRIV_IOCTL_GSITESURVEY (SIOCIWFIRSTPRIV + 0x0D)
689 #define RT_PRIV_IOCTL (SIOCIWFIRSTPRIV + 0x0E) // Sync. with RT61 (for wpa_supplicant)
690 #define RTPRIV_IOCTL_GET_MAC_TABLE (SIOCIWFIRSTPRIV + 0x0F)
692 #define RTPRIV_IOCTL_SHOW (SIOCIWFIRSTPRIV + 0x11)
694 SHOW_CONN_STATUS = 4,
695 SHOW_DRVIER_VERION = 5,
699 SHOW_RXBULK_INFO = 8,
700 SHOW_TXBULK_INFO = 9,
704 #ifdef QOS_DLS_SUPPORT
705 SHOW_DLS_ENTRY_INFO = 19,
706 #endif // QOS_DLS_SUPPORT //
711 #endif // CONFIG_STA_SUPPORT //
716 //SNMP ieee 802dot11, kathy , 2008_0220
718 #define RT_OID_802_11_MANUFACTUREROUI 0x0700
719 #define RT_OID_802_11_MANUFACTURERNAME 0x0701
720 #define RT_OID_802_11_RESOURCETYPEIDNAME 0x0702
723 #define RT_OID_802_11_PRIVACYOPTIONIMPLEMENTED 0x0703
724 #define RT_OID_802_11_POWERMANAGEMENTMODE 0x0704
725 #define OID_802_11_WEPDEFAULTKEYVALUE 0x0705 // read , write
726 #define OID_802_11_WEPDEFAULTKEYID 0x0706
727 #define RT_OID_802_11_WEPKEYMAPPINGLENGTH 0x0707
728 #define OID_802_11_SHORTRETRYLIMIT 0x0708
729 #define OID_802_11_LONGRETRYLIMIT 0x0709
730 #define RT_OID_802_11_PRODUCTID 0x0710
731 #define RT_OID_802_11_MANUFACTUREID 0x0711
734 #define OID_802_11_CURRENTCHANNEL 0x0712
737 #define RT_OID_802_11_MAC_ADDRESS 0x0713
738 #endif // SNMP_SUPPORT //
740 #define OID_802_11_BUILD_CHANNEL_EX 0x0714
741 #define OID_802_11_GET_CH_LIST 0x0715
742 #define OID_802_11_GET_COUNTRY_CODE 0x0716
743 #define OID_802_11_GET_CHANNEL_GEOGRAPHY 0x0717
745 //#define RT_OID_802_11_STATISTICS (OID_GET_SET_TOGGLE | OID_802_11_STATISTICS)
747 #ifdef CONFIG_STA_SUPPORT
748 #define RT_OID_WSC_SET_PASSPHRASE 0x0740 // passphrase for wpa(2)-psk
749 #define RT_OID_WSC_DRIVER_AUTO_CONNECT 0x0741
750 #define RT_OID_WSC_QUERY_DEFAULT_PROFILE 0x0742
751 #define RT_OID_WSC_SET_CONN_BY_PROFILE_INDEX 0x0743
752 #define RT_OID_WSC_SET_ACTION 0x0744
753 #define RT_OID_WSC_SET_SSID 0x0745
754 #define RT_OID_WSC_SET_PIN_CODE 0x0746
755 #define RT_OID_WSC_SET_MODE 0x0747 // PIN or PBC
756 #define RT_OID_WSC_SET_CONF_MODE 0x0748 // Enrollee or Registrar
757 #define RT_OID_WSC_SET_PROFILE 0x0749
758 #endif // CONFIG_STA_SUPPORT //
759 #define RT_OID_802_11_WSC_QUERY_PROFILE 0x0750
760 // for consistency with RT61
761 #define RT_OID_WSC_QUERY_STATUS 0x0751
762 #define RT_OID_WSC_PIN_CODE 0x0752
763 #define RT_OID_WSC_UUID 0x0753
764 #define RT_OID_WSC_SET_SELECTED_REGISTRAR 0x0754
765 #define RT_OID_WSC_EAPMSG 0x0755
766 #define RT_OID_WSC_MANUFACTURER 0x0756
767 #define RT_OID_WSC_MODEL_NAME 0x0757
768 #define RT_OID_WSC_MODEL_NO 0x0758
769 #define RT_OID_WSC_SERIAL_NO 0x0759
770 #define RT_OID_WSC_MAC_ADDRESS 0x0760
773 // for consistency with RT61
774 #define RT_OID_GET_PHY_MODE 0x761
775 #endif // LLTD_SUPPORT //
778 //#define RT_OID_NINTENDO 0x0D010770
779 #define RT_OID_802_11_NINTENDO_GET_TABLE 0x0771 //((RT_OID_NINTENDO + 0x01) & 0xffff)
780 #define RT_OID_802_11_NINTENDO_SET_TABLE 0x0772 //((RT_OID_NINTENDO + 0x02) & 0xffff)
781 #define RT_OID_802_11_NINTENDO_CAPABLE 0x0773 //((RT_OID_NINTENDO + 0x03) & 0xffff)
782 #endif // NINTENDO_AP //
784 //Add Paul Chen for Accton
785 //#define RT_OID_TX_POWER_LEVEL 0xFF020010
786 //#define RT_OID_SET_TX_POWER_LEVEL (OID_GET_SET_TOGGLE | RT_OID_TX_POWER_LEVEL)
788 // New for MeetingHouse Api support
789 #define OID_MH_802_1X_SUPPORTED 0xFFEDC100
791 // MIMO Tx parameter, ShortGI, MCS, STBC, etc. these are fields in TXWI. Don't change this definition!!!
792 typedef union _HTTRANSMIT_SETTING {
795 USHORT MODE:2; // Use definition MODE_xxx.
799 USHORT STBC:2; //SPACE
801 USHORT BW:1; //channel bandwidth 20MHz or 40 MHz
807 USHORT BW:1; //channel bandwidth 20MHz or 40 MHz
809 USHORT STBC:2; //SPACE
813 USHORT MODE:2; // Use definition MODE_xxx.
817 } HTTRANSMIT_SETTING, *PHTTRANSMIT_SETTING;
819 typedef enum _RT_802_11_PREAMBLE {
820 Rt802_11PreambleLong,
821 Rt802_11PreambleShort,
823 } RT_802_11_PREAMBLE, *PRT_802_11_PREAMBLE;
825 // Only for STA, need to sync with AP
826 // 2005-03-08 match current RaConfig.
827 typedef enum _RT_802_11_PHY_MODE {
833 #ifdef DOT11_N_SUPPORT
834 PHY_11ABGN_MIXED, // both band 5
835 PHY_11N_2_4G, // 11n-only with 2.4G band 6
836 PHY_11GN_MIXED, // 2.4G band 7
837 PHY_11AN_MIXED, // 5G band 8
838 PHY_11BGN_MIXED, // if check 802.11b. 9
839 PHY_11AGN_MIXED, // if check 802.11b. 10
840 PHY_11N_5G, // 11n-only with 5G band 11
841 #endif // DOT11_N_SUPPORT //
842 } RT_802_11_PHY_MODE;
844 // put all proprietery for-query objects here to reduce # of Query_OID
845 typedef struct _RT_802_11_LINK_STATUS {
846 ULONG CurrTxRate; // in units of 0.5Mbps
847 ULONG ChannelQuality; // 0..100 %
848 ULONG TxByteCount; // both ok and fail
849 ULONG RxByteCount; // both ok and fail
850 ULONG CentralChannel; // 40MHz central channel number
851 } RT_802_11_LINK_STATUS, *PRT_802_11_LINK_STATUS;
853 typedef struct _RT_802_11_EVENT_LOG {
854 LARGE_INTEGER SystemTime; // timestammp via NdisGetCurrentSystemTime()
855 UCHAR Addr[MAC_ADDR_LENGTH];
856 USHORT Event; // EVENT_xxx
857 } RT_802_11_EVENT_LOG, *PRT_802_11_EVENT_LOG;
859 typedef struct _RT_802_11_EVENT_TABLE {
861 ULONG Rsv; // to align Log[] at LARGE_INEGER boundary
862 RT_802_11_EVENT_LOG Log[MAX_NUMBER_OF_EVENT];
863 } RT_802_11_EVENT_TABLE, PRT_802_11_EVENT_TABLE;
865 // MIMO Tx parameter, ShortGI, MCS, STBC, etc. these are fields in TXWI. Don't change this definition!!!
866 typedef union _MACHTTRANSMIT_SETTING {
869 USHORT BW:1; //channel bandwidth 20MHz or 40 MHz
871 USHORT STBC:2; //SPACE
873 USHORT MODE:2; // Use definition MODE_xxx.
876 } MACHTTRANSMIT_SETTING, *PMACHTTRANSMIT_SETTING;
878 typedef struct _RT_802_11_MAC_ENTRY {
879 UCHAR Addr[MAC_ADDR_LENGTH];
881 UCHAR Psm; // 0:PWR_ACTIVE, 1:PWR_SAVE
882 UCHAR MimoPs; // 0:MMPS_STATIC, 1:MMPS_DYNAMIC, 3:MMPS_Enabled
886 UINT32 ConnectedTime;
887 MACHTTRANSMIT_SETTING TxRate;
888 } RT_802_11_MAC_ENTRY, *PRT_802_11_MAC_ENTRY;
890 typedef struct _RT_802_11_MAC_TABLE {
892 RT_802_11_MAC_ENTRY Entry[MAX_NUMBER_OF_MAC];
893 } RT_802_11_MAC_TABLE, *PRT_802_11_MAC_TABLE;
895 // structure for query/set hardware register - MAC, BBP, RF register
896 typedef struct _RT_802_11_HARDWARE_REGISTER {
897 ULONG HardwareType; // 0:MAC, 1:BBP, 2:RF register, 3:EEPROM
898 ULONG Offset; // Q/S register offset addr
899 ULONG Data; // R/W data buffer
900 } RT_802_11_HARDWARE_REGISTER, *PRT_802_11_HARDWARE_REGISTER;
902 // structure to tune BBP R17 "RX AGC VGC init"
903 //typedef struct _RT_802_11_RX_AGC_VGC_TUNING {
904 // UCHAR FalseCcaLowerThreshold; // 0-255, def 10
905 // UCHAR FalseCcaUpperThreshold; // 0-255, def 100
906 // UCHAR VgcDelta; // R17 +-= VgcDelta whenever flase CCA over UpprThreshold
907 // // or lower than LowerThresholdupper threshold
908 // UCHAR VgcUpperBound; // max value of R17
909 //} RT_802_11_RX_AGC_VGC_TUNING, *PRT_802_11_RX_AGC_VGC_TUNING;
911 typedef struct _RT_802_11_AP_CONFIG {
912 ULONG EnableTxBurst; // 0-disable, 1-enable
913 ULONG EnableTurboRate; // 0-disable, 1-enable 72/100mbps turbo rate
914 ULONG IsolateInterStaTraffic; // 0-disable, 1-enable isolation
915 ULONG HideSsid; // 0-disable, 1-enable hiding
916 ULONG UseBGProtection; // 0-AUTO, 1-always ON, 2-always OFF
917 ULONG UseShortSlotTime; // 0-no use, 1-use 9-us short slot time
918 ULONG Rsv1; // must be 0
919 ULONG SystemErrorBitmap; // ignore upon SET, return system error upon QUERY
920 } RT_802_11_AP_CONFIG, *PRT_802_11_AP_CONFIG;
922 // structure to query/set STA_CONFIG
923 typedef struct _RT_802_11_STA_CONFIG {
924 ULONG EnableTxBurst; // 0-disable, 1-enable
925 ULONG EnableTurboRate; // 0-disable, 1-enable 72/100mbps turbo rate
926 ULONG UseBGProtection; // 0-AUTO, 1-always ON, 2-always OFF
927 ULONG UseShortSlotTime; // 0-no use, 1-use 9-us short slot time when applicable
928 ULONG AdhocMode; // 0-11b rates only (WIFI spec), 1 - b/g mixed, 2 - g only
929 ULONG HwRadioStatus; // 0-OFF, 1-ON, default is 1, Read-Only
930 ULONG Rsv1; // must be 0
931 ULONG SystemErrorBitmap; // ignore upon SET, return system error upon QUERY
932 } RT_802_11_STA_CONFIG, *PRT_802_11_STA_CONFIG;
935 // For OID Query or Set about BA structure
937 typedef struct _OID_BACAP_STRUC {
940 UCHAR Policy; // 0: DELAY_BA 1:IMMED_BA (//BA Policy subfiled value in ADDBA frame) 2:BA-not use. other value invalid
941 UCHAR MpduDensity; // 0: DELAY_BA 1:IMMED_BA (//BA Policy subfiled value in ADDBA frame) 2:BA-not use. other value invalid
942 UCHAR AmsduEnable; //Enable AMSDU transmisstion
943 UCHAR AmsduSize; // 0:3839, 1:7935 bytes. UINT MSDUSizeToBytes[] = { 3839, 7935};
944 UCHAR MMPSmode; // MIMO power save more, 0:static, 1:dynamic, 2:rsv, 3:mimo enable
945 BOOLEAN AutoBA; // Auto BA will automatically
946 } OID_BACAP_STRUC, *POID_BACAP_STRUC;
948 typedef struct _RT_802_11_ACL_ENTRY {
949 UCHAR Addr[MAC_ADDR_LENGTH];
951 } RT_802_11_ACL_ENTRY, *PRT_802_11_ACL_ENTRY;
953 typedef struct PACKED _RT_802_11_ACL {
954 ULONG Policy; // 0-disable, 1-positive list, 2-negative list
956 RT_802_11_ACL_ENTRY Entry[MAX_NUMBER_OF_ACL];
957 } RT_802_11_ACL, *PRT_802_11_ACL;
959 typedef struct _RT_802_11_WDS {
961 NDIS_802_11_MAC_ADDRESS Entry[24/*MAX_NUM_OF_WDS_LINK*/];
963 UCHAR KeyMaterial[32];
964 } RT_802_11_WDS, *PRT_802_11_WDS;
966 typedef struct _RT_802_11_TX_RATES_ {
968 UCHAR SupRate[MAX_LENGTH_OF_SUPPORT_RATES];
970 UCHAR ExtRate[MAX_LENGTH_OF_SUPPORT_RATES];
971 } RT_802_11_TX_RATES, *PRT_802_11_TX_RATES;
974 // Definition of extra information code
975 #define GENERAL_LINK_UP 0x0 // Link is Up
976 #define GENERAL_LINK_DOWN 0x1 // Link is Down
977 #define HW_RADIO_OFF 0x2 // Hardware radio off
978 #define SW_RADIO_OFF 0x3 // Software radio off
979 #define AUTH_FAIL 0x4 // Open authentication fail
980 #define AUTH_FAIL_KEYS 0x5 // Shared authentication fail
981 #define ASSOC_FAIL 0x6 // Association failed
982 #define EAP_MIC_FAILURE 0x7 // Deauthencation because MIC failure
983 #define EAP_4WAY_TIMEOUT 0x8 // Deauthencation on 4-way handshake timeout
984 #define EAP_GROUP_KEY_TIMEOUT 0x9 // Deauthencation on group key handshake timeout
985 #define EAP_SUCCESS 0xa // EAP succeed
986 #define DETECT_RADAR_SIGNAL 0xb // Radar signal occur in current channel
987 #define EXTRA_INFO_MAX 0xb // Indicate Last OID
989 #define EXTRA_INFO_CLEAR 0xffffffff
991 // This is OID setting structure. So only GF or MM as Mode. This is valid when our wirelss mode has 802.11n in use.
993 RT_802_11_PHY_MODE PhyMode; //
995 UCHAR HtMode; //HTMODE_GF or HTMODE_MM
996 UCHAR ExtOffset; //extension channel above or below
1002 } OID_SET_HT_PHYMODE, *POID_SET_HT_PHYMODE;
1005 #define NINTENDO_MAX_ENTRY 16
1006 #define NINTENDO_SSID_NAME_LN 8
1007 #define NINTENDO_SSID_NAME "NWCUSBAP"
1008 #define NINTENDO_PROBE_REQ_FLAG_MASK 0x03
1009 #define NINTENDO_PROBE_REQ_ON 0x01
1010 #define NINTENDO_PROBE_REQ_SIGNAL 0x02
1011 #define NINTENDO_PROBE_RSP_ON 0x01
1012 #define NINTENDO_SSID_NICKNAME_LN 20
1014 #define NINTENDO_WEPKEY_LN 13
1016 typedef struct _NINTENDO_SSID
1018 UCHAR NINTENDOFixChar[NINTENDO_SSID_NAME_LN];
1023 UCHAR NICKname[NINTENDO_SSID_NICKNAME_LN];
1024 } RT_NINTENDO_SSID, *PRT_NINTENDO_SSID;
1026 typedef struct _NINTENDO_ENTRY
1028 UCHAR NICKname[NINTENDO_SSID_NICKNAME_LN];
1029 UCHAR DS_Addr[ETH_LENGTH_OF_ADDRESS];
1032 } RT_NINTENDO_ENTRY, *PRT_NINTENDO_ENTRY;
1034 //RTPRIV_IOCTL_NINTENDO_GET_TABLE
1035 //RTPRIV_IOCTL_NINTENDO_SET_TABLE
1036 typedef struct _NINTENDO_TABLE
1039 RT_NINTENDO_ENTRY entry[NINTENDO_MAX_ENTRY];
1040 } RT_NINTENDO_TABLE, *PRT_NINTENDO_TABLE;
1042 //RTPRIV_IOCTL_NINTENDO_SEED_WEPKEY
1043 typedef struct _NINTENDO_SEED_WEPKEY
1045 UCHAR seed[NINTENDO_SSID_NICKNAME_LN];
1046 UCHAR wepkey[16];//use 13 for 104 bits wep key
1047 } RT_NINTENDO_SEED_WEPKEY, *PRT_NINTENDO_SEED_WEPKEY;
1048 #endif // NINTENDO_AP //
1051 typedef struct _RT_LLTD_ASSOICATION_ENTRY {
1052 UCHAR Addr[ETH_LENGTH_OF_ADDRESS];
1053 unsigned short MOR; // maximum operational rate
1055 } RT_LLTD_ASSOICATION_ENTRY, *PRT_LLTD_ASSOICATION_ENTRY;
1057 typedef struct _RT_LLTD_ASSOICATION_TABLE {
1059 RT_LLTD_ASSOICATION_ENTRY Entry[MAX_NUMBER_OF_MAC];
1060 } RT_LLTD_ASSOICATION_TABLE, *PRT_LLTD_ASSOICATION_TABLE;
1061 #endif // LLTD_SUPPORT //
1063 #ifdef CONFIG_STA_SUPPORT
1064 #ifdef QOS_DLS_SUPPORT
1065 //rt2860, kathy 2007-0118
1066 // structure for DLS
1067 typedef struct _RT_802_11_DLS_UI {
1068 USHORT TimeOut; // unit: second , set by UI
1069 USHORT CountDownTimer; // unit: second , used by driver only
1070 NDIS_802_11_MAC_ADDRESS MacAddr; // set by UI
1071 UCHAR Status; // 0: none , 1: wait STAkey, 2: finish DLS setup , set by driver only
1072 BOOLEAN Valid; // 1: valid , 0: invalid , set by UI, use to setup or tear down DLS link
1073 } RT_802_11_DLS_UI, *PRT_802_11_DLS_UI;
1075 typedef struct _RT_802_11_DLS_INFO {
1076 RT_802_11_DLS_UI Entry[MAX_NUMBER_OF_DLS_ENTRY];
1078 } RT_802_11_DLS_INFO, *PRT_802_11_DLS_INFO;
1080 typedef enum _RT_802_11_DLS_MODE {
1084 } RT_802_11_DLS_MODE;
1085 #endif // QOS_DLS_SUPPORT //
1087 #ifdef WPA_SUPPLICANT_SUPPORT
1088 #ifndef NATIVE_WPA_SUPPLICANT_SUPPORT
1089 #define RT_ASSOC_EVENT_FLAG 0x0101
1090 #define RT_DISASSOC_EVENT_FLAG 0x0102
1091 #define RT_REQIE_EVENT_FLAG 0x0103
1092 #define RT_RESPIE_EVENT_FLAG 0x0104
1093 #define RT_ASSOCINFO_EVENT_FLAG 0x0105
1094 #define RT_PMKIDCAND_FLAG 0x0106
1095 #define RT_INTERFACE_DOWN 0x0107
1096 #define RT_INTERFACE_UP 0x0108
1097 #endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
1098 #endif // WPA_SUPPLICANT_SUPPORT //
1099 #endif // CONFIG_STA_SUPPORT //
1102 #define MAX_CUSTOM_LEN 128
1104 #ifdef CONFIG_STA_SUPPORT
1105 typedef enum _RT_802_11_D_CLIENT_MODE
1108 Rt802_11_D_Flexible,
1110 } RT_802_11_D_CLIENT_MODE, *PRT_802_11_D_CLIENT_MODE;
1111 #endif // CONFIG_STA_SUPPORT //
1113 typedef struct _RT_CHANNEL_LIST_INFO
1115 UCHAR ChannelList[MAX_NUM_OF_CHS]; // list all supported channels for site survey
1116 UCHAR ChannelListNum; // number of channel in ChannelList[]
1117 } RT_CHANNEL_LIST_INFO, *PRT_CHANNEL_LIST_INFO;
1119 // WSC configured credential
1120 typedef struct _WSC_CREDENTIAL
1122 NDIS_802_11_SSID SSID; // mandatory
1123 USHORT AuthType; // mandatory, 1: open, 2: wpa-psk, 4: shared, 8:wpa, 0x10: wpa2, 0x20: wpa2-psk
1124 USHORT EncrType; // mandatory, 1: none, 2: wep, 4: tkip, 8: aes
1125 UCHAR Key[64]; // mandatory, Maximum 64 byte
1127 UCHAR MacAddr[6]; // mandatory, AP MAC address
1128 UCHAR KeyIndex; // optional, default is 1
1129 UCHAR Rsvd[3]; // Make alignment
1130 } WSC_CREDENTIAL, *PWSC_CREDENTIAL;
1132 // WSC configured profiles
1133 typedef struct _WSC_PROFILE
1136 WSC_CREDENTIAL Profile[8]; // Support up to 8 profiles
1137 } WSC_PROFILE, *PWSC_PROFILE;