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 41 #define TRUE 1 42 #define FALSE 0 43 // 44 // IEEE 802.11 Structures and definitions 45 // 46 #define MAX_TX_POWER_LEVEL 100 /* mW */ 47 #define MAX_RSSI_TRIGGER -10 /* dBm */ 48 #define MIN_RSSI_TRIGGER -200 /* dBm */ 49 #define MAX_FRAG_THRESHOLD 2346 /* byte count */ 50 #define MIN_FRAG_THRESHOLD 256 /* byte count */ 51 #define MAX_RTS_THRESHOLD 2347 /* byte count */ 52 53 // new types for Media Specific Indications 54 // Extension channel offset 55 #define EXTCHA_NONE 0 56 #define EXTCHA_ABOVE 0x1 57 #define EXTCHA_BELOW 0x3 58 59 // BW 60 #define BAND_WIDTH_20 0 61 #define BAND_WIDTH_40 1 62 #define BAND_WIDTH_BOTH 2 63 #define BAND_WIDTH_10 3 // 802.11j has 10MHz. This definition is for internal usage. doesn't fill in the IE or other field. 64 // SHORTGI 65 #define GAP_INTERVAL_400 1 // only support in HT mode 66 #define GAP_INTERVAL_800 0 67 #define GAP_INTERVAL_BOTH 2 68 69 #define NdisMediaStateConnected 1 70 #define NdisMediaStateDisconnected 0 71 72 #define NDIS_802_11_LENGTH_SSID 32 73 #define NDIS_802_11_LENGTH_RATES 8 74 #define NDIS_802_11_LENGTH_RATES_EX 16 75 #define MAC_ADDR_LENGTH 6 76 #define MAX_NUM_OF_CHS 49 // 14 channels @2.4G + 12@UNII + 4 @MMAC + 11 @HiperLAN2 + 7 @Japan + 1 as NULL terminationc 77 #define MAX_NUMBER_OF_EVENT 10 // entry # in EVENT table 78 #define MAX_NUMBER_OF_MAC 32 // if MAX_MBSSID_NUM is 8, this value can't be larger than 211 79 #define MAX_NUMBER_OF_ACL 64 80 #define MAX_LENGTH_OF_SUPPORT_RATES 12 // 1, 2, 5.5, 11, 6, 9, 12, 18, 24, 36, 48, 54 81 #define MAX_NUMBER_OF_DLS_ENTRY 4 82 83 #ifndef UNDER_CE 84 85 #define OID_GEN_MACHINE_NAME 0x0001021A 86 87 #ifdef RALINK_ATE 88 #define RT_QUERY_ATE_TXDONE_COUNT 0x0401 89 #endif // RALINK_ATE // 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 95 // 96 // IEEE 802.11 OIDs 97 // 98 #define OID_GET_SET_TOGGLE 0x8000 99 100 #define OID_802_11_NETWORK_TYPES_SUPPORTED 0x0103 101 #define OID_802_11_NETWORK_TYPE_IN_USE 0x0104 102 #define OID_802_11_RSSI_TRIGGER 0x0107 103 #define RT_OID_802_11_RSSI 0x0108 //rt2860 only , kathy 104 #define RT_OID_802_11_RSSI_1 0x0109 //rt2860 only , kathy 105 #define RT_OID_802_11_RSSI_2 0x010A //rt2860 only , kathy 106 #define OID_802_11_NUMBER_OF_ANTENNAS 0x010B 107 #define OID_802_11_RX_ANTENNA_SELECTED 0x010C 108 #define OID_802_11_TX_ANTENNA_SELECTED 0x010D 109 #define OID_802_11_SUPPORTED_RATES 0x010E 110 #define OID_802_11_ADD_WEP 0x0112 111 #define OID_802_11_REMOVE_WEP 0x0113 112 #define OID_802_11_DISASSOCIATE 0x0114 113 #define OID_802_11_PRIVACY_FILTER 0x0118 114 #define OID_802_11_ASSOCIATION_INFORMATION 0x011E 115 #define OID_802_11_TEST 0x011F 116 #define RT_OID_802_11_COUNTRY_REGION 0x0507 117 #define OID_802_11_BSSID_LIST_SCAN 0x0508 118 #define OID_802_11_SSID 0x0509 119 #define OID_802_11_BSSID 0x050A 120 #define RT_OID_802_11_RADIO 0x050B 121 #define RT_OID_802_11_PHY_MODE 0x050C 122 #define RT_OID_802_11_STA_CONFIG 0x050D 123 #define OID_802_11_DESIRED_RATES 0x050E 124 #define RT_OID_802_11_PREAMBLE 0x050F 125 #define OID_802_11_WEP_STATUS 0x0510 126 #define OID_802_11_AUTHENTICATION_MODE 0x0511 127 #define OID_802_11_INFRASTRUCTURE_MODE 0x0512 128 #define RT_OID_802_11_RESET_COUNTERS 0x0513 129 #define OID_802_11_RTS_THRESHOLD 0x0514 130 #define OID_802_11_FRAGMENTATION_THRESHOLD 0x0515 131 #define OID_802_11_POWER_MODE 0x0516 132 #define OID_802_11_TX_POWER_LEVEL 0x0517 133 #define RT_OID_802_11_ADD_WPA 0x0518 134 #define OID_802_11_REMOVE_KEY 0x0519 135 #define OID_802_11_ADD_KEY 0x0520 136 #define OID_802_11_CONFIGURATION 0x0521 137 #define OID_802_11_TX_PACKET_BURST 0x0522 138 #define RT_OID_802_11_QUERY_NOISE_LEVEL 0x0523 139 #define RT_OID_802_11_EXTRA_INFO 0x0524 140 #ifdef DBG 141 #define RT_OID_802_11_HARDWARE_REGISTER 0x0525 142 #endif 143 #define OID_802_11_ENCRYPTION_STATUS OID_802_11_WEP_STATUS 144 #define OID_802_11_DEAUTHENTICATION 0x0526 145 #define OID_802_11_DROP_UNENCRYPTED 0x0527 146 #define OID_802_11_MIC_FAILURE_REPORT_FRAME 0x0528 147 148 // For 802.1x daemin using to require current driver configuration 149 #define OID_802_11_RADIUS_QUERY_SETTING 0x0540 150 151 #define RT_OID_DEVICE_NAME 0x0607 152 #define RT_OID_VERSION_INFO 0x0608 153 #define OID_802_11_BSSID_LIST 0x0609 154 #define OID_802_3_CURRENT_ADDRESS 0x060A 155 #define OID_GEN_MEDIA_CONNECT_STATUS 0x060B 156 #define RT_OID_802_11_QUERY_LINK_STATUS 0x060C 157 #define OID_802_11_RSSI 0x060D 158 #define OID_802_11_STATISTICS 0x060E 159 #define OID_GEN_RCV_OK 0x060F 160 #define OID_GEN_RCV_NO_BUFFER 0x0610 161 #define RT_OID_802_11_QUERY_EEPROM_VERSION 0x0611 162 #define RT_OID_802_11_QUERY_FIRMWARE_VERSION 0x0612 163 #define RT_OID_802_11_QUERY_LAST_RX_RATE 0x0613 164 #define RT_OID_802_11_TX_POWER_LEVEL_1 0x0614 165 #define RT_OID_802_11_QUERY_PIDVID 0x0615 166 //for WPA_SUPPLICANT_SUPPORT 167 #define OID_SET_COUNTERMEASURES 0x0616 168 #define OID_802_11_SET_IEEE8021X 0x0617 169 #define OID_802_11_SET_IEEE8021X_REQUIRE_KEY 0x0618 170 #define OID_802_11_PMKID 0x0620 171 #define RT_OID_WPA_SUPPLICANT_SUPPORT 0x0621 172 #define RT_OID_WE_VERSION_COMPILED 0x0622 173 #define RT_OID_NEW_DRIVER 0x0623 174 175 176 //rt2860 , kathy 177 #define RT_OID_802_11_SNR_0 0x0630 178 #define RT_OID_802_11_SNR_1 0x0631 179 #define RT_OID_802_11_QUERY_LAST_TX_RATE 0x0632 180 #define RT_OID_802_11_QUERY_HT_PHYMODE 0x0633 181 #define RT_OID_802_11_SET_HT_PHYMODE 0x0634 182 #define OID_802_11_RELOAD_DEFAULTS 0x0635 183 #define RT_OID_802_11_QUERY_APSD_SETTING 0x0636 184 #define RT_OID_802_11_SET_APSD_SETTING 0x0637 185 #define RT_OID_802_11_QUERY_APSD_PSM 0x0638 186 #define RT_OID_802_11_SET_APSD_PSM 0x0639 187 #define RT_OID_802_11_QUERY_DLS 0x063A 188 #define RT_OID_802_11_SET_DLS 0x063B 189 #define RT_OID_802_11_QUERY_DLS_PARAM 0x063C 190 #define RT_OID_802_11_SET_DLS_PARAM 0x063D 191 #define RT_OID_802_11_QUERY_WMM 0x063E 192 #define RT_OID_802_11_SET_WMM 0x063F 193 #define RT_OID_802_11_QUERY_IMME_BA_CAP 0x0640 194 #define RT_OID_802_11_SET_IMME_BA_CAP 0x0641 195 #define RT_OID_802_11_QUERY_BATABLE 0x0642 196 #define RT_OID_802_11_ADD_IMME_BA 0x0643 197 #define RT_OID_802_11_TEAR_IMME_BA 0x0644 198 #define RT_OID_DRIVER_DEVICE_NAME 0x0645 199 #define RT_OID_802_11_QUERY_DAT_HT_PHYMODE 0x0646 200 #define RT_OID_QUERY_MULTIPLE_CARD_SUPPORT 0x0647 201 202 // Ralink defined OIDs 203 // Dennis Lee move to platform specific 204 205 #define RT_OID_802_11_BSSID (OID_GET_SET_TOGGLE | OID_802_11_BSSID) 206 #define RT_OID_802_11_SSID (OID_GET_SET_TOGGLE | OID_802_11_SSID) 207 #define RT_OID_802_11_INFRASTRUCTURE_MODE (OID_GET_SET_TOGGLE | OID_802_11_INFRASTRUCTURE_MODE) 208 #define RT_OID_802_11_ADD_WEP (OID_GET_SET_TOGGLE | OID_802_11_ADD_WEP) 209 #define RT_OID_802_11_ADD_KEY (OID_GET_SET_TOGGLE | OID_802_11_ADD_KEY) 210 #define RT_OID_802_11_REMOVE_WEP (OID_GET_SET_TOGGLE | OID_802_11_REMOVE_WEP) 211 #define RT_OID_802_11_REMOVE_KEY (OID_GET_SET_TOGGLE | OID_802_11_REMOVE_KEY) 212 #define RT_OID_802_11_DISASSOCIATE (OID_GET_SET_TOGGLE | OID_802_11_DISASSOCIATE) 213 #define RT_OID_802_11_AUTHENTICATION_MODE (OID_GET_SET_TOGGLE | OID_802_11_AUTHENTICATION_MODE) 214 #define RT_OID_802_11_PRIVACY_FILTER (OID_GET_SET_TOGGLE | OID_802_11_PRIVACY_FILTER) 215 #define RT_OID_802_11_BSSID_LIST_SCAN (OID_GET_SET_TOGGLE | OID_802_11_BSSID_LIST_SCAN) 216 #define RT_OID_802_11_WEP_STATUS (OID_GET_SET_TOGGLE | OID_802_11_WEP_STATUS) 217 #define RT_OID_802_11_RELOAD_DEFAULTS (OID_GET_SET_TOGGLE | OID_802_11_RELOAD_DEFAULTS) 218 #define RT_OID_802_11_NETWORK_TYPE_IN_USE (OID_GET_SET_TOGGLE | OID_802_11_NETWORK_TYPE_IN_USE) 219 #define RT_OID_802_11_TX_POWER_LEVEL (OID_GET_SET_TOGGLE | OID_802_11_TX_POWER_LEVEL) 220 #define RT_OID_802_11_RSSI_TRIGGER (OID_GET_SET_TOGGLE | OID_802_11_RSSI_TRIGGER) 221 #define RT_OID_802_11_FRAGMENTATION_THRESHOLD (OID_GET_SET_TOGGLE | OID_802_11_FRAGMENTATION_THRESHOLD) 222 #define RT_OID_802_11_RTS_THRESHOLD (OID_GET_SET_TOGGLE | OID_802_11_RTS_THRESHOLD) 223 #define RT_OID_802_11_RX_ANTENNA_SELECTED (OID_GET_SET_TOGGLE | OID_802_11_RX_ANTENNA_SELECTED) 224 #define RT_OID_802_11_TX_ANTENNA_SELECTED (OID_GET_SET_TOGGLE | OID_802_11_TX_ANTENNA_SELECTED) 225 #define RT_OID_802_11_SUPPORTED_RATES (OID_GET_SET_TOGGLE | OID_802_11_SUPPORTED_RATES) 226 #define RT_OID_802_11_DESIRED_RATES (OID_GET_SET_TOGGLE | OID_802_11_DESIRED_RATES) 227 #define RT_OID_802_11_CONFIGURATION (OID_GET_SET_TOGGLE | OID_802_11_CONFIGURATION) 228 #define RT_OID_802_11_POWER_MODE (OID_GET_SET_TOGGLE | OID_802_11_POWER_MODE) 229 230 typedef enum _NDIS_802_11_STATUS_TYPE 231 { 232 Ndis802_11StatusType_Authentication, 233 Ndis802_11StatusType_MediaStreamMode, 234 Ndis802_11StatusType_PMKID_CandidateList, 235 Ndis802_11StatusTypeMax // not a real type, defined as an upper bound 236 } NDIS_802_11_STATUS_TYPE, *PNDIS_802_11_STATUS_TYPE; 237 238 typedef UCHAR NDIS_802_11_MAC_ADDRESS[6]; 239 240 typedef struct _NDIS_802_11_STATUS_INDICATION 241 { 242 NDIS_802_11_STATUS_TYPE StatusType; 243 } NDIS_802_11_STATUS_INDICATION, *PNDIS_802_11_STATUS_INDICATION; 244 245 // mask for authentication/integrity fields 246 #define NDIS_802_11_AUTH_REQUEST_AUTH_FIELDS 0x0f 247 248 #define NDIS_802_11_AUTH_REQUEST_REAUTH 0x01 249 #define NDIS_802_11_AUTH_REQUEST_KEYUPDATE 0x02 250 #define NDIS_802_11_AUTH_REQUEST_PAIRWISE_ERROR 0x06 251 #define NDIS_802_11_AUTH_REQUEST_GROUP_ERROR 0x0E 252 253 typedef struct _NDIS_802_11_AUTHENTICATION_REQUEST 254 { 255 ULONG Length; // Length of structure 256 NDIS_802_11_MAC_ADDRESS Bssid; 257 ULONG Flags; 258 } NDIS_802_11_AUTHENTICATION_REQUEST, *PNDIS_802_11_AUTHENTICATION_REQUEST; 259 260 //Added new types for PMKID Candidate lists. 261 typedef struct _PMKID_CANDIDATE { 262 NDIS_802_11_MAC_ADDRESS BSSID; 263 ULONG Flags; 264 } PMKID_CANDIDATE, *PPMKID_CANDIDATE; 265 266 typedef struct _NDIS_802_11_PMKID_CANDIDATE_LIST 267 { 268 ULONG Version; // Version of the structure 269 ULONG NumCandidates; // No. of pmkid candidates 270 PMKID_CANDIDATE CandidateList[1]; 271 } NDIS_802_11_PMKID_CANDIDATE_LIST, *PNDIS_802_11_PMKID_CANDIDATE_LIST; 272 273 //Flags for PMKID Candidate list structure 274 #define NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED 0x01 275 276 // Added new types for OFDM 5G and 2.4G 277 typedef enum _NDIS_802_11_NETWORK_TYPE 278 { 279 Ndis802_11FH, 280 Ndis802_11DS, 281 Ndis802_11OFDM5, 282 Ndis802_11OFDM5_N, 283 Ndis802_11OFDM24, 284 Ndis802_11OFDM24_N, 285 Ndis802_11Automode, 286 Ndis802_11NetworkTypeMax // not a real type, defined as an upper bound 287 } NDIS_802_11_NETWORK_TYPE, *PNDIS_802_11_NETWORK_TYPE; 288 289 typedef struct _NDIS_802_11_NETWORK_TYPE_LIST 290 { 291 UINT NumberOfItems; // in list below, at least 1 292 NDIS_802_11_NETWORK_TYPE NetworkType [1]; 293 } NDIS_802_11_NETWORK_TYPE_LIST, *PNDIS_802_11_NETWORK_TYPE_LIST; 294 295 typedef enum _NDIS_802_11_POWER_MODE 296 { 297 Ndis802_11PowerModeCAM, 298 Ndis802_11PowerModeMAX_PSP, 299 Ndis802_11PowerModeFast_PSP, 300 Ndis802_11PowerModeLegacy_PSP, 301 Ndis802_11PowerModeMax // not a real mode, defined as an upper bound 302 } NDIS_802_11_POWER_MODE, *PNDIS_802_11_POWER_MODE; 303 304 typedef ULONG NDIS_802_11_TX_POWER_LEVEL; // in milliwatts 305 306 // 307 // Received Signal Strength Indication 308 // 309 typedef LONG NDIS_802_11_RSSI; // in dBm 310 311 typedef struct _NDIS_802_11_CONFIGURATION_FH 312 { 313 ULONG Length; // Length of structure 314 ULONG HopPattern; // As defined by 802.11, MSB set 315 ULONG HopSet; // to one if non-802.11 316 ULONG DwellTime; // units are Kusec 317 } NDIS_802_11_CONFIGURATION_FH, *PNDIS_802_11_CONFIGURATION_FH; 318 319 typedef struct _NDIS_802_11_CONFIGURATION 320 { 321 ULONG Length; // Length of structure 322 ULONG BeaconPeriod; // units are Kusec 323 ULONG ATIMWindow; // units are Kusec 324 ULONG DSConfig; // Frequency, units are kHz 325 NDIS_802_11_CONFIGURATION_FH FHConfig; 326 } NDIS_802_11_CONFIGURATION, *PNDIS_802_11_CONFIGURATION; 327 328 typedef struct _NDIS_802_11_STATISTICS 329 { 330 ULONG Length; // Length of structure 331 LARGE_INTEGER TransmittedFragmentCount; 332 LARGE_INTEGER MulticastTransmittedFrameCount; 333 LARGE_INTEGER FailedCount; 334 LARGE_INTEGER RetryCount; 335 LARGE_INTEGER MultipleRetryCount; 336 LARGE_INTEGER RTSSuccessCount; 337 LARGE_INTEGER RTSFailureCount; 338 LARGE_INTEGER ACKFailureCount; 339 LARGE_INTEGER FrameDuplicateCount; 340 LARGE_INTEGER ReceivedFragmentCount; 341 LARGE_INTEGER MulticastReceivedFrameCount; 342 LARGE_INTEGER FCSErrorCount; 343 LARGE_INTEGER TKIPLocalMICFailures; 344 LARGE_INTEGER TKIPRemoteMICErrors; 345 LARGE_INTEGER TKIPICVErrors; 346 LARGE_INTEGER TKIPCounterMeasuresInvoked; 347 LARGE_INTEGER TKIPReplays; 348 LARGE_INTEGER CCMPFormatErrors; 349 LARGE_INTEGER CCMPReplays; 350 LARGE_INTEGER CCMPDecryptErrors; 351 LARGE_INTEGER FourWayHandshakeFailures; 352 } NDIS_802_11_STATISTICS, *PNDIS_802_11_STATISTICS; 353 354 typedef ULONG NDIS_802_11_KEY_INDEX; 355 typedef ULONGLONG NDIS_802_11_KEY_RSC; 356 357 #define MAX_RADIUS_SRV_NUM 2 // 802.1x failover number 358 359 typedef struct PACKED _RADIUS_SRV_INFO { 360 UINT32 radius_ip; 361 UINT32 radius_port; 362 UCHAR radius_key[64]; 363 UCHAR radius_key_len; 364 } RADIUS_SRV_INFO, *PRADIUS_SRV_INFO; 365 366 typedef struct PACKED _RADIUS_KEY_INFO 367 { 368 UCHAR radius_srv_num; 369 RADIUS_SRV_INFO radius_srv_info[MAX_RADIUS_SRV_NUM]; 370 UCHAR ieee8021xWEP; // dynamic WEP 371 UCHAR key_index; 372 UCHAR key_length; // length of key in bytes 373 UCHAR key_material[13]; 374 } RADIUS_KEY_INFO, *PRADIUS_KEY_INFO; 375 376 // It's used by 802.1x daemon to require relative configuration 377 typedef struct PACKED _RADIUS_CONF 378 { 379 UINT32 Length; // Length of this structure 380 UCHAR mbss_num; // indicate multiple BSS number 381 UINT32 own_ip_addr; 382 UINT32 retry_interval; 383 UINT32 session_timeout_interval; 384 UCHAR EAPifname[IFNAMSIZ]; 385 UCHAR EAPifname_len; 386 UCHAR PreAuthifname[IFNAMSIZ]; 387 UCHAR PreAuthifname_len; 388 RADIUS_KEY_INFO RadiusInfo[8/*MAX_MBSSID_NUM*/]; 389 } RADIUS_CONF, *PRADIUS_CONF; 390 391 392 393 #ifdef CONFIG_STA_SUPPORT 394 // Key mapping keys require a BSSID 395 typedef struct _NDIS_802_11_KEY 396 { 397 UINT Length; // Length of this structure 398 UINT KeyIndex; 399 UINT KeyLength; // length of key in bytes 400 NDIS_802_11_MAC_ADDRESS BSSID; 401 NDIS_802_11_KEY_RSC KeyRSC; 402 UCHAR KeyMaterial[1]; // variable length depending on above field 403 } NDIS_802_11_KEY, *PNDIS_802_11_KEY; 404 #endif // CONFIG_STA_SUPPORT // 405 406 typedef struct _NDIS_802_11_REMOVE_KEY 407 { 408 UINT Length; // Length of this structure 409 UINT KeyIndex; 410 NDIS_802_11_MAC_ADDRESS BSSID; 411 } NDIS_802_11_REMOVE_KEY, *PNDIS_802_11_REMOVE_KEY; 412 413 typedef struct _NDIS_802_11_WEP 414 { 415 UINT Length; // Length of this structure 416 UINT KeyIndex; // 0 is the per-client key, 1-N are the 417 // global keys 418 UINT KeyLength; // length of key in bytes 419 UCHAR KeyMaterial[1];// variable length depending on above field 420 } NDIS_802_11_WEP, *PNDIS_802_11_WEP; 421 422 423 typedef enum _NDIS_802_11_NETWORK_INFRASTRUCTURE 424 { 425 Ndis802_11IBSS, 426 Ndis802_11Infrastructure, 427 Ndis802_11AutoUnknown, 428 Ndis802_11Monitor, 429 Ndis802_11InfrastructureMax // Not a real value, defined as upper bound 430 } NDIS_802_11_NETWORK_INFRASTRUCTURE, *PNDIS_802_11_NETWORK_INFRASTRUCTURE; 431 432 // Add new authentication modes 433 typedef enum _NDIS_802_11_AUTHENTICATION_MODE 434 { 435 Ndis802_11AuthModeOpen, 436 Ndis802_11AuthModeShared, 437 Ndis802_11AuthModeAutoSwitch, 438 Ndis802_11AuthModeWPA, 439 Ndis802_11AuthModeWPAPSK, 440 Ndis802_11AuthModeWPANone, 441 Ndis802_11AuthModeWPA2, 442 Ndis802_11AuthModeWPA2PSK, 443 Ndis802_11AuthModeWPA1WPA2, 444 Ndis802_11AuthModeWPA1PSKWPA2PSK, 445 Ndis802_11AuthModeMax // Not a real mode, defined as upper bound 446 } NDIS_802_11_AUTHENTICATION_MODE, *PNDIS_802_11_AUTHENTICATION_MODE; 447 448 typedef UCHAR NDIS_802_11_RATES[NDIS_802_11_LENGTH_RATES]; // Set of 8 data rates 449 typedef UCHAR NDIS_802_11_RATES_EX[NDIS_802_11_LENGTH_RATES_EX]; // Set of 16 data rates 450 451 typedef struct PACKED _NDIS_802_11_SSID 452 { 453 UINT SsidLength; // length of SSID field below, in bytes; 454 // this can be zero. 455 UCHAR Ssid[NDIS_802_11_LENGTH_SSID]; // SSID information field 456 } NDIS_802_11_SSID, *PNDIS_802_11_SSID; 457 458 459 typedef struct PACKED _NDIS_WLAN_BSSID 460 { 461 ULONG Length; // Length of this structure 462 NDIS_802_11_MAC_ADDRESS MacAddress; // BSSID 463 UCHAR Reserved[2]; 464 NDIS_802_11_SSID Ssid; // SSID 465 ULONG Privacy; // WEP encryption requirement 466 NDIS_802_11_RSSI Rssi; // receive signal strength in dBm 467 NDIS_802_11_NETWORK_TYPE NetworkTypeInUse; 468 NDIS_802_11_CONFIGURATION Configuration; 469 NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode; 470 NDIS_802_11_RATES SupportedRates; 471 } NDIS_WLAN_BSSID, *PNDIS_WLAN_BSSID; 472 473 typedef struct PACKED _NDIS_802_11_BSSID_LIST 474 { 475 UINT NumberOfItems; // in list below, at least 1 476 NDIS_WLAN_BSSID Bssid[1]; 477 } NDIS_802_11_BSSID_LIST, *PNDIS_802_11_BSSID_LIST; 478 479 // Added Capabilities, IELength and IEs for each BSSID 480 typedef struct PACKED _NDIS_WLAN_BSSID_EX 481 { 482 ULONG Length; // Length of this structure 483 NDIS_802_11_MAC_ADDRESS MacAddress; // BSSID 484 UCHAR Reserved[2]; 485 NDIS_802_11_SSID Ssid; // SSID 486 UINT Privacy; // WEP encryption requirement 487 NDIS_802_11_RSSI Rssi; // receive signal 488 // strength in dBm 489 NDIS_802_11_NETWORK_TYPE NetworkTypeInUse; 490 NDIS_802_11_CONFIGURATION Configuration; 491 NDIS_802_11_NETWORK_INFRASTRUCTURE InfrastructureMode; 492 NDIS_802_11_RATES_EX SupportedRates; 493 ULONG IELength; 494 UCHAR IEs[1]; 495 } NDIS_WLAN_BSSID_EX, *PNDIS_WLAN_BSSID_EX; 496 497 typedef struct PACKED _NDIS_802_11_BSSID_LIST_EX 498 { 499 UINT NumberOfItems; // in list below, at least 1 500 NDIS_WLAN_BSSID_EX Bssid[1]; 501 } NDIS_802_11_BSSID_LIST_EX, *PNDIS_802_11_BSSID_LIST_EX; 502 503 typedef struct PACKED _NDIS_802_11_FIXED_IEs 504 { 505 UCHAR Timestamp[8]; 506 USHORT BeaconInterval; 507 USHORT Capabilities; 508 } NDIS_802_11_FIXED_IEs, *PNDIS_802_11_FIXED_IEs; 509 510 typedef struct _NDIS_802_11_VARIABLE_IEs 511 { 512 UCHAR ElementID; 513 UCHAR Length; // Number of bytes in data field 514 UCHAR data[1]; 515 } NDIS_802_11_VARIABLE_IEs, *PNDIS_802_11_VARIABLE_IEs; 516 517 typedef ULONG NDIS_802_11_FRAGMENTATION_THRESHOLD; 518 519 typedef ULONG NDIS_802_11_RTS_THRESHOLD; 520 521 typedef ULONG NDIS_802_11_ANTENNA; 522 523 typedef enum _NDIS_802_11_PRIVACY_FILTER 524 { 525 Ndis802_11PrivFilterAcceptAll, 526 Ndis802_11PrivFilter8021xWEP 527 } NDIS_802_11_PRIVACY_FILTER, *PNDIS_802_11_PRIVACY_FILTER; 528 529 // Added new encryption types 530 // Also aliased typedef to new name 531 typedef enum _NDIS_802_11_WEP_STATUS 532 { 533 Ndis802_11WEPEnabled, 534 Ndis802_11Encryption1Enabled = Ndis802_11WEPEnabled, 535 Ndis802_11WEPDisabled, 536 Ndis802_11EncryptionDisabled = Ndis802_11WEPDisabled, 537 Ndis802_11WEPKeyAbsent, 538 Ndis802_11Encryption1KeyAbsent = Ndis802_11WEPKeyAbsent, 539 Ndis802_11WEPNotSupported, 540 Ndis802_11EncryptionNotSupported = Ndis802_11WEPNotSupported, 541 Ndis802_11Encryption2Enabled, 542 Ndis802_11Encryption2KeyAbsent, 543 Ndis802_11Encryption3Enabled, 544 Ndis802_11Encryption3KeyAbsent, 545 Ndis802_11Encryption4Enabled, // TKIP or AES mix 546 Ndis802_11Encryption4KeyAbsent, 547 } NDIS_802_11_WEP_STATUS, *PNDIS_802_11_WEP_STATUS, 548 NDIS_802_11_ENCRYPTION_STATUS, *PNDIS_802_11_ENCRYPTION_STATUS; 549 550 typedef enum _NDIS_802_11_RELOAD_DEFAULTS 551 { 552 Ndis802_11ReloadWEPKeys 553 } NDIS_802_11_RELOAD_DEFAULTS, *PNDIS_802_11_RELOAD_DEFAULTS; 554 555 #define NDIS_802_11_AI_REQFI_CAPABILITIES 1 556 #define NDIS_802_11_AI_REQFI_LISTENINTERVAL 2 557 #define NDIS_802_11_AI_REQFI_CURRENTAPADDRESS 4 558 559 #define NDIS_802_11_AI_RESFI_CAPABILITIES 1 560 #define NDIS_802_11_AI_RESFI_STATUSCODE 2 561 #define NDIS_802_11_AI_RESFI_ASSOCIATIONID 4 562 563 typedef struct _NDIS_802_11_AI_REQFI 564 { 565 USHORT Capabilities; 566 USHORT ListenInterval; 567 NDIS_802_11_MAC_ADDRESS CurrentAPAddress; 568 } NDIS_802_11_AI_REQFI, *PNDIS_802_11_AI_REQFI; 569 570 typedef struct _NDIS_802_11_AI_RESFI 571 { 572 USHORT Capabilities; 573 USHORT StatusCode; 574 USHORT AssociationId; 575 } NDIS_802_11_AI_RESFI, *PNDIS_802_11_AI_RESFI; 576 577 typedef struct _NDIS_802_11_ASSOCIATION_INFORMATION 578 { 579 ULONG Length; 580 USHORT AvailableRequestFixedIEs; 581 NDIS_802_11_AI_REQFI RequestFixedIEs; 582 ULONG RequestIELength; 583 ULONG OffsetRequestIEs; 584 USHORT AvailableResponseFixedIEs; 585 NDIS_802_11_AI_RESFI ResponseFixedIEs; 586 ULONG ResponseIELength; 587 ULONG OffsetResponseIEs; 588 } NDIS_802_11_ASSOCIATION_INFORMATION, *PNDIS_802_11_ASSOCIATION_INFORMATION; 589 590 typedef struct _NDIS_802_11_AUTHENTICATION_EVENT 591 { 592 NDIS_802_11_STATUS_INDICATION Status; 593 NDIS_802_11_AUTHENTICATION_REQUEST Request[1]; 594 } NDIS_802_11_AUTHENTICATION_EVENT, *PNDIS_802_11_AUTHENTICATION_EVENT; 595 596 // 802.11 Media stream constraints, associated with OID_802_11_MEDIA_STREAM_MODE 597 typedef enum _NDIS_802_11_MEDIA_STREAM_MODE 598 { 599 Ndis802_11MediaStreamOff, 600 Ndis802_11MediaStreamOn, 601 } NDIS_802_11_MEDIA_STREAM_MODE, *PNDIS_802_11_MEDIA_STREAM_MODE; 602 603 // PMKID Structures 604 typedef UCHAR NDIS_802_11_PMKID_VALUE[16]; 605 606 #ifdef CONFIG_STA_SUPPORT 607 typedef struct _BSSID_INFO 608 { 609 NDIS_802_11_MAC_ADDRESS BSSID; 610 NDIS_802_11_PMKID_VALUE PMKID; 611 } BSSID_INFO, *PBSSID_INFO; 612 613 typedef struct _NDIS_802_11_PMKID 614 { 615 UINT Length; 616 UINT BSSIDInfoCount; 617 BSSID_INFO BSSIDInfo[1]; 618 } NDIS_802_11_PMKID, *PNDIS_802_11_PMKID; 619 #endif // CONFIG_STA_SUPPORT // 620 621 622 typedef struct _NDIS_802_11_AUTHENTICATION_ENCRYPTION 623 { 624 NDIS_802_11_AUTHENTICATION_MODE AuthModeSupported; 625 NDIS_802_11_ENCRYPTION_STATUS EncryptStatusSupported; 626 } NDIS_802_11_AUTHENTICATION_ENCRYPTION, *PNDIS_802_11_AUTHENTICATION_ENCRYPTION; 627 628 typedef struct _NDIS_802_11_CAPABILITY 629 { 630 ULONG Length; 631 ULONG Version; 632 ULONG NoOfPMKIDs; 633 ULONG NoOfAuthEncryptPairsSupported; 634 NDIS_802_11_AUTHENTICATION_ENCRYPTION AuthenticationEncryptionSupported[1]; 635 } NDIS_802_11_CAPABILITY, *PNDIS_802_11_CAPABILITY; 636 637 //#endif //of WIN 2k 638 #endif //UNDER_CE 639 640 #if WIRELESS_EXT <= 11 641 #ifndef SIOCDEVPRIVATE 642 #define SIOCDEVPRIVATE 0x8BE0 643 #endif 644 #define SIOCIWFIRSTPRIV SIOCDEVPRIVATE 645 #endif 646 647 #ifdef CONFIG_STA_SUPPORT 648 #define RTPRIV_IOCTL_SET (SIOCIWFIRSTPRIV + 0x02) 649 650 #ifdef DBG 651 #define RTPRIV_IOCTL_BBP (SIOCIWFIRSTPRIV + 0x03) 652 #define RTPRIV_IOCTL_MAC (SIOCIWFIRSTPRIV + 0x05) 653 #define RTPRIV_IOCTL_E2P (SIOCIWFIRSTPRIV + 0x07) 654 #endif 655 656 #ifdef RALINK_ATE 657 #ifdef RALINK_28xx_QA 658 #define RTPRIV_IOCTL_ATE (SIOCIWFIRSTPRIV + 0x08) 659 #endif // RALINK_28xx_QA // 660 #endif // RALINK_ATE // 661 662 #define RTPRIV_IOCTL_STATISTICS (SIOCIWFIRSTPRIV + 0x09) 663 #define RTPRIV_IOCTL_ADD_PMKID_CACHE (SIOCIWFIRSTPRIV + 0x0A) 664 #define RTPRIV_IOCTL_RADIUS_DATA (SIOCIWFIRSTPRIV + 0x0C) 665 #define RTPRIV_IOCTL_GSITESURVEY (SIOCIWFIRSTPRIV + 0x0D) 666 #define RT_PRIV_IOCTL (SIOCIWFIRSTPRIV + 0x0E) // Sync. with RT61 (for wpa_supplicant) 667 #define RTPRIV_IOCTL_GET_MAC_TABLE (SIOCIWFIRSTPRIV + 0x0F) 668 669 #define RTPRIV_IOCTL_SHOW (SIOCIWFIRSTPRIV + 0x11) 670 enum { 671 SHOW_CONN_STATUS = 4, 672 SHOW_DRVIER_VERION = 5, 673 SHOW_BA_INFO = 6, 674 SHOW_DESC_INFO = 7, 675 RAIO_OFF = 10, 676 RAIO_ON = 11, 677 #ifdef QOS_DLS_SUPPORT 678 SHOW_DLS_ENTRY_INFO = 19, 679 #endif // QOS_DLS_SUPPORT // 680 SHOW_CFG_VALUE = 20, 681 }; 682 683 #endif // CONFIG_STA_SUPPORT // 684 685 #ifdef SNMP_SUPPORT 686 //SNMP ieee 802dot11, kathy , 2008_0220 687 // dot11res(3) 688 #define RT_OID_802_11_MANUFACTUREROUI 0x0700 689 #define RT_OID_802_11_MANUFACTURERNAME 0x0701 690 #define RT_OID_802_11_RESOURCETYPEIDNAME 0x0702 691 692 // dot11smt(1) 693 #define RT_OID_802_11_PRIVACYOPTIONIMPLEMENTED 0x0703 694 #define RT_OID_802_11_POWERMANAGEMENTMODE 0x0704 695 #define OID_802_11_WEPDEFAULTKEYVALUE 0x0705 // read , write 696 #define OID_802_11_WEPDEFAULTKEYID 0x0706 697 #define RT_OID_802_11_WEPKEYMAPPINGLENGTH 0x0707 698 #define OID_802_11_SHORTRETRYLIMIT 0x0708 699 #define OID_802_11_LONGRETRYLIMIT 0x0709 700 #define RT_OID_802_11_PRODUCTID 0x0710 701 #define RT_OID_802_11_MANUFACTUREID 0x0711 702 703 // //dot11Phy(4) 704 #define OID_802_11_CURRENTCHANNEL 0x0712 705 706 //dot11mac 707 #define RT_OID_802_11_MAC_ADDRESS 0x0713 708 #endif // SNMP_SUPPORT // 709 710 #define OID_802_11_BUILD_CHANNEL_EX 0x0714 711 #define OID_802_11_GET_CH_LIST 0x0715 712 #define OID_802_11_GET_COUNTRY_CODE 0x0716 713 #define OID_802_11_GET_CHANNEL_GEOGRAPHY 0x0717 714 715 #ifdef LLTD_SUPPORT 716 // for consistency with RT61 717 #define RT_OID_GET_PHY_MODE 0x761 718 #endif // LLTD_SUPPORT // 719 720 // New for MeetingHouse Api support 721 #define OID_MH_802_1X_SUPPORTED 0xFFEDC100 722 723 // MIMO Tx parameter, ShortGI, MCS, STBC, etc. these are fields in TXWI. Don't change this definition!!! 724 typedef union _HTTRANSMIT_SETTING { 725 #ifdef RT_BIG_ENDIAN 726 struct { 727 USHORT MODE:2; // Use definition MODE_xxx. 728 USHORT TxBF:1; 729 USHORT rsv:2; 730 USHORT STBC:2; //SPACE 731 USHORT ShortGI:1; 732 USHORT BW:1; //channel bandwidth 20MHz or 40 MHz 733 USHORT MCS:7; // MCS 734 } field; 735 #else 736 struct { 737 USHORT MCS:7; // MCS 738 USHORT BW:1; //channel bandwidth 20MHz or 40 MHz 739 USHORT ShortGI:1; 740 USHORT STBC:2; //SPACE 741 USHORT rsv:2; 742 USHORT TxBF:1; 743 USHORT MODE:2; // Use definition MODE_xxx. 744 } field; 745 #endif 746 USHORT word; 747 } HTTRANSMIT_SETTING, *PHTTRANSMIT_SETTING; 748 749 typedef enum _RT_802_11_PREAMBLE { 750 Rt802_11PreambleLong, 751 Rt802_11PreambleShort, 752 Rt802_11PreambleAuto 753 } RT_802_11_PREAMBLE, *PRT_802_11_PREAMBLE; 754 755 // Only for STA, need to sync with AP 756 // 2005-03-08 match current RaConfig. 757 typedef enum _RT_802_11_PHY_MODE { 758 PHY_11BG_MIXED = 0, 759 PHY_11B, 760 PHY_11A, 761 PHY_11ABG_MIXED, 762 PHY_11G, 763 #ifdef DOT11_N_SUPPORT 764 PHY_11ABGN_MIXED, // both band 5 765 PHY_11N_2_4G, // 11n-only with 2.4G band 6 766 PHY_11GN_MIXED, // 2.4G band 7 767 PHY_11AN_MIXED, // 5G band 8 768 PHY_11BGN_MIXED, // if check 802.11b. 9 769 PHY_11AGN_MIXED, // if check 802.11b. 10 770 PHY_11N_5G, // 11n-only with 5G band 11 771 #endif // DOT11_N_SUPPORT // 772 } RT_802_11_PHY_MODE; 773 774 // put all proprietery for-query objects here to reduce # of Query_OID 775 typedef struct _RT_802_11_LINK_STATUS { 776 ULONG CurrTxRate; // in units of 0.5Mbps 777 ULONG ChannelQuality; // 0..100 % 778 ULONG TxByteCount; // both ok and fail 779 ULONG RxByteCount; // both ok and fail 780 ULONG CentralChannel; // 40MHz central channel number 781 } RT_802_11_LINK_STATUS, *PRT_802_11_LINK_STATUS; 782 783 typedef struct _RT_802_11_EVENT_LOG { 784 LARGE_INTEGER SystemTime; // timestammp via NdisGetCurrentSystemTime() 785 UCHAR Addr[MAC_ADDR_LENGTH]; 786 USHORT Event; // EVENT_xxx 787 } RT_802_11_EVENT_LOG, *PRT_802_11_EVENT_LOG; 788 789 typedef struct _RT_802_11_EVENT_TABLE { 790 ULONG Num; 791 ULONG Rsv; // to align Log[] at LARGE_INEGER boundary 792 RT_802_11_EVENT_LOG Log[MAX_NUMBER_OF_EVENT]; 793 } RT_802_11_EVENT_TABLE, PRT_802_11_EVENT_TABLE; 794 795 // MIMO Tx parameter, ShortGI, MCS, STBC, etc. these are fields in TXWI. Don't change this definition!!! 796 typedef union _MACHTTRANSMIT_SETTING { 797 struct { 798 USHORT MCS:7; // MCS 799 USHORT BW:1; //channel bandwidth 20MHz or 40 MHz 800 USHORT ShortGI:1; 801 USHORT STBC:2; //SPACE 802 USHORT rsv:3; 803 USHORT MODE:2; // Use definition MODE_xxx. 804 } field; 805 USHORT word; 806 } MACHTTRANSMIT_SETTING, *PMACHTTRANSMIT_SETTING; 807 808 typedef struct _RT_802_11_MAC_ENTRY { 809 UCHAR Addr[MAC_ADDR_LENGTH]; 810 UCHAR Aid; 811 UCHAR Psm; // 0:PWR_ACTIVE, 1:PWR_SAVE 812 UCHAR MimoPs; // 0:MMPS_STATIC, 1:MMPS_DYNAMIC, 3:MMPS_Enabled 813 CHAR AvgRssi0; 814 CHAR AvgRssi1; 815 CHAR AvgRssi2; 816 UINT32 ConnectedTime; 817 MACHTTRANSMIT_SETTING TxRate; 818 } RT_802_11_MAC_ENTRY, *PRT_802_11_MAC_ENTRY; 819 820 typedef struct _RT_802_11_MAC_TABLE { 821 ULONG Num; 822 RT_802_11_MAC_ENTRY Entry[MAX_NUMBER_OF_MAC]; 823 } RT_802_11_MAC_TABLE, *PRT_802_11_MAC_TABLE; 824 825 // structure for query/set hardware register - MAC, BBP, RF register 826 typedef struct _RT_802_11_HARDWARE_REGISTER { 827 ULONG HardwareType; // 0:MAC, 1:BBP, 2:RF register, 3:EEPROM 828 ULONG Offset; // Q/S register offset addr 829 ULONG Data; // R/W data buffer 830 } RT_802_11_HARDWARE_REGISTER, *PRT_802_11_HARDWARE_REGISTER; 831 832 typedef struct _RT_802_11_AP_CONFIG { 833 ULONG EnableTxBurst; // 0-disable, 1-enable 834 ULONG EnableTurboRate; // 0-disable, 1-enable 72/100mbps turbo rate 835 ULONG IsolateInterStaTraffic; // 0-disable, 1-enable isolation 836 ULONG HideSsid; // 0-disable, 1-enable hiding 837 ULONG UseBGProtection; // 0-AUTO, 1-always ON, 2-always OFF 838 ULONG UseShortSlotTime; // 0-no use, 1-use 9-us short slot time 839 ULONG Rsv1; // must be 0 840 ULONG SystemErrorBitmap; // ignore upon SET, return system error upon QUERY 841 } RT_802_11_AP_CONFIG, *PRT_802_11_AP_CONFIG; 842 843 // structure to query/set STA_CONFIG 844 typedef struct _RT_802_11_STA_CONFIG { 845 ULONG EnableTxBurst; // 0-disable, 1-enable 846 ULONG EnableTurboRate; // 0-disable, 1-enable 72/100mbps turbo rate 847 ULONG UseBGProtection; // 0-AUTO, 1-always ON, 2-always OFF 848 ULONG UseShortSlotTime; // 0-no use, 1-use 9-us short slot time when applicable 849 ULONG AdhocMode; // 0-11b rates only (WIFI spec), 1 - b/g mixed, 2 - g only 850 ULONG HwRadioStatus; // 0-OFF, 1-ON, default is 1, Read-Only 851 ULONG Rsv1; // must be 0 852 ULONG SystemErrorBitmap; // ignore upon SET, return system error upon QUERY 853 } RT_802_11_STA_CONFIG, *PRT_802_11_STA_CONFIG; 854 855 // 856 // For OID Query or Set about BA structure 857 // 858 typedef struct _OID_BACAP_STRUC { 859 UCHAR RxBAWinLimit; 860 UCHAR TxBAWinLimit; 861 UCHAR Policy; // 0: DELAY_BA 1:IMMED_BA (//BA Policy subfiled value in ADDBA frame) 2:BA-not use. other value invalid 862 UCHAR MpduDensity; // 0: DELAY_BA 1:IMMED_BA (//BA Policy subfiled value in ADDBA frame) 2:BA-not use. other value invalid 863 UCHAR AmsduEnable; //Enable AMSDU transmisstion 864 UCHAR AmsduSize; // 0:3839, 1:7935 bytes. UINT MSDUSizeToBytes[] = { 3839, 7935}; 865 UCHAR MMPSmode; // MIMO power save more, 0:static, 1:dynamic, 2:rsv, 3:mimo enable 866 BOOLEAN AutoBA; // Auto BA will automatically 867 } OID_BACAP_STRUC, *POID_BACAP_STRUC; 868 869 typedef struct _RT_802_11_ACL_ENTRY { 870 UCHAR Addr[MAC_ADDR_LENGTH]; 871 USHORT Rsv; 872 } RT_802_11_ACL_ENTRY, *PRT_802_11_ACL_ENTRY; 873 874 typedef struct PACKED _RT_802_11_ACL { 875 ULONG Policy; // 0-disable, 1-positive list, 2-negative list 876 ULONG Num; 877 RT_802_11_ACL_ENTRY Entry[MAX_NUMBER_OF_ACL]; 878 } RT_802_11_ACL, *PRT_802_11_ACL; 879 880 typedef struct _RT_802_11_WDS { 881 ULONG Num; 882 NDIS_802_11_MAC_ADDRESS Entry[24/*MAX_NUM_OF_WDS_LINK*/]; 883 ULONG KeyLength; 884 UCHAR KeyMaterial[32]; 885 } RT_802_11_WDS, *PRT_802_11_WDS; 886 887 typedef struct _RT_802_11_TX_RATES_ { 888 UCHAR SupRateLen; 889 UCHAR SupRate[MAX_LENGTH_OF_SUPPORT_RATES]; 890 UCHAR ExtRateLen; 891 UCHAR ExtRate[MAX_LENGTH_OF_SUPPORT_RATES]; 892 } RT_802_11_TX_RATES, *PRT_802_11_TX_RATES; 893 894 895 // Definition of extra information code 896 #define GENERAL_LINK_UP 0x0 // Link is Up 897 #define GENERAL_LINK_DOWN 0x1 // Link is Down 898 #define HW_RADIO_OFF 0x2 // Hardware radio off 899 #define SW_RADIO_OFF 0x3 // Software radio off 900 #define AUTH_FAIL 0x4 // Open authentication fail 901 #define AUTH_FAIL_KEYS 0x5 // Shared authentication fail 902 #define ASSOC_FAIL 0x6 // Association failed 903 #define EAP_MIC_FAILURE 0x7 // Deauthencation because MIC failure 904 #define EAP_4WAY_TIMEOUT 0x8 // Deauthencation on 4-way handshake timeout 905 #define EAP_GROUP_KEY_TIMEOUT 0x9 // Deauthencation on group key handshake timeout 906 #define EAP_SUCCESS 0xa // EAP succeed 907 #define DETECT_RADAR_SIGNAL 0xb // Radar signal occur in current channel 908 #define EXTRA_INFO_MAX 0xb // Indicate Last OID 909 910 #define EXTRA_INFO_CLEAR 0xffffffff 911 912 // This is OID setting structure. So only GF or MM as Mode. This is valid when our wirelss mode has 802.11n in use. 913 typedef struct { 914 RT_802_11_PHY_MODE PhyMode; // 915 UCHAR TransmitNo; 916 UCHAR HtMode; //HTMODE_GF or HTMODE_MM 917 UCHAR ExtOffset; //extension channel above or below 918 UCHAR MCS; 919 UCHAR BW; 920 UCHAR STBC; 921 UCHAR SHORTGI; 922 UCHAR rsv; 923 } OID_SET_HT_PHYMODE, *POID_SET_HT_PHYMODE; 924 925 #ifdef LLTD_SUPPORT 926 typedef struct _RT_LLTD_ASSOICATION_ENTRY { 927 UCHAR Addr[ETH_LENGTH_OF_ADDRESS]; 928 unsigned short MOR; // maximum operational rate 929 UCHAR phyMode; 930 } RT_LLTD_ASSOICATION_ENTRY, *PRT_LLTD_ASSOICATION_ENTRY; 931 932 typedef struct _RT_LLTD_ASSOICATION_TABLE { 933 unsigned int Num; 934 RT_LLTD_ASSOICATION_ENTRY Entry[MAX_NUMBER_OF_MAC]; 935 } RT_LLTD_ASSOICATION_TABLE, *PRT_LLTD_ASSOICATION_TABLE; 936 #endif // LLTD_SUPPORT // 937 938 #ifdef CONFIG_STA_SUPPORT 939 #ifdef QOS_DLS_SUPPORT 940 //rt2860, kathy 2007-0118 941 // structure for DLS 942 typedef struct _RT_802_11_DLS_UI { 943 USHORT TimeOut; // unit: second , set by UI 944 USHORT CountDownTimer; // unit: second , used by driver only 945 NDIS_802_11_MAC_ADDRESS MacAddr; // set by UI 946 UCHAR Status; // 0: none , 1: wait STAkey, 2: finish DLS setup , set by driver only 947 BOOLEAN Valid; // 1: valid , 0: invalid , set by UI, use to setup or tear down DLS link 948 } RT_802_11_DLS_UI, *PRT_802_11_DLS_UI; 949 950 typedef struct _RT_802_11_DLS_INFO { 951 RT_802_11_DLS_UI Entry[MAX_NUMBER_OF_DLS_ENTRY]; 952 UCHAR num; 953 } RT_802_11_DLS_INFO, *PRT_802_11_DLS_INFO; 954 955 typedef enum _RT_802_11_DLS_MODE { 956 DLS_NONE, 957 DLS_WAIT_KEY, 958 DLS_FINISH 959 } RT_802_11_DLS_MODE; 960 #endif // QOS_DLS_SUPPORT // 961 962 #ifdef WPA_SUPPLICANT_SUPPORT 963 #ifndef NATIVE_WPA_SUPPLICANT_SUPPORT 964 #define RT_ASSOC_EVENT_FLAG 0x0101 965 #define RT_DISASSOC_EVENT_FLAG 0x0102 966 #define RT_REQIE_EVENT_FLAG 0x0103 967 #define RT_RESPIE_EVENT_FLAG 0x0104 968 #define RT_ASSOCINFO_EVENT_FLAG 0x0105 969 #define RT_PMKIDCAND_FLAG 0x0106 970 #define RT_INTERFACE_DOWN 0x0107 971 #define RT_INTERFACE_UP 0x0108 972 #endif // NATIVE_WPA_SUPPLICANT_SUPPORT // 973 #endif // WPA_SUPPLICANT_SUPPORT // 974 #endif // CONFIG_STA_SUPPORT // 975 976 #define MAX_CUSTOM_LEN 128 977 978 #ifdef CONFIG_STA_SUPPORT 979 typedef enum _RT_802_11_D_CLIENT_MODE 980 { 981 Rt802_11_D_None, 982 Rt802_11_D_Flexible, 983 Rt802_11_D_Strict, 984 } RT_802_11_D_CLIENT_MODE, *PRT_802_11_D_CLIENT_MODE; 985 #endif // CONFIG_STA_SUPPORT // 986 987 typedef struct _RT_CHANNEL_LIST_INFO 988 { 989 UCHAR ChannelList[MAX_NUM_OF_CHS]; // list all supported channels for site survey 990 UCHAR ChannelListNum; // number of channel in ChannelList[] 991 } RT_CHANNEL_LIST_INFO, *PRT_CHANNEL_LIST_INFO; 992 993 994 #endif // _OID_H_ 995 996