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