1 /****************************************************************************** 2 * Copyright (c) 2013-2016 Realtek Semiconductor Corp. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 ****************************************************************************** 16 * @file wifi_constants.h 17 * @author 18 * @version 19 * @brief This file provides the data types used for wlan API. 20 ****************************************************************************** 21 */ 22 23 #ifndef _WIFI_CONSTANTS_H 24 #define _WIFI_CONSTANTS_H 25 26 /** @addtogroup nic NIC 27 * @ingroup wlan 28 * @brief NIC functions 29 * @{ 30 */ 31 32 #ifdef __cplusplus 33 extern "C" { 34 #endif 35 36 #ifndef WLAN0_NAME 37 #define WLAN0_NAME "wlan0" 38 #endif 39 #ifndef WLAN1_NAME 40 #define WLAN1_NAME "wlan1" 41 #endif 42 43 #define WEP_ENABLED 0x0001 44 #define TKIP_ENABLED 0x0002 45 #define AES_ENABLED 0x0004 46 #define WSEC_SWFLAG 0x0008 47 #define AES_CMAC_ENABLED 0x0010 48 #define ENTERPRISE_ENABLED 0x0020 49 50 #define SHARED_ENABLED 0x00008000 51 #define WPA_SECURITY 0x00200000 52 #define WPA2_SECURITY 0x00400000 53 #define WPA3_SECURITY 0x00800000 54 #define WPS_ENABLED 0x10000000 55 56 #define RTW_MAX_PSK_LEN (64) 57 #define RTW_MIN_PSK_LEN (8) 58 59 #define MCSSET_LEN 16 60 61 /** 62 * @brief The enumeration lists the results of the function. 63 */ 64 enum 65 { 66 RTW_SUCCESS = 0, /**< Success */ 67 RTW_PENDING = 1, /**< Pending */ 68 RTW_TIMEOUT = 2, /**< Timeout */ 69 RTW_PARTIAL_RESULTS = 3, /**< Partial results */ 70 RTW_INVALID_KEY = 4, /**< Invalid key */ 71 RTW_DOES_NOT_EXIST = 5, /**< Does not exist */ 72 RTW_NOT_AUTHENTICATED = 6, /**< Not authenticated */ 73 RTW_NOT_KEYED = 7, /**< Not keyed */ 74 RTW_IOCTL_FAIL = 8, /**< IOCTL fail */ 75 RTW_BUFFER_UNAVAILABLE_TEMPORARY = 9, /**< Buffer unavailable temporarily */ 76 RTW_BUFFER_UNAVAILABLE_PERMANENT = 10, /**< Buffer unavailable permanently */ 77 RTW_WPS_PBC_OVERLAP = 11, /**< WPS PBC overlap */ 78 RTW_CONNECTION_LOST = 12, /**< Connection lost */ 79 80 RTW_ERROR = -1, /**< Generic Error */ 81 RTW_BADARG = -2, /**< Bad Argument */ 82 RTW_BADOPTION = -3, /**< Bad option */ 83 RTW_NOTUP = -4, /**< Not up */ 84 RTW_NOTDOWN = -5, /**< Not down */ 85 RTW_NOTAP = -6, /**< Not AP */ 86 RTW_NOTSTA = -7, /**< Not STA */ 87 RTW_BADKEYIDX = -8, /**< BAD Key Index */ 88 RTW_RADIOOFF = -9, /**< Radio Off */ 89 RTW_NOTBANDLOCKED = -10, /**< Not band locked */ 90 RTW_NOCLK = -11, /**< No Clock */ 91 RTW_BADRATESET = -12, /**< BAD Rate valueset */ 92 RTW_BADBAND = -13, /**< BAD Band */ 93 RTW_BUFTOOSHORT = -14, /**< Buffer too short */ 94 RTW_BUFTOOLONG = -15, /**< Buffer too long */ 95 RTW_BUSY = -16, /**< Busy */ 96 RTW_NOTASSOCIATED = -17, /**< Not Associated */ 97 RTW_BADSSIDLEN = -18, /**< Bad SSID len */ 98 RTW_OUTOFRANGECHAN = -19, /**< Out of Range Channel */ 99 RTW_BADCHAN = -20, /**< Bad Channel */ 100 RTW_BADADDR = -21, /**< Bad Address */ 101 RTW_NORESOURCE = -22, /**< Not Enough Resources */ 102 RTW_UNSUPPORTED = -23, /**< Unsupported */ 103 RTW_BADLEN = -24, /**< Bad length */ 104 RTW_NOTREADY = -25, /**< Not Ready */ 105 RTW_EPERM = -26, /**< Not Permitted */ 106 RTW_NOMEM = -27, /**< No Memory */ 107 RTW_ASSOCIATED = -28, /**< Associated */ 108 RTW_RANGE = -29, /**< Not In Range */ 109 RTW_NOTFOUND = -30, /**< Not Found */ 110 RTW_WME_NOT_ENABLED = -31, /**< WME Not Enabled */ 111 RTW_TSPEC_NOTFOUND = -32, /**< TSPEC Not Found */ 112 RTW_ACM_NOTSUPPORTED = -33, /**< ACM Not Supported */ 113 RTW_NOT_WME_ASSOCIATION = -34, /**< Not WME Association */ 114 RTW_SDIO_ERROR = -35, /**< SDIO Bus Error */ 115 RTW_WLAN_DOWN = -36, /**< WLAN Not Accessible */ 116 RTW_BAD_VERSION = -37, /**< Incorrect version */ 117 RTW_TXFAIL = -38, /**< TX failure */ 118 RTW_RXFAIL = -39, /**< RX failure */ 119 RTW_NODEVICE = -40, /**< Device not present */ 120 RTW_UNFINISHED = -41, /**< To be finished */ 121 RTW_NONRESIDENT = -42, /**< access to nonresident overlay */ 122 RTW_DISABLED = -43 /**< Disabled in this build */ 123 }; 124 typedef unsigned long rtw_result_t; 125 126 /** 127 * @brief The enumeration lists the possible security types to set when connection.\n 128 * Station mode supports OPEN, WEP, and WPA2.\n 129 * AP mode support OPEN and WPA2. 130 */ 131 enum { 132 RTW_SECURITY_OPEN = 0, /**< Open security */ 133 RTW_SECURITY_WEP_PSK = WEP_ENABLED, /**< WEP Security with open authentication */ 134 RTW_SECURITY_WEP_SHARED = ( WEP_ENABLED | SHARED_ENABLED ), /**< WEP Security with shared authentication */ 135 RTW_SECURITY_WPA_TKIP_PSK = ( WPA_SECURITY | TKIP_ENABLED ), /**< WPA Security with TKIP */ 136 RTW_SECURITY_WPA_AES_PSK = ( WPA_SECURITY | AES_ENABLED ), /**< WPA Security with AES */ 137 RTW_SECURITY_WPA_MIXED_PSK = ( WPA_SECURITY | AES_ENABLED | TKIP_ENABLED ), /**< WPA Security with AES & TKIP */ 138 RTW_SECURITY_WPA2_AES_PSK = ( WPA2_SECURITY | AES_ENABLED ), /**< WPA2 Security with AES */ 139 RTW_SECURITY_WPA2_TKIP_PSK = ( WPA2_SECURITY | TKIP_ENABLED ), /**< WPA2 Security with TKIP */ 140 RTW_SECURITY_WPA2_MIXED_PSK = ( WPA2_SECURITY | AES_ENABLED | TKIP_ENABLED ), /**< WPA2 Security with AES & TKIP */ 141 RTW_SECURITY_WPA_WPA2_TKIP_PSK = ( WPA_SECURITY | WPA2_SECURITY | TKIP_ENABLED), /**< WPA/WPA2 Security with TKIP */ 142 RTW_SECURITY_WPA_WPA2_AES_PSK = ( WPA_SECURITY | WPA2_SECURITY | AES_ENABLED), /**< WPA/WPA2 Security with AES */ 143 RTW_SECURITY_WPA_WPA2_MIXED_PSK = ( WPA_SECURITY | WPA2_SECURITY | TKIP_ENABLED | AES_ENABLED), /**< WPA/WPA2 Security with AES & TKIP */ 144 RTW_SECURITY_WPA2_AES_CMAC = ( WPA2_SECURITY | AES_CMAC_ENABLED), /**< WPA2 Security with AES and Management Frame Protection */ 145 RTW_SECURITY_WPA2_ENTERPRISE = ( WPA2_SECURITY | ENTERPRISE_ENABLED ), /**< WPA2 Security with 802.1X authentication>*/ 146 RTW_SECURITY_WPA_WPA2_ENTERPRISE = ( WPA_SECURITY | WPA2_SECURITY | ENTERPRISE_ENABLED), /**<WPA/WPA2 Security with 802.1X authentication>*/ 147 148 RTW_SECURITY_WPS_OPEN = WPS_ENABLED, /**< WPS with open security */ 149 RTW_SECURITY_WPS_SECURE = (WPS_ENABLED | AES_ENABLED), /**< WPS with AES security */ 150 151 RTW_SECURITY_WPA3_AES_PSK = (WPA3_SECURITY | AES_ENABLED), /**< WPA3-AES with AES security */ 152 153 RTW_SECURITY_UNKNOWN = -1, /**< May be returned by scan function if security is unknown. Do not pass this to the join function! */ 154 155 RTW_SECURITY_FORCE_32_BIT = 0x7fffffff /**< Exists only to force rtw_security_t type to 32 bits */ 156 }; 157 typedef unsigned long rtw_security_t; 158 159 enum { 160 RTW_ENCRYPTION_UNKNOWN = 0, 161 RTW_ENCRYPTION_OPEN = 1, 162 RTW_ENCRYPTION_WEP40 = 2, 163 RTW_ENCRYPTION_WPA_TKIP = 3, 164 RTW_ENCRYPTION_WPA_AES = 4, 165 RTW_ENCRYPTION_WPA2_TKIP = 5, 166 RTW_ENCRYPTION_WPA2_AES = 6, 167 RTW_ENCRYPTION_WPA2_MIXED = 7, 168 RTW_ENCRYPTION_WEP104 = 9, 169 RTW_ENCRYPTION_UNDEF = 0xFF, 170 }; 171 typedef unsigned long rtw_encryption_t; 172 173 enum { 174 RTW_FALSE = 0, 175 RTW_TRUE = 1 176 }; 177 typedef unsigned long rtw_bool_t; 178 179 /** 180 * @brief The enumeration lists the band types. 181 */ 182 enum { 183 RTW_802_11_BAND_5GHZ = 0, /**< Denotes 5GHz radio band */ 184 RTW_802_11_BAND_2_4GHZ = 1 /**< Denotes 2.4GHz radio band */ 185 }; 186 typedef unsigned long rtw_802_11_band_t; 187 188 /** 189 * @brief The enumeration lists all the country codes able to set to Wi-Fi driver. 190 */ 191 enum { 192 /* CHANNEL PLAN */ 193 RTW_COUNTRY_WORLD1, // 0x20 194 RTW_COUNTRY_ETSI1, // 0x21 195 RTW_COUNTRY_FCC1, // 0x22 196 RTW_COUNTRY_MKK1, // 0x23 197 RTW_COUNTRY_ETSI2, // 0x24 198 RTW_COUNTRY_FCC2, // 0x2A 199 RTW_COUNTRY_WORLD2, // 0x47 200 RTW_COUNTRY_MKK2, // 0x58 201 RTW_COUNTRY_GLOBAL, // 0x41 202 203 /* SPECIAL */ 204 RTW_COUNTRY_WORLD, // WORLD1 205 RTW_COUNTRY_EU, // ETSI1 206 207 /* JAPANESE */ 208 RTW_COUNTRY_JP, // MKK1 209 210 /* FCC , 19 countries*/ 211 RTW_COUNTRY_AS, // FCC2 212 RTW_COUNTRY_BM, 213 RTW_COUNTRY_CA, 214 RTW_COUNTRY_DM, 215 RTW_COUNTRY_DO, 216 RTW_COUNTRY_FM, 217 RTW_COUNTRY_GD, 218 RTW_COUNTRY_GT, 219 RTW_COUNTRY_GU, 220 RTW_COUNTRY_HT, 221 RTW_COUNTRY_MH, 222 RTW_COUNTRY_MP, 223 RTW_COUNTRY_NI, 224 RTW_COUNTRY_PA, 225 RTW_COUNTRY_PR, 226 RTW_COUNTRY_PW, 227 RTW_COUNTRY_TW, 228 RTW_COUNTRY_US, 229 RTW_COUNTRY_VI, 230 231 /* others, ETSI */ 232 RTW_COUNTRY_AD, // ETSI1 233 RTW_COUNTRY_AE, 234 RTW_COUNTRY_AF, 235 RTW_COUNTRY_AI, 236 RTW_COUNTRY_AL, 237 RTW_COUNTRY_AM, 238 RTW_COUNTRY_AN, 239 RTW_COUNTRY_AR, 240 RTW_COUNTRY_AT, 241 RTW_COUNTRY_AU, 242 RTW_COUNTRY_AW, 243 RTW_COUNTRY_AZ, 244 RTW_COUNTRY_BA, 245 RTW_COUNTRY_BB, 246 RTW_COUNTRY_BD, 247 RTW_COUNTRY_BE, 248 RTW_COUNTRY_BF, 249 RTW_COUNTRY_BG, 250 RTW_COUNTRY_BH, 251 RTW_COUNTRY_BL, 252 RTW_COUNTRY_BN, 253 RTW_COUNTRY_BO, 254 RTW_COUNTRY_BR, 255 RTW_COUNTRY_BS, 256 RTW_COUNTRY_BT, 257 RTW_COUNTRY_BY, 258 RTW_COUNTRY_BZ, 259 RTW_COUNTRY_CF, 260 RTW_COUNTRY_CH, 261 RTW_COUNTRY_CI, 262 RTW_COUNTRY_CL, 263 RTW_COUNTRY_CN, 264 RTW_COUNTRY_CO, 265 RTW_COUNTRY_CR, 266 RTW_COUNTRY_CX, 267 RTW_COUNTRY_CY, 268 RTW_COUNTRY_CZ, 269 RTW_COUNTRY_DE, 270 RTW_COUNTRY_DK, 271 RTW_COUNTRY_DZ, 272 RTW_COUNTRY_EC, 273 RTW_COUNTRY_EE, 274 RTW_COUNTRY_EG, 275 RTW_COUNTRY_ES, 276 RTW_COUNTRY_ET, 277 RTW_COUNTRY_FI, 278 RTW_COUNTRY_FR, 279 RTW_COUNTRY_GB, 280 RTW_COUNTRY_GE, 281 RTW_COUNTRY_GF, 282 RTW_COUNTRY_GH, 283 RTW_COUNTRY_GL, 284 RTW_COUNTRY_GP, 285 RTW_COUNTRY_GR, 286 RTW_COUNTRY_GY, 287 RTW_COUNTRY_HK, 288 RTW_COUNTRY_HN, 289 RTW_COUNTRY_HR, 290 RTW_COUNTRY_HU, 291 RTW_COUNTRY_ID, 292 RTW_COUNTRY_IE, 293 RTW_COUNTRY_IL, 294 RTW_COUNTRY_IN, 295 RTW_COUNTRY_IQ, 296 RTW_COUNTRY_IR, 297 RTW_COUNTRY_IS, 298 RTW_COUNTRY_IT, 299 RTW_COUNTRY_JM, 300 RTW_COUNTRY_JO, 301 RTW_COUNTRY_KE, 302 RTW_COUNTRY_KH, 303 RTW_COUNTRY_KN, 304 RTW_COUNTRY_KP, 305 RTW_COUNTRY_KR, 306 RTW_COUNTRY_KW, 307 RTW_COUNTRY_KY, 308 RTW_COUNTRY_KZ, 309 RTW_COUNTRY_LA, 310 RTW_COUNTRY_LB, 311 RTW_COUNTRY_LC, 312 RTW_COUNTRY_LI, 313 RTW_COUNTRY_LK, 314 RTW_COUNTRY_LR, 315 RTW_COUNTRY_LS, 316 RTW_COUNTRY_LT, 317 RTW_COUNTRY_LU, 318 RTW_COUNTRY_LV, 319 RTW_COUNTRY_MA, 320 RTW_COUNTRY_MC, 321 RTW_COUNTRY_MD, 322 RTW_COUNTRY_ME, 323 RTW_COUNTRY_MF, 324 RTW_COUNTRY_MK, 325 RTW_COUNTRY_MN, 326 RTW_COUNTRY_MO, 327 RTW_COUNTRY_MQ, 328 RTW_COUNTRY_MR, 329 RTW_COUNTRY_MT, 330 RTW_COUNTRY_MU, 331 RTW_COUNTRY_MV, 332 RTW_COUNTRY_MW, 333 RTW_COUNTRY_MX, 334 RTW_COUNTRY_MY, 335 RTW_COUNTRY_NG, 336 RTW_COUNTRY_NL, 337 RTW_COUNTRY_NO, 338 RTW_COUNTRY_NP, 339 RTW_COUNTRY_NZ, 340 RTW_COUNTRY_OM, 341 RTW_COUNTRY_PE, 342 RTW_COUNTRY_PF, 343 RTW_COUNTRY_PG, 344 RTW_COUNTRY_PH, 345 RTW_COUNTRY_PK, 346 RTW_COUNTRY_PL, 347 RTW_COUNTRY_PM, 348 RTW_COUNTRY_PT, 349 RTW_COUNTRY_PY, 350 RTW_COUNTRY_QA, 351 RTW_COUNTRY_RS, 352 RTW_COUNTRY_RU, 353 RTW_COUNTRY_RW, 354 RTW_COUNTRY_SA, 355 RTW_COUNTRY_SE, 356 RTW_COUNTRY_SG, 357 RTW_COUNTRY_SI, 358 RTW_COUNTRY_SK, 359 RTW_COUNTRY_SN, 360 RTW_COUNTRY_SR, 361 RTW_COUNTRY_SV, 362 RTW_COUNTRY_SY, 363 RTW_COUNTRY_TC, 364 RTW_COUNTRY_TD, 365 RTW_COUNTRY_TG, 366 RTW_COUNTRY_TH, 367 RTW_COUNTRY_TN, 368 RTW_COUNTRY_TR, 369 RTW_COUNTRY_TT, 370 RTW_COUNTRY_TZ, 371 RTW_COUNTRY_UA, 372 RTW_COUNTRY_UG, 373 RTW_COUNTRY_UY, 374 RTW_COUNTRY_UZ, 375 RTW_COUNTRY_VC, 376 RTW_COUNTRY_VE, 377 RTW_COUNTRY_VN, 378 RTW_COUNTRY_VU, 379 RTW_COUNTRY_WF, 380 RTW_COUNTRY_WS, 381 RTW_COUNTRY_YE, 382 RTW_COUNTRY_YT, 383 RTW_COUNTRY_ZA, 384 RTW_COUNTRY_ZW, 385 386 RTW_COUNTRY_MAX 387 388 }; 389 typedef unsigned long rtw_country_code_t; 390 391 /** 392 * @brief The enumeration lists the adaptivity types. 393 */ 394 enum { 395 RTW_ADAPTIVITY_DISABLE = 0, 396 RTW_ADAPTIVITY_NORMAL, // CE 397 RTW_ADAPTIVITY_CARRIER_SENSE // MKK 398 }; 399 typedef unsigned long rtw_adaptivity_mode_t; 400 401 /** 402 * @brief The enumeration lists the trp_tis types. 403 */ 404 enum { 405 RTW_TRP_TIS_DISABLE = 0, 406 RTW_TRP_TIS_NORMAL, 407 RTW_TRP_TIS_DYNAMIC, // enable dynamic mechanism 408 RTW_TRP_TIS_FIX_ACK_RATE, // fix ack rate to 6M 409 }; 410 typedef unsigned long rtw_trp_tis_mode_t; 411 412 413 /** 414 * @brief The enumeration lists the supported operation mode by WIFI driver, 415 * including station and AP mode. 416 */ 417 enum { 418 RTW_MODE_NONE = 0, 419 RTW_MODE_STA, 420 RTW_MODE_AP, 421 RTW_MODE_STA_AP, 422 RTW_MODE_PROMISC, 423 RTW_MODE_P2P 424 }; 425 typedef unsigned long rtw_mode_t; 426 427 enum { 428 RTW_SCAN_FULL = 0, 429 RTW_SCAN_SOCIAL, 430 RTW_SCAN_ONE 431 }; 432 typedef unsigned long rtw_scan_mode_t; 433 434 /** 435 * @brief The enumeration lists the supported autoreconnect mode by WIFI driver. 436 */ 437 typedef enum{ 438 RTW_AUTORECONNECT_DISABLE, 439 RTW_AUTORECONNECT_FINITE, 440 RTW_AUTORECONNECT_INFINITE 441 } rtw_autoreconnect_mode_t; 442 443 /** 444 * @brief The enumeration lists the status to describe the connection link. 445 */ 446 enum { 447 RTW_LINK_DISCONNECTED = 0, 448 RTW_LINK_CONNECTED 449 }; 450 typedef unsigned long rtw_link_status_t; 451 452 /** 453 * @brief The enumeration lists the scan types. 454 */ 455 enum { 456 RTW_SCAN_TYPE_ACTIVE = 0x00, /**< Actively scan a network by sending 802.11 probe(s) */ 457 RTW_SCAN_TYPE_PASSIVE = 0x01, /**< Passively scan a network by listening for beacons from APs */ 458 RTW_SCAN_TYPE_PROHIBITED_CHANNELS = 0x04 /**< Passively scan on channels not enabled by the country code */ 459 }; 460 typedef unsigned long rtw_scan_type_t; 461 462 /** 463 * @brief The enumeration lists the bss types. 464 */ 465 enum { 466 RTW_BSS_TYPE_INFRASTRUCTURE = 0, /**< Denotes infrastructure network */ 467 RTW_BSS_TYPE_ADHOC = 1, /**< Denotes an 802.11 ad-hoc IBSS network */ 468 RTW_BSS_TYPE_ANY = 2, /**< Denotes either infrastructure or ad-hoc network */ 469 470 RTW_BSS_TYPE_UNKNOWN = -1 /**< May be returned by scan function if BSS type is unknown. Do not pass this to the Join function */ 471 }; 472 typedef unsigned long rtw_bss_type_t; 473 474 enum { 475 RTW_SCAN_COMMAMD = 0x01 476 }; 477 typedef unsigned long rtw_scan_command_t; 478 479 enum{ 480 COMMAND1 = 0x01 481 }; 482 typedef unsigned long rtw_command_type; 483 484 enum { 485 RTW_WPS_TYPE_DEFAULT = 0x0000, 486 RTW_WPS_TYPE_USER_SPECIFIED = 0x0001, 487 RTW_WPS_TYPE_MACHINE_SPECIFIED = 0x0002, 488 RTW_WPS_TYPE_REKEY = 0x0003, 489 RTW_WPS_TYPE_PUSHBUTTON = 0x0004, 490 RTW_WPS_TYPE_REGISTRAR_SPECIFIED = 0x0005, 491 RTW_WPS_TYPE_NONE = 0x0006, 492 RTW_WPS_TYPE_WSC = 0x0007 493 }; 494 typedef unsigned long rtw_wps_type_t; 495 496 /** 497 * @brief The enumeration lists all the network bgn mode. 498 */ 499 enum { 500 RTW_NETWORK_B = 1, 501 RTW_NETWORK_BG = 3, 502 RTW_NETWORK_BGN = 11 503 }; 504 typedef unsigned long rtw_network_mode_t; 505 506 /** 507 * @brief The enumeration lists the interfaces. 508 */ 509 enum { 510 RTW_STA_INTERFACE = 0, /**< STA or Client Interface */ 511 RTW_AP_INTERFACE = 1, /**< SoftAP Interface */ 512 }; 513 typedef unsigned long rtw_interface_t; 514 515 /** 516 * @brief The enumeration lists the packet filter rules. 517 */ 518 enum { 519 RTW_POSITIVE_MATCHING = 0, /**< Receive the data matching with this pattern and discard the other data */ 520 RTW_NEGATIVE_MATCHING = 1 /**< Discard the data matching with this pattern and receive the other data */ 521 }; 522 typedef unsigned long rtw_packet_filter_rule_t; 523 524 /** 525 * @brief The enumeration lists the promisc levels. 526 */ 527 enum { 528 RTW_PROMISC_DISABLE = 0, /**< Disable the promisc */ 529 RTW_PROMISC_ENABLE = 1, /**< Fetch all ethernet packets */ 530 RTW_PROMISC_ENABLE_1 = 2, /**< Fetch only B/M packets */ 531 RTW_PROMISC_ENABLE_2 = 3, /**< Fetch all 802.11 packets*/ 532 RTW_PROMISC_ENABLE_3 = 4, /**< Fetch only B/M 802.11 packets*/ 533 RTW_PROMISC_ENABLE_4 = 5, /**< Fetch all 802.11 packets & MIMO PLCP headers. Please note that the PLCP header would be struct rtw_rx_info_t defined in wifi_structures.h*/ 534 }; 535 typedef unsigned long rtw_rcr_level_t; 536 537 /** 538 * @brief The enumeration lists the promisc rx type. 539 */ 540 #if defined(CONFIG_UNSUPPORT_PLCPHDR_RPT) && CONFIG_UNSUPPORT_PLCPHDR_RPT 541 enum { 542 RTW_RX_NORMAL = 0, /**< The supported 802.11 packet*/ 543 RTW_RX_UNSUPPORT = 1, /**< Unsupported 802.11 packet info */ 544 }; 545 typedef unsigned long rtw_rx_type_t; 546 #endif 547 /** 548 * @brief The enumeration lists the disconnect reasons. 549 */ 550 enum{ 551 RTW_NO_ERROR = 0, 552 RTW_NONE_NETWORK = 1, 553 RTW_CONNECT_FAIL = 2, 554 RTW_WRONG_PASSWORD = 3 , 555 RTW_4WAY_HANDSHAKE_TIMEOUT = 4, 556 RTW_DHCP_FAIL = 5, 557 RTW_UNKNOWN, 558 }; 559 typedef unsigned long rtw_connect_error_flag_t; 560 561 enum { 562 RTW_TX_PWR_PERCENTAGE_100 = 0, /* 100%, default target output power. */ 563 RTW_TX_PWR_PERCENTAGE_75 = 1, /* 75% */ 564 RTW_TX_PWR_PERCENTAGE_50 = 2, /* 50% */ 565 RTW_TX_PWR_PERCENTAGE_25 = 3, /* 25% */ 566 RTW_TX_PWR_PERCENTAGE_12_5 = 4, /* 12.5% */ 567 }; 568 typedef unsigned long rtw_tx_pwr_percentage_t; 569 570 /** 571 * @brief The enumeration is event type indicated from wlan driver. 572 */ 573 enum _WIFI_EVENT_INDICATE{ 574 WIFI_EVENT_CONNECT = 0, 575 WIFI_EVENT_DISCONNECT = 1, 576 WIFI_EVENT_FOURWAY_HANDSHAKE_DONE = 2, 577 WIFI_EVENT_SCAN_RESULT_REPORT = 3, 578 WIFI_EVENT_SCAN_DONE = 4, 579 WIFI_EVENT_RECONNECTION_FAIL = 5, 580 WIFI_EVENT_SEND_ACTION_DONE = 6, 581 WIFI_EVENT_RX_MGNT = 7, 582 WIFI_EVENT_STA_ASSOC = 8, 583 WIFI_EVENT_STA_DISASSOC = 9, 584 WIFI_EVENT_STA_WPS_START = 10, 585 WIFI_EVENT_WPS_FINISH = 11, 586 WIFI_EVENT_EAPOL_START = 12, 587 WIFI_EVENT_EAPOL_RECVD = 13, 588 WIFI_EVENT_NO_NETWORK = 14, 589 WIFI_EVENT_BEACON_AFTER_DHCP = 15, 590 WIFI_EVENT_IP_CHANGED = 16, 591 WIFI_EVENT_ICV_ERROR = 17, 592 WIFI_EVENT_CHALLENGE_FAIL = 18, 593 WIFI_EVENT_SOFTAP_START = 19, 594 WIFI_EVENT_SOFTAP_STOP = 20, 595 WIFI_EVENT_MAX, 596 }; 597 typedef unsigned long rtw_event_indicate_t; 598 #ifdef __cplusplus 599 } 600 #endif 601 602 /*\@}*/ 603 604 #endif /* _WIFI_CONSTANTS_H */ 605