First Support on Ginger and OMAP TI
[linux-ginger.git] / drivers / staging / rt3090 / oid.h
blob29a43401095e8d465df122e355ca8be56858d97a
1 /*
2 *************************************************************************
3 * Ralink Tech Inc.
4 * 5F., No.36, Taiyuan St., Jhubei City,
5 * Hsinchu County 302,
6 * Taiwan, R.O.C.
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. *
14 * *
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. *
19 * *
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. *
24 * *
25 *************************************************************************
27 Module Name:
28 oid.h
30 Abstract:
32 Revision History:
33 Who When What
34 -------- ---------- ----------------------------------------------
35 Name Date Modification logs
37 #ifndef _OID_H_
38 #define _OID_H_
40 //#include <linux/wireless.h>
42 #ifndef TRUE
43 #define TRUE 1
44 #endif
45 #ifndef FALSE
46 #define FALSE 0
47 #endif
49 // IEEE 802.11 Structures and definitions
51 #define MAX_TX_POWER_LEVEL 100 /* mW */
52 #define MAX_RSSI_TRIGGER -10 /* dBm */
53 #define MIN_RSSI_TRIGGER -200 /* dBm */
54 #define MAX_FRAG_THRESHOLD 2346 /* byte count */
55 #define MIN_FRAG_THRESHOLD 256 /* byte count */
56 #define MAX_RTS_THRESHOLD 2347 /* byte count */
58 // new types for Media Specific Indications
59 // Extension channel offset
60 #define EXTCHA_NONE 0
61 #define EXTCHA_ABOVE 0x1
62 #define EXTCHA_BELOW 0x3
64 // BW
65 #define BAND_WIDTH_20 0
66 #define BAND_WIDTH_40 1
67 #define BAND_WIDTH_BOTH 2
68 #define BAND_WIDTH_10 3 // 802.11j has 10MHz. This definition is for internal usage. doesn't fill in the IE or other field.
69 // SHORTGI
70 #define GAP_INTERVAL_400 1 // only support in HT mode
71 #define GAP_INTERVAL_800 0
72 #define GAP_INTERVAL_BOTH 2
74 #define NdisMediaStateConnected 1
75 #define NdisMediaStateDisconnected 0
77 #define NDIS_802_11_LENGTH_SSID 32
78 #define NDIS_802_11_LENGTH_RATES 8
79 #define NDIS_802_11_LENGTH_RATES_EX 16
80 #define MAC_ADDR_LENGTH 6
81 //#define MAX_NUM_OF_CHS 49 // 14 channels @2.4G + 12@UNII + 4 @MMAC + 11 @HiperLAN2 + 7 @Japan + 1 as NULL terminationc
82 #define MAX_NUM_OF_CHS 54 // 14 channels @2.4G + 12@UNII(lower/middle) + 16@HiperLAN2 + 11@UNII(upper) + 0 @Japan + 1 as NULL termination
83 #define MAX_NUMBER_OF_EVENT 10 // entry # in EVENT table
84 #define MAX_NUMBER_OF_MAC 32 // if MAX_MBSSID_NUM is 8, this value can't be larger than 211
85 #define MAX_NUMBER_OF_ACL 64
86 #define MAX_LENGTH_OF_SUPPORT_RATES 12 // 1, 2, 5.5, 11, 6, 9, 12, 18, 24, 36, 48, 54
87 #define MAX_NUMBER_OF_DLS_ENTRY 4
90 #define RT_QUERY_SIGNAL_CONTEXT 0x0402
91 #define RT_SET_IAPP_PID 0x0404
92 #define RT_SET_APD_PID 0x0405
93 #define RT_SET_DEL_MAC_ENTRY 0x0406
94 #define RT_QUERY_EVENT_TABLE 0x0407
96 // IEEE 802.11 OIDs
98 #define OID_GET_SET_TOGGLE 0x8000
99 #define OID_GET_SET_FROM_UI 0x4000
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
119 #define RT_OID_802_11_COUNTRY_REGION 0x0507
120 #define OID_802_11_BSSID_LIST_SCAN 0x0508
121 #define OID_802_11_SSID 0x0509
122 #define OID_802_11_BSSID 0x050A
123 #define RT_OID_802_11_RADIO 0x050B
124 #define RT_OID_802_11_PHY_MODE 0x050C
125 #define RT_OID_802_11_STA_CONFIG 0x050D
126 #define OID_802_11_DESIRED_RATES 0x050E
127 #define RT_OID_802_11_PREAMBLE 0x050F
128 #define OID_802_11_WEP_STATUS 0x0510
129 #define OID_802_11_AUTHENTICATION_MODE 0x0511
130 #define OID_802_11_INFRASTRUCTURE_MODE 0x0512
131 #define RT_OID_802_11_RESET_COUNTERS 0x0513
132 #define OID_802_11_RTS_THRESHOLD 0x0514
133 #define OID_802_11_FRAGMENTATION_THRESHOLD 0x0515
134 #define OID_802_11_POWER_MODE 0x0516
135 #define OID_802_11_TX_POWER_LEVEL 0x0517
136 #define RT_OID_802_11_ADD_WPA 0x0518
137 #define OID_802_11_REMOVE_KEY 0x0519
138 #define OID_802_11_ADD_KEY 0x0520
139 #define OID_802_11_CONFIGURATION 0x0521
140 #define OID_802_11_TX_PACKET_BURST 0x0522
141 #define RT_OID_802_11_QUERY_NOISE_LEVEL 0x0523
142 #define RT_OID_802_11_EXTRA_INFO 0x0524
143 #ifdef DBG
144 #define RT_OID_802_11_HARDWARE_REGISTER 0x0525
145 #endif
146 #define OID_802_11_ENCRYPTION_STATUS OID_802_11_WEP_STATUS
147 #define OID_802_11_DEAUTHENTICATION 0x0526
148 #define OID_802_11_DROP_UNENCRYPTED 0x0527
149 #define OID_802_11_MIC_FAILURE_REPORT_FRAME 0x0528
150 #define OID_802_11_EAP_METHOD 0x0529
152 // For 802.1x daemin using to require current driver configuration
153 #define OID_802_11_RADIUS_QUERY_SETTING 0x0540
155 #define RT_OID_DEVICE_NAME 0x0607
156 #define RT_OID_VERSION_INFO 0x0608
157 #define OID_802_11_BSSID_LIST 0x0609
158 #define OID_802_3_CURRENT_ADDRESS 0x060A
159 #define OID_GEN_MEDIA_CONNECT_STATUS 0x060B
160 #define RT_OID_802_11_QUERY_LINK_STATUS 0x060C
161 #define OID_802_11_RSSI 0x060D
162 #define OID_802_11_STATISTICS 0x060E
163 #define OID_GEN_RCV_OK 0x060F
164 #define OID_GEN_RCV_NO_BUFFER 0x0610
165 #define RT_OID_802_11_QUERY_EEPROM_VERSION 0x0611
166 #define RT_OID_802_11_QUERY_FIRMWARE_VERSION 0x0612
167 #define RT_OID_802_11_QUERY_LAST_RX_RATE 0x0613
168 #define RT_OID_802_11_TX_POWER_LEVEL_1 0x0614
169 #define RT_OID_802_11_QUERY_PIDVID 0x0615
170 //for WPA_SUPPLICANT_SUPPORT
171 #define OID_SET_COUNTERMEASURES 0x0616
172 #define OID_802_11_SET_IEEE8021X 0x0617
173 #define OID_802_11_SET_IEEE8021X_REQUIRE_KEY 0x0618
174 #define OID_802_11_PMKID 0x0620
175 #define RT_OID_WPA_SUPPLICANT_SUPPORT 0x0621
176 #define RT_OID_WE_VERSION_COMPILED 0x0622
177 #define RT_OID_NEW_DRIVER 0x0623
179 #define RT_OID_802_11_SNR_0 0x0630
180 #define RT_OID_802_11_SNR_1 0x0631
181 #define RT_OID_802_11_QUERY_LAST_TX_RATE 0x0632
182 #define RT_OID_802_11_QUERY_HT_PHYMODE 0x0633
183 #define RT_OID_802_11_SET_HT_PHYMODE 0x0634
184 #define OID_802_11_RELOAD_DEFAULTS 0x0635
185 #define RT_OID_802_11_QUERY_APSD_SETTING 0x0636
186 #define RT_OID_802_11_SET_APSD_SETTING 0x0637
187 #define RT_OID_802_11_QUERY_APSD_PSM 0x0638
188 #define RT_OID_802_11_SET_APSD_PSM 0x0639
189 #define RT_OID_802_11_QUERY_DLS 0x063A
190 #define RT_OID_802_11_SET_DLS 0x063B
191 #define RT_OID_802_11_QUERY_DLS_PARAM 0x063C
192 #define RT_OID_802_11_SET_DLS_PARAM 0x063D
193 #define RT_OID_802_11_QUERY_WMM 0x063E
194 #define RT_OID_802_11_SET_WMM 0x063F
195 #define RT_OID_802_11_QUERY_IMME_BA_CAP 0x0640
196 #define RT_OID_802_11_SET_IMME_BA_CAP 0x0641
197 #define RT_OID_802_11_QUERY_BATABLE 0x0642
198 #define RT_OID_802_11_ADD_IMME_BA 0x0643
199 #define RT_OID_802_11_TEAR_IMME_BA 0x0644
200 #define RT_OID_DRIVER_DEVICE_NAME 0x0645
201 #define RT_OID_802_11_QUERY_DAT_HT_PHYMODE 0x0646
202 #define RT_OID_QUERY_MULTIPLE_CARD_SUPPORT 0x0647
203 #define OID_802_11_SET_PSPXLINK_MODE 0x0648
204 /*+++ add by woody +++*/
205 #define OID_802_11_SET_PASSPHRASE 0x0649
206 // Ralink defined OIDs
207 // Dennis Lee move to platform specific
209 #define RT_OID_802_11_BSSID (OID_GET_SET_TOGGLE | OID_802_11_BSSID)
210 #define RT_OID_802_11_SSID (OID_GET_SET_TOGGLE | OID_802_11_SSID)
211 #define RT_OID_802_11_INFRASTRUCTURE_MODE (OID_GET_SET_TOGGLE | OID_802_11_INFRASTRUCTURE_MODE)
212 #define RT_OID_802_11_ADD_WEP (OID_GET_SET_TOGGLE | OID_802_11_ADD_WEP)
213 #define RT_OID_802_11_ADD_KEY (OID_GET_SET_TOGGLE | OID_802_11_ADD_KEY)
214 #define RT_OID_802_11_REMOVE_WEP (OID_GET_SET_TOGGLE | OID_802_11_REMOVE_WEP)
215 #define RT_OID_802_11_REMOVE_KEY (OID_GET_SET_TOGGLE | OID_802_11_REMOVE_KEY)
216 #define RT_OID_802_11_DISASSOCIATE (OID_GET_SET_TOGGLE | OID_802_11_DISASSOCIATE)
217 #define RT_OID_802_11_AUTHENTICATION_MODE (OID_GET_SET_TOGGLE | OID_802_11_AUTHENTICATION_MODE)
218 #define RT_OID_802_11_PRIVACY_FILTER (OID_GET_SET_TOGGLE | OID_802_11_PRIVACY_FILTER)
219 #define RT_OID_802_11_BSSID_LIST_SCAN (OID_GET_SET_TOGGLE | OID_802_11_BSSID_LIST_SCAN)
220 #define RT_OID_802_11_WEP_STATUS (OID_GET_SET_TOGGLE | OID_802_11_WEP_STATUS)
221 #define RT_OID_802_11_RELOAD_DEFAULTS (OID_GET_SET_TOGGLE | OID_802_11_RELOAD_DEFAULTS)
222 #define RT_OID_802_11_NETWORK_TYPE_IN_USE (OID_GET_SET_TOGGLE | OID_802_11_NETWORK_TYPE_IN_USE)
223 #define RT_OID_802_11_TX_POWER_LEVEL (OID_GET_SET_TOGGLE | OID_802_11_TX_POWER_LEVEL)
224 #define RT_OID_802_11_RSSI_TRIGGER (OID_GET_SET_TOGGLE | OID_802_11_RSSI_TRIGGER)
225 #define RT_OID_802_11_FRAGMENTATION_THRESHOLD (OID_GET_SET_TOGGLE | OID_802_11_FRAGMENTATION_THRESHOLD)
226 #define RT_OID_802_11_RTS_THRESHOLD (OID_GET_SET_TOGGLE | OID_802_11_RTS_THRESHOLD)
227 #define RT_OID_802_11_RX_ANTENNA_SELECTED (OID_GET_SET_TOGGLE | OID_802_11_RX_ANTENNA_SELECTED)
228 #define RT_OID_802_11_TX_ANTENNA_SELECTED (OID_GET_SET_TOGGLE | OID_802_11_TX_ANTENNA_SELECTED)
229 #define RT_OID_802_11_SUPPORTED_RATES (OID_GET_SET_TOGGLE | OID_802_11_SUPPORTED_RATES)
230 #define RT_OID_802_11_DESIRED_RATES (OID_GET_SET_TOGGLE | OID_802_11_DESIRED_RATES)
231 #define RT_OID_802_11_CONFIGURATION (OID_GET_SET_TOGGLE | OID_802_11_CONFIGURATION)
232 #define RT_OID_802_11_POWER_MODE (OID_GET_SET_TOGGLE | OID_802_11_POWER_MODE)
233 #define RT_OID_802_11_SET_PSPXLINK_MODE (OID_GET_SET_TOGGLE | OID_802_11_SET_PSPXLINK_MODE)
234 #define RT_OID_802_11_EAP_METHOD (OID_GET_SET_TOGGLE | OID_802_11_EAP_METHOD)
235 #define RT_OID_802_11_SET_PASSPHRASE (OID_GET_SET_TOGGLE | OID_802_11_SET_PASSPHRASE)
239 typedef enum _NDIS_802_11_STATUS_TYPE
241 Ndis802_11StatusType_Authentication,
242 Ndis802_11StatusType_MediaStreamMode,
243 Ndis802_11StatusType_PMKID_CandidateList,
244 Ndis802_11StatusTypeMax // not a real type, defined as an upper bound
245 } NDIS_802_11_STATUS_TYPE, *PNDIS_802_11_STATUS_TYPE;
247 typedef UCHAR NDIS_802_11_MAC_ADDRESS[6];
249 typedef struct _NDIS_802_11_STATUS_INDICATION
251 NDIS_802_11_STATUS_TYPE StatusType;
252 } NDIS_802_11_STATUS_INDICATION, *PNDIS_802_11_STATUS_INDICATION;
254 // mask for authentication/integrity fields
255 #define NDIS_802_11_AUTH_REQUEST_AUTH_FIELDS 0x0f
257 #define NDIS_802_11_AUTH_REQUEST_REAUTH 0x01
258 #define NDIS_802_11_AUTH_REQUEST_KEYUPDATE 0x02
259 #define NDIS_802_11_AUTH_REQUEST_PAIRWISE_ERROR 0x06
260 #define NDIS_802_11_AUTH_REQUEST_GROUP_ERROR 0x0E
262 typedef struct _NDIS_802_11_AUTHENTICATION_REQUEST
264 ULONG Length; // Length of structure
265 NDIS_802_11_MAC_ADDRESS Bssid;
266 ULONG Flags;
267 } NDIS_802_11_AUTHENTICATION_REQUEST, *PNDIS_802_11_AUTHENTICATION_REQUEST;
269 //Added new types for PMKID Candidate lists.
270 typedef struct _PMKID_CANDIDATE {
271 NDIS_802_11_MAC_ADDRESS BSSID;
272 ULONG Flags;
273 } PMKID_CANDIDATE, *PPMKID_CANDIDATE;
275 typedef struct _NDIS_802_11_PMKID_CANDIDATE_LIST
277 ULONG Version; // Version of the structure
278 ULONG NumCandidates; // No. of pmkid candidates
279 PMKID_CANDIDATE CandidateList[1];
280 } NDIS_802_11_PMKID_CANDIDATE_LIST, *PNDIS_802_11_PMKID_CANDIDATE_LIST;
282 //Flags for PMKID Candidate list structure
283 #define NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED 0x01
285 // Added new types for OFDM 5G and 2.4G
286 typedef enum _NDIS_802_11_NETWORK_TYPE
288 Ndis802_11FH,
289 Ndis802_11DS,
290 Ndis802_11OFDM5,
291 Ndis802_11OFDM24,
292 Ndis802_11Automode,
293 Ndis802_11OFDM5_N,
294 Ndis802_11OFDM24_N,
295 Ndis802_11NetworkTypeMax // not a real type, defined as an upper bound
296 } NDIS_802_11_NETWORK_TYPE, *PNDIS_802_11_NETWORK_TYPE;
298 typedef struct _NDIS_802_11_NETWORK_TYPE_LIST
300 UINT NumberOfItems; // in list below, at least 1
301 NDIS_802_11_NETWORK_TYPE NetworkType [1];
302 } NDIS_802_11_NETWORK_TYPE_LIST, *PNDIS_802_11_NETWORK_TYPE_LIST;
304 typedef enum _NDIS_802_11_POWER_MODE
306 Ndis802_11PowerModeCAM,
307 Ndis802_11PowerModeMAX_PSP,
308 Ndis802_11PowerModeFast_PSP,
309 Ndis802_11PowerModeLegacy_PSP,
310 Ndis802_11PowerModeMax // not a real mode, defined as an upper bound
311 } NDIS_802_11_POWER_MODE, *PNDIS_802_11_POWER_MODE;
313 typedef ULONG NDIS_802_11_TX_POWER_LEVEL; // in milliwatts
316 // Received Signal Strength Indication
318 typedef LONG NDIS_802_11_RSSI; // in dBm
320 typedef struct _NDIS_802_11_CONFIGURATION_FH
322 ULONG Length; // Length of structure
323 ULONG HopPattern; // As defined by 802.11, MSB set
324 ULONG HopSet; // to one if non-802.11
325 ULONG DwellTime; // units are Kusec
326 } NDIS_802_11_CONFIGURATION_FH, *PNDIS_802_11_CONFIGURATION_FH;
328 typedef struct _NDIS_802_11_CONFIGURATION
330 ULONG Length; // Length of structure
331 ULONG BeaconPeriod; // units are Kusec
332 ULONG ATIMWindow; // units are Kusec
333 ULONG DSConfig; // Frequency, units are kHz
334 NDIS_802_11_CONFIGURATION_FH FHConfig;
335 } NDIS_802_11_CONFIGURATION, *PNDIS_802_11_CONFIGURATION;
337 typedef struct _NDIS_802_11_STATISTICS
339 ULONG Length; // Length of structure
340 LARGE_INTEGER TransmittedFragmentCount;
341 LARGE_INTEGER MulticastTransmittedFrameCount;
342 LARGE_INTEGER FailedCount;
343 LARGE_INTEGER RetryCount;
344 LARGE_INTEGER MultipleRetryCount;
345 LARGE_INTEGER RTSSuccessCount;
346 LARGE_INTEGER RTSFailureCount;
347 LARGE_INTEGER ACKFailureCount;
348 LARGE_INTEGER FrameDuplicateCount;
349 LARGE_INTEGER ReceivedFragmentCount;
350 LARGE_INTEGER MulticastReceivedFrameCount;
351 LARGE_INTEGER FCSErrorCount;
352 LARGE_INTEGER TKIPLocalMICFailures;
353 LARGE_INTEGER TKIPRemoteMICErrors;
354 LARGE_INTEGER TKIPICVErrors;
355 LARGE_INTEGER TKIPCounterMeasuresInvoked;
356 LARGE_INTEGER TKIPReplays;
357 LARGE_INTEGER CCMPFormatErrors;
358 LARGE_INTEGER CCMPReplays;
359 LARGE_INTEGER CCMPDecryptErrors;
360 LARGE_INTEGER FourWayHandshakeFailures;
361 } NDIS_802_11_STATISTICS, *PNDIS_802_11_STATISTICS;
363 typedef ULONG NDIS_802_11_KEY_INDEX;
364 typedef ULONGLONG NDIS_802_11_KEY_RSC;
366 #define MAX_RADIUS_SRV_NUM 2 // 802.1x failover number
368 typedef struct PACKED _RADIUS_SRV_INFO {
369 UINT32 radius_ip;
370 UINT32 radius_port;
371 UCHAR radius_key[64];
372 UCHAR radius_key_len;
373 } RADIUS_SRV_INFO, *PRADIUS_SRV_INFO;
375 typedef struct PACKED _RADIUS_KEY_INFO
377 UCHAR radius_srv_num;
378 RADIUS_SRV_INFO radius_srv_info[MAX_RADIUS_SRV_NUM];
379 UCHAR ieee8021xWEP; // dynamic WEP
380 UCHAR key_index;
381 UCHAR key_length; // length of key in bytes
382 UCHAR key_material[13];
383 } RADIUS_KEY_INFO, *PRADIUS_KEY_INFO;
385 // It's used by 802.1x daemon to require relative configuration
386 typedef struct PACKED _RADIUS_CONF
388 UINT32 Length; // Length of this structure
389 UCHAR mbss_num; // indicate multiple BSS number
390 UINT32 own_ip_addr;
391 UINT32 retry_interval;
392 UINT32 session_timeout_interval;
393 UCHAR EAPifname[8][IFNAMSIZ];
394 UCHAR EAPifname_len[8];
395 UCHAR PreAuthifname[8][IFNAMSIZ];
396 UCHAR PreAuthifname_len[8];
397 RADIUS_KEY_INFO RadiusInfo[8];
398 } RADIUS_CONF, *PRADIUS_CONF;
402 #ifdef CONFIG_STA_SUPPORT
403 // Key mapping keys require a BSSID
404 typedef struct _NDIS_802_11_KEY
406 UINT Length; // Length of this structure
407 UINT KeyIndex;
408 UINT KeyLength; // length of key in bytes
409 NDIS_802_11_MAC_ADDRESS BSSID;
410 NDIS_802_11_KEY_RSC KeyRSC;
411 UCHAR KeyMaterial[1]; // variable length depending on above field
412 } NDIS_802_11_KEY, *PNDIS_802_11_KEY;
414 typedef struct _NDIS_802_11_PASSPHRASE
416 UINT KeyLength; // length of key in bytes
417 NDIS_802_11_MAC_ADDRESS BSSID;
418 UCHAR KeyMaterial[1]; // variable length depending on above field
419 } NDIS_802_11_PASSPHRASE, *PNDIS_802_11_PASSPHRASE;
420 #endif // CONFIG_STA_SUPPORT //
422 typedef struct _NDIS_802_11_REMOVE_KEY
424 UINT Length; // Length of this structure
425 UINT KeyIndex;
426 NDIS_802_11_MAC_ADDRESS BSSID;
427 } NDIS_802_11_REMOVE_KEY, *PNDIS_802_11_REMOVE_KEY;
429 typedef struct _NDIS_802_11_WEP
431 UINT Length; // Length of this structure
432 UINT KeyIndex; // 0 is the per-client key, 1-N are the
433 // global keys
434 UINT KeyLength; // length of key in bytes
435 UCHAR KeyMaterial[1];// variable length depending on above field
436 } NDIS_802_11_WEP, *PNDIS_802_11_WEP;
439 typedef enum _NDIS_802_11_NETWORK_INFRASTRUCTURE
441 Ndis802_11IBSS,
442 Ndis802_11Infrastructure,
443 Ndis802_11AutoUnknown,
444 Ndis802_11Monitor,
445 Ndis802_11InfrastructureMax // Not a real value, defined as upper bound
446 } NDIS_802_11_NETWORK_INFRASTRUCTURE, *PNDIS_802_11_NETWORK_INFRASTRUCTURE;
448 // Add new authentication modes
449 typedef enum _NDIS_802_11_AUTHENTICATION_MODE
451 Ndis802_11AuthModeOpen,
452 Ndis802_11AuthModeShared,
453 Ndis802_11AuthModeAutoSwitch,
454 Ndis802_11AuthModeWPA,
455 Ndis802_11AuthModeWPAPSK,
456 Ndis802_11AuthModeWPANone,
457 Ndis802_11AuthModeWPA2,
458 Ndis802_11AuthModeWPA2PSK,
459 Ndis802_11AuthModeWPA1WPA2,
460 Ndis802_11AuthModeWPA1PSKWPA2PSK,
461 Ndis802_11AuthModeMax // Not a real mode, defined as upper bound
462 } NDIS_802_11_AUTHENTICATION_MODE, *PNDIS_802_11_AUTHENTICATION_MODE;
464 typedef UCHAR NDIS_802_11_RATES[NDIS_802_11_LENGTH_RATES]; // Set of 8 data rates
465 typedef UCHAR NDIS_802_11_RATES_EX[NDIS_802_11_LENGTH_RATES_EX]; // Set of 16 data rates
467 typedef struct PACKED _NDIS_802_11_SSID
469 UINT SsidLength; // length of SSID field below, in bytes;
470 // this can be zero.
471 UCHAR Ssid[NDIS_802_11_LENGTH_SSID]; // SSID information field
472 } NDIS_802_11_SSID, *PNDIS_802_11_SSID;
475 typedef struct PACKED _NDIS_WLAN_BSSID
477 ULONG Length; // Length of this structure
478 NDIS_802_11_MAC_ADDRESS MacAddress; // BSSID
479 UCHAR Reserved[2];
480 NDIS_802_11_SSID Ssid; // SSID
481 ULONG Privacy; // WEP encryption requirement
482 NDIS_802_11_RSSI Rssi; // receive signal strength in dBm
483 NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;
484 NDIS_802_11_CONFIGURATION Configuration;
485 NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode;
486 NDIS_802_11_RATES SupportedRates;
487 } NDIS_WLAN_BSSID, *PNDIS_WLAN_BSSID;
489 typedef struct PACKED _NDIS_802_11_BSSID_LIST
491 UINT NumberOfItems; // in list below, at least 1
492 NDIS_WLAN_BSSID Bssid[1];
493 } NDIS_802_11_BSSID_LIST, *PNDIS_802_11_BSSID_LIST;
495 // Added Capabilities, IELength and IEs for each BSSID
496 typedef struct PACKED _NDIS_WLAN_BSSID_EX
498 ULONG Length; // Length of this structure
499 NDIS_802_11_MAC_ADDRESS MacAddress; // BSSID
500 UCHAR Reserved[2];
501 NDIS_802_11_SSID Ssid; // SSID
502 UINT Privacy; // WEP encryption requirement
503 NDIS_802_11_RSSI Rssi; // receive signal
504 // strength in dBm
505 NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;
506 NDIS_802_11_CONFIGURATION Configuration;
507 NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode;
508 NDIS_802_11_RATES_EX SupportedRates;
509 ULONG IELength;
510 UCHAR IEs[1];
511 } NDIS_WLAN_BSSID_EX, *PNDIS_WLAN_BSSID_EX;
513 typedef struct PACKED _NDIS_802_11_BSSID_LIST_EX
515 UINT NumberOfItems; // in list below, at least 1
516 NDIS_WLAN_BSSID_EX Bssid[1];
517 } NDIS_802_11_BSSID_LIST_EX, *PNDIS_802_11_BSSID_LIST_EX;
519 typedef struct PACKED _NDIS_802_11_FIXED_IEs
521 UCHAR Timestamp[8];
522 USHORT BeaconInterval;
523 USHORT Capabilities;
524 } NDIS_802_11_FIXED_IEs, *PNDIS_802_11_FIXED_IEs;
526 typedef struct _NDIS_802_11_VARIABLE_IEs
528 UCHAR ElementID;
529 UCHAR Length; // Number of bytes in data field
530 UCHAR data[1];
531 } NDIS_802_11_VARIABLE_IEs, *PNDIS_802_11_VARIABLE_IEs;
533 typedef ULONG NDIS_802_11_FRAGMENTATION_THRESHOLD;
535 typedef ULONG NDIS_802_11_RTS_THRESHOLD;
537 typedef ULONG NDIS_802_11_ANTENNA;
539 typedef enum _NDIS_802_11_PRIVACY_FILTER
541 Ndis802_11PrivFilterAcceptAll,
542 Ndis802_11PrivFilter8021xWEP
543 } NDIS_802_11_PRIVACY_FILTER, *PNDIS_802_11_PRIVACY_FILTER;
545 // Added new encryption types
546 // Also aliased typedef to new name
547 typedef enum _NDIS_802_11_WEP_STATUS
549 Ndis802_11WEPEnabled,
550 Ndis802_11Encryption1Enabled = Ndis802_11WEPEnabled,
551 Ndis802_11WEPDisabled,
552 Ndis802_11EncryptionDisabled = Ndis802_11WEPDisabled,
553 Ndis802_11WEPKeyAbsent,
554 Ndis802_11Encryption1KeyAbsent = Ndis802_11WEPKeyAbsent,
555 Ndis802_11WEPNotSupported,
556 Ndis802_11EncryptionNotSupported = Ndis802_11WEPNotSupported,
557 Ndis802_11Encryption2Enabled,
558 Ndis802_11Encryption2KeyAbsent,
559 Ndis802_11Encryption3Enabled,
560 Ndis802_11Encryption3KeyAbsent,
561 Ndis802_11Encryption4Enabled, // TKIP or AES mix
562 Ndis802_11Encryption4KeyAbsent,
563 Ndis802_11GroupWEP40Enabled,
564 Ndis802_11GroupWEP104Enabled,
565 } NDIS_802_11_WEP_STATUS, *PNDIS_802_11_WEP_STATUS,
566 NDIS_802_11_ENCRYPTION_STATUS, *PNDIS_802_11_ENCRYPTION_STATUS;
568 typedef enum _NDIS_802_11_RELOAD_DEFAULTS
570 Ndis802_11ReloadWEPKeys
571 } NDIS_802_11_RELOAD_DEFAULTS, *PNDIS_802_11_RELOAD_DEFAULTS;
573 #define NDIS_802_11_AI_REQFI_CAPABILITIES 1
574 #define NDIS_802_11_AI_REQFI_LISTENINTERVAL 2
575 #define NDIS_802_11_AI_REQFI_CURRENTAPADDRESS 4
577 #define NDIS_802_11_AI_RESFI_CAPABILITIES 1
578 #define NDIS_802_11_AI_RESFI_STATUSCODE 2
579 #define NDIS_802_11_AI_RESFI_ASSOCIATIONID 4
581 typedef struct _NDIS_802_11_AI_REQFI
583 USHORT Capabilities;
584 USHORT ListenInterval;
585 NDIS_802_11_MAC_ADDRESS CurrentAPAddress;
586 } NDIS_802_11_AI_REQFI, *PNDIS_802_11_AI_REQFI;
588 typedef struct _NDIS_802_11_AI_RESFI
590 USHORT Capabilities;
591 USHORT StatusCode;
592 USHORT AssociationId;
593 } NDIS_802_11_AI_RESFI, *PNDIS_802_11_AI_RESFI;
595 typedef struct _NDIS_802_11_ASSOCIATION_INFORMATION
597 ULONG Length;
598 USHORT AvailableRequestFixedIEs;
599 NDIS_802_11_AI_REQFI RequestFixedIEs;
600 ULONG RequestIELength;
601 ULONG OffsetRequestIEs;
602 USHORT AvailableResponseFixedIEs;
603 NDIS_802_11_AI_RESFI ResponseFixedIEs;
604 ULONG ResponseIELength;
605 ULONG OffsetResponseIEs;
606 } NDIS_802_11_ASSOCIATION_INFORMATION, *PNDIS_802_11_ASSOCIATION_INFORMATION;
608 typedef struct _NDIS_802_11_AUTHENTICATION_EVENT
610 NDIS_802_11_STATUS_INDICATION Status;
611 NDIS_802_11_AUTHENTICATION_REQUEST Request[1];
612 } NDIS_802_11_AUTHENTICATION_EVENT, *PNDIS_802_11_AUTHENTICATION_EVENT;
615 typedef struct _NDIS_802_11_TEST
617 ULONG Length;
618 ULONG Type;
619 union
621 NDIS_802_11_AUTHENTICATION_EVENT AuthenticationEvent;
622 NDIS_802_11_RSSI RssiTrigger;
624 } NDIS_802_11_TEST, *PNDIS_802_11_TEST;
627 // 802.11 Media stream constraints, associated with OID_802_11_MEDIA_STREAM_MODE
628 typedef enum _NDIS_802_11_MEDIA_STREAM_MODE
630 Ndis802_11MediaStreamOff,
631 Ndis802_11MediaStreamOn,
632 } NDIS_802_11_MEDIA_STREAM_MODE, *PNDIS_802_11_MEDIA_STREAM_MODE;
634 // PMKID Structures
635 typedef UCHAR NDIS_802_11_PMKID_VALUE[16];
637 #ifdef CONFIG_STA_SUPPORT
638 typedef struct _BSSID_INFO
640 NDIS_802_11_MAC_ADDRESS BSSID;
641 NDIS_802_11_PMKID_VALUE PMKID;
642 } BSSID_INFO, *PBSSID_INFO;
644 typedef struct _NDIS_802_11_PMKID
646 UINT Length;
647 UINT BSSIDInfoCount;
648 BSSID_INFO BSSIDInfo[1];
649 } NDIS_802_11_PMKID, *PNDIS_802_11_PMKID;
650 #endif // CONFIG_STA_SUPPORT //
653 typedef struct _NDIS_802_11_AUTHENTICATION_ENCRYPTION
655 NDIS_802_11_AUTHENTICATION_MODE AuthModeSupported;
656 NDIS_802_11_ENCRYPTION_STATUS EncryptStatusSupported;
657 } NDIS_802_11_AUTHENTICATION_ENCRYPTION, *PNDIS_802_11_AUTHENTICATION_ENCRYPTION;
659 typedef struct _NDIS_802_11_CAPABILITY
661 ULONG Length;
662 ULONG Version;
663 ULONG NoOfPMKIDs;
664 ULONG NoOfAuthEncryptPairsSupported;
665 NDIS_802_11_AUTHENTICATION_ENCRYPTION AuthenticationEncryptionSupported[1];
666 } NDIS_802_11_CAPABILITY, *PNDIS_802_11_CAPABILITY;
668 #ifdef LINUX
669 #if WIRELESS_EXT <= 11
670 #ifndef SIOCDEVPRIVATE
671 #define SIOCDEVPRIVATE 0x8BE0
672 #endif
673 #define SIOCIWFIRSTPRIV SIOCDEVPRIVATE
674 #endif
675 #endif // LINUX //
678 #ifdef CONFIG_STA_SUPPORT
679 #define RT_PRIV_IOCTL (SIOCIWFIRSTPRIV + 0x01) // Sync. with AP for wsc upnp daemon
680 #define RTPRIV_IOCTL_SET (SIOCIWFIRSTPRIV + 0x02)
682 #ifdef DBG
683 #define RTPRIV_IOCTL_BBP (SIOCIWFIRSTPRIV + 0x03)
684 #define RTPRIV_IOCTL_MAC (SIOCIWFIRSTPRIV + 0x05)
686 #ifdef RTMP_RF_RW_SUPPORT
687 // TODO: shiang, Need to reassign the oid number. ArchTeam use (SIOCIWFIRSTPRIV + 0x19) for this oid
688 #define RTPRIV_IOCTL_RF (SIOCIWFIRSTPRIV + 0x13) // edit by johnli, fix read rf register problem
689 #endif // RTMP_RF_RW_SUPPORT //
691 #define RTPRIV_IOCTL_E2P (SIOCIWFIRSTPRIV + 0x07)
692 #endif // DBG //
694 #ifdef RALINK_ATE
695 #ifdef RALINK_28xx_QA
696 #define RTPRIV_IOCTL_ATE (SIOCIWFIRSTPRIV + 0x08)
697 #endif // RALINK_28xx_QA //
698 #endif // RALINK_ATE //
700 #define RTPRIV_IOCTL_STATISTICS (SIOCIWFIRSTPRIV + 0x09)
701 #define RTPRIV_IOCTL_ADD_PMKID_CACHE (SIOCIWFIRSTPRIV + 0x0A)
702 #define RTPRIV_IOCTL_RADIUS_DATA (SIOCIWFIRSTPRIV + 0x0C)
703 #define RTPRIV_IOCTL_GSITESURVEY (SIOCIWFIRSTPRIV + 0x0D)
704 #define RT_PRIV_IOCTL_EXT (SIOCIWFIRSTPRIV + 0x0E) // Sync. with RT61 (for wpa_supplicant)
705 #define RTPRIV_IOCTL_GET_MAC_TABLE (SIOCIWFIRSTPRIV + 0x0F)
707 #define RTPRIV_IOCTL_SHOW (SIOCIWFIRSTPRIV + 0x11)
708 enum {
709 SHOW_CONN_STATUS = 4,
710 SHOW_DRVIER_VERION = 5,
711 SHOW_BA_INFO = 6,
712 SHOW_DESC_INFO = 7,
713 RAIO_OFF = 10,
714 RAIO_ON = 11,
715 #ifdef QOS_DLS_SUPPORT
716 SHOW_DLS_ENTRY_INFO = 19,
717 #endif // QOS_DLS_SUPPORT //
718 SHOW_CFG_VALUE = 20,
719 SHOW_ADHOC_ENTRY_INFO = 21,
723 #endif // CONFIG_STA_SUPPORT //
727 #ifdef SNMP_SUPPORT
728 //SNMP ieee 802dot11, kathy , 2008_0220
729 // dot11res(3)
730 #define RT_OID_802_11_MANUFACTUREROUI 0x0700
731 #define RT_OID_802_11_MANUFACTURERNAME 0x0701
732 #define RT_OID_802_11_RESOURCETYPEIDNAME 0x0702
734 // dot11smt(1)
735 #define RT_OID_802_11_PRIVACYOPTIONIMPLEMENTED 0x0703
736 #define RT_OID_802_11_POWERMANAGEMENTMODE 0x0704
737 #define OID_802_11_WEPDEFAULTKEYVALUE 0x0705 // read , write
738 #define OID_802_11_WEPDEFAULTKEYID 0x0706
739 #define RT_OID_802_11_WEPKEYMAPPINGLENGTH 0x0707
740 #define OID_802_11_SHORTRETRYLIMIT 0x0708
741 #define OID_802_11_LONGRETRYLIMIT 0x0709
742 #define RT_OID_802_11_PRODUCTID 0x0710
743 #define RT_OID_802_11_MANUFACTUREID 0x0711
745 // //dot11Phy(4)
746 #define OID_802_11_CURRENTCHANNEL 0x0712
748 //dot11mac
749 #define RT_OID_802_11_MAC_ADDRESS 0x0713
750 #endif // SNMP_SUPPORT //
752 #define OID_802_11_BUILD_CHANNEL_EX 0x0714
753 #define OID_802_11_GET_CH_LIST 0x0715
754 #define OID_802_11_GET_COUNTRY_CODE 0x0716
755 #define OID_802_11_GET_CHANNEL_GEOGRAPHY 0x0717
757 //#define RT_OID_802_11_STATISTICS (OID_GET_SET_TOGGLE | OID_802_11_STATISTICS)
759 #ifdef CONFIG_STA_SUPPORT
760 #define RT_OID_WSC_SET_PASSPHRASE 0x0740 // passphrase for wpa(2)-psk
761 #define RT_OID_WSC_DRIVER_AUTO_CONNECT 0x0741
762 #define RT_OID_WSC_QUERY_DEFAULT_PROFILE 0x0742
763 #define RT_OID_WSC_SET_CONN_BY_PROFILE_INDEX 0x0743
764 #define RT_OID_WSC_SET_ACTION 0x0744
765 #define RT_OID_WSC_SET_SSID 0x0745
766 #define RT_OID_WSC_SET_PIN_CODE 0x0746
767 #define RT_OID_WSC_SET_MODE 0x0747 // PIN or PBC
768 #define RT_OID_WSC_SET_CONF_MODE 0x0748 // Enrollee or Registrar
769 #define RT_OID_WSC_SET_PROFILE 0x0749
770 #endif // CONFIG_STA_SUPPORT //
771 #define RT_OID_WSC_CONFIG_STATUS 0x074F
772 #define RT_OID_802_11_WSC_QUERY_PROFILE 0x0750
773 // for consistency with RT61
774 #define RT_OID_WSC_QUERY_STATUS 0x0751
775 #define RT_OID_WSC_PIN_CODE 0x0752
776 #define RT_OID_WSC_UUID 0x0753
777 #define RT_OID_WSC_SET_SELECTED_REGISTRAR 0x0754
778 #define RT_OID_WSC_EAPMSG 0x0755
779 #define RT_OID_WSC_MANUFACTURER 0x0756
780 #define RT_OID_WSC_MODEL_NAME 0x0757
781 #define RT_OID_WSC_MODEL_NO 0x0758
782 #define RT_OID_WSC_SERIAL_NO 0x0759
783 #define RT_OID_WSC_MAC_ADDRESS 0x0760
785 #ifdef LLTD_SUPPORT
786 // for consistency with RT61
787 #define RT_OID_GET_PHY_MODE 0x761
788 #endif // LLTD_SUPPORT //
790 #ifdef NINTENDO_AP
791 //#define RT_OID_NINTENDO 0x0D010770
792 #define RT_OID_802_11_NINTENDO_GET_TABLE 0x0771 //((RT_OID_NINTENDO + 0x01) & 0xffff)
793 #define RT_OID_802_11_NINTENDO_SET_TABLE 0x0772 //((RT_OID_NINTENDO + 0x02) & 0xffff)
794 #define RT_OID_802_11_NINTENDO_CAPABLE 0x0773 //((RT_OID_NINTENDO + 0x03) & 0xffff)
795 #endif // NINTENDO_AP //
798 // New for MeetingHouse Api support
799 #define OID_MH_802_1X_SUPPORTED 0xFFEDC100
801 // MIMO Tx parameter, ShortGI, MCS, STBC, etc. these are fields in TXWI. Don't change this definition!!!
802 typedef union _HTTRANSMIT_SETTING {
803 #ifdef RT_BIG_ENDIAN
804 struct {
805 USHORT MODE:2; // Use definition MODE_xxx.
806 // USHORT rsv:3;
807 USHORT TxBF:1;
808 USHORT rsv:2;
809 USHORT STBC:2; //SPACE
810 USHORT ShortGI:1;
811 USHORT BW:1; //channel bandwidth 20MHz or 40 MHz
812 USHORT MCS:7; // MCS
813 } field;
814 #else
815 struct {
816 USHORT MCS:7; // MCS
817 USHORT BW:1; //channel bandwidth 20MHz or 40 MHz
818 USHORT ShortGI:1;
819 USHORT STBC:2; //SPACE
820 // USHORT rsv:3;
821 USHORT rsv:2;
822 USHORT TxBF:1;
823 USHORT MODE:2; // Use definition MODE_xxx.
824 } field;
825 #endif
826 USHORT word;
827 } HTTRANSMIT_SETTING, *PHTTRANSMIT_SETTING;
829 typedef enum _RT_802_11_PREAMBLE {
830 Rt802_11PreambleLong,
831 Rt802_11PreambleShort,
832 Rt802_11PreambleAuto
833 } RT_802_11_PREAMBLE, *PRT_802_11_PREAMBLE;
835 typedef enum _RT_802_11_PHY_MODE {
836 PHY_11BG_MIXED = 0,
837 PHY_11B,
838 PHY_11A,
839 PHY_11ABG_MIXED,
840 PHY_11G,
841 #ifdef DOT11_N_SUPPORT
842 PHY_11ABGN_MIXED, // both band 5
843 PHY_11N_2_4G, // 11n-only with 2.4G band 6
844 PHY_11GN_MIXED, // 2.4G band 7
845 PHY_11AN_MIXED, // 5G band 8
846 PHY_11BGN_MIXED, // if check 802.11b. 9
847 PHY_11AGN_MIXED, // if check 802.11b. 10
848 PHY_11N_5G, // 11n-only with 5G band 11
849 #endif // DOT11_N_SUPPORT //
850 } RT_802_11_PHY_MODE;
853 // put all proprietery for-query objects here to reduce # of Query_OID
854 typedef struct _RT_802_11_LINK_STATUS {
855 ULONG CurrTxRate; // in units of 0.5Mbps
856 ULONG ChannelQuality; // 0..100 %
857 ULONG TxByteCount; // both ok and fail
858 ULONG RxByteCount; // both ok and fail
859 ULONG CentralChannel; // 40MHz central channel number
860 } RT_802_11_LINK_STATUS, *PRT_802_11_LINK_STATUS;
862 typedef struct _RT_802_11_EVENT_LOG {
863 LARGE_INTEGER SystemTime; // timestammp via NdisGetCurrentSystemTime()
864 UCHAR Addr[MAC_ADDR_LENGTH];
865 USHORT Event; // EVENT_xxx
866 } RT_802_11_EVENT_LOG, *PRT_802_11_EVENT_LOG;
868 typedef struct _RT_802_11_EVENT_TABLE {
869 ULONG Num;
870 ULONG Rsv; // to align Log[] at LARGE_INEGER boundary
871 RT_802_11_EVENT_LOG Log[MAX_NUMBER_OF_EVENT];
872 } RT_802_11_EVENT_TABLE, PRT_802_11_EVENT_TABLE;
874 // MIMO Tx parameter, ShortGI, MCS, STBC, etc. these are fields in TXWI. Don't change this definition!!!
875 typedef union _MACHTTRANSMIT_SETTING {
876 struct {
877 USHORT MCS:7; // MCS
878 USHORT BW:1; //channel bandwidth 20MHz or 40 MHz
879 USHORT ShortGI:1;
880 USHORT STBC:2; //SPACE
881 USHORT rsv:3;
882 USHORT MODE:2; // Use definition MODE_xxx.
883 } field;
884 USHORT word;
885 } MACHTTRANSMIT_SETTING, *PMACHTTRANSMIT_SETTING;
887 typedef struct _RT_802_11_MAC_ENTRY {
888 UCHAR Addr[MAC_ADDR_LENGTH];
889 UCHAR Aid;
890 UCHAR Psm; // 0:PWR_ACTIVE, 1:PWR_SAVE
891 UCHAR MimoPs; // 0:MMPS_STATIC, 1:MMPS_DYNAMIC, 3:MMPS_Enabled
892 CHAR AvgRssi0;
893 CHAR AvgRssi1;
894 CHAR AvgRssi2;
895 UINT32 ConnectedTime;
896 MACHTTRANSMIT_SETTING TxRate;
897 } RT_802_11_MAC_ENTRY, *PRT_802_11_MAC_ENTRY;
899 typedef struct _RT_802_11_MAC_TABLE {
900 ULONG Num;
901 RT_802_11_MAC_ENTRY Entry[MAX_NUMBER_OF_MAC];
902 } RT_802_11_MAC_TABLE, *PRT_802_11_MAC_TABLE;
904 // structure for query/set hardware register - MAC, BBP, RF register
905 typedef struct _RT_802_11_HARDWARE_REGISTER {
906 ULONG HardwareType; // 0:MAC, 1:BBP, 2:RF register, 3:EEPROM
907 ULONG Offset; // Q/S register offset addr
908 ULONG Data; // R/W data buffer
909 } RT_802_11_HARDWARE_REGISTER, *PRT_802_11_HARDWARE_REGISTER;
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 {
938 UCHAR RxBAWinLimit;
939 UCHAR TxBAWinLimit;
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];
950 USHORT Rsv;
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
955 ULONG Num;
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 {
960 ULONG Num;
961 NDIS_802_11_MAC_ADDRESS Entry[24/*MAX_NUM_OF_WDS_LINK*/];
962 ULONG KeyLength;
963 UCHAR KeyMaterial[32];
964 } RT_802_11_WDS, *PRT_802_11_WDS;
966 typedef struct _RT_802_11_TX_RATES_ {
967 UCHAR SupRateLen;
968 UCHAR SupRate[MAX_LENGTH_OF_SUPPORT_RATES];
969 UCHAR ExtRateLen;
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.
992 typedef struct {
993 RT_802_11_PHY_MODE PhyMode; //
994 UCHAR TransmitNo;
995 UCHAR HtMode; //HTMODE_GF or HTMODE_MM
996 UCHAR ExtOffset; //extension channel above or below
997 UCHAR MCS;
998 UCHAR BW;
999 UCHAR STBC;
1000 UCHAR SHORTGI;
1001 UCHAR rsv;
1002 } OID_SET_HT_PHYMODE, *POID_SET_HT_PHYMODE;
1004 #ifdef NINTENDO_AP
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];
1019 UCHAR zero1;
1020 UCHAR registe;
1021 UCHAR ID;
1022 UCHAR zero2;
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];
1030 UCHAR registe;
1031 UCHAR UserSpaceAck;
1032 } RT_NINTENDO_ENTRY, *PRT_NINTENDO_ENTRY;
1034 //RTPRIV_IOCTL_NINTENDO_GET_TABLE
1035 //RTPRIV_IOCTL_NINTENDO_SET_TABLE
1036 typedef struct _NINTENDO_TABLE
1038 UINT number;
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 //
1050 #ifdef LLTD_SUPPORT
1051 typedef struct _RT_LLTD_ASSOICATION_ENTRY {
1052 UCHAR Addr[ETH_LENGTH_OF_ADDRESS];
1053 unsigned short MOR; // maximum operational rate
1054 UCHAR phyMode;
1055 } RT_LLTD_ASSOICATION_ENTRY, *PRT_LLTD_ASSOICATION_ENTRY;
1057 typedef struct _RT_LLTD_ASSOICATION_TABLE {
1058 unsigned int Num;
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];
1077 UCHAR num;
1078 } RT_802_11_DLS_INFO, *PRT_802_11_DLS_INFO;
1080 typedef enum _RT_802_11_DLS_MODE {
1081 DLS_NONE,
1082 DLS_WAIT_KEY,
1083 DLS_FINISH
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 //
1104 #define MAX_CUSTOM_LEN 128
1106 #ifdef CONFIG_STA_SUPPORT
1107 typedef enum _RT_802_11_D_CLIENT_MODE
1109 Rt802_11_D_None,
1110 Rt802_11_D_Flexible,
1111 Rt802_11_D_Strict,
1112 } RT_802_11_D_CLIENT_MODE, *PRT_802_11_D_CLIENT_MODE;
1113 #endif // CONFIG_STA_SUPPORT //
1115 typedef struct _RT_CHANNEL_LIST_INFO
1117 UCHAR ChannelList[MAX_NUM_OF_CHS]; // list all supported channels for site survey
1118 UCHAR ChannelListNum; // number of channel in ChannelList[]
1119 } RT_CHANNEL_LIST_INFO, *PRT_CHANNEL_LIST_INFO;
1121 // WSC configured credential
1122 typedef struct _WSC_CREDENTIAL
1124 NDIS_802_11_SSID SSID; // mandatory
1125 USHORT AuthType; // mandatory, 1: open, 2: wpa-psk, 4: shared, 8:wpa, 0x10: wpa2, 0x20: wpa2-psk
1126 USHORT EncrType; // mandatory, 1: none, 2: wep, 4: tkip, 8: aes
1127 UCHAR Key[64]; // mandatory, Maximum 64 byte
1128 USHORT KeyLength;
1129 UCHAR MacAddr[6]; // mandatory, AP MAC address
1130 UCHAR KeyIndex; // optional, default is 1
1131 UCHAR Rsvd[3]; // Make alignment
1132 } WSC_CREDENTIAL, *PWSC_CREDENTIAL;
1134 // WSC configured profiles
1135 typedef struct _WSC_PROFILE
1137 UINT ProfileCnt;
1138 UINT ApplyProfileIdx; // add by johnli, fix WPS test plan 5.1.1
1139 WSC_CREDENTIAL Profile[8]; // Support up to 8 profiles
1140 } WSC_PROFILE, *PWSC_PROFILE;
1144 #endif // _OID_H_