]> bbs.cooldavid.org Git - net-next-2.6.git/blob - drivers/staging/rt3090/oid.h
25927c1322e37a5aaaa2dd63b73336a695fa5e02
[net-next-2.6.git] / drivers / staging / rt3090 / oid.h
1 /*
2  *************************************************************************
3  * Ralink Tech Inc.
4  * 5F., No.36, Taiyuan St., Jhubei City,
5  * Hsinchu County 302,
6  * Taiwan, R.O.C.
7  *
8  * (c) Copyright 2002-2007, Ralink Technology, Inc.
9  *
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  *************************************************************************
26
27         Module Name:
28         oid.h
29
30         Abstract:
31
32         Revision History:
33         Who                     When                    What
34         --------        ----------              ----------------------------------------------
35         Name            Date                    Modification logs
36 */
37 #ifndef _OID_H_
38 #define _OID_H_
39
40 //#include <linux/wireless.h>
41
42 #ifndef TRUE
43 #define TRUE                            1
44 #endif
45 #ifndef FALSE
46 #define FALSE                           0
47 #endif
48 //
49 // IEEE 802.11 Structures and definitions
50 //
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 */
57
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
63
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
73
74 #define NdisMediaStateConnected                 1
75 #define NdisMediaStateDisconnected              0
76
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
88
89
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
95 //
96 // IEEE 802.11 OIDs
97 //
98 #define OID_GET_SET_TOGGLE                      0x8000
99 #define OID_GET_SET_FROM_UI                     0x4000
100
101 #define OID_802_11_ADD_WEP                                                      0x0112
102 #define OID_802_11_DISASSOCIATE                                         0x0114
103 #define OID_802_11_BSSID_LIST_SCAN                                      0x0508
104 #define OID_802_11_SSID                                                         0x0509
105 #define OID_802_11_BSSID                                                        0x050A
106 #define OID_802_11_MIC_FAILURE_REPORT_FRAME         0x0528
107
108 #define RT_OID_DEVICE_NAME                                                      0x0607
109 #define RT_OID_VERSION_INFO                                                     0x0608
110 #define OID_GEN_MEDIA_CONNECT_STATUS                            0x060B
111 #define OID_GEN_RCV_OK                                                          0x060F
112 #define OID_GEN_RCV_NO_BUFFER                                           0x0610
113 //for WPA_SUPPLICANT_SUPPORT
114 #define OID_SET_COUNTERMEASURES                     0x0616
115 #define RT_OID_WPA_SUPPLICANT_SUPPORT               0x0621
116 #define RT_OID_WE_VERSION_COMPILED                  0x0622
117 #define RT_OID_NEW_DRIVER                           0x0623
118
119 #define RT_OID_DRIVER_DEVICE_NAME                   0x0645
120 #define RT_OID_QUERY_MULTIPLE_CARD_SUPPORT          0x0647
121
122 typedef enum _NDIS_802_11_STATUS_TYPE
123 {
124     Ndis802_11StatusType_Authentication,
125     Ndis802_11StatusType_MediaStreamMode,
126     Ndis802_11StatusType_PMKID_CandidateList,
127     Ndis802_11StatusTypeMax    // not a real type, defined as an upper bound
128 } NDIS_802_11_STATUS_TYPE, *PNDIS_802_11_STATUS_TYPE;
129
130 typedef UCHAR   NDIS_802_11_MAC_ADDRESS[6];
131
132 typedef struct _NDIS_802_11_STATUS_INDICATION
133 {
134     NDIS_802_11_STATUS_TYPE StatusType;
135 } NDIS_802_11_STATUS_INDICATION, *PNDIS_802_11_STATUS_INDICATION;
136
137 // mask for authentication/integrity fields
138 #define NDIS_802_11_AUTH_REQUEST_AUTH_FIELDS        0x0f
139
140 #define NDIS_802_11_AUTH_REQUEST_REAUTH             0x01
141 #define NDIS_802_11_AUTH_REQUEST_KEYUPDATE          0x02
142 #define NDIS_802_11_AUTH_REQUEST_PAIRWISE_ERROR     0x06
143 #define NDIS_802_11_AUTH_REQUEST_GROUP_ERROR        0x0E
144
145 typedef struct _NDIS_802_11_AUTHENTICATION_REQUEST
146 {
147     ULONG Length;            // Length of structure
148     NDIS_802_11_MAC_ADDRESS Bssid;
149     ULONG Flags;
150 } NDIS_802_11_AUTHENTICATION_REQUEST, *PNDIS_802_11_AUTHENTICATION_REQUEST;
151
152 //Added new types for PMKID Candidate lists.
153 typedef struct _PMKID_CANDIDATE {
154     NDIS_802_11_MAC_ADDRESS BSSID;
155     ULONG Flags;
156 } PMKID_CANDIDATE, *PPMKID_CANDIDATE;
157
158 typedef struct _NDIS_802_11_PMKID_CANDIDATE_LIST
159 {
160     ULONG Version;       // Version of the structure
161     ULONG NumCandidates; // No. of pmkid candidates
162     PMKID_CANDIDATE CandidateList[1];
163 } NDIS_802_11_PMKID_CANDIDATE_LIST, *PNDIS_802_11_PMKID_CANDIDATE_LIST;
164
165 //Flags for PMKID Candidate list structure
166 #define NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED     0x01
167
168 // Added new types for OFDM 5G and 2.4G
169 typedef enum _NDIS_802_11_NETWORK_TYPE
170 {
171    Ndis802_11FH,
172    Ndis802_11DS,
173     Ndis802_11OFDM5,
174     Ndis802_11OFDM24,
175         Ndis802_11Automode,
176     Ndis802_11OFDM5_N,
177     Ndis802_11OFDM24_N,
178     Ndis802_11NetworkTypeMax    // not a real type, defined as an upper bound
179 } NDIS_802_11_NETWORK_TYPE, *PNDIS_802_11_NETWORK_TYPE;
180
181 typedef struct _NDIS_802_11_NETWORK_TYPE_LIST
182 {
183     UINT                       NumberOfItems;  // in list below, at least 1
184    NDIS_802_11_NETWORK_TYPE    NetworkType [1];
185 } NDIS_802_11_NETWORK_TYPE_LIST, *PNDIS_802_11_NETWORK_TYPE_LIST;
186
187 typedef enum _NDIS_802_11_POWER_MODE
188 {
189     Ndis802_11PowerModeCAM,
190     Ndis802_11PowerModeMAX_PSP,
191     Ndis802_11PowerModeFast_PSP,
192     Ndis802_11PowerModeLegacy_PSP,
193     Ndis802_11PowerModeMax      // not a real mode, defined as an upper bound
194 } NDIS_802_11_POWER_MODE, *PNDIS_802_11_POWER_MODE;
195
196 typedef ULONG   NDIS_802_11_TX_POWER_LEVEL; // in milliwatts
197
198 //
199 // Received Signal Strength Indication
200 //
201 typedef LONG    NDIS_802_11_RSSI;           // in dBm
202
203 typedef struct _NDIS_802_11_CONFIGURATION_FH
204 {
205    ULONG           Length;            // Length of structure
206    ULONG           HopPattern;        // As defined by 802.11, MSB set
207    ULONG           HopSet;            // to one if non-802.11
208    ULONG           DwellTime;         // units are Kusec
209 } NDIS_802_11_CONFIGURATION_FH, *PNDIS_802_11_CONFIGURATION_FH;
210
211 typedef struct _NDIS_802_11_CONFIGURATION
212 {
213    ULONG                           Length;             // Length of structure
214    ULONG                           BeaconPeriod;       // units are Kusec
215    ULONG                           ATIMWindow;         // units are Kusec
216    ULONG                           DSConfig;           // Frequency, units are kHz
217    NDIS_802_11_CONFIGURATION_FH    FHConfig;
218 } NDIS_802_11_CONFIGURATION, *PNDIS_802_11_CONFIGURATION;
219
220 typedef struct _NDIS_802_11_STATISTICS
221 {
222    ULONG           Length;             // Length of structure
223    LARGE_INTEGER   TransmittedFragmentCount;
224    LARGE_INTEGER   MulticastTransmittedFrameCount;
225    LARGE_INTEGER   FailedCount;
226    LARGE_INTEGER   RetryCount;
227    LARGE_INTEGER   MultipleRetryCount;
228    LARGE_INTEGER   RTSSuccessCount;
229    LARGE_INTEGER   RTSFailureCount;
230    LARGE_INTEGER   ACKFailureCount;
231    LARGE_INTEGER   FrameDuplicateCount;
232    LARGE_INTEGER   ReceivedFragmentCount;
233    LARGE_INTEGER   MulticastReceivedFrameCount;
234    LARGE_INTEGER   FCSErrorCount;
235    LARGE_INTEGER   TKIPLocalMICFailures;
236    LARGE_INTEGER   TKIPRemoteMICErrors;
237    LARGE_INTEGER   TKIPICVErrors;
238    LARGE_INTEGER   TKIPCounterMeasuresInvoked;
239    LARGE_INTEGER   TKIPReplays;
240    LARGE_INTEGER   CCMPFormatErrors;
241    LARGE_INTEGER   CCMPReplays;
242    LARGE_INTEGER   CCMPDecryptErrors;
243    LARGE_INTEGER   FourWayHandshakeFailures;
244 } NDIS_802_11_STATISTICS, *PNDIS_802_11_STATISTICS;
245
246 typedef  ULONG  NDIS_802_11_KEY_INDEX;
247 typedef ULONGLONG   NDIS_802_11_KEY_RSC;
248
249 #define MAX_RADIUS_SRV_NUM                      2         // 802.1x failover number
250
251 typedef struct PACKED _RADIUS_SRV_INFO {
252         UINT32                  radius_ip;
253         UINT32                  radius_port;
254         UCHAR                   radius_key[64];
255         UCHAR                   radius_key_len;
256 } RADIUS_SRV_INFO, *PRADIUS_SRV_INFO;
257
258 typedef struct PACKED _RADIUS_KEY_INFO
259 {
260         UCHAR                   radius_srv_num;
261         RADIUS_SRV_INFO radius_srv_info[MAX_RADIUS_SRV_NUM];
262         UCHAR                   ieee8021xWEP;            // dynamic WEP
263     UCHAR           key_index;
264     UCHAR           key_length;          // length of key in bytes
265     UCHAR           key_material[13];
266 } RADIUS_KEY_INFO, *PRADIUS_KEY_INFO;
267
268 // It's used by 802.1x daemon to require relative configuration
269 typedef struct PACKED _RADIUS_CONF
270 {
271     UINT32          Length;             // Length of this structure
272     UCHAR                       mbss_num;                       // indicate multiple BSS number
273         UINT32                  own_ip_addr;
274         UINT32                  retry_interval;
275         UINT32                  session_timeout_interval;
276         UCHAR                   EAPifname[8][IFNAMSIZ];
277         UCHAR                   EAPifname_len[8];
278         UCHAR                   PreAuthifname[8][IFNAMSIZ];
279         UCHAR                   PreAuthifname_len[8];
280         RADIUS_KEY_INFO RadiusInfo[8];
281 } RADIUS_CONF, *PRADIUS_CONF;
282
283
284
285 #ifdef CONFIG_STA_SUPPORT
286 // Key mapping keys require a BSSID
287 typedef struct _NDIS_802_11_KEY
288 {
289     UINT           Length;             // Length of this structure
290     UINT           KeyIndex;
291     UINT           KeyLength;          // length of key in bytes
292     NDIS_802_11_MAC_ADDRESS BSSID;
293     NDIS_802_11_KEY_RSC KeyRSC;
294     UCHAR           KeyMaterial[1];     // variable length depending on above field
295 } NDIS_802_11_KEY, *PNDIS_802_11_KEY;
296
297 typedef struct _NDIS_802_11_PASSPHRASE
298 {
299     UINT           KeyLength;          // length of key in bytes
300     NDIS_802_11_MAC_ADDRESS BSSID;
301     UCHAR           KeyMaterial[1];     // variable length depending on above field
302 } NDIS_802_11_PASSPHRASE, *PNDIS_802_11_PASSPHRASE;
303 #endif // CONFIG_STA_SUPPORT //
304
305 typedef struct _NDIS_802_11_REMOVE_KEY
306 {
307     UINT           Length;             // Length of this structure
308     UINT           KeyIndex;
309     NDIS_802_11_MAC_ADDRESS BSSID;
310 } NDIS_802_11_REMOVE_KEY, *PNDIS_802_11_REMOVE_KEY;
311
312 typedef struct _NDIS_802_11_WEP
313 {
314    UINT     Length;        // Length of this structure
315    UINT     KeyIndex;           // 0 is the per-client key, 1-N are the
316                                         // global keys
317    UINT     KeyLength;     // length of key in bytes
318    UCHAR     KeyMaterial[1];// variable length depending on above field
319 } NDIS_802_11_WEP, *PNDIS_802_11_WEP;
320
321
322 typedef enum _NDIS_802_11_NETWORK_INFRASTRUCTURE
323 {
324    Ndis802_11IBSS,
325    Ndis802_11Infrastructure,
326    Ndis802_11AutoUnknown,
327    Ndis802_11Monitor,
328    Ndis802_11InfrastructureMax     // Not a real value, defined as upper bound
329 } NDIS_802_11_NETWORK_INFRASTRUCTURE, *PNDIS_802_11_NETWORK_INFRASTRUCTURE;
330
331 // Add new authentication modes
332 typedef enum _NDIS_802_11_AUTHENTICATION_MODE
333 {
334    Ndis802_11AuthModeOpen,
335    Ndis802_11AuthModeShared,
336    Ndis802_11AuthModeAutoSwitch,
337     Ndis802_11AuthModeWPA,
338     Ndis802_11AuthModeWPAPSK,
339     Ndis802_11AuthModeWPANone,
340    Ndis802_11AuthModeWPA2,
341    Ndis802_11AuthModeWPA2PSK,
342         Ndis802_11AuthModeWPA1WPA2,
343         Ndis802_11AuthModeWPA1PSKWPA2PSK,
344    Ndis802_11AuthModeMax           // Not a real mode, defined as upper bound
345 } NDIS_802_11_AUTHENTICATION_MODE, *PNDIS_802_11_AUTHENTICATION_MODE;
346
347 typedef UCHAR   NDIS_802_11_RATES[NDIS_802_11_LENGTH_RATES];        // Set of 8 data rates
348 typedef UCHAR   NDIS_802_11_RATES_EX[NDIS_802_11_LENGTH_RATES_EX];  // Set of 16 data rates
349
350 typedef struct PACKED _NDIS_802_11_SSID
351 {
352     UINT   SsidLength;         // length of SSID field below, in bytes;
353                                 // this can be zero.
354     UCHAR   Ssid[NDIS_802_11_LENGTH_SSID];           // SSID information field
355 } NDIS_802_11_SSID, *PNDIS_802_11_SSID;
356
357
358 typedef struct PACKED _NDIS_WLAN_BSSID
359 {
360    ULONG                               Length;     // Length of this structure
361    NDIS_802_11_MAC_ADDRESS             MacAddress; // BSSID
362    UCHAR                               Reserved[2];
363    NDIS_802_11_SSID                    Ssid;       // SSID
364    ULONG                               Privacy;    // WEP encryption requirement
365    NDIS_802_11_RSSI                    Rssi;       // receive signal strength in dBm
366    NDIS_802_11_NETWORK_TYPE            NetworkTypeInUse;
367    NDIS_802_11_CONFIGURATION           Configuration;
368    NDIS_802_11_NETWORK_INFRASTRUCTURE  InfrastructureMode;
369    NDIS_802_11_RATES                   SupportedRates;
370 } NDIS_WLAN_BSSID, *PNDIS_WLAN_BSSID;
371
372 typedef struct PACKED _NDIS_802_11_BSSID_LIST
373 {
374    UINT           NumberOfItems;      // in list below, at least 1
375    NDIS_WLAN_BSSID Bssid[1];
376 } NDIS_802_11_BSSID_LIST, *PNDIS_802_11_BSSID_LIST;
377
378 // Added Capabilities, IELength and IEs for each BSSID
379 typedef struct PACKED _NDIS_WLAN_BSSID_EX
380 {
381     ULONG                               Length;             // Length of this structure
382     NDIS_802_11_MAC_ADDRESS             MacAddress;         // BSSID
383     UCHAR                               Reserved[2];
384     NDIS_802_11_SSID                    Ssid;               // SSID
385     UINT                                Privacy;            // WEP encryption requirement
386     NDIS_802_11_RSSI                    Rssi;               // receive signal
387                                                             // strength in dBm
388     NDIS_802_11_NETWORK_TYPE            NetworkTypeInUse;
389     NDIS_802_11_CONFIGURATION           Configuration;
390     NDIS_802_11_NETWORK_INFRASTRUCTURE  InfrastructureMode;
391     NDIS_802_11_RATES_EX                SupportedRates;
392     ULONG                               IELength;
393     UCHAR                               IEs[1];
394 } NDIS_WLAN_BSSID_EX, *PNDIS_WLAN_BSSID_EX;
395
396 typedef struct PACKED _NDIS_802_11_BSSID_LIST_EX
397 {
398     UINT                   NumberOfItems;      // in list below, at least 1
399     NDIS_WLAN_BSSID_EX      Bssid[1];
400 } NDIS_802_11_BSSID_LIST_EX, *PNDIS_802_11_BSSID_LIST_EX;
401
402 typedef struct PACKED _NDIS_802_11_FIXED_IEs
403 {
404     UCHAR Timestamp[8];
405     USHORT BeaconInterval;
406     USHORT Capabilities;
407 } NDIS_802_11_FIXED_IEs, *PNDIS_802_11_FIXED_IEs;
408
409 typedef struct _NDIS_802_11_VARIABLE_IEs
410 {
411     UCHAR ElementID;
412     UCHAR Length;    // Number of bytes in data field
413     UCHAR data[1];
414 } NDIS_802_11_VARIABLE_IEs, *PNDIS_802_11_VARIABLE_IEs;
415
416 typedef  ULONG   NDIS_802_11_FRAGMENTATION_THRESHOLD;
417
418 typedef  ULONG   NDIS_802_11_RTS_THRESHOLD;
419
420 typedef  ULONG   NDIS_802_11_ANTENNA;
421
422 typedef enum _NDIS_802_11_PRIVACY_FILTER
423 {
424    Ndis802_11PrivFilterAcceptAll,
425    Ndis802_11PrivFilter8021xWEP
426 } NDIS_802_11_PRIVACY_FILTER, *PNDIS_802_11_PRIVACY_FILTER;
427
428 // Added new encryption types
429 // Also aliased typedef to new name
430 typedef enum _NDIS_802_11_WEP_STATUS
431 {
432    Ndis802_11WEPEnabled,
433     Ndis802_11Encryption1Enabled = Ndis802_11WEPEnabled,
434    Ndis802_11WEPDisabled,
435     Ndis802_11EncryptionDisabled = Ndis802_11WEPDisabled,
436    Ndis802_11WEPKeyAbsent,
437     Ndis802_11Encryption1KeyAbsent = Ndis802_11WEPKeyAbsent,
438    Ndis802_11WEPNotSupported,
439     Ndis802_11EncryptionNotSupported = Ndis802_11WEPNotSupported,
440     Ndis802_11Encryption2Enabled,
441     Ndis802_11Encryption2KeyAbsent,
442     Ndis802_11Encryption3Enabled,
443     Ndis802_11Encryption3KeyAbsent,
444     Ndis802_11Encryption4Enabled,       // TKIP or AES mix
445     Ndis802_11Encryption4KeyAbsent,
446     Ndis802_11GroupWEP40Enabled,
447         Ndis802_11GroupWEP104Enabled,
448 } NDIS_802_11_WEP_STATUS, *PNDIS_802_11_WEP_STATUS,
449   NDIS_802_11_ENCRYPTION_STATUS, *PNDIS_802_11_ENCRYPTION_STATUS;
450
451 typedef enum _NDIS_802_11_RELOAD_DEFAULTS
452 {
453    Ndis802_11ReloadWEPKeys
454 } NDIS_802_11_RELOAD_DEFAULTS, *PNDIS_802_11_RELOAD_DEFAULTS;
455
456 #define NDIS_802_11_AI_REQFI_CAPABILITIES      1
457 #define NDIS_802_11_AI_REQFI_LISTENINTERVAL    2
458 #define NDIS_802_11_AI_REQFI_CURRENTAPADDRESS  4
459
460 #define NDIS_802_11_AI_RESFI_CAPABILITIES      1
461 #define NDIS_802_11_AI_RESFI_STATUSCODE        2
462 #define NDIS_802_11_AI_RESFI_ASSOCIATIONID     4
463
464 typedef struct _NDIS_802_11_AI_REQFI
465 {
466     USHORT Capabilities;
467     USHORT ListenInterval;
468     NDIS_802_11_MAC_ADDRESS  CurrentAPAddress;
469 } NDIS_802_11_AI_REQFI, *PNDIS_802_11_AI_REQFI;
470
471 typedef struct _NDIS_802_11_AI_RESFI
472 {
473     USHORT Capabilities;
474     USHORT StatusCode;
475     USHORT AssociationId;
476 } NDIS_802_11_AI_RESFI, *PNDIS_802_11_AI_RESFI;
477
478 typedef struct _NDIS_802_11_ASSOCIATION_INFORMATION
479 {
480     ULONG                   Length;
481     USHORT                  AvailableRequestFixedIEs;
482     NDIS_802_11_AI_REQFI    RequestFixedIEs;
483     ULONG                   RequestIELength;
484     ULONG                   OffsetRequestIEs;
485     USHORT                  AvailableResponseFixedIEs;
486     NDIS_802_11_AI_RESFI    ResponseFixedIEs;
487     ULONG                   ResponseIELength;
488     ULONG                   OffsetResponseIEs;
489 } NDIS_802_11_ASSOCIATION_INFORMATION, *PNDIS_802_11_ASSOCIATION_INFORMATION;
490
491 typedef struct _NDIS_802_11_AUTHENTICATION_EVENT
492 {
493     NDIS_802_11_STATUS_INDICATION       Status;
494     NDIS_802_11_AUTHENTICATION_REQUEST  Request[1];
495 } NDIS_802_11_AUTHENTICATION_EVENT, *PNDIS_802_11_AUTHENTICATION_EVENT;
496
497 /*
498 typedef struct _NDIS_802_11_TEST
499 {
500     ULONG Length;
501     ULONG Type;
502     union
503     {
504         NDIS_802_11_AUTHENTICATION_EVENT AuthenticationEvent;
505         NDIS_802_11_RSSI RssiTrigger;
506     };
507 } NDIS_802_11_TEST, *PNDIS_802_11_TEST;
508  */
509
510 // 802.11 Media stream constraints, associated with OID_802_11_MEDIA_STREAM_MODE
511 typedef enum _NDIS_802_11_MEDIA_STREAM_MODE
512 {
513     Ndis802_11MediaStreamOff,
514     Ndis802_11MediaStreamOn,
515 } NDIS_802_11_MEDIA_STREAM_MODE, *PNDIS_802_11_MEDIA_STREAM_MODE;
516
517 // PMKID Structures
518 typedef UCHAR   NDIS_802_11_PMKID_VALUE[16];
519
520 #ifdef CONFIG_STA_SUPPORT
521 typedef struct _BSSID_INFO
522 {
523     NDIS_802_11_MAC_ADDRESS BSSID;
524     NDIS_802_11_PMKID_VALUE PMKID;
525 } BSSID_INFO, *PBSSID_INFO;
526
527 typedef struct _NDIS_802_11_PMKID
528 {
529     UINT    Length;
530     UINT    BSSIDInfoCount;
531     BSSID_INFO BSSIDInfo[1];
532 } NDIS_802_11_PMKID, *PNDIS_802_11_PMKID;
533 #endif // CONFIG_STA_SUPPORT //
534
535
536 typedef struct _NDIS_802_11_AUTHENTICATION_ENCRYPTION
537 {
538     NDIS_802_11_AUTHENTICATION_MODE AuthModeSupported;
539     NDIS_802_11_ENCRYPTION_STATUS EncryptStatusSupported;
540 } NDIS_802_11_AUTHENTICATION_ENCRYPTION, *PNDIS_802_11_AUTHENTICATION_ENCRYPTION;
541
542 typedef struct _NDIS_802_11_CAPABILITY
543 {
544      ULONG Length;
545      ULONG Version;
546      ULONG NoOfPMKIDs;
547      ULONG NoOfAuthEncryptPairsSupported;
548      NDIS_802_11_AUTHENTICATION_ENCRYPTION AuthenticationEncryptionSupported[1];
549 } NDIS_802_11_CAPABILITY, *PNDIS_802_11_CAPABILITY;
550
551 #ifdef LINUX
552 #if WIRELESS_EXT <= 11
553 #ifndef SIOCDEVPRIVATE
554 #define SIOCDEVPRIVATE                              0x8BE0
555 #endif
556 #define SIOCIWFIRSTPRIV                                                         SIOCDEVPRIVATE
557 #endif
558 #endif // LINUX //
559
560
561 #ifdef CONFIG_STA_SUPPORT
562 #define RT_PRIV_IOCTL                                                   (SIOCIWFIRSTPRIV + 0x01) // Sync. with AP for wsc upnp daemon
563 #define RTPRIV_IOCTL_SET                                                        (SIOCIWFIRSTPRIV + 0x02)
564
565 #ifdef RALINK_ATE
566 #ifdef RALINK_28xx_QA
567 #define RTPRIV_IOCTL_ATE                                                        (SIOCIWFIRSTPRIV + 0x08)
568 #endif // RALINK_28xx_QA //
569 #endif // RALINK_ATE //
570
571 #define RTPRIV_IOCTL_STATISTICS                     (SIOCIWFIRSTPRIV + 0x09)
572 #define RTPRIV_IOCTL_ADD_PMKID_CACHE                (SIOCIWFIRSTPRIV + 0x0A)
573 #define RTPRIV_IOCTL_RADIUS_DATA                    (SIOCIWFIRSTPRIV + 0x0C)
574 #define RTPRIV_IOCTL_GSITESURVEY                                        (SIOCIWFIRSTPRIV + 0x0D)
575 #define RT_PRIV_IOCTL_EXT                                                       (SIOCIWFIRSTPRIV + 0x0E) // Sync. with RT61 (for wpa_supplicant)
576 #define RTPRIV_IOCTL_GET_MAC_TABLE                                      (SIOCIWFIRSTPRIV + 0x0F)
577
578 #define RTPRIV_IOCTL_SHOW                                                       (SIOCIWFIRSTPRIV + 0x11)
579 enum {
580         SHOW_CONN_STATUS = 4,
581         SHOW_DRVIER_VERION = 5,
582         SHOW_BA_INFO = 6,
583         SHOW_DESC_INFO = 7,
584         RAIO_OFF = 10,
585         RAIO_ON = 11,
586 #ifdef QOS_DLS_SUPPORT
587         SHOW_DLS_ENTRY_INFO = 19,
588 #endif // QOS_DLS_SUPPORT //
589         SHOW_CFG_VALUE = 20,
590         SHOW_ADHOC_ENTRY_INFO = 21,
591 };
592
593
594 #endif // CONFIG_STA_SUPPORT //
595
596
597
598 #ifdef SNMP_SUPPORT
599 //SNMP ieee 802dot11, kathy , 2008_0220
600 // dot11res(3)
601 #define RT_OID_802_11_MANUFACTUREROUI                   0x0700
602 #define RT_OID_802_11_MANUFACTURERNAME                  0x0701
603 #define RT_OID_802_11_RESOURCETYPEIDNAME                0x0702
604
605 // dot11smt(1)
606 #define RT_OID_802_11_PRIVACYOPTIONIMPLEMENTED  0x0703
607 #define RT_OID_802_11_POWERMANAGEMENTMODE               0x0704
608 #define OID_802_11_WEPDEFAULTKEYVALUE                   0x0705 // read , write
609 #define OID_802_11_WEPDEFAULTKEYID                              0x0706
610 #define RT_OID_802_11_WEPKEYMAPPINGLENGTH               0x0707
611 #define OID_802_11_SHORTRETRYLIMIT                              0x0708
612 #define OID_802_11_LONGRETRYLIMIT                               0x0709
613 #define RT_OID_802_11_PRODUCTID                                 0x0710
614 #define RT_OID_802_11_MANUFACTUREID                             0x0711
615
616 // //dot11Phy(4)
617 #define OID_802_11_CURRENTCHANNEL                               0x0712
618
619 //dot11mac
620 #define RT_OID_802_11_MAC_ADDRESS                               0x0713
621 #endif // SNMP_SUPPORT //
622
623 #define OID_802_11_BUILD_CHANNEL_EX                             0x0714
624 #define OID_802_11_GET_CH_LIST                                  0x0715
625 #define OID_802_11_GET_COUNTRY_CODE                             0x0716
626 #define OID_802_11_GET_CHANNEL_GEOGRAPHY                0x0717
627
628 //#define RT_OID_802_11_STATISTICS              (OID_GET_SET_TOGGLE | OID_802_11_STATISTICS)
629
630 #ifdef CONFIG_STA_SUPPORT
631 #define RT_OID_WSC_SET_PASSPHRASE                   0x0740 // passphrase for wpa(2)-psk
632 #define RT_OID_WSC_DRIVER_AUTO_CONNECT              0x0741
633 #define RT_OID_WSC_QUERY_DEFAULT_PROFILE            0x0742
634 #define RT_OID_WSC_SET_CONN_BY_PROFILE_INDEX        0x0743
635 #define RT_OID_WSC_SET_ACTION                       0x0744
636 #define RT_OID_WSC_SET_SSID                         0x0745
637 #define RT_OID_WSC_SET_PIN_CODE                     0x0746
638 #define RT_OID_WSC_SET_MODE                         0x0747 // PIN or PBC
639 #define RT_OID_WSC_SET_CONF_MODE                    0x0748 // Enrollee or Registrar
640 #define RT_OID_WSC_SET_PROFILE                      0x0749
641 #endif // CONFIG_STA_SUPPORT //
642 #define RT_OID_WSC_CONFIG_STATUS                                        0x074F
643 #define RT_OID_802_11_WSC_QUERY_PROFILE                         0x0750
644 // for consistency with RT61
645 #define RT_OID_WSC_QUERY_STATUS                                         0x0751
646 #define RT_OID_WSC_PIN_CODE                                                     0x0752
647 #define RT_OID_WSC_UUID                                                         0x0753
648 #define RT_OID_WSC_SET_SELECTED_REGISTRAR                       0x0754
649 #define RT_OID_WSC_EAPMSG                                                       0x0755
650 #define RT_OID_WSC_MANUFACTURER                                         0x0756
651 #define RT_OID_WSC_MODEL_NAME                                           0x0757
652 #define RT_OID_WSC_MODEL_NO                                                     0x0758
653 #define RT_OID_WSC_SERIAL_NO                                            0x0759
654 #define RT_OID_WSC_MAC_ADDRESS                                          0x0760
655
656 #ifdef LLTD_SUPPORT
657 // for consistency with RT61
658 #define RT_OID_GET_PHY_MODE                         0x761
659 #endif // LLTD_SUPPORT //
660
661 #ifdef NINTENDO_AP
662 //#define RT_OID_NINTENDO                             0x0D010770
663 #define RT_OID_802_11_NINTENDO_GET_TABLE                        0x0771 //((RT_OID_NINTENDO + 0x01) & 0xffff)
664 #define RT_OID_802_11_NINTENDO_SET_TABLE                        0x0772 //((RT_OID_NINTENDO + 0x02) & 0xffff)
665 #define RT_OID_802_11_NINTENDO_CAPABLE                          0x0773 //((RT_OID_NINTENDO + 0x03) & 0xffff)
666 #endif // NINTENDO_AP //
667
668
669 // New for MeetingHouse Api support
670 #define OID_MH_802_1X_SUPPORTED               0xFFEDC100
671
672 // MIMO Tx parameter, ShortGI, MCS, STBC, etc.  these are fields in TXWI. Don't change this definition!!!
673 typedef union  _HTTRANSMIT_SETTING {
674 #ifdef RT_BIG_ENDIAN
675         struct  {
676         USHORT          MODE:2; // Use definition MODE_xxx.
677 //      USHORT          rsv:3;
678         USHORT          TxBF:1;
679         USHORT          rsv:2;
680         USHORT          STBC:2; //SPACE
681         USHORT          ShortGI:1;
682         USHORT          BW:1;   //channel bandwidth 20MHz or 40 MHz
683         USHORT          MCS:7;                 // MCS
684         }       field;
685 #else
686         struct  {
687         USHORT          MCS:7;                 // MCS
688         USHORT          BW:1;   //channel bandwidth 20MHz or 40 MHz
689         USHORT          ShortGI:1;
690         USHORT          STBC:2; //SPACE
691 //      USHORT          rsv:3;
692         USHORT          rsv:2;
693         USHORT          TxBF:1;
694         USHORT          MODE:2; // Use definition MODE_xxx.
695         }       field;
696 #endif
697         USHORT          word;
698  } HTTRANSMIT_SETTING, *PHTTRANSMIT_SETTING;
699
700 typedef enum _RT_802_11_PREAMBLE {
701     Rt802_11PreambleLong,
702     Rt802_11PreambleShort,
703     Rt802_11PreambleAuto
704 } RT_802_11_PREAMBLE, *PRT_802_11_PREAMBLE;
705
706 typedef enum _RT_802_11_PHY_MODE {
707         PHY_11BG_MIXED = 0,
708         PHY_11B,
709         PHY_11A,
710         PHY_11ABG_MIXED,
711         PHY_11G,
712 #ifdef DOT11_N_SUPPORT
713         PHY_11ABGN_MIXED,       // both band   5
714         PHY_11N_2_4G,           // 11n-only with 2.4G band      6
715         PHY_11GN_MIXED, // 2.4G band      7
716         PHY_11AN_MIXED, // 5G  band       8
717         PHY_11BGN_MIXED,        // if check 802.11b.      9
718         PHY_11AGN_MIXED,        // if check 802.11b.      10
719         PHY_11N_5G,                     // 11n-only with 5G band                11
720 #endif // DOT11_N_SUPPORT //
721 } RT_802_11_PHY_MODE;
722
723
724 // put all proprietery for-query objects here to reduce # of Query_OID
725 typedef struct _RT_802_11_LINK_STATUS {
726     ULONG   CurrTxRate;         // in units of 0.5Mbps
727     ULONG   ChannelQuality;     // 0..100 %
728     ULONG   TxByteCount;        // both ok and fail
729     ULONG   RxByteCount;        // both ok and fail
730     ULONG       CentralChannel;         // 40MHz central channel number
731 } RT_802_11_LINK_STATUS, *PRT_802_11_LINK_STATUS;
732
733 typedef struct _RT_802_11_EVENT_LOG {
734     LARGE_INTEGER   SystemTime;  // timestammp via NdisGetCurrentSystemTime()
735     UCHAR           Addr[MAC_ADDR_LENGTH];
736     USHORT          Event;       // EVENT_xxx
737 } RT_802_11_EVENT_LOG, *PRT_802_11_EVENT_LOG;
738
739 typedef struct _RT_802_11_EVENT_TABLE {
740     ULONG       Num;
741     ULONG       Rsv;     // to align Log[] at LARGE_INEGER boundary
742     RT_802_11_EVENT_LOG   Log[MAX_NUMBER_OF_EVENT];
743 } RT_802_11_EVENT_TABLE, PRT_802_11_EVENT_TABLE;
744
745 // MIMO Tx parameter, ShortGI, MCS, STBC, etc.  these are fields in TXWI. Don't change this definition!!!
746 typedef union  _MACHTTRANSMIT_SETTING {
747         struct  {
748         USHORT          MCS:7;                 // MCS
749         USHORT          BW:1;   //channel bandwidth 20MHz or 40 MHz
750         USHORT          ShortGI:1;
751         USHORT          STBC:2; //SPACE
752         USHORT          rsv:3;
753         USHORT          MODE:2; // Use definition MODE_xxx.
754         }       field;
755         USHORT          word;
756  } MACHTTRANSMIT_SETTING, *PMACHTTRANSMIT_SETTING;
757
758 typedef struct _RT_802_11_MAC_ENTRY {
759     UCHAR       Addr[MAC_ADDR_LENGTH];
760     UCHAR       Aid;
761     UCHAR       Psm;     // 0:PWR_ACTIVE, 1:PWR_SAVE
762     UCHAR               MimoPs;  // 0:MMPS_STATIC, 1:MMPS_DYNAMIC, 3:MMPS_Enabled
763     CHAR                AvgRssi0;
764         CHAR            AvgRssi1;
765         CHAR            AvgRssi2;
766         UINT32          ConnectedTime;
767     MACHTTRANSMIT_SETTING       TxRate;
768 } RT_802_11_MAC_ENTRY, *PRT_802_11_MAC_ENTRY;
769
770 typedef struct _RT_802_11_MAC_TABLE {
771     ULONG       Num;
772     RT_802_11_MAC_ENTRY Entry[MAX_NUMBER_OF_MAC];
773 } RT_802_11_MAC_TABLE, *PRT_802_11_MAC_TABLE;
774
775 // structure for query/set hardware register - MAC, BBP, RF register
776 typedef struct _RT_802_11_HARDWARE_REGISTER {
777     ULONG   HardwareType;       // 0:MAC, 1:BBP, 2:RF register, 3:EEPROM
778     ULONG   Offset;             // Q/S register offset addr
779     ULONG   Data;               // R/W data buffer
780 } RT_802_11_HARDWARE_REGISTER, *PRT_802_11_HARDWARE_REGISTER;
781
782 typedef struct _RT_802_11_AP_CONFIG {
783     ULONG   EnableTxBurst;      // 0-disable, 1-enable
784     ULONG   EnableTurboRate;    // 0-disable, 1-enable 72/100mbps turbo rate
785     ULONG   IsolateInterStaTraffic;     // 0-disable, 1-enable isolation
786     ULONG   HideSsid;           // 0-disable, 1-enable hiding
787     ULONG   UseBGProtection;    // 0-AUTO, 1-always ON, 2-always OFF
788     ULONG   UseShortSlotTime;   // 0-no use, 1-use 9-us short slot time
789     ULONG   Rsv1;               // must be 0
790     ULONG   SystemErrorBitmap;  // ignore upon SET, return system error upon QUERY
791 } RT_802_11_AP_CONFIG, *PRT_802_11_AP_CONFIG;
792
793 // structure to query/set STA_CONFIG
794 typedef struct _RT_802_11_STA_CONFIG {
795     ULONG   EnableTxBurst;      // 0-disable, 1-enable
796     ULONG   EnableTurboRate;    // 0-disable, 1-enable 72/100mbps turbo rate
797     ULONG   UseBGProtection;    // 0-AUTO, 1-always ON, 2-always OFF
798     ULONG   UseShortSlotTime;   // 0-no use, 1-use 9-us short slot time when applicable
799     ULONG   AdhocMode;                  // 0-11b rates only (WIFI spec), 1 - b/g mixed, 2 - g only
800     ULONG   HwRadioStatus;      // 0-OFF, 1-ON, default is 1, Read-Only
801     ULONG   Rsv1;               // must be 0
802     ULONG   SystemErrorBitmap;  // ignore upon SET, return system error upon QUERY
803 } RT_802_11_STA_CONFIG, *PRT_802_11_STA_CONFIG;
804
805 //
806 //  For OID Query or Set about BA structure
807 //
808 typedef struct  _OID_BACAP_STRUC        {
809                 UCHAR           RxBAWinLimit;
810                 UCHAR           TxBAWinLimit;
811                 UCHAR           Policy; // 0: DELAY_BA 1:IMMED_BA  (//BA Policy subfiled value in ADDBA frame)   2:BA-not use. other value invalid
812                 UCHAR           MpduDensity;    // 0: DELAY_BA 1:IMMED_BA  (//BA Policy subfiled value in ADDBA frame)   2:BA-not use. other value invalid
813                 UCHAR           AmsduEnable;    //Enable AMSDU transmisstion
814                 UCHAR           AmsduSize;      // 0:3839, 1:7935 bytes. UINT  MSDUSizeToBytes[]        = { 3839, 7935};
815                 UCHAR           MMPSmode;       // MIMO power save more, 0:static, 1:dynamic, 2:rsv, 3:mimo enable
816                 BOOLEAN         AutoBA; // Auto BA will automatically
817 } OID_BACAP_STRUC, *POID_BACAP_STRUC;
818
819 typedef struct _RT_802_11_ACL_ENTRY {
820     UCHAR   Addr[MAC_ADDR_LENGTH];
821     USHORT  Rsv;
822 } RT_802_11_ACL_ENTRY, *PRT_802_11_ACL_ENTRY;
823
824 typedef struct PACKED _RT_802_11_ACL {
825     ULONG   Policy;             // 0-disable, 1-positive list, 2-negative list
826     ULONG   Num;
827     RT_802_11_ACL_ENTRY Entry[MAX_NUMBER_OF_ACL];
828 } RT_802_11_ACL, *PRT_802_11_ACL;
829
830 typedef struct _RT_802_11_WDS {
831     ULONG                                               Num;
832     NDIS_802_11_MAC_ADDRESS             Entry[24/*MAX_NUM_OF_WDS_LINK*/];
833         ULONG                                           KeyLength;
834         UCHAR                                           KeyMaterial[32];
835 } RT_802_11_WDS, *PRT_802_11_WDS;
836
837 typedef struct _RT_802_11_TX_RATES_ {
838     UCHAR       SupRateLen;
839     UCHAR       SupRate[MAX_LENGTH_OF_SUPPORT_RATES];
840     UCHAR       ExtRateLen;
841     UCHAR       ExtRate[MAX_LENGTH_OF_SUPPORT_RATES];
842 } RT_802_11_TX_RATES, *PRT_802_11_TX_RATES;
843
844
845 // Definition of extra information code
846 #define GENERAL_LINK_UP                 0x0                     // Link is Up
847 #define GENERAL_LINK_DOWN               0x1                     // Link is Down
848 #define HW_RADIO_OFF                    0x2                     // Hardware radio off
849 #define SW_RADIO_OFF                    0x3                     // Software radio off
850 #define AUTH_FAIL                               0x4                     // Open authentication fail
851 #define AUTH_FAIL_KEYS                  0x5                     // Shared authentication fail
852 #define ASSOC_FAIL                              0x6                     // Association failed
853 #define EAP_MIC_FAILURE                 0x7                     // Deauthencation because MIC failure
854 #define EAP_4WAY_TIMEOUT                0x8                     // Deauthencation on 4-way handshake timeout
855 #define EAP_GROUP_KEY_TIMEOUT   0x9                     // Deauthencation on group key handshake timeout
856 #define EAP_SUCCESS                             0xa                     // EAP succeed
857 #define DETECT_RADAR_SIGNAL             0xb         // Radar signal occur in current channel
858 #define EXTRA_INFO_MAX                  0xb                     // Indicate Last OID
859
860 #define EXTRA_INFO_CLEAR                0xffffffff
861
862 // This is OID setting structure. So only GF or MM as Mode. This is valid when our wirelss mode has 802.11n in use.
863 typedef struct {
864         RT_802_11_PHY_MODE              PhyMode;        //
865         UCHAR           TransmitNo;
866         UCHAR           HtMode;         //HTMODE_GF or HTMODE_MM
867         UCHAR           ExtOffset;      //extension channel above or below
868         UCHAR           MCS;
869         UCHAR           BW;
870         UCHAR           STBC;
871         UCHAR           SHORTGI;
872         UCHAR           rsv;
873 } OID_SET_HT_PHYMODE, *POID_SET_HT_PHYMODE;
874
875 #ifdef NINTENDO_AP
876 #define NINTENDO_MAX_ENTRY 16
877 #define NINTENDO_SSID_NAME_LN 8
878 #define NINTENDO_SSID_NAME "NWCUSBAP"
879 #define NINTENDO_PROBE_REQ_FLAG_MASK 0x03
880 #define NINTENDO_PROBE_REQ_ON 0x01
881 #define NINTENDO_PROBE_REQ_SIGNAL 0x02
882 #define NINTENDO_PROBE_RSP_ON 0x01
883 #define NINTENDO_SSID_NICKNAME_LN 20
884
885 #define NINTENDO_WEPKEY_LN 13
886
887 typedef struct _NINTENDO_SSID
888 {
889         UCHAR   NINTENDOFixChar[NINTENDO_SSID_NAME_LN];
890         UCHAR   zero1;
891         UCHAR   registe;
892         UCHAR   ID;
893         UCHAR   zero2;
894         UCHAR   NICKname[NINTENDO_SSID_NICKNAME_LN];
895 } RT_NINTENDO_SSID, *PRT_NINTENDO_SSID;
896
897 typedef struct _NINTENDO_ENTRY
898 {
899         UCHAR   NICKname[NINTENDO_SSID_NICKNAME_LN];
900     UCHAR   DS_Addr[ETH_LENGTH_OF_ADDRESS];
901         UCHAR   registe;
902         UCHAR   UserSpaceAck;
903 } RT_NINTENDO_ENTRY, *PRT_NINTENDO_ENTRY;
904
905 //RTPRIV_IOCTL_NINTENDO_GET_TABLE
906 //RTPRIV_IOCTL_NINTENDO_SET_TABLE
907 typedef struct _NINTENDO_TABLE
908 {
909         UINT                            number;
910         RT_NINTENDO_ENTRY       entry[NINTENDO_MAX_ENTRY];
911 } RT_NINTENDO_TABLE, *PRT_NINTENDO_TABLE;
912
913 //RTPRIV_IOCTL_NINTENDO_SEED_WEPKEY
914 typedef struct _NINTENDO_SEED_WEPKEY
915 {
916         UCHAR   seed[NINTENDO_SSID_NICKNAME_LN];
917         UCHAR   wepkey[16];//use 13 for 104 bits wep key
918 } RT_NINTENDO_SEED_WEPKEY, *PRT_NINTENDO_SEED_WEPKEY;
919 #endif // NINTENDO_AP //
920
921 #ifdef LLTD_SUPPORT
922 typedef struct _RT_LLTD_ASSOICATION_ENTRY {
923     UCHAR           Addr[ETH_LENGTH_OF_ADDRESS];
924     unsigned short  MOR;        // maximum operational rate
925     UCHAR           phyMode;
926 } RT_LLTD_ASSOICATION_ENTRY, *PRT_LLTD_ASSOICATION_ENTRY;
927
928 typedef struct _RT_LLTD_ASSOICATION_TABLE {
929     unsigned int                Num;
930     RT_LLTD_ASSOICATION_ENTRY   Entry[MAX_NUMBER_OF_MAC];
931 } RT_LLTD_ASSOICATION_TABLE, *PRT_LLTD_ASSOICATION_TABLE;
932 #endif // LLTD_SUPPORT //
933
934 #ifdef CONFIG_STA_SUPPORT
935 #ifdef QOS_DLS_SUPPORT
936 //rt2860, kathy 2007-0118
937 // structure for DLS
938 typedef struct _RT_802_11_DLS_UI {
939         USHORT                                          TimeOut;                // unit: second , set by UI
940         USHORT                                          CountDownTimer; // unit: second , used by driver only
941         NDIS_802_11_MAC_ADDRESS         MacAddr;                // set by UI
942         UCHAR                                           Status;                 // 0: none , 1: wait STAkey, 2: finish DLS setup , set by driver only
943         BOOLEAN                                         Valid;                  // 1: valid , 0: invalid , set by UI, use to setup or tear down DLS link
944 } RT_802_11_DLS_UI, *PRT_802_11_DLS_UI;
945
946 typedef struct _RT_802_11_DLS_INFO {
947         RT_802_11_DLS_UI        Entry[MAX_NUMBER_OF_DLS_ENTRY];
948         UCHAR                           num;
949 } RT_802_11_DLS_INFO, *PRT_802_11_DLS_INFO;
950
951 typedef enum _RT_802_11_DLS_MODE {
952     DLS_NONE,
953     DLS_WAIT_KEY,
954     DLS_FINISH
955 } RT_802_11_DLS_MODE;
956 #endif // QOS_DLS_SUPPORT //
957
958 #ifdef WPA_SUPPLICANT_SUPPORT
959 #ifndef NATIVE_WPA_SUPPLICANT_SUPPORT
960 #define RT_ASSOC_EVENT_FLAG                         0x0101
961 #define RT_DISASSOC_EVENT_FLAG                      0x0102
962 #define RT_REQIE_EVENT_FLAG                         0x0103
963 #define RT_RESPIE_EVENT_FLAG                        0x0104
964 #define RT_ASSOCINFO_EVENT_FLAG                     0x0105
965 #define RT_PMKIDCAND_FLAG                           0x0106
966 #define RT_INTERFACE_DOWN                           0x0107
967 #define RT_INTERFACE_UP                             0x0108
968 #endif // NATIVE_WPA_SUPPLICANT_SUPPORT //
969 #endif // WPA_SUPPLICANT_SUPPORT //
970 #endif // CONFIG_STA_SUPPORT //
971
972
973
974
975 #define MAX_CUSTOM_LEN 128
976
977 #ifdef CONFIG_STA_SUPPORT
978 typedef enum _RT_802_11_D_CLIENT_MODE
979 {
980    Rt802_11_D_None,
981    Rt802_11_D_Flexible,
982    Rt802_11_D_Strict,
983 } RT_802_11_D_CLIENT_MODE, *PRT_802_11_D_CLIENT_MODE;
984 #endif // CONFIG_STA_SUPPORT //
985
986 typedef struct _RT_CHANNEL_LIST_INFO
987 {
988         UCHAR ChannelList[MAX_NUM_OF_CHS];   // list all supported channels for site survey
989         UCHAR ChannelListNum; // number of channel in ChannelList[]
990 } RT_CHANNEL_LIST_INFO, *PRT_CHANNEL_LIST_INFO;
991
992 // WSC configured credential
993 typedef struct  _WSC_CREDENTIAL
994 {
995         NDIS_802_11_SSID        SSID;                           // mandatory
996         USHORT                          AuthType;                       // mandatory, 1: open, 2: wpa-psk, 4: shared, 8:wpa, 0x10: wpa2, 0x20: wpa2-psk
997         USHORT                          EncrType;                       // mandatory, 1: none, 2: wep, 4: tkip, 8: aes
998         UCHAR                           Key[64];                        // mandatory, Maximum 64 byte
999         USHORT                          KeyLength;
1000         UCHAR                           MacAddr[6];                     // mandatory, AP MAC address
1001         UCHAR                           KeyIndex;                       // optional, default is 1
1002         UCHAR                           Rsvd[3];                        // Make alignment
1003 }       WSC_CREDENTIAL, *PWSC_CREDENTIAL;
1004
1005 // WSC configured profiles
1006 typedef struct  _WSC_PROFILE
1007 {
1008         UINT                    ProfileCnt;
1009         UINT                    ApplyProfileIdx;  // add by johnli, fix WPS test plan 5.1.1
1010         WSC_CREDENTIAL  Profile[8];                             // Support up to 8 profiles
1011 }       WSC_PROFILE, *PWSC_PROFILE;
1012
1013
1014
1015 #endif // _OID_H_