SDK4.0
This document shows Ameba SDK 4.0 APIs
Macros | Typedefs | Enumerations
wifi_constants.h File Reference

This file provides the data types used for wlan API. More...

Macros

#define WLAN0_NAME   "wlan0"
 
#define WLAN1_NAME   "wlan1"
 
#define WEP_ENABLED   0x0001
 
#define TKIP_ENABLED   0x0002
 
#define AES_ENABLED   0x0004
 
#define WSEC_SWFLAG   0x0008
 
#define SHARED_ENABLED   0x00008000
 
#define WPA_SECURITY   0x00200000
 
#define WPA2_SECURITY   0x00400000
 
#define WPS_ENABLED   0x10000000
 
#define RTW_MAX_PSK_LEN   (64)
 
#define RTW_MIN_PSK_LEN   (8)
 
#define MCSSET_LEN   16
 

Typedefs

typedef enum _WIFI_EVENT_INDICATE rtw_event_indicate_t
 The enumeration is event type indicated from wlan driver.
 

Enumerations

enum  rtw_result_t {
  RTW_SUCCESS = 0, RTW_PENDING = 1, RTW_TIMEOUT = 2, RTW_PARTIAL_RESULTS = 3,
  RTW_INVALID_KEY = 4, RTW_DOES_NOT_EXIST = 5, RTW_NOT_AUTHENTICATED = 6, RTW_NOT_KEYED = 7,
  RTW_IOCTL_FAIL = 8, RTW_BUFFER_UNAVAILABLE_TEMPORARY = 9, RTW_BUFFER_UNAVAILABLE_PERMANENT = 10, RTW_WPS_PBC_OVERLAP = 11,
  RTW_CONNECTION_LOST = 12, RTW_ERROR = -1, RTW_BADARG = -2, RTW_BADOPTION = -3,
  RTW_NOTUP = -4, RTW_NOTDOWN = -5, RTW_NOTAP = -6, RTW_NOTSTA = -7,
  RTW_BADKEYIDX = -8, RTW_RADIOOFF = -9, RTW_NOTBANDLOCKED = -10, RTW_NOCLK = -11,
  RTW_BADRATESET = -12, RTW_BADBAND = -13, RTW_BUFTOOSHORT = -14, RTW_BUFTOOLONG = -15,
  RTW_BUSY = -16, RTW_NOTASSOCIATED = -17, RTW_BADSSIDLEN = -18, RTW_OUTOFRANGECHAN = -19,
  RTW_BADCHAN = -20, RTW_BADADDR = -21, RTW_NORESOURCE = -22, RTW_UNSUPPORTED = -23,
  RTW_BADLEN = -24, RTW_NOTREADY = -25, RTW_EPERM = -26, RTW_NOMEM = -27,
  RTW_ASSOCIATED = -28, RTW_RANGE = -29, RTW_NOTFOUND = -30, RTW_WME_NOT_ENABLED = -31,
  RTW_TSPEC_NOTFOUND = -32, RTW_ACM_NOTSUPPORTED = -33, RTW_NOT_WME_ASSOCIATION = -34, RTW_SDIO_ERROR = -35,
  RTW_WLAN_DOWN = -36, RTW_BAD_VERSION = -37, RTW_TXFAIL = -38, RTW_RXFAIL = -39,
  RTW_NODEVICE = -40, RTW_UNFINISHED = -41, RTW_NONRESIDENT = -42, RTW_DISABLED = -43
}
 The enumeration lists the results of the function. More...
 
enum  rtw_security_t {
  RTW_SECURITY_OPEN = 0, RTW_SECURITY_WEP_PSK = WEP_ENABLED, RTW_SECURITY_WEP_SHARED = ( WEP_ENABLED | SHARED_ENABLED ), RTW_SECURITY_WPA_TKIP_PSK = ( WPA_SECURITY | TKIP_ENABLED ),
  RTW_SECURITY_WPA_AES_PSK = ( WPA_SECURITY | AES_ENABLED ), RTW_SECURITY_WPA2_AES_PSK = ( WPA2_SECURITY | AES_ENABLED ), RTW_SECURITY_WPA2_TKIP_PSK = ( WPA2_SECURITY | TKIP_ENABLED ), RTW_SECURITY_WPA2_MIXED_PSK = ( WPA2_SECURITY | AES_ENABLED | TKIP_ENABLED ),
  RTW_SECURITY_WPA_WPA2_MIXED = ( WPA_SECURITY | WPA2_SECURITY ), RTW_SECURITY_WPS_OPEN = WPS_ENABLED, RTW_SECURITY_WPS_SECURE = (WPS_ENABLED | AES_ENABLED), RTW_SECURITY_UNKNOWN = -1,
  RTW_SECURITY_FORCE_32_BIT = 0x7fffffff
}
 The enumeration lists the possible security types to set when connection.
Station mode supports OPEN, WEP, and WPA2.
AP mode support OPEN and WPA2. More...
 
enum  rtw_encryption_t {
  RTW_ENCRYPTION_UNKNOWN = 0, RTW_ENCRYPTION_OPEN = 1, RTW_ENCRYPTION_WEP40 = 2, RTW_ENCRYPTION_WPA_TKIP = 3,
  RTW_ENCRYPTION_WPA_AES = 4, RTW_ENCRYPTION_WPA2_TKIP = 5, RTW_ENCRYPTION_WPA2_AES = 6, RTW_ENCRYPTION_WPA2_MIXED = 7,
  RTW_ENCRYPTION_WEP104 = 9, RTW_ENCRYPTION_UNDEF = 0xFF
}
 
enum  rtw_bool_t { RTW_FALSE = 0, RTW_TRUE = 1 }
 
enum  rtw_802_11_band_t { RTW_802_11_BAND_5GHZ = 0, RTW_802_11_BAND_2_4GHZ = 1 }
 The enumeration lists the band types. More...
 
enum  rtw_country_code_t {
  RTW_COUNTRY_WORLD1, RTW_COUNTRY_ETSI1, RTW_COUNTRY_FCC1, RTW_COUNTRY_MKK1,
  RTW_COUNTRY_ETSI2, RTW_COUNTRY_FCC2, RTW_COUNTRY_WORLD2, RTW_COUNTRY_MKK2,
  RTW_COUNTRY_GLOBAL, RTW_COUNTRY_WORLD, RTW_COUNTRY_EU, RTW_COUNTRY_JP,
  RTW_COUNTRY_AS, RTW_COUNTRY_BM, RTW_COUNTRY_CA, RTW_COUNTRY_DM,
  RTW_COUNTRY_DO, RTW_COUNTRY_FM, RTW_COUNTRY_GD, RTW_COUNTRY_GT,
  RTW_COUNTRY_GU, RTW_COUNTRY_HT, RTW_COUNTRY_MH, RTW_COUNTRY_MP,
  RTW_COUNTRY_NI, RTW_COUNTRY_PA, RTW_COUNTRY_PR, RTW_COUNTRY_PW,
  RTW_COUNTRY_TW, RTW_COUNTRY_US, RTW_COUNTRY_VI, RTW_COUNTRY_AD,
  RTW_COUNTRY_AE, RTW_COUNTRY_AF, RTW_COUNTRY_AI, RTW_COUNTRY_AL,
  RTW_COUNTRY_AM, RTW_COUNTRY_AN, RTW_COUNTRY_AR, RTW_COUNTRY_AT,
  RTW_COUNTRY_AU, RTW_COUNTRY_AW, RTW_COUNTRY_AZ, RTW_COUNTRY_BA,
  RTW_COUNTRY_BB, RTW_COUNTRY_BD, RTW_COUNTRY_BE, RTW_COUNTRY_BF,
  RTW_COUNTRY_BG, RTW_COUNTRY_BH, RTW_COUNTRY_BL, RTW_COUNTRY_BN,
  RTW_COUNTRY_BO, RTW_COUNTRY_BR, RTW_COUNTRY_BS, RTW_COUNTRY_BT,
  RTW_COUNTRY_BY, RTW_COUNTRY_BZ, RTW_COUNTRY_CF, RTW_COUNTRY_CH,
  RTW_COUNTRY_CI, RTW_COUNTRY_CL, RTW_COUNTRY_CN, RTW_COUNTRY_CO,
  RTW_COUNTRY_CR, RTW_COUNTRY_CX, RTW_COUNTRY_CY, RTW_COUNTRY_CZ,
  RTW_COUNTRY_DE, RTW_COUNTRY_DK, RTW_COUNTRY_DZ, RTW_COUNTRY_EC,
  RTW_COUNTRY_EE, RTW_COUNTRY_EG, RTW_COUNTRY_ES, RTW_COUNTRY_ET,
  RTW_COUNTRY_FI, RTW_COUNTRY_FR, RTW_COUNTRY_GB, RTW_COUNTRY_GE,
  RTW_COUNTRY_GF, RTW_COUNTRY_GH, RTW_COUNTRY_GL, RTW_COUNTRY_GP,
  RTW_COUNTRY_GR, RTW_COUNTRY_GY, RTW_COUNTRY_HK, RTW_COUNTRY_HN,
  RTW_COUNTRY_HR, RTW_COUNTRY_HU, RTW_COUNTRY_ID, RTW_COUNTRY_IE,
  RTW_COUNTRY_IL, RTW_COUNTRY_IN, RTW_COUNTRY_IQ, RTW_COUNTRY_IR,
  RTW_COUNTRY_IS, RTW_COUNTRY_IT, RTW_COUNTRY_JM, RTW_COUNTRY_JO,
  RTW_COUNTRY_KE, RTW_COUNTRY_KH, RTW_COUNTRY_KN, RTW_COUNTRY_KP,
  RTW_COUNTRY_KR, RTW_COUNTRY_KW, RTW_COUNTRY_KY, RTW_COUNTRY_KZ,
  RTW_COUNTRY_LA, RTW_COUNTRY_LB, RTW_COUNTRY_LC, RTW_COUNTRY_LI,
  RTW_COUNTRY_LK, RTW_COUNTRY_LR, RTW_COUNTRY_LS, RTW_COUNTRY_LT,
  RTW_COUNTRY_LU, RTW_COUNTRY_LV, RTW_COUNTRY_MA, RTW_COUNTRY_MC,
  RTW_COUNTRY_MD, RTW_COUNTRY_ME, RTW_COUNTRY_MF, RTW_COUNTRY_MK,
  RTW_COUNTRY_MN, RTW_COUNTRY_MO, RTW_COUNTRY_MQ, RTW_COUNTRY_MR,
  RTW_COUNTRY_MT, RTW_COUNTRY_MU, RTW_COUNTRY_MV, RTW_COUNTRY_MW,
  RTW_COUNTRY_MX, RTW_COUNTRY_MY, RTW_COUNTRY_NG, RTW_COUNTRY_NL,
  RTW_COUNTRY_NO, RTW_COUNTRY_NP, RTW_COUNTRY_NZ, RTW_COUNTRY_OM,
  RTW_COUNTRY_PE, RTW_COUNTRY_PF, RTW_COUNTRY_PG, RTW_COUNTRY_PH,
  RTW_COUNTRY_PK, RTW_COUNTRY_PL, RTW_COUNTRY_PM, RTW_COUNTRY_PT,
  RTW_COUNTRY_PY, RTW_COUNTRY_QA, RTW_COUNTRY_RS, RTW_COUNTRY_RU,
  RTW_COUNTRY_RW, RTW_COUNTRY_SA, RTW_COUNTRY_SE, RTW_COUNTRY_SG,
  RTW_COUNTRY_SI, RTW_COUNTRY_SK, RTW_COUNTRY_SN, RTW_COUNTRY_SR,
  RTW_COUNTRY_SV, RTW_COUNTRY_SY, RTW_COUNTRY_TC, RTW_COUNTRY_TD,
  RTW_COUNTRY_TG, RTW_COUNTRY_TH, RTW_COUNTRY_TN, RTW_COUNTRY_TR,
  RTW_COUNTRY_TT, RTW_COUNTRY_TZ, RTW_COUNTRY_UA, RTW_COUNTRY_UG,
  RTW_COUNTRY_UY, RTW_COUNTRY_UZ, RTW_COUNTRY_VC, RTW_COUNTRY_VE,
  RTW_COUNTRY_VN, RTW_COUNTRY_VU, RTW_COUNTRY_WF, RTW_COUNTRY_WS,
  RTW_COUNTRY_YE, RTW_COUNTRY_YT, RTW_COUNTRY_ZA, RTW_COUNTRY_ZW,
  RTW_COUNTRY_MAX
}
 The enumeration lists all the country codes able to set to Wi-Fi driver.
 
enum  rtw_adaptivity_mode_t { RTW_ADAPTIVITY_DISABLE = 0, RTW_ADAPTIVITY_NORMAL, RTW_ADAPTIVITY_CARRIER_SENSE }
 The enumeration lists the adaptivity types.
 
enum  rtw_mode_t {
  RTW_MODE_NONE = 0, RTW_MODE_STA, RTW_MODE_AP, RTW_MODE_STA_AP,
  RTW_MODE_PROMISC, RTW_MODE_P2P
}
 The enumeration lists the supported operation mode by WIFI driver, including station and AP mode.
 
enum  rtw_scan_mode_t { RTW_SCAN_FULL = 0, RTW_SCAN_SOCIAL, RTW_SCAN_ONE }
 
enum  rtw_link_status_t { RTW_LINK_DISCONNECTED = 0, RTW_LINK_CONNECTED }
 The enumeration lists the status to describe the connection link.
 
enum  rtw_scan_type_t { RTW_SCAN_TYPE_ACTIVE = 0x00, RTW_SCAN_TYPE_PASSIVE = 0x01, RTW_SCAN_TYPE_PROHIBITED_CHANNELS = 0x04 }
 The enumeration lists the scan types. More...
 
enum  rtw_bss_type_t { RTW_BSS_TYPE_INFRASTRUCTURE = 0, RTW_BSS_TYPE_ADHOC = 1, RTW_BSS_TYPE_ANY = 2, RTW_BSS_TYPE_UNKNOWN = -1 }
 The enumeration lists the bss types. More...
 
enum  rtw_scan_command_t { RTW_SCAN_COMMAMD = 0x01 }
 
enum  rtw_command_type { COMMAND1 = 0x01 }
 
enum  rtw_wps_type_t {
  RTW_WPS_TYPE_DEFAULT = 0x0000, RTW_WPS_TYPE_USER_SPECIFIED = 0x0001, RTW_WPS_TYPE_MACHINE_SPECIFIED = 0x0002, RTW_WPS_TYPE_REKEY = 0x0003,
  RTW_WPS_TYPE_PUSHBUTTON = 0x0004, RTW_WPS_TYPE_REGISTRAR_SPECIFIED = 0x0005, RTW_WPS_TYPE_NONE = 0x0006, RTW_WPS_TYPE_WSC = 0x0007
}
 
enum  rtw_network_mode_t { RTW_NETWORK_B = 1, RTW_NETWORK_BG = 3, RTW_NETWORK_BGN = 11 }
 The enumeration lists all the network bgn mode.
 
enum  rtw_interface_t { RTW_STA_INTERFACE = 0, RTW_AP_INTERFACE = 1 }
 The enumeration lists the interfaces. More...
 
enum  rtw_packet_filter_rule_t { RTW_POSITIVE_MATCHING = 0, RTW_NEGATIVE_MATCHING = 1 }
 The enumeration lists the packet filter rules. More...
 
enum  rtw_rcr_level_t {
  RTW_PROMISC_DISABLE = 0, RTW_PROMISC_ENABLE = 1, RTW_PROMISC_ENABLE_1 = 2, RTW_PROMISC_ENABLE_2 = 3,
  RTW_PROMISC_ENABLE_3 = 4
}
 The enumeration lists the promisc levels. More...
 
enum  rtw_connect_error_flag_t {
  RTW_NO_ERROR = 0, RTW_NONE_NETWORK = 1, RTW_CONNECT_FAIL = 2, RTW_WRONG_PASSWORD = 3,
  RTW_DHCP_FAIL = 4, RTW_UNKNOWN
}
 The enumeration lists the disconnect reasons.
 
enum  rtw_tx_pwr_percentage_t {
  RTW_TX_PWR_PERCENTAGE_100 = 0, RTW_TX_PWR_PERCENTAGE_75 = 1, RTW_TX_PWR_PERCENTAGE_50 = 2, RTW_TX_PWR_PERCENTAGE_25 = 3,
  RTW_TX_PWR_PERCENTAGE_12_5 = 4
}
 
enum  _WIFI_EVENT_INDICATE {
  WIFI_EVENT_CONNECT = 0, WIFI_EVENT_DISCONNECT = 1, WIFI_EVENT_FOURWAY_HANDSHAKE_DONE = 2, WIFI_EVENT_SCAN_RESULT_REPORT = 3,
  WIFI_EVENT_SCAN_DONE = 4, WIFI_EVENT_RECONNECTION_FAIL = 5, WIFI_EVENT_SEND_ACTION_DONE = 6, WIFI_EVENT_RX_MGNT = 7,
  WIFI_EVENT_STA_ASSOC = 8, WIFI_EVENT_STA_DISASSOC = 9, WIFI_EVENT_STA_WPS_START = 10, WIFI_EVENT_WPS_FINISH = 11,
  WIFI_EVENT_EAPOL_START = 12, WIFI_EVENT_EAPOL_RECVD = 13, WIFI_EVENT_NO_NETWORK = 14, WIFI_EVENT_BEACON_AFTER_DHCP = 15,
  WIFI_EVENT_MAX
}
 The enumeration is event type indicated from wlan driver.
 

Detailed Description

This file provides the data types used for wlan API.

Author
Version
Attention

This module is a confidential and proprietary property of RealTek and possession or use of this module requires written permission of RealTek.

Copyright(c) 2016, Realtek Semiconductor Corporation. All rights reserved.