]> bbs.cooldavid.org Git - net-next-2.6.git/blame - drivers/staging/rt2860/oid.h
Staging: rt28x0: remove typedefs (part three)
[net-next-2.6.git] / drivers / staging / rt2860 / oid.h
CommitLineData
91980990
GKH
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
cc277069 40/*#include <linux/wireless.h> */
91980990 41
ca97b838 42#ifndef TRUE
91980990 43#define TRUE 1
ca97b838
BZ
44#endif
45#ifndef FALSE
91980990 46#define FALSE 0
ca97b838 47#endif
cc277069
BZ
48/* */
49/* IEEE 802.11 Structures and definitions */
50/* */
52b81c89
BZ
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 */
91980990 57
cc277069
BZ
58/* new types for Media Specific Indications */
59/* Extension channel offset */
91980990
GKH
60#define EXTCHA_NONE 0
61#define EXTCHA_ABOVE 0x1
62#define EXTCHA_BELOW 0x3
63
cc277069 64/* BW */
91980990
GKH
65#define BAND_WIDTH_20 0
66#define BAND_WIDTH_40 1
67#define BAND_WIDTH_BOTH 2
cc277069
BZ
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 */
91980990
GKH
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
cc277069
BZ
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 */
91980990 85#define MAX_NUMBER_OF_ACL 64
cc277069 86#define MAX_LENGTH_OF_SUPPORT_RATES 12 /* 1, 2, 5.5, 11, 6, 9, 12, 18, 24, 36, 48, 54 */
91980990
GKH
87#define MAX_NUMBER_OF_DLS_ENTRY 4
88
91980990
GKH
89#define RT_QUERY_SIGNAL_CONTEXT 0x0402
90#define RT_SET_IAPP_PID 0x0404
91#define RT_SET_APD_PID 0x0405
92#define RT_SET_DEL_MAC_ENTRY 0x0406
ca97b838 93#define RT_QUERY_EVENT_TABLE 0x0407
cc277069
BZ
94/* */
95/* IEEE 802.11 OIDs */
96/* */
91980990 97#define OID_GET_SET_TOGGLE 0x8000
ca97b838 98#define OID_GET_SET_FROM_UI 0x4000
91980990 99
881abc9d
BZ
100#define OID_802_11_ADD_WEP 0x0112
101#define OID_802_11_DISASSOCIATE 0x0114
102#define OID_802_11_BSSID_LIST_SCAN 0x0508
103#define OID_802_11_SSID 0x0509
104#define OID_802_11_BSSID 0x050A
105#define OID_802_11_MIC_FAILURE_REPORT_FRAME 0x0528
91980990
GKH
106
107#define RT_OID_DEVICE_NAME 0x0607
108#define RT_OID_VERSION_INFO 0x0608
ca97b838
BZ
109#define OID_802_11_BSSID_LIST 0x0609
110#define OID_802_3_CURRENT_ADDRESS 0x060A
91980990 111#define OID_GEN_MEDIA_CONNECT_STATUS 0x060B
ca97b838
BZ
112#define RT_OID_802_11_QUERY_LINK_STATUS 0x060C
113#define OID_802_11_RSSI 0x060D
114#define OID_802_11_STATISTICS 0x060E
91980990
GKH
115#define OID_GEN_RCV_OK 0x060F
116#define OID_GEN_RCV_NO_BUFFER 0x0610
ca97b838
BZ
117#define RT_OID_802_11_QUERY_EEPROM_VERSION 0x0611
118#define RT_OID_802_11_QUERY_FIRMWARE_VERSION 0x0612
119#define RT_OID_802_11_QUERY_LAST_RX_RATE 0x0613
120#define RT_OID_802_11_TX_POWER_LEVEL_1 0x0614
121#define RT_OID_802_11_QUERY_PIDVID 0x0615
cc277069 122/*for WPA_SUPPLICANT_SUPPORT */
91980990 123#define OID_SET_COUNTERMEASURES 0x0616
91980990
GKH
124#define RT_OID_WPA_SUPPLICANT_SUPPORT 0x0621
125#define RT_OID_WE_VERSION_COMPILED 0x0622
126#define RT_OID_NEW_DRIVER 0x0623
127
91980990 128#define RT_OID_DRIVER_DEVICE_NAME 0x0645
91980990
GKH
129#define RT_OID_QUERY_MULTIPLE_CARD_SUPPORT 0x0647
130
52b81c89
BZ
131typedef enum _NDIS_802_11_STATUS_TYPE {
132 Ndis802_11StatusType_Authentication,
133 Ndis802_11StatusType_MediaStreamMode,
134 Ndis802_11StatusType_PMKID_CandidateList,
cc277069 135 Ndis802_11StatusTypeMax /* not a real type, defined as an upper bound */
91980990
GKH
136} NDIS_802_11_STATUS_TYPE, *PNDIS_802_11_STATUS_TYPE;
137
51126deb 138typedef u8 NDIS_802_11_MAC_ADDRESS[6];
91980990 139
62eb734b 140struct rt_ndis_802_11_status_indication {
52b81c89 141 NDIS_802_11_STATUS_TYPE StatusType;
62eb734b 142};
91980990 143
cc277069 144/* mask for authentication/integrity fields */
91980990
GKH
145#define NDIS_802_11_AUTH_REQUEST_AUTH_FIELDS 0x0f
146
147#define NDIS_802_11_AUTH_REQUEST_REAUTH 0x01
148#define NDIS_802_11_AUTH_REQUEST_KEYUPDATE 0x02
149#define NDIS_802_11_AUTH_REQUEST_PAIRWISE_ERROR 0x06
150#define NDIS_802_11_AUTH_REQUEST_GROUP_ERROR 0x0E
151
62eb734b 152struct rt_ndis_802_11_authentication_request {
51126deb 153 unsigned long Length; /* Length of structure */
52b81c89 154 NDIS_802_11_MAC_ADDRESS Bssid;
51126deb 155 unsigned long Flags;
62eb734b 156};
91980990 157
cc277069 158/*Added new types for PMKID Candidate lists. */
62eb734b 159struct rt_pmkid_candidate {
52b81c89 160 NDIS_802_11_MAC_ADDRESS BSSID;
51126deb 161 unsigned long Flags;
62eb734b 162};
91980990 163
62eb734b 164struct rt_ndis_802_11_pmkid_candidate_list {
51126deb
BZ
165 unsigned long Version; /* Version of the structure */
166 unsigned long NumCandidates; /* No. of pmkid candidates */
62eb734b
BZ
167 struct rt_pmkid_candidate CandidateList[1];
168};
91980990 169
cc277069 170/*Flags for PMKID Candidate list structure */
91980990
GKH
171#define NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED 0x01
172
cc277069 173/* Added new types for OFDM 5G and 2.4G */
52b81c89
BZ
174typedef enum _NDIS_802_11_NETWORK_TYPE {
175 Ndis802_11FH,
176 Ndis802_11DS,
177 Ndis802_11OFDM5,
178 Ndis802_11OFDM24,
179 Ndis802_11Automode,
180 Ndis802_11OFDM5_N,
181 Ndis802_11OFDM24_N,
cc277069 182 Ndis802_11NetworkTypeMax /* not a real type, defined as an upper bound */
91980990
GKH
183} NDIS_802_11_NETWORK_TYPE, *PNDIS_802_11_NETWORK_TYPE;
184
62eb734b 185struct rt_ndis_802_11_network_type_list {
51126deb 186 u32 NumberOfItems; /* in list below, at least 1 */
52b81c89 187 NDIS_802_11_NETWORK_TYPE NetworkType[1];
62eb734b 188};
91980990 189
52b81c89
BZ
190typedef enum _NDIS_802_11_POWER_MODE {
191 Ndis802_11PowerModeCAM,
192 Ndis802_11PowerModeMAX_PSP,
193 Ndis802_11PowerModeFast_PSP,
194 Ndis802_11PowerModeLegacy_PSP,
cc277069 195 Ndis802_11PowerModeMax /* not a real mode, defined as an upper bound */
91980990
GKH
196} NDIS_802_11_POWER_MODE, *PNDIS_802_11_POWER_MODE;
197
51126deb 198typedef unsigned long NDIS_802_11_TX_POWER_LEVEL; /* in milliwatts */
91980990 199
cc277069
BZ
200/* */
201/* Received Signal Strength Indication */
202/* */
51126deb 203typedef long NDIS_802_11_RSSI; /* in dBm */
52b81c89 204
62eb734b 205struct rt_ndis_802_11_configuration_fh {
51126deb
BZ
206 unsigned long Length; /* Length of structure */
207 unsigned long HopPattern; /* As defined by 802.11, MSB set */
208 unsigned long HopSet; /* to one if non-802.11 */
209 unsigned long DwellTime; /* units are Kusec */
62eb734b 210};
91980990 211
62eb734b 212struct rt_ndis_802_11_configuration {
51126deb
BZ
213 unsigned long Length; /* Length of structure */
214 unsigned long BeaconPeriod; /* units are Kusec */
215 unsigned long ATIMWindow; /* units are Kusec */
216 unsigned long DSConfig; /* Frequency, units are kHz */
62eb734b
BZ
217 struct rt_ndis_802_11_configuration_fh FHConfig;
218};
91980990 219
62eb734b 220struct rt_ndis_802_11_statistics {
51126deb 221 unsigned long Length; /* Length of structure */
52b81c89
BZ
222 LARGE_INTEGER TransmittedFragmentCount;
223 LARGE_INTEGER MulticastTransmittedFrameCount;
224 LARGE_INTEGER FailedCount;
225 LARGE_INTEGER RetryCount;
226 LARGE_INTEGER MultipleRetryCount;
227 LARGE_INTEGER RTSSuccessCount;
228 LARGE_INTEGER RTSFailureCount;
229 LARGE_INTEGER ACKFailureCount;
230 LARGE_INTEGER FrameDuplicateCount;
231 LARGE_INTEGER ReceivedFragmentCount;
232 LARGE_INTEGER MulticastReceivedFrameCount;
233 LARGE_INTEGER FCSErrorCount;
234 LARGE_INTEGER TKIPLocalMICFailures;
235 LARGE_INTEGER TKIPRemoteMICErrors;
236 LARGE_INTEGER TKIPICVErrors;
237 LARGE_INTEGER TKIPCounterMeasuresInvoked;
238 LARGE_INTEGER TKIPReplays;
239 LARGE_INTEGER CCMPFormatErrors;
240 LARGE_INTEGER CCMPReplays;
241 LARGE_INTEGER CCMPDecryptErrors;
242 LARGE_INTEGER FourWayHandshakeFailures;
62eb734b 243};
91980990 244
51126deb
BZ
245typedef unsigned long NDIS_802_11_KEY_INDEX;
246typedef unsigned long long NDIS_802_11_KEY_RSC;
91980990 247
cc277069 248#define MAX_RADIUS_SRV_NUM 2 /* 802.1x failover number */
91980990 249
62eb734b 250struct PACKED rt_radius_srv_info {
51126deb
BZ
251 u32 radius_ip;
252 u32 radius_port;
253 u8 radius_key[64];
254 u8 radius_key_len;
62eb734b 255};
91980990 256
62eb734b 257struct PACKED rt_radius_key_info {
51126deb 258 u8 radius_srv_num;
62eb734b 259 struct rt_radius_srv_info radius_srv_info[MAX_RADIUS_SRV_NUM];
51126deb
BZ
260 u8 ieee8021xWEP; /* dynamic WEP */
261 u8 key_index;
262 u8 key_length; /* length of key in bytes */
263 u8 key_material[13];
62eb734b 264};
91980990 265
cc277069 266/* It's used by 802.1x daemon to require relative configuration */
62eb734b 267struct PACKED rt_radius_conf {
51126deb
BZ
268 u32 Length; /* Length of this structure */
269 u8 mbss_num; /* indicate multiple BSS number */
270 u32 own_ip_addr;
271 u32 retry_interval;
272 u32 session_timeout_interval;
273 u8 EAPifname[8][IFNAMSIZ];
274 u8 EAPifname_len[8];
275 u8 PreAuthifname[8][IFNAMSIZ];
276 u8 PreAuthifname_len[8];
62eb734b
BZ
277 struct rt_radius_key_info RadiusInfo[8];
278};
91980990 279
cc277069 280/* Key mapping keys require a BSSID */
62eb734b 281struct rt_ndis_802_11_key {
51126deb
BZ
282 u32 Length; /* Length of this structure */
283 u32 KeyIndex;
284 u32 KeyLength; /* length of key in bytes */
52b81c89
BZ
285 NDIS_802_11_MAC_ADDRESS BSSID;
286 NDIS_802_11_KEY_RSC KeyRSC;
51126deb 287 u8 KeyMaterial[1]; /* variable length depending on above field */
62eb734b 288};
91980990 289
62eb734b 290struct rt_ndis_802_11_passphrase {
51126deb 291 u32 KeyLength; /* length of key in bytes */
52b81c89 292 NDIS_802_11_MAC_ADDRESS BSSID;
51126deb 293 u8 KeyMaterial[1]; /* variable length depending on above field */
62eb734b 294};
ca97b838 295
62eb734b 296struct rt_ndis_802_11_remove_key {
51126deb
BZ
297 u32 Length; /* Length of this structure */
298 u32 KeyIndex;
52b81c89 299 NDIS_802_11_MAC_ADDRESS BSSID;
62eb734b 300};
91980990 301
62eb734b 302struct rt_ndis_802_11_wep {
51126deb
BZ
303 u32 Length; /* Length of this structure */
304 u32 KeyIndex; /* 0 is the per-client key, 1-N are the */
cc277069 305 /* global keys */
51126deb
BZ
306 u32 KeyLength; /* length of key in bytes */
307 u8 KeyMaterial[1]; /* variable length depending on above field */
62eb734b 308};
91980990 309
52b81c89
BZ
310typedef enum _NDIS_802_11_NETWORK_INFRASTRUCTURE {
311 Ndis802_11IBSS,
312 Ndis802_11Infrastructure,
313 Ndis802_11AutoUnknown,
314 Ndis802_11Monitor,
cc277069 315 Ndis802_11InfrastructureMax /* Not a real value, defined as upper bound */
91980990
GKH
316} NDIS_802_11_NETWORK_INFRASTRUCTURE, *PNDIS_802_11_NETWORK_INFRASTRUCTURE;
317
cc277069 318/* Add new authentication modes */
52b81c89
BZ
319typedef enum _NDIS_802_11_AUTHENTICATION_MODE {
320 Ndis802_11AuthModeOpen,
321 Ndis802_11AuthModeShared,
322 Ndis802_11AuthModeAutoSwitch,
323 Ndis802_11AuthModeWPA,
324 Ndis802_11AuthModeWPAPSK,
325 Ndis802_11AuthModeWPANone,
326 Ndis802_11AuthModeWPA2,
327 Ndis802_11AuthModeWPA2PSK,
328 Ndis802_11AuthModeWPA1WPA2,
91980990 329 Ndis802_11AuthModeWPA1PSKWPA2PSK,
cc277069 330 Ndis802_11AuthModeMax /* Not a real mode, defined as upper bound */
91980990
GKH
331} NDIS_802_11_AUTHENTICATION_MODE, *PNDIS_802_11_AUTHENTICATION_MODE;
332
51126deb
BZ
333typedef u8 NDIS_802_11_RATES[NDIS_802_11_LENGTH_RATES]; /* Set of 8 data rates */
334typedef u8 NDIS_802_11_RATES_EX[NDIS_802_11_LENGTH_RATES_EX]; /* Set of 16 data rates */
91980990 335
62eb734b 336struct PACKED rt_ndis_802_11_ssid {
51126deb 337 u32 SsidLength; /* length of SSID field below, in bytes; */
cc277069 338 /* this can be zero. */
51126deb 339 u8 Ssid[NDIS_802_11_LENGTH_SSID]; /* SSID information field */
62eb734b 340};
91980990 341
62eb734b 342struct PACKED rt_ndis_wlan_bssid {
51126deb 343 unsigned long Length; /* Length of this structure */
cc277069 344 NDIS_802_11_MAC_ADDRESS MacAddress; /* BSSID */
51126deb 345 u8 Reserved[2];
62eb734b 346 struct rt_ndis_802_11_ssid Ssid; /* SSID */
51126deb 347 unsigned long Privacy; /* WEP encryption requirement */
cc277069 348 NDIS_802_11_RSSI Rssi; /* receive signal strength in dBm */
52b81c89 349 NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;
62eb734b 350 struct rt_ndis_802_11_configuration Configuration;
52b81c89
BZ
351 NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode;
352 NDIS_802_11_RATES SupportedRates;
62eb734b 353};
91980990 354
62eb734b 355struct PACKED rt_ndis_802_11_bssid_list {
51126deb 356 u32 NumberOfItems; /* in list below, at least 1 */
62eb734b
BZ
357 struct rt_ndis_wlan_bssid Bssid[1];
358};
91980990 359
cc277069 360/* Added Capabilities, IELength and IEs for each BSSID */
62eb734b 361struct PACKED rt_ndis_wlan_bssid_ex {
51126deb 362 unsigned long Length; /* Length of this structure */
cc277069 363 NDIS_802_11_MAC_ADDRESS MacAddress; /* BSSID */
51126deb 364 u8 Reserved[2];
62eb734b 365 struct rt_ndis_802_11_ssid Ssid; /* SSID */
51126deb 366 u32 Privacy; /* WEP encryption requirement */
cc277069
BZ
367 NDIS_802_11_RSSI Rssi; /* receive signal */
368 /* strength in dBm */
52b81c89 369 NDIS_802_11_NETWORK_TYPE NetworkTypeInUse;
62eb734b 370 struct rt_ndis_802_11_configuration Configuration;
52b81c89
BZ
371 NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode;
372 NDIS_802_11_RATES_EX SupportedRates;
51126deb
BZ
373 unsigned long IELength;
374 u8 IEs[1];
62eb734b 375};
91980990 376
62eb734b 377struct PACKED rt_ndis_802_11_bssid_list_ex {
51126deb 378 u32 NumberOfItems; /* in list below, at least 1 */
62eb734b
BZ
379 struct rt_ndis_wlan_bssid_ex Bssid[1];
380};
91980990 381
62eb734b 382struct PACKED rt_ndis_802_11_fixed_ies {
51126deb
BZ
383 u8 Timestamp[8];
384 u16 BeaconInterval;
385 u16 Capabilities;
62eb734b 386};
91980990 387
62eb734b 388struct rt_ndis_802_11_variable_ies {
51126deb
BZ
389 u8 ElementID;
390 u8 Length; /* Number of bytes in data field */
391 u8 data[1];
62eb734b 392};
91980990 393
51126deb 394typedef unsigned long NDIS_802_11_FRAGMENTATION_THRESHOLD;
91980990 395
51126deb 396typedef unsigned long NDIS_802_11_RTS_THRESHOLD;
91980990 397
51126deb 398typedef unsigned long NDIS_802_11_ANTENNA;
91980990 399
52b81c89
BZ
400typedef enum _NDIS_802_11_PRIVACY_FILTER {
401 Ndis802_11PrivFilterAcceptAll,
402 Ndis802_11PrivFilter8021xWEP
91980990
GKH
403} NDIS_802_11_PRIVACY_FILTER, *PNDIS_802_11_PRIVACY_FILTER;
404
cc277069
BZ
405/* Added new encryption types */
406/* Also aliased typedef to new name */
52b81c89
BZ
407typedef enum _NDIS_802_11_WEP_STATUS {
408 Ndis802_11WEPEnabled,
409 Ndis802_11Encryption1Enabled = Ndis802_11WEPEnabled,
410 Ndis802_11WEPDisabled,
411 Ndis802_11EncryptionDisabled = Ndis802_11WEPDisabled,
412 Ndis802_11WEPKeyAbsent,
413 Ndis802_11Encryption1KeyAbsent = Ndis802_11WEPKeyAbsent,
414 Ndis802_11WEPNotSupported,
415 Ndis802_11EncryptionNotSupported = Ndis802_11WEPNotSupported,
416 Ndis802_11Encryption2Enabled,
417 Ndis802_11Encryption2KeyAbsent,
418 Ndis802_11Encryption3Enabled,
419 Ndis802_11Encryption3KeyAbsent,
cc277069 420 Ndis802_11Encryption4Enabled, /* TKIP or AES mix */
52b81c89
BZ
421 Ndis802_11Encryption4KeyAbsent,
422 Ndis802_11GroupWEP40Enabled,
ed291e80 423 Ndis802_11GroupWEP104Enabled,
91980990 424} NDIS_802_11_WEP_STATUS, *PNDIS_802_11_WEP_STATUS,
52b81c89 425 NDIS_802_11_ENCRYPTION_STATUS, *PNDIS_802_11_ENCRYPTION_STATUS;
91980990 426
52b81c89
BZ
427typedef enum _NDIS_802_11_RELOAD_DEFAULTS {
428 Ndis802_11ReloadWEPKeys
91980990
GKH
429} NDIS_802_11_RELOAD_DEFAULTS, *PNDIS_802_11_RELOAD_DEFAULTS;
430
431#define NDIS_802_11_AI_REQFI_CAPABILITIES 1
432#define NDIS_802_11_AI_REQFI_LISTENINTERVAL 2
433#define NDIS_802_11_AI_REQFI_CURRENTAPADDRESS 4
434
435#define NDIS_802_11_AI_RESFI_CAPABILITIES 1
436#define NDIS_802_11_AI_RESFI_STATUSCODE 2
437#define NDIS_802_11_AI_RESFI_ASSOCIATIONID 4
438
62eb734b 439struct rt_ndis_802_11_ai_reqfi {
51126deb
BZ
440 u16 Capabilities;
441 u16 ListenInterval;
52b81c89 442 NDIS_802_11_MAC_ADDRESS CurrentAPAddress;
62eb734b 443};
91980990 444
62eb734b 445struct rt_ndis_802_11_ai_resfi {
51126deb
BZ
446 u16 Capabilities;
447 u16 StatusCode;
448 u16 AssociationId;
62eb734b 449};
91980990 450
62eb734b 451struct rt_ndis_802_11_association_information {
51126deb
BZ
452 unsigned long Length;
453 u16 AvailableRequestFixedIEs;
62eb734b 454 struct rt_ndis_802_11_ai_reqfi RequestFixedIEs;
51126deb
BZ
455 unsigned long RequestIELength;
456 unsigned long OffsetRequestIEs;
457 u16 AvailableResponseFixedIEs;
62eb734b 458 struct rt_ndis_802_11_ai_resfi ResponseFixedIEs;
51126deb
BZ
459 unsigned long ResponseIELength;
460 unsigned long OffsetResponseIEs;
62eb734b 461};
91980990 462
62eb734b
BZ
463struct rt_ndis_802_11_authentication_event {
464 struct rt_ndis_802_11_status_indication Status;
465 struct rt_ndis_802_11_authentication_request Request[1];
466};
91980990 467
cc277069 468/* 802.11 Media stream constraints, associated with OID_802_11_MEDIA_STREAM_MODE */
52b81c89
BZ
469typedef enum _NDIS_802_11_MEDIA_STREAM_MODE {
470 Ndis802_11MediaStreamOff,
471 Ndis802_11MediaStreamOn,
91980990
GKH
472} NDIS_802_11_MEDIA_STREAM_MODE, *PNDIS_802_11_MEDIA_STREAM_MODE;
473
cc277069 474/* PMKID Structures */
51126deb 475typedef u8 NDIS_802_11_PMKID_VALUE[16];
91980990 476
62eb734b 477struct rt_bssid_info {
52b81c89
BZ
478 NDIS_802_11_MAC_ADDRESS BSSID;
479 NDIS_802_11_PMKID_VALUE PMKID;
62eb734b 480};
91980990 481
62eb734b 482struct rt_ndis_802_11_pmkid {
51126deb
BZ
483 u32 Length;
484 u32 BSSIDInfoCount;
62eb734b
BZ
485 struct rt_bssid_info BSSIDInfo[1];
486};
91980990 487
62eb734b 488struct rt_ndis_802_11_authentication_encryption {
52b81c89
BZ
489 NDIS_802_11_AUTHENTICATION_MODE AuthModeSupported;
490 NDIS_802_11_ENCRYPTION_STATUS EncryptStatusSupported;
62eb734b 491};
52b81c89 492
62eb734b 493struct rt_ndis_802_11_capability {
51126deb
BZ
494 unsigned long Length;
495 unsigned long Version;
496 unsigned long NoOfPMKIDs;
497 unsigned long NoOfAuthEncryptPairsSupported;
62eb734b 498 struct rt_ndis_802_11_authentication_encryption
52b81c89 499 AuthenticationEncryptionSupported[1];
62eb734b 500};
91980990 501
cc277069 502#define RT_PRIV_IOCTL (SIOCIWFIRSTPRIV + 0x01) /* Sync. with AP for wsc upnp daemon */
91980990
GKH
503#define RTPRIV_IOCTL_SET (SIOCIWFIRSTPRIV + 0x02)
504
91980990
GKH
505#define RTPRIV_IOCTL_STATISTICS (SIOCIWFIRSTPRIV + 0x09)
506#define RTPRIV_IOCTL_ADD_PMKID_CACHE (SIOCIWFIRSTPRIV + 0x0A)
507#define RTPRIV_IOCTL_RADIUS_DATA (SIOCIWFIRSTPRIV + 0x0C)
508#define RTPRIV_IOCTL_GSITESURVEY (SIOCIWFIRSTPRIV + 0x0D)
cc277069 509#define RT_PRIV_IOCTL_EXT (SIOCIWFIRSTPRIV + 0x0E) /* Sync. with RT61 (for wpa_supplicant) */
91980990
GKH
510#define RTPRIV_IOCTL_GET_MAC_TABLE (SIOCIWFIRSTPRIV + 0x0F)
511
512#define RTPRIV_IOCTL_SHOW (SIOCIWFIRSTPRIV + 0x11)
513enum {
52b81c89
BZ
514 SHOW_CONN_STATUS = 4,
515 SHOW_DRVIER_VERION = 5,
516 SHOW_BA_INFO = 6,
91980990 517 SHOW_DESC_INFO = 7,
ca97b838 518#ifdef RTMP_MAC_USB
3a32ed12
BZ
519 SHOW_RXBULK_INFO = 8,
520 SHOW_TXBULK_INFO = 9,
cc277069 521#endif /* RTMP_MAC_USB // */
52b81c89
BZ
522 RAIO_OFF = 10,
523 RAIO_ON = 11,
91980990 524 SHOW_CFG_VALUE = 20,
3a32ed12 525 SHOW_ADHOC_ENTRY_INFO = 21,
91980990
GKH
526};
527
ca97b838
BZ
528#define OID_802_11_BUILD_CHANNEL_EX 0x0714
529#define OID_802_11_GET_CH_LIST 0x0715
530#define OID_802_11_GET_COUNTRY_CODE 0x0716
531#define OID_802_11_GET_CHANNEL_GEOGRAPHY 0x0717
532
cc277069 533#define RT_OID_WSC_SET_PASSPHRASE 0x0740 /* passphrase for wpa(2)-psk */
ca97b838
BZ
534#define RT_OID_WSC_DRIVER_AUTO_CONNECT 0x0741
535#define RT_OID_WSC_QUERY_DEFAULT_PROFILE 0x0742
536#define RT_OID_WSC_SET_CONN_BY_PROFILE_INDEX 0x0743
537#define RT_OID_WSC_SET_ACTION 0x0744
538#define RT_OID_WSC_SET_SSID 0x0745
539#define RT_OID_WSC_SET_PIN_CODE 0x0746
cc277069
BZ
540#define RT_OID_WSC_SET_MODE 0x0747 /* PIN or PBC */
541#define RT_OID_WSC_SET_CONF_MODE 0x0748 /* Enrollee or Registrar */
ca97b838
BZ
542#define RT_OID_WSC_SET_PROFILE 0x0749
543#define RT_OID_WSC_CONFIG_STATUS 0x074F
544#define RT_OID_802_11_WSC_QUERY_PROFILE 0x0750
cc277069 545/* for consistency with RT61 */
ca97b838
BZ
546#define RT_OID_WSC_QUERY_STATUS 0x0751
547#define RT_OID_WSC_PIN_CODE 0x0752
548#define RT_OID_WSC_UUID 0x0753
549#define RT_OID_WSC_SET_SELECTED_REGISTRAR 0x0754
550#define RT_OID_WSC_EAPMSG 0x0755
551#define RT_OID_WSC_MANUFACTURER 0x0756
552#define RT_OID_WSC_MODEL_NAME 0x0757
553#define RT_OID_WSC_MODEL_NO 0x0758
554#define RT_OID_WSC_SERIAL_NO 0x0759
555#define RT_OID_WSC_MAC_ADDRESS 0x0760
91980990 556
cc277069 557/* New for MeetingHouse Api support */
91980990
GKH
558#define OID_MH_802_1X_SUPPORTED 0xFFEDC100
559
cc277069 560/* MIMO Tx parameter, ShortGI, MCS, STBC, etc. these are fields in TXWI. Don't change this definition!!! */
52b81c89
BZ
561typedef union _HTTRANSMIT_SETTING {
562 struct {
51126deb
BZ
563 u16 MCS:7; /* MCS */
564 u16 BW:1; /*channel bandwidth 20MHz or 40 MHz */
565 u16 ShortGI:1;
566 u16 STBC:2; /*SPACE */
567/* u16 rsv:3; */
568 u16 rsv:2;
569 u16 TxBF:1;
570 u16 MODE:2; /* Use definition MODE_xxx. */
52b81c89 571 } field;
51126deb 572 u16 word;
52b81c89 573} HTTRANSMIT_SETTING, *PHTTRANSMIT_SETTING;
91980990
GKH
574
575typedef enum _RT_802_11_PREAMBLE {
52b81c89
BZ
576 Rt802_11PreambleLong,
577 Rt802_11PreambleShort,
578 Rt802_11PreambleAuto
91980990
GKH
579} RT_802_11_PREAMBLE, *PRT_802_11_PREAMBLE;
580
91980990
GKH
581typedef enum _RT_802_11_PHY_MODE {
582 PHY_11BG_MIXED = 0,
583 PHY_11B,
584 PHY_11A,
585 PHY_11ABG_MIXED,
586 PHY_11G,
cc277069
BZ
587 PHY_11ABGN_MIXED, /* both band 5 */
588 PHY_11N_2_4G, /* 11n-only with 2.4G band 6 */
589 PHY_11GN_MIXED, /* 2.4G band 7 */
590 PHY_11AN_MIXED, /* 5G band 8 */
591 PHY_11BGN_MIXED, /* if check 802.11b. 9 */
592 PHY_11AGN_MIXED, /* if check 802.11b. 10 */
593 PHY_11N_5G, /* 11n-only with 5G band 11 */
91980990
GKH
594} RT_802_11_PHY_MODE;
595
cc277069 596/* put all proprietery for-query objects here to reduce # of Query_OID */
62eb734b 597struct rt_802_11_link_status {
51126deb
BZ
598 unsigned long CurrTxRate; /* in units of 0.5Mbps */
599 unsigned long ChannelQuality; /* 0..100 % */
600 unsigned long TxByteCount; /* both ok and fail */
601 unsigned long RxByteCount; /* both ok and fail */
602 unsigned long CentralChannel; /* 40MHz central channel number */
62eb734b 603};
91980990 604
62eb734b 605struct rt_802_11_event_log {
cc277069 606 LARGE_INTEGER SystemTime; /* timestammp via NdisGetCurrentSystemTime() */
51126deb
BZ
607 u8 Addr[MAC_ADDR_LENGTH];
608 u16 Event; /* EVENT_xxx */
62eb734b 609};
91980990 610
62eb734b 611struct rt_802_11_event_table {
51126deb
BZ
612 unsigned long Num;
613 unsigned long Rsv; /* to align Log[] at LARGE_INEGER boundary */
62eb734b
BZ
614 struct rt_802_11_event_log Log[MAX_NUMBER_OF_EVENT];
615};
91980990 616
cc277069 617/* MIMO Tx parameter, ShortGI, MCS, STBC, etc. these are fields in TXWI. Don't change this definition!!! */
52b81c89
BZ
618typedef union _MACHTTRANSMIT_SETTING {
619 struct {
51126deb
BZ
620 u16 MCS:7; /* MCS */
621 u16 BW:1; /*channel bandwidth 20MHz or 40 MHz */
622 u16 ShortGI:1;
623 u16 STBC:2; /*SPACE */
624 u16 rsv:3;
625 u16 MODE:2; /* Use definition MODE_xxx. */
52b81c89 626 } field;
51126deb 627 u16 word;
52b81c89 628} MACHTTRANSMIT_SETTING, *PMACHTTRANSMIT_SETTING;
91980990 629
62eb734b 630struct rt_802_11_mac_entry {
51126deb
BZ
631 u8 Addr[MAC_ADDR_LENGTH];
632 u8 Aid;
633 u8 Psm; /* 0:PWR_ACTIVE, 1:PWR_SAVE */
634 u8 MimoPs; /* 0:MMPS_STATIC, 1:MMPS_DYNAMIC, 3:MMPS_Enabled */
635 char AvgRssi0;
636 char AvgRssi1;
637 char AvgRssi2;
638 u32 ConnectedTime;
52b81c89 639 MACHTTRANSMIT_SETTING TxRate;
62eb734b 640};
91980990 641
62eb734b 642struct rt_802_11_mac_table {
51126deb 643 unsigned long Num;
62eb734b
BZ
644 struct rt_802_11_mac_entry Entry[MAX_NUMBER_OF_MAC];
645};
91980990 646
cc277069 647/* structure for query/set hardware register - MAC, BBP, RF register */
62eb734b 648struct rt_802_11_hardware_register {
51126deb
BZ
649 unsigned long HardwareType; /* 0:MAC, 1:BBP, 2:RF register, 3:EEPROM */
650 unsigned long Offset; /* Q/S register offset addr */
651 unsigned long Data; /* R/W data buffer */
62eb734b 652};
91980990 653
62eb734b 654struct rt_802_11_ap_config {
51126deb
BZ
655 unsigned long EnableTxBurst; /* 0-disable, 1-enable */
656 unsigned long EnableTurboRate; /* 0-disable, 1-enable 72/100mbps turbo rate */
657 unsigned long IsolateInterStaTraffic; /* 0-disable, 1-enable isolation */
658 unsigned long HideSsid; /* 0-disable, 1-enable hiding */
659 unsigned long UseBGProtection; /* 0-AUTO, 1-always ON, 2-always OFF */
660 unsigned long UseShortSlotTime; /* 0-no use, 1-use 9-us short slot time */
661 unsigned long Rsv1; /* must be 0 */
662 unsigned long SystemErrorBitmap; /* ignore upon SET, return system error upon QUERY */
62eb734b 663};
91980990 664
cc277069 665/* structure to query/set STA_CONFIG */
62eb734b 666struct rt_802_11_sta_config {
51126deb
BZ
667 unsigned long EnableTxBurst; /* 0-disable, 1-enable */
668 unsigned long EnableTurboRate; /* 0-disable, 1-enable 72/100mbps turbo rate */
669 unsigned long UseBGProtection; /* 0-AUTO, 1-always ON, 2-always OFF */
670 unsigned long UseShortSlotTime; /* 0-no use, 1-use 9-us short slot time when applicable */
671 unsigned long AdhocMode; /* 0-11b rates only (WIFI spec), 1 - b/g mixed, 2 - g only */
672 unsigned long HwRadioStatus; /* 0-OFF, 1-ON, default is 1, Read-Only */
673 unsigned long Rsv1; /* must be 0 */
674 unsigned long SystemErrorBitmap; /* ignore upon SET, return system error upon QUERY */
62eb734b 675};
91980990 676
cc277069
BZ
677/* */
678/* For OID Query or Set about BA structure */
679/* */
62eb734b 680struct rt_oid_bacap {
51126deb
BZ
681 u8 RxBAWinLimit;
682 u8 TxBAWinLimit;
683 u8 Policy; /* 0: DELAY_BA 1:IMMED_BA (//BA Policy subfiled value in ADDBA frame) 2:BA-not use. other value invalid */
684 u8 MpduDensity; /* 0: DELAY_BA 1:IMMED_BA (//BA Policy subfiled value in ADDBA frame) 2:BA-not use. other value invalid */
685 u8 AmsduEnable; /*Enable AMSDU transmisstion */
686 u8 AmsduSize; /* 0:3839, 1:7935 bytes. u32 MSDUSizeToBytes[] = { 3839, 7935}; */
687 u8 MMPSmode; /* MIMO power save more, 0:static, 1:dynamic, 2:rsv, 3:mimo enable */
cc277069 688 BOOLEAN AutoBA; /* Auto BA will automatically */
62eb734b 689};
91980990 690
62eb734b 691struct rt_802_11_acl_entry {
51126deb
BZ
692 u8 Addr[MAC_ADDR_LENGTH];
693 u16 Rsv;
62eb734b 694};
91980990 695
62eb734b 696struct PACKED rt_rt_802_11_acl {
51126deb
BZ
697 unsigned long Policy; /* 0-disable, 1-positive list, 2-negative list */
698 unsigned long Num;
62eb734b
BZ
699 struct rt_802_11_acl_entry Entry[MAX_NUMBER_OF_ACL];
700};
91980990 701
62eb734b 702struct rt_802_11_wds {
51126deb 703 unsigned long Num;
52b81c89 704 NDIS_802_11_MAC_ADDRESS Entry[24 /*MAX_NUM_OF_WDS_LINK */ ];
51126deb
BZ
705 unsigned long KeyLength;
706 u8 KeyMaterial[32];
62eb734b 707};
91980990 708
62eb734b 709struct rt_802_11_tx_rates {
51126deb
BZ
710 u8 SupRateLen;
711 u8 SupRate[MAX_LENGTH_OF_SUPPORT_RATES];
712 u8 ExtRateLen;
713 u8 ExtRate[MAX_LENGTH_OF_SUPPORT_RATES];
62eb734b 714};
91980990 715
cc277069
BZ
716/* Definition of extra information code */
717#define GENERAL_LINK_UP 0x0 /* Link is Up */
718#define GENERAL_LINK_DOWN 0x1 /* Link is Down */
719#define HW_RADIO_OFF 0x2 /* Hardware radio off */
720#define SW_RADIO_OFF 0x3 /* Software radio off */
721#define AUTH_FAIL 0x4 /* Open authentication fail */
722#define AUTH_FAIL_KEYS 0x5 /* Shared authentication fail */
723#define ASSOC_FAIL 0x6 /* Association failed */
724#define EAP_MIC_FAILURE 0x7 /* Deauthencation because MIC failure */
725#define EAP_4WAY_TIMEOUT 0x8 /* Deauthencation on 4-way handshake timeout */
726#define EAP_GROUP_KEY_TIMEOUT 0x9 /* Deauthencation on group key handshake timeout */
727#define EAP_SUCCESS 0xa /* EAP succeed */
728#define DETECT_RADAR_SIGNAL 0xb /* Radar signal occur in current channel */
729#define EXTRA_INFO_MAX 0xb /* Indicate Last OID */
91980990
GKH
730
731#define EXTRA_INFO_CLEAR 0xffffffff
732
cc277069 733/* This is OID setting structure. So only GF or MM as Mode. This is valid when our wirelss mode has 802.11n in use. */
62eb734b 734struct rt_oid_set_ht_phymode {
cc277069 735 RT_802_11_PHY_MODE PhyMode; /* */
51126deb
BZ
736 u8 TransmitNo;
737 u8 HtMode; /*HTMODE_GF or HTMODE_MM */
738 u8 ExtOffset; /*extension channel above or below */
739 u8 MCS;
740 u8 BW;
741 u8 STBC;
742 u8 SHORTGI;
743 u8 rsv;
62eb734b 744};
91980990 745
91980990
GKH
746#define MAX_CUSTOM_LEN 128
747
52b81c89
BZ
748typedef enum _RT_802_11_D_CLIENT_MODE {
749 Rt802_11_D_None,
750 Rt802_11_D_Flexible,
751 Rt802_11_D_Strict,
91980990 752} RT_802_11_D_CLIENT_MODE, *PRT_802_11_D_CLIENT_MODE;
91980990 753
62eb734b 754struct rt_channel_list_info {
51126deb
BZ
755 u8 ChannelList[MAX_NUM_OF_CHS]; /* list all supported channels for site survey */
756 u8 ChannelListNum; /* number of channel in ChannelList[] */
62eb734b 757};
91980990 758
cc277069 759/* WSC configured credential */
62eb734b
BZ
760struct rt_wsc_credential {
761 struct rt_ndis_802_11_ssid SSID; /* mandatory */
51126deb
BZ
762 u16 AuthType; /* mandatory, 1: open, 2: wpa-psk, 4: shared, 8:wpa, 0x10: wpa2, 0x20: wpa2-psk */
763 u16 EncrType; /* mandatory, 1: none, 2: wep, 4: tkip, 8: aes */
764 u8 Key[64]; /* mandatory, Maximum 64 byte */
765 u16 KeyLength;
766 u8 MacAddr[6]; /* mandatory, AP MAC address */
767 u8 KeyIndex; /* optional, default is 1 */
768 u8 Rsvd[3]; /* Make alignment */
62eb734b 769};
3a32ed12 770
cc277069 771/* WSC configured profiles */
62eb734b 772struct rt_wsc_profile {
51126deb
BZ
773 u32 ProfileCnt;
774 u32 ApplyProfileIdx; /* add by johnli, fix WPS test plan 5.1.1 */
62eb734b
BZ
775 struct rt_wsc_credential Profile[8]; /* Support up to 8 profiles */
776};
91980990 777
cc277069 778#endif /* _OID_H_ */