WE310F5  39.00.000
M2MB WLAN DRIVER

This section describes the M2MB APIs for WLAN control operations. More...

#define M2MB_WLAN_MAC_LEN   6
 
#define M2MB_WLAN_MAX_SSID_LEN   32
 
#define M2MB_WLAN_MIN_PASSPHRASE_LEN   8
 
#define M2MB_WLAN_MAX_PASSPHRASE_LEN   64
 
#define M2MB_WLAN_NUM_OF_DEVICES   2
 
#define M2MB_WLAN_MIN_WEP_KEY_SIZE   10
 
#define M2MB_WLAN_MAX_WEP_KEY_SIZE   26
 
#define M2MB_WLAN_WPS_MAX_KEY_LEN   64
 
#define DEV_NUM   2
 
#define M2MB_WLAN_PROM_FILTER_SRC_ADDR   0x01
 
#define M2MB_WLAN_PROM_FILTER_DST_ADDR   0x02
 
#define M2MB_WLAN_PROM_FILTER_FRAME_TYPE   0x04
 
#define M2MB_WLAN_PROM_FILTER_FRAME_SUB_TYPE   0x08
 
#define ALBANIA   "AL"
 
#define ARUBA   "AW"
 
#define AUSTRIA   "AT"
 
#define BELARUS   "BY"
 
#define BELGIUM   "BE"
 
#define BOSNIA_HERZEGOWANIA   "BA"
 
#define BULGARIA   "BG"
 
#define CAMBODIA   "KH"
 
#define CROATIA   "HR"
 
#define CYPRUS   "CY"
 
#define CZECH   "CZ"
 
#define DENMARK   "DK"
 
#define ESTONIA   "EE"
 
#define FINLAND   "FI"
 
#define FRANCE   "FR"
 
#define GERMANY   "DE"
 
#define GREECE   "GR"
 
#define GREENLAND   "GL"
 
#define GAUTEMALA   "GT"
 
#define HUNGARY   "HU"
 
#define ICELAND   "IS"
 
#define IRELAND   "IE"
 
#define ITALY   "IT"
 
#define LATVIA   "LV"
 
#define LIECHTENSTEIN   "LI"
 
#define LITHUANIA   "LT"
 
#define LUXEMBOURG   "LU"
 
#define MACEDONIA   "MK"
 
#define MALAWI   "MW"
 
#define MALTA   "MT"
 
#define MONACO   "MC"
 
#define NETHERLANDS   "NL"
 
#define NETHERLAND_ANTILLES   "AN"
 
#define NORWAY   "NO"
 
#define OMAN   "OM"
 
#define POLAND   "PL"
 
#define PORTUGAL   "PT"
 
#define ROMANIA   "RO"
 
#define MONTENEGRO   "ME"
 
#define SERBIA   "RS"
 
#define SLOVAKIA   "SK"
 
#define SLOVENIA   "SI"
 
#define SPAIN   "ES"
 
#define SWEDEN   "SE"
 
#define SWITZERLAND   "CH"
 
#define TURKEY   "TR"
 
#define UNITED_KINGDOM   "GB"
 
#define ZIMBABWE   "ZW"
 
#define AFGHANISTAN   "AF"
 
#define BHUTAN   "BT"
 
#define CHAD   "TD"
 
#define ETHIOPIA   "ET"
 
#define FRENCH_GUIANA   "GF"
 
#define FRENCH_POLYNESIA   "PF"
 
#define GUADELOUPE   "GP"
 
#define LESOTHO   "LS"
 
#define MARTINIQUE   "MQ"
 
#define MAYOTTE   "YT"
 
#define MOLDOVA   "MD"
 
#define MONTENEGRO   "ME"
 
#define REUNION   "RE"
 
#define SAINT_BARTHELEMY   "BL"
 
#define SAINT_MARTIN   "MF"
 
#define SAINT_PIERRE_AND_MIQUELON   "PM"
 
#define SAINT_VINCENT_AND_THE_GRENADIENS   "VC"
 
#define SAMOA   "WS"
 
#define SURINAME   "SR"
 
#define TOGO   "TG"
 
#define WALLIS_AND_FUTUNA   "WF"
 
#define EGYPT   "EG"
 
#define ISRAEL   "IL"
 
#define KUWAIT   "KW"
 
#define MOROCCO   "MA"
 
#define TUNISIA   "TN"
 
#define UZBEKISTAN   "UZ"
 
#define ARMENIA   "AM"
 
#define AZERBAIJAN   "AZ"
 
#define GEORGIA   "GE"
 
#define BELIZE   "BZ"
 
#define RUSSIA   "RU"
 
#define UKRAINE   "UA"
 
#define DOMINICAN_REPUBLIC   "DO"
 
#define EL_SALVADOR   "SV"
 
#define PANAMA   "PA"
 
#define DOMINICA   "DM"
 
#define BARBADOS   "BB"
 
#define CHINA   "CN"
 
#define URUGUAY   "UY"
 
#define VENEZUELA   "VE"
 
#define ARGENTINA   "AR"
 
#define AUSTRALIA   "AU"
 
#define BRAZIL   "BR"
 
#define CANADA   "CA"
 
#define COLOMBIA   "CO"
 
#define COSTA_RICA   "CR"
 
#define ECUADOR   "EC"
 
#define GRENADA   "GD"
 
#define GUAM   "GU"
 
#define HAITI   "HT"
 
#define HONDURAS   "HN"
 
#define HONG_KONG   "HK"
 
#define JAMAICA   "JM"
 
#define LEBANON   "LB"
 
#define MACAU   "MO"
 
#define MEXICO   "MX"
 
#define NEW_ZEALAND   "NZ"
 
#define PERU   "PE"
 
#define PHILIPPINES   "PH"
 
#define PUERTO_RICO   "PR"
 
#define RWANDA   "RW"
 
#define SAUDI_ARABIA   "SA"
 
#define SINGAPORE   "SG"
 
#define SOUTH_AFRICA   "ZA"
 
#define TAIWAN   "TW"
 
#define THAILAND   "TH"
 
#define TRINIDAD_Y_TOBAGO   "TT"
 
#define UGANDA   "UG"
 
#define UAE   "AE"
 
#define UNITED_STATES   "US"
 
#define VIET_NAM   "VN"
 
#define AMERICAN_SAMOA   "AS"
 
#define BAHAMAS   "BS"
 
#define BERMUDA   "BM"
 
#define BURKINA_FASO   "BF"
 
#define CAYMAN_ISLANDS   "KY"
 
#define CENTRAL_AFRICA_REPUBLIC   "CF"
 
#define CHRISTMAS_ISLAND   "CX"
 
#define DIVOIRE   "CI"
 
#define GHANA   "GH"
 
#define MARSHAL_ISLANDS   "MH"
 
#define MAURITIUS   "MU"
 
#define MICRONESIA   "FM"
 
#define MONGOLIA   "MN"
 
#define NICARAGUA   "NI"
 
#define NORTHERN_MARIANA_ISLANDS   "MP"
 
#define PALAU   "PW"
 
#define PARAGUAY   "PY"
 
#define SENEGAL   "SN"
 
#define TURKS_AND_CAICOS   "TC"
 
#define VANUATU   "VU"
 
#define US_VIRGIN_ISLANDS   "VI"
 
#define AUSTRALIA_AP   "AU"
 
#define MALAYSIA   "MY"
 
#define BANGLADESH   "BD"
 
#define PAKISTAN   "PK"
 
#define QATAR   "QA"
 
#define GUYANA   "GY"
 
#define TANZANIA   "TZ"
 
#define INDONESIA   "ID"
 
#define JORDAN   "JO"
 
#define BAHRAIN   "BH"
 
#define BRUNEI_DARUSSALAM   "BN"
 
#define CHILE   "CL"
 
#define INDIA   "IN"
 
#define NEPAL   "NP"
 
#define MALDIVES   "MV"
 
#define BOLIVIA   "BO"
 
#define NIGERIA   "NG"
 
#define KOREA_ROC   "KR"
 
#define SAINT_KITTS_AND_NEVIS   "KN"
 
#define SAINT_LUCIA   "LC"
 
#define KENYA   "KE"
 
#define ALGERIA   "DZ"
 
#define JAPAN   "JP"
 
enum  M2MB_WLAN_AUTH_TYPE_E {
  M2MB_WLAN_AUTH_TYPE_NONE = 0,
  M2MB_WLAN_AUTH_TYPE_WPA = 1,
  M2MB_WLAN_AUTH_TYPE_WPA2 = 2,
  M2MB_WLAN_AUTH_TYPE_WPA_PSK = 3,
  M2MB_WLAN_AUTH_TYPE_WPA2_PSK = 4,
  M2MB_WLAN_AUTH_TYPE_WEP = 8,
  M2MB_WLAN_AUTH_TYPE_WEP_SHARED,
  M2MB_WLAN_AUTH_TYPE_WPA3,
  M2MB_WLAN_AUTH_TYPE_INVALID
}
 Different authentication modes supported by WLAN. More...
 
enum  M2MB_WLAN_ENCRYPT_TYPE_E {
  M2MB_WLAN_ENCRYPT_TYPE_NONE = 0,
  M2MB_WLAN_ENCRYPT_TYPE_WEP = 1,
  M2MB_WLAN_ENCRYPT_TYPE_TKIP = 2,
  M2MB_WLAN_ENCRYPT_TYPE_AES = 3,
  M2MB_WLAN_ENCRYPT_TYPE_INVALID
}
 Different encryption modes supported by WLAN. More...
 
enum  M2MB_WLAN_8021X_METHOD_E {
  M2MB_WLAN_8021X_METHOD_UNKNOWN_E =0,
  M2MB_WLAN_8021X_METHOD_EAP_TLS_E =1,
  M2MB_WLAN_8021X_METHOD_EAP_TTLS_MSCHAPV2_E =2,
  M2MB_WLAN_8021X_METHOD_EAP_PEAP_MSCHAPV2_E =3,
  M2MB_WLAN_8021X_METHOD_EAP_TTLS_MD5_E =4,
  M2MB_WLAN_8021X_METHOD_MAX =50
}
 Different 802.1x methods supported by WLAN firmware. More...
 
enum  M2MB_WLAN_PARAM_FLAG_E {
  M2MB_WLAN_PARAM_SSID,
  M2MB_WLAN_PARAM_CHANNEL,
  M2MB_WLAN_PARAM_MAC_ADDRESS,
  M2MB_WLAN_PARAM_OPERATION_MODE,
  M2MB_WLAN_PARAM_LISTEN_INTERVAL,
  M2MB_WLAN_PARAM_DTIM_INTERVAL,
  M2MB_WLAN_PARAM_AP_ENABLE_HIDDEN_MODE,
  M2MB_WLAN_PARAM_STA_KEEP_ALIVE_IN_SEC,
  M2MB_WLAN_PARAM_BEACON_INTERVAL_TU,
  M2MB_WLAN_PARAM_BMISS_CONFIG,
  M2MB_WLAN_PARAM_RSSI,
  M2MB_WLAN_PARAM_TX_POWER,
  M2MB_WLAN_PARAM_REG_DOMAIN,
  M2MB_WLAN_PARAM_TX_RATE,
  M2MB_WLAN_PARAM_POWER_SAVE_MODE,
  M2MB_WLAN_PARAM_POWER_SAVE_POLICY,
  M2MB_WLAN_PARAM_PHY_MODE,
  M2MB_WLAN_PARAM_AUTH_TYPE,
  M2MB_WLAN_PARAM_AUTH_TYPE_NUM,
  M2MB_WLAN_PARAM_ENCRYPTION_TYPE,
  M2MB_WLAN_PARAM_ENCRYPTION_TYPE_NUM,
  M2MB_WLAN_PARAM_SECURITY_MODE,
  M2MB_WLAN_PARAM_BSSID,
  M2MB_WLAN_PARAM_WPA_PSK,
  M2MB_WLAN_PARAM_SECURITY_PASSPHRASE,
  M2MB_WLAN_PARAM_WEP_KEY_INDEX,
  M2MB_WLAN_PARAM_WEP_KEY_PAIR,
  M2MB_WLAN_PARAM_WPS_CREDENTIALS,
  M2MB_WLAN_PARAM_GET_STATS,
  M2MB_WLAN_PARAM_PNO_INFO,
  M2MB_WLAN_SETTING_PROFILE_INFO,
  M2MB_WLAN_COUNTRY_CODE,
  M2MB_WLAN_11N_HT,
  M2MB_WLAN_PARAM_AP_WPS_SUPPORT,
  M2MB_WLAN_PARAM_PROMISC_FILTER_INFO,
  M2MB_WLAN_PARAM_PROMISC_CMD,
  M2MB_WLAN_PARAM_EAP_8021X,
  M2MB_WLAN_PARAM_INACTIVITY_TIME_IN_MIN,
  M2MB_WLAN_PARAM_SCAN_TIME,
  M2MB_WLAN_UAPSD_CONFIG_FLAG,
  M2MB_WLAN_PARAM_RXACTIVE_MODE,
  M2MB_WLAN_PARAM_REG_USER_CALLBACK,
  M2MB_WLAN_PARAM_MAX
}
 WLAN interface set or get flags. More...
 
enum  M2MB_WLAN_MODE_E {
  M2MB_WLAN_MODE_STATION,
  M2MB_WLAN_MODE_ACCESS_POINT,
  M2MB_WLAN_MODE_ADHOC,
  M2MB_WLAN_MODE_INVALID
}
 WLAN interface operating modes. More...
 
enum  M2MB_WLAN_11N_HT_E {
  M2MB_WLAN_11N_DISABLED = 0x1,
  M2MB_WLAN_11N_HT20 = 0x2,
  M2MB_WLAN_11N_HT40 = 0x3
}
 11n HT configurations. More...
 
enum  M2MB_WLAN_PHY_MODE_E {
  M2MB_WLAN_11A_MODE = 0x1,
  M2MB_WLAN_11G_MODE = 0x2,
  M2MB_WLAN_11AG_MODE = 0x3,
  M2MB_WLAN_11B_MODE = 0x4,
  M2MB_WLAN_11GONLY_MODE = 0x5,
  M2MB_WLAN_11BG_MODE = 0x6,
  M2MB_WLAN_11BGN_MODE = 0x7,
  M2MB_WLAN_11NONLY_MODE = 0x8
}
 802.11 PHY modes. More...
 
enum  M2MB_WLAN_CB_ID_E {
  M2MB_WLAN_SCAN_COMPLETE_CB,
  M2MB_WLAN_CONNECT_CB,
  M2MB_WLAN_CONNECT_FAIL_CB,
  M2MB_WLAN_DISCONNECT_CB,
  M2MB_WLAN_PROFILE_PNO_CB,
  M2MB_WLAN_EVENT_WPS_CB,
  M2MB_WLAN_EVENT_PROMISCOUS_CB,
  M2MB_WLAN_EVENT_STA_CONN_CB,
  M2MB_WLAN_EVENT_STA_DISCONN_CB,
  M2MB_WLAN_CB_MAX
}
 Events for an application registered CB functions. More...
 
enum  M2MB_WLAN_WPS_MODE_E {
  M2MB_WLAN_WPS_PIN_MODE = 0,
  M2MB_WLAN_WPS_PBC_MODE = 1,
  M2MB_WLAN_WPS_DEFAULT_PIN_MODE = 2
}
 WPS methods. More...
 
enum  M2MB_WLAN_WPS_CONNECT_ACTION_E {
  M2MB_WLAN_NO_ACTION_POST_WPS_PROCEDURE = 0,
  M2MB_WLAN_L2_CONNECT_POST_WPS_PROCEDURE = 1
}
 action after WPS procedure success. More...
 
enum  M2MB_WLAN_MGMT_FRAME_TYPE_E {
  M2MB_WLAN_FRAME_BEACON = 0,
  M2MB_WLAN_FRAME_PROBE_REQ,
  M2MB_WLAN_FRAME_PROBE_RESP,
  M2MB_WLAN_FRAME_ASSOC_REQ,
  M2MB_WLAN_FRAME_ASSOC_RESP,
  M2MB_WLAN_NUM_MGMT_FRAME
}
 MGMT frame types. More...
 
enum  M2MB_WLAN_RAW_MODE_HEADER_TYPE_E {
  M2MB_WLAN_RAW_MODE_HDR_TYPE_BEACON = 0,
  M2MB_WLAN_RAW_MODE_HDR_TYPE_PROBE_REQUEST = 1,
  M2MB_WLAN_RAW_MODE_HDR_TYPE_PROBE_RESPONSE = 2,
  M2MB_WLAN_RAW_MODE_HDR_TYPE_DATA = 3,
  M2MB_WLAN_RAW_MODE_HDR_TYPE_ACTION = 4
}
 802.11 header types. More...
 
enum  M2MB_WLAN_POWER_MODE_E {
  M2MB_WLAN_POWER_SAVE_MODE = 1,
  M2MB_WLAN_MAX_PERF_MODE = 2,
  M2MB_WLAN_INVALID_POWER_MODE
}
 power save modes. More...
 
enum  M2MB_WLAN_POWER_MODULE_E {
  M2MB_WLAN_POWER_MODULE_USER,
  M2MB_WLAN_POWER_MODULE_INVALID
}
 power save modes. More...
 
enum  M2MB_WLAN_DTIM_POLICY_E {
  M2MB_WLAN_DTIM_NORMAL = 2,
  M2MB_WLAN_DTIM_STICK = 3,
  M2MB_WLAN_DTIM_AUTO = 4
}
 DTIM policies. More...
 
enum  M2MB_WLAN_MODE_UP_E {
  M2MB_WLAN_MODE_DOWN = 0x00,
  M2MB_WLAN_MODE_STA_UP = 0x01,
  M2MB_WLAN_MODE_AP_UP = 0x02,
  M2MB_WLAN_MODE_BOTH_UP = 0x03
}
 
typedef struct M2MB_WLAN_BSS_SCAN_INFO_S M2MB_WLAN_BSS_SCAN_INFO_T
 Structure of members for scan results. More...
 
typedef struct M2MB_WLAN_BSS_SCAN_CB_INFO_S M2MB_WLAN_BSS_SCAN_CB_INFO_T
 Structure to get the count for scan results. More...
 
typedef struct M2MB_WEP_KEY_INFO_S M2MB_WEP_KEY_INFO_T
 WEP key info structure. More...
 
typedef struct M2MB_STA_BMISS_CONFIG_S M2MB_STA_BMISS_CONFIG_T
 Beacon miss parameters setting in firmware. More...
 
typedef struct M2MB_CONNECTION_DATA_S M2MB_CONNECTION_DATA_T
 Connection event info for both AP and STA modes. More...
 
typedef struct M2MB_WLAN_PROFILE_PNO_S M2MB_WLAN_PROFILE_PNO_T
 Preferred Network Offload setting in firmware. More...
 
typedef struct M2MB_WLAN_PHY_DATA_RATE_S M2MB_WLAN_PHY_DATA_RATE_T
 
typedef struct M2MB_WLAN_WPS_CREDENTIALS_S M2MB_WLAN_WPS_CREDENTIALS_T
 WPS credentials information. More...
 
typedef struct M2MB_WLAN_WPS_CB_INFO_S M2MB_WLAN_WPS_CB_INFO_T
 WPS cb information. More...
 
typedef struct M2MB_WLAN_RAW_SEND_PARAMS_S M2MB_WLAN_RAW_SEND_PARAMS_T
 802.11 RAW frame. More...
 
typedef struct M2MB_WLAN_POWER_MODE_SETTING_S M2MB_WLAN_POWER_MODE_SETTING_T
 Data structure for power mode setting. More...
 
typedef VOID(* M2MB_WLAN_CALLBACK) (UINT8 device_id, UINT8 event_id, INT32 status, VOID *data, VOID *usr_ctx)
 WLAN call back prototype. More...
 
INT8 m2mb_wlan_init (M2MB_WLAN_11N_HT_E mode)
 WLAN module initialization. More...
 
INT8 m2mb_wlan_interface_init (M2MB_WLAN_MODE_E mode, M2MB_WLAN_CALLBACK m2m_wlan_user_cb, VOID *appCtx, UINT8 *device_id)
 WLAN Interface Initialization. More...
 
INT8 m2mb_wlan_scan (UINT8 device_id, UINT8 *ssid, UINT8 no_of_channels, UINT8 *channel_list, UINT8 scan_type, UINT32 num_of_scan_entries, M2MB_WLAN_BSS_SCAN_INFO_T *result_buff, M2MB_WLAN_CALLBACK m2mb_user_cb, VOID *ctx)
 This API is used to initiate a wireless scan to find nearby access points m2mb_wlan_init and m2mb_wlan_interface_init should call before calling m2mb_wlan_scan. More...
 
INT8 m2mb_wlan_connect (UINT8 device_id, UINT8 *ssid)
 This API is part of connect process in non-AP station mode. More...
 
INT8 m2mb_wlan_disconnect (UINT8 device_id)
 Disconnects a device from a network. More...
 
INT32 m2mb_wlan_get_param (UINT8 device_id, M2MB_WLAN_PARAM_FLAG_E flag, void *data)
 Getting the value[M2M_WLAN_PARAM_FLAG_E] from WLAN. More...
 
INT32 m2mb_wlan_set_param (UINT8 device_id, M2MB_WLAN_PARAM_FLAG_E flag, VOID *data)
 Setting the value[M2M_WLAN_PARAM_FLAG_E] to WLAN. More...
 
INT8 m2mb_wlan_deinit (VOID)
 Disables the WLAN module. More...
 
INT8 m2mb_wlan_interface_deinit (UINT8 device_id)
 Removes the interface from the WLAN driver. More...
 
INT8 m2mb_wlan_create (UINT8 device_id)
 This API is part of create process in soft-AP mode. More...
 
INT8 m2mb_wlan_register_cb (UINT8 device_id, M2MB_WLAN_CALLBACK m2m_wlan_cb, VOID *ctx)
 Registering a call back in WLAN driver to handle events. More...
 
INT8 m2mb_wlan_register_wps_cb (UINT8 device_id, M2MB_WLAN_CALLBACK m2m_wlan_cb, VOID *ctx)
 Registering a call back for handling WPS events. More...
 
INT32 m2mb_wlan_wps_start (UINT8 device_id, M2MB_WLAN_WPS_MODE_E method, M2MB_WLAN_WPS_CONNECT_ACTION_E connect_action, UINT8 *pin, UINT8 *ssid)
 This API is part of WPS procedure. More...
 
INT8 m2mb_wlan_status_get (INT8 device_id)
 L2 association status for both STA and AP modes. More...
 
INT32 m2mb_wlan_add_ie_mgmt_frames (UINT8 device_id, M2MB_WLAN_MGMT_FRAME_TYPE_E frame_type, INT8 *oui, INT8 *vndr_spefc_data)
 Adding information element for mgmt frames. More...
 
INT32 m2mb_wlan_send_raw_packet (UINT8 device_id, M2MB_WLAN_RAW_SEND_PARAMS_T *params)
 API to send raw packets in the air. More...
 
INT8 m2mb_wlan_deregister_cb (UINT8 device_id)
 Deregister the cb in WLAN driver. More...
 
UINT8 m2mb_wlan_get_active_mode (VOID)
 

Detailed Description

This section describes the M2MB APIs for WLAN control operations.

WLAN module APIs are used to connect to an AP till layer 2 connection in STA mode. This WLAN module APIs are also used to create a network till Layer 2 when the device is in AP mode. This module also has APIs to set the security for both STA and AP modes.

Initialization of WLAN module and interface are MANDATORY before any operations. These can be achieved by m2mb_wlan_init and m2mb_wlan_interface_init APIs respectively.

m2mb_wlan_get_param and m2mb_wlan_set_param are used to get and set parameters respectively. M2MB_WLAN_PARAM_FLAG_E enumeration plays a vital role in these APIs.

m2mb_wlan_connect is used to connect the AP in STA mode. m2mb_wlan_create is used to create a limited AP in AP mode.

Macro Definition Documentation

◆ AFGHANISTAN

#define AFGHANISTAN   "AF"

Definition at line 828 of file m2mb_wlan_driver.h.

◆ ALBANIA

#define ALBANIA   "AL"

Definition at line 776 of file m2mb_wlan_driver.h.

◆ ALGERIA

#define ALGERIA   "DZ"

Definition at line 954 of file m2mb_wlan_driver.h.

◆ AMERICAN_SAMOA

#define AMERICAN_SAMOA   "AS"

Definition at line 908 of file m2mb_wlan_driver.h.

◆ ARGENTINA

#define ARGENTINA   "AR"

Definition at line 873 of file m2mb_wlan_driver.h.

◆ ARMENIA

#define ARMENIA   "AM"

Definition at line 858 of file m2mb_wlan_driver.h.

◆ ARUBA

#define ARUBA   "AW"

Definition at line 777 of file m2mb_wlan_driver.h.

◆ AUSTRALIA

#define AUSTRALIA   "AU"

Definition at line 875 of file m2mb_wlan_driver.h.

◆ AUSTRALIA_AP

#define AUSTRALIA_AP   "AU"

Definition at line 931 of file m2mb_wlan_driver.h.

◆ AUSTRIA

#define AUSTRIA   "AT"

Definition at line 778 of file m2mb_wlan_driver.h.

◆ AZERBAIJAN

#define AZERBAIJAN   "AZ"

Definition at line 859 of file m2mb_wlan_driver.h.

◆ BAHAMAS

#define BAHAMAS   "BS"

Definition at line 909 of file m2mb_wlan_driver.h.

◆ BAHRAIN

#define BAHRAIN   "BH"

Definition at line 941 of file m2mb_wlan_driver.h.

◆ BANGLADESH

#define BANGLADESH   "BD"

Definition at line 933 of file m2mb_wlan_driver.h.

◆ BARBADOS

#define BARBADOS   "BB"

Definition at line 869 of file m2mb_wlan_driver.h.

◆ BELARUS

#define BELARUS   "BY"

Definition at line 779 of file m2mb_wlan_driver.h.

◆ BELGIUM

#define BELGIUM   "BE"

Definition at line 780 of file m2mb_wlan_driver.h.

◆ BELIZE

#define BELIZE   "BZ"

Definition at line 861 of file m2mb_wlan_driver.h.

◆ BERMUDA

#define BERMUDA   "BM"

Definition at line 910 of file m2mb_wlan_driver.h.

◆ BHUTAN

#define BHUTAN   "BT"

Definition at line 829 of file m2mb_wlan_driver.h.

◆ BOLIVIA

#define BOLIVIA   "BO"

Definition at line 947 of file m2mb_wlan_driver.h.

◆ BOSNIA_HERZEGOWANIA

#define BOSNIA_HERZEGOWANIA   "BA"

Definition at line 781 of file m2mb_wlan_driver.h.

◆ BRAZIL

#define BRAZIL   "BR"

Definition at line 876 of file m2mb_wlan_driver.h.

◆ BRUNEI_DARUSSALAM

#define BRUNEI_DARUSSALAM   "BN"

Definition at line 942 of file m2mb_wlan_driver.h.

◆ BULGARIA

#define BULGARIA   "BG"

Definition at line 782 of file m2mb_wlan_driver.h.

◆ BURKINA_FASO

#define BURKINA_FASO   "BF"

Definition at line 911 of file m2mb_wlan_driver.h.

◆ CAMBODIA

#define CAMBODIA   "KH"

Definition at line 783 of file m2mb_wlan_driver.h.

◆ CANADA

#define CANADA   "CA"

Definition at line 877 of file m2mb_wlan_driver.h.

◆ CAYMAN_ISLANDS

#define CAYMAN_ISLANDS   "KY"

Definition at line 912 of file m2mb_wlan_driver.h.

◆ CENTRAL_AFRICA_REPUBLIC

#define CENTRAL_AFRICA_REPUBLIC   "CF"

Definition at line 913 of file m2mb_wlan_driver.h.

◆ CHAD

#define CHAD   "TD"

Definition at line 831 of file m2mb_wlan_driver.h.

◆ CHILE

#define CHILE   "CL"

Definition at line 943 of file m2mb_wlan_driver.h.

◆ CHINA

#define CHINA   "CN"

Definition at line 870 of file m2mb_wlan_driver.h.

◆ CHRISTMAS_ISLAND

#define CHRISTMAS_ISLAND   "CX"

Definition at line 914 of file m2mb_wlan_driver.h.

◆ COLOMBIA

#define COLOMBIA   "CO"

Definition at line 878 of file m2mb_wlan_driver.h.

◆ COSTA_RICA

#define COSTA_RICA   "CR"

Definition at line 879 of file m2mb_wlan_driver.h.

◆ CROATIA

#define CROATIA   "HR"

Definition at line 784 of file m2mb_wlan_driver.h.

◆ CYPRUS

#define CYPRUS   "CY"

Definition at line 785 of file m2mb_wlan_driver.h.

◆ CZECH

#define CZECH   "CZ"

Definition at line 787 of file m2mb_wlan_driver.h.

◆ DENMARK

#define DENMARK   "DK"

Definition at line 788 of file m2mb_wlan_driver.h.

◆ DEV_NUM

#define DEV_NUM   2

No of device Ids or interfaces

Definition at line 82 of file m2mb_wlan_driver.h.

◆ DIVOIRE

#define DIVOIRE   "CI"

Definition at line 915 of file m2mb_wlan_driver.h.

◆ DOMINICA

#define DOMINICA   "DM"

Definition at line 868 of file m2mb_wlan_driver.h.

◆ DOMINICAN_REPUBLIC

#define DOMINICAN_REPUBLIC   "DO"

Definition at line 865 of file m2mb_wlan_driver.h.

◆ ECUADOR

#define ECUADOR   "EC"

Definition at line 880 of file m2mb_wlan_driver.h.

◆ EGYPT

#define EGYPT   "EG"

Definition at line 851 of file m2mb_wlan_driver.h.

◆ EL_SALVADOR

#define EL_SALVADOR   "SV"

Definition at line 866 of file m2mb_wlan_driver.h.

◆ ESTONIA

#define ESTONIA   "EE"

Definition at line 789 of file m2mb_wlan_driver.h.

◆ ETHIOPIA

#define ETHIOPIA   "ET"

Definition at line 832 of file m2mb_wlan_driver.h.

◆ FINLAND

#define FINLAND   "FI"

Definition at line 790 of file m2mb_wlan_driver.h.

◆ FRANCE

#define FRANCE   "FR"

Definition at line 791 of file m2mb_wlan_driver.h.

◆ FRENCH_GUIANA

#define FRENCH_GUIANA   "GF"

Definition at line 833 of file m2mb_wlan_driver.h.

◆ FRENCH_POLYNESIA

#define FRENCH_POLYNESIA   "PF"

Definition at line 834 of file m2mb_wlan_driver.h.

◆ GAUTEMALA

#define GAUTEMALA   "GT"

Definition at line 795 of file m2mb_wlan_driver.h.

◆ GEORGIA

#define GEORGIA   "GE"

Definition at line 860 of file m2mb_wlan_driver.h.

◆ GERMANY

#define GERMANY   "DE"

Definition at line 792 of file m2mb_wlan_driver.h.

◆ GHANA

#define GHANA   "GH"

Definition at line 916 of file m2mb_wlan_driver.h.

◆ GREECE

#define GREECE   "GR"

Definition at line 793 of file m2mb_wlan_driver.h.

◆ GREENLAND

#define GREENLAND   "GL"

Definition at line 794 of file m2mb_wlan_driver.h.

◆ GRENADA

#define GRENADA   "GD"

Definition at line 881 of file m2mb_wlan_driver.h.

◆ GUADELOUPE

#define GUADELOUPE   "GP"

Definition at line 835 of file m2mb_wlan_driver.h.

◆ GUAM

#define GUAM   "GU"

Definition at line 882 of file m2mb_wlan_driver.h.

◆ GUYANA

#define GUYANA   "GY"

Definition at line 936 of file m2mb_wlan_driver.h.

◆ HAITI

#define HAITI   "HT"

Definition at line 883 of file m2mb_wlan_driver.h.

◆ HONDURAS

#define HONDURAS   "HN"

Definition at line 884 of file m2mb_wlan_driver.h.

◆ HONG_KONG

#define HONG_KONG   "HK"

Definition at line 886 of file m2mb_wlan_driver.h.

◆ HUNGARY

#define HUNGARY   "HU"

Definition at line 796 of file m2mb_wlan_driver.h.

◆ ICELAND

#define ICELAND   "IS"

Definition at line 798 of file m2mb_wlan_driver.h.

◆ INDIA

#define INDIA   "IN"

Definition at line 944 of file m2mb_wlan_driver.h.

◆ INDONESIA

#define INDONESIA   "ID"

Definition at line 938 of file m2mb_wlan_driver.h.

◆ IRELAND

#define IRELAND   "IE"

Definition at line 799 of file m2mb_wlan_driver.h.

◆ ISRAEL

#define ISRAEL   "IL"

Definition at line 853 of file m2mb_wlan_driver.h.

◆ ITALY

#define ITALY   "IT"

Definition at line 800 of file m2mb_wlan_driver.h.

◆ JAMAICA

#define JAMAICA   "JM"

Definition at line 887 of file m2mb_wlan_driver.h.

◆ JAPAN

#define JAPAN   "JP"

Definition at line 955 of file m2mb_wlan_driver.h.

◆ JORDAN

#define JORDAN   "JO"

Definition at line 939 of file m2mb_wlan_driver.h.

◆ KENYA

#define KENYA   "KE"

Definition at line 953 of file m2mb_wlan_driver.h.

◆ KOREA_ROC

#define KOREA_ROC   "KR"

Definition at line 949 of file m2mb_wlan_driver.h.

◆ KUWAIT

#define KUWAIT   "KW"

Definition at line 854 of file m2mb_wlan_driver.h.

◆ LATVIA

#define LATVIA   "LV"

Definition at line 801 of file m2mb_wlan_driver.h.

◆ LEBANON

#define LEBANON   "LB"

Definition at line 888 of file m2mb_wlan_driver.h.

◆ LESOTHO

#define LESOTHO   "LS"

Definition at line 836 of file m2mb_wlan_driver.h.

◆ LIECHTENSTEIN

#define LIECHTENSTEIN   "LI"

Definition at line 802 of file m2mb_wlan_driver.h.

◆ LITHUANIA

#define LITHUANIA   "LT"

Definition at line 803 of file m2mb_wlan_driver.h.

◆ LUXEMBOURG

#define LUXEMBOURG   "LU"

Definition at line 804 of file m2mb_wlan_driver.h.

◆ M2MB_WLAN_MAC_LEN

#define M2MB_WLAN_MAC_LEN   6

Length of MAC address

Definition at line 66 of file m2mb_wlan_driver.h.

◆ M2MB_WLAN_MAX_PASSPHRASE_LEN

#define M2MB_WLAN_MAX_PASSPHRASE_LEN   64

Maximum length of passphrase

Definition at line 70 of file m2mb_wlan_driver.h.

◆ M2MB_WLAN_MAX_SSID_LEN

#define M2MB_WLAN_MAX_SSID_LEN   32

Maximum length of SSID

Definition at line 67 of file m2mb_wlan_driver.h.

◆ M2MB_WLAN_MAX_WEP_KEY_SIZE

#define M2MB_WLAN_MAX_WEP_KEY_SIZE   26

Maximum WEP key size

Definition at line 77 of file m2mb_wlan_driver.h.

◆ M2MB_WLAN_MIN_PASSPHRASE_LEN

#define M2MB_WLAN_MIN_PASSPHRASE_LEN   8

Minimum length of passphrase

Definition at line 69 of file m2mb_wlan_driver.h.

◆ M2MB_WLAN_MIN_WEP_KEY_SIZE

#define M2MB_WLAN_MIN_WEP_KEY_SIZE   10

Minimum WEP key size

Definition at line 76 of file m2mb_wlan_driver.h.

◆ M2MB_WLAN_NUM_OF_DEVICES

#define M2MB_WLAN_NUM_OF_DEVICES   2

Maximum number of virtual devices

Definition at line 72 of file m2mb_wlan_driver.h.

◆ M2MB_WLAN_PROM_FILTER_DST_ADDR

#define M2MB_WLAN_PROM_FILTER_DST_ADDR   0x02

Definition at line 733 of file m2mb_wlan_driver.h.

◆ M2MB_WLAN_PROM_FILTER_FRAME_SUB_TYPE

#define M2MB_WLAN_PROM_FILTER_FRAME_SUB_TYPE   0x08

Definition at line 735 of file m2mb_wlan_driver.h.

◆ M2MB_WLAN_PROM_FILTER_FRAME_TYPE

#define M2MB_WLAN_PROM_FILTER_FRAME_TYPE   0x04

Definition at line 734 of file m2mb_wlan_driver.h.

◆ M2MB_WLAN_PROM_FILTER_SRC_ADDR

#define M2MB_WLAN_PROM_FILTER_SRC_ADDR   0x01

Definition at line 732 of file m2mb_wlan_driver.h.

◆ M2MB_WLAN_WPS_MAX_KEY_LEN

#define M2MB_WLAN_WPS_MAX_KEY_LEN   64

Maximum size of WPS key in bytes

Definition at line 79 of file m2mb_wlan_driver.h.

◆ MACAU

#define MACAU   "MO"

Definition at line 889 of file m2mb_wlan_driver.h.

◆ MACEDONIA

#define MACEDONIA   "MK"

Definition at line 805 of file m2mb_wlan_driver.h.

◆ MALAWI

#define MALAWI   "MW"

Definition at line 806 of file m2mb_wlan_driver.h.

◆ MALAYSIA

#define MALAYSIA   "MY"

Definition at line 932 of file m2mb_wlan_driver.h.

◆ MALDIVES

#define MALDIVES   "MV"

Definition at line 946 of file m2mb_wlan_driver.h.

◆ MALTA

#define MALTA   "MT"

Definition at line 807 of file m2mb_wlan_driver.h.

◆ MARSHAL_ISLANDS

#define MARSHAL_ISLANDS   "MH"

Definition at line 917 of file m2mb_wlan_driver.h.

◆ MARTINIQUE

#define MARTINIQUE   "MQ"

Definition at line 837 of file m2mb_wlan_driver.h.

◆ MAURITIUS

#define MAURITIUS   "MU"

Definition at line 919 of file m2mb_wlan_driver.h.

◆ MAYOTTE

#define MAYOTTE   "YT"

Definition at line 838 of file m2mb_wlan_driver.h.

◆ MEXICO

#define MEXICO   "MX"

Definition at line 890 of file m2mb_wlan_driver.h.

◆ MICRONESIA

#define MICRONESIA   "FM"

Definition at line 920 of file m2mb_wlan_driver.h.

◆ MOLDOVA

#define MOLDOVA   "MD"

Definition at line 839 of file m2mb_wlan_driver.h.

◆ MONACO

#define MONACO   "MC"

Definition at line 809 of file m2mb_wlan_driver.h.

◆ MONGOLIA

#define MONGOLIA   "MN"

Definition at line 921 of file m2mb_wlan_driver.h.

◆ MONTENEGRO [1/2]

#define MONTENEGRO   "ME"

Definition at line 840 of file m2mb_wlan_driver.h.

◆ MONTENEGRO [2/2]

#define MONTENEGRO   "ME"

Definition at line 840 of file m2mb_wlan_driver.h.

◆ MOROCCO

#define MOROCCO   "MA"

Definition at line 855 of file m2mb_wlan_driver.h.

◆ NEPAL

#define NEPAL   "NP"

Definition at line 945 of file m2mb_wlan_driver.h.

◆ NETHERLAND_ANTILLES

#define NETHERLAND_ANTILLES   "AN"

Definition at line 811 of file m2mb_wlan_driver.h.

◆ NETHERLANDS

#define NETHERLANDS   "NL"

Definition at line 810 of file m2mb_wlan_driver.h.

◆ NEW_ZEALAND

#define NEW_ZEALAND   "NZ"

Definition at line 891 of file m2mb_wlan_driver.h.

◆ NICARAGUA

#define NICARAGUA   "NI"

Definition at line 922 of file m2mb_wlan_driver.h.

◆ NIGERIA

#define NIGERIA   "NG"

Definition at line 948 of file m2mb_wlan_driver.h.

◆ NORTHERN_MARIANA_ISLANDS

#define NORTHERN_MARIANA_ISLANDS   "MP"

Definition at line 923 of file m2mb_wlan_driver.h.

◆ NORWAY

#define NORWAY   "NO"

Definition at line 812 of file m2mb_wlan_driver.h.

◆ OMAN

#define OMAN   "OM"

Definition at line 813 of file m2mb_wlan_driver.h.

◆ PAKISTAN

#define PAKISTAN   "PK"

Definition at line 934 of file m2mb_wlan_driver.h.

◆ PALAU

#define PALAU   "PW"

Definition at line 924 of file m2mb_wlan_driver.h.

◆ PANAMA

#define PANAMA   "PA"

Definition at line 867 of file m2mb_wlan_driver.h.

◆ PARAGUAY

#define PARAGUAY   "PY"

Definition at line 925 of file m2mb_wlan_driver.h.

◆ PERU

#define PERU   "PE"

Definition at line 892 of file m2mb_wlan_driver.h.

◆ PHILIPPINES

#define PHILIPPINES   "PH"

Definition at line 893 of file m2mb_wlan_driver.h.

◆ POLAND

#define POLAND   "PL"

Definition at line 814 of file m2mb_wlan_driver.h.

◆ PORTUGAL

#define PORTUGAL   "PT"

Definition at line 815 of file m2mb_wlan_driver.h.

◆ PUERTO_RICO

#define PUERTO_RICO   "PR"

Definition at line 894 of file m2mb_wlan_driver.h.

◆ QATAR

#define QATAR   "QA"

Definition at line 935 of file m2mb_wlan_driver.h.

◆ REUNION

#define REUNION   "RE"

Definition at line 842 of file m2mb_wlan_driver.h.

◆ ROMANIA

#define ROMANIA   "RO"

Definition at line 816 of file m2mb_wlan_driver.h.

◆ RUSSIA

#define RUSSIA   "RU"

Definition at line 862 of file m2mb_wlan_driver.h.

◆ RWANDA

#define RWANDA   "RW"

Definition at line 895 of file m2mb_wlan_driver.h.

◆ SAINT_BARTHELEMY

#define SAINT_BARTHELEMY   "BL"

Definition at line 843 of file m2mb_wlan_driver.h.

◆ SAINT_KITTS_AND_NEVIS

#define SAINT_KITTS_AND_NEVIS   "KN"

Definition at line 950 of file m2mb_wlan_driver.h.

◆ SAINT_LUCIA

#define SAINT_LUCIA   "LC"

Definition at line 952 of file m2mb_wlan_driver.h.

◆ SAINT_MARTIN

#define SAINT_MARTIN   "MF"

Definition at line 844 of file m2mb_wlan_driver.h.

◆ SAINT_PIERRE_AND_MIQUELON

#define SAINT_PIERRE_AND_MIQUELON   "PM"

Definition at line 845 of file m2mb_wlan_driver.h.

◆ SAINT_VINCENT_AND_THE_GRENADIENS

#define SAINT_VINCENT_AND_THE_GRENADIENS   "VC"

Definition at line 846 of file m2mb_wlan_driver.h.

◆ SAMOA

#define SAMOA   "WS"

Definition at line 847 of file m2mb_wlan_driver.h.

◆ SAUDI_ARABIA

#define SAUDI_ARABIA   "SA"

Definition at line 897 of file m2mb_wlan_driver.h.

◆ SENEGAL

#define SENEGAL   "SN"

Definition at line 926 of file m2mb_wlan_driver.h.

◆ SERBIA

#define SERBIA   "RS"

Definition at line 818 of file m2mb_wlan_driver.h.

◆ SINGAPORE

#define SINGAPORE   "SG"

Definition at line 898 of file m2mb_wlan_driver.h.

◆ SLOVAKIA

#define SLOVAKIA   "SK"

Definition at line 820 of file m2mb_wlan_driver.h.

◆ SLOVENIA

#define SLOVENIA   "SI"

Definition at line 821 of file m2mb_wlan_driver.h.

◆ SOUTH_AFRICA

#define SOUTH_AFRICA   "ZA"

Definition at line 899 of file m2mb_wlan_driver.h.

◆ SPAIN

#define SPAIN   "ES"

Definition at line 822 of file m2mb_wlan_driver.h.

◆ SURINAME

#define SURINAME   "SR"

Definition at line 848 of file m2mb_wlan_driver.h.

◆ SWEDEN

#define SWEDEN   "SE"

Definition at line 823 of file m2mb_wlan_driver.h.

◆ SWITZERLAND

#define SWITZERLAND   "CH"

Definition at line 824 of file m2mb_wlan_driver.h.

◆ TAIWAN

#define TAIWAN   "TW"

Definition at line 900 of file m2mb_wlan_driver.h.

◆ TANZANIA

#define TANZANIA   "TZ"

Definition at line 937 of file m2mb_wlan_driver.h.

◆ THAILAND

#define THAILAND   "TH"

Definition at line 901 of file m2mb_wlan_driver.h.

◆ TOGO

#define TOGO   "TG"

Definition at line 849 of file m2mb_wlan_driver.h.

◆ TRINIDAD_Y_TOBAGO

#define TRINIDAD_Y_TOBAGO   "TT"

Definition at line 902 of file m2mb_wlan_driver.h.

◆ TUNISIA

#define TUNISIA   "TN"

Definition at line 856 of file m2mb_wlan_driver.h.

◆ TURKEY

#define TURKEY   "TR"

Definition at line 825 of file m2mb_wlan_driver.h.

◆ TURKS_AND_CAICOS

#define TURKS_AND_CAICOS   "TC"

Definition at line 927 of file m2mb_wlan_driver.h.

◆ UAE

#define UAE   "AE"

Definition at line 904 of file m2mb_wlan_driver.h.

◆ UGANDA

#define UGANDA   "UG"

Definition at line 903 of file m2mb_wlan_driver.h.

◆ UKRAINE

#define UKRAINE   "UA"

Definition at line 864 of file m2mb_wlan_driver.h.

◆ UNITED_KINGDOM

#define UNITED_KINGDOM   "GB"

Definition at line 826 of file m2mb_wlan_driver.h.

◆ UNITED_STATES

#define UNITED_STATES   "US"

Definition at line 905 of file m2mb_wlan_driver.h.

◆ URUGUAY

#define URUGUAY   "UY"

Definition at line 871 of file m2mb_wlan_driver.h.

◆ US_VIRGIN_ISLANDS

#define US_VIRGIN_ISLANDS   "VI"

Definition at line 930 of file m2mb_wlan_driver.h.

◆ UZBEKISTAN

#define UZBEKISTAN   "UZ"

Definition at line 857 of file m2mb_wlan_driver.h.

◆ VANUATU

#define VANUATU   "VU"

Definition at line 928 of file m2mb_wlan_driver.h.

◆ VENEZUELA

#define VENEZUELA   "VE"

Definition at line 872 of file m2mb_wlan_driver.h.

◆ VIET_NAM

#define VIET_NAM   "VN"

Definition at line 906 of file m2mb_wlan_driver.h.

◆ WALLIS_AND_FUTUNA

#define WALLIS_AND_FUTUNA   "WF"

Definition at line 850 of file m2mb_wlan_driver.h.

◆ ZIMBABWE

#define ZIMBABWE   "ZW"

Definition at line 827 of file m2mb_wlan_driver.h.

Typedef Documentation

◆ M2MB_CONNECTION_DATA_T

Connection event info for both AP and STA modes.

Data structure that presents connect event information from the driver to the application. The application uses this data structure to interpret the event payload received with an M2MB_WLAN_CONNECT_CB, M2MB_WLAN_DISCONNECT_CB events.

◆ M2MB_STA_BMISS_CONFIG_T

Beacon miss parameters setting in firmware.

Structure used to set beacon missing parameters in the firmware. Either of the values will be set by the user. Based on the values the WLAN firmware detects link loss and disconnected from the network. This can be settled by using m2mb_wlan_set_param with M2MB_WLAN_PARAM_BMISS_CONFIG flag.

◆ M2MB_WEP_KEY_INFO_T

WEP key info structure.

Structure for setting key index and key, which will be used in upcoming association when WEP security is enabled.

◆ M2MB_WLAN_BSS_SCAN_CB_INFO_T

Structure to get the count for scan results.

Structure for storing a number of scan results and pointer to the array of M2MB_WLAN_BSS_SCAN_INFO_T type structures, so that the user can come to know the total number of filled structures. The application uses this data structure to interpret the event payload received with an M2MB_WLAN_SCAN_COMPLETE_CB event.

◆ M2MB_WLAN_BSS_SCAN_INFO_T

Structure of members for scan results.

Structure for storing scan results. User application should send the array of this structure as a parameter to get filled when scan completed by the driver. This structure can be passed as one of the parameters for the m2mb_wlan_scan function.

◆ M2MB_WLAN_CALLBACK

typedef VOID(* M2MB_WLAN_CALLBACK) (UINT8 device_id, UINT8 event_id, INT32 status, VOID *data, VOID *usr_ctx)

WLAN call back prototype.

Type definition of the user callback to receive asynchronous events from WLAN driver. Device_id represents 0 or 1 after successful initialization, event_id is asynchronous events from WLAN driver. status is 0 for success -1 for failure. data is data from WLAN driver

Definition at line 965 of file m2mb_wlan_driver.h.

◆ M2MB_WLAN_PHY_DATA_RATE_T

◆ M2MB_WLAN_POWER_MODE_SETTING_T

Data structure for power mode setting.

Data structure used to request the necessary operating power mode (Maximum Performance or Power Save mode).

◆ M2MB_WLAN_PROFILE_PNO_T

Preferred Network Offload setting in firmware.

Data structure to set an AP profile information to search for when enabling the PNO feature. This data structure is used to set the profile by passing the required profile information to m2mb_wlan_set_param() with M2MB_WLAN_SETTING_PROFILE_INFO as flag

◆ M2MB_WLAN_RAW_SEND_PARAMS_T

802.11 RAW frame.

Data structure that the application is to pass when invoking m2mb_wlan_send_raw_packet() to transmit a raw frame.

◆ M2MB_WLAN_WPS_CB_INFO_T

WPS cb information.

Data structure to get WPS command results from the driver.

◆ M2MB_WLAN_WPS_CREDENTIALS_T

WPS credentials information.

Data structure to pass WPS credentials from the driver to the application.

Enumeration Type Documentation

◆ M2MB_WLAN_11N_HT_E

11n HT configurations.

Enumeration for WLAN 11n HT configurations.

Enumerator
M2MB_WLAN_11N_DISABLED 

802.11n disabled. Not supported

M2MB_WLAN_11N_HT20 

802.11n with bandwidth 20M. This will be default

M2MB_WLAN_11N_HT40 

802.11n with bandwidth 40M.

Definition at line 469 of file m2mb_wlan_driver.h.

◆ M2MB_WLAN_8021X_METHOD_E

Different 802.1x methods supported by WLAN firmware.

Enumeration that identifies 802.1x enterprise supported by the WLAN subsystem. The application sets the required 802.1x method from one of these methods using m2mb_wlan_set_param() with M2MB_WLAN_PARAM_EAP_8021X and the required information should be filled in the M2MB_WLAN_EAP_T structure.

Note
This should be set before calling m2mb_wlan_connect API
Enumerator
M2MB_WLAN_8021X_METHOD_UNKNOWN_E 

unknown method

M2MB_WLAN_8021X_METHOD_EAP_TLS_E 

TLS

M2MB_WLAN_8021X_METHOD_EAP_TTLS_MSCHAPV2_E 

TTLS-MSCHAPV2

M2MB_WLAN_8021X_METHOD_EAP_PEAP_MSCHAPV2_E 

PEAP-MSCHAPV2

M2MB_WLAN_8021X_METHOD_EAP_TTLS_MD5_E 

TTLS-MD5

M2MB_WLAN_8021X_METHOD_MAX 

maximum

Definition at line 260 of file m2mb_wlan_driver.h.

◆ M2MB_WLAN_AUTH_TYPE_E

Different authentication modes supported by WLAN.

Enumeration that identifies authentication modes supported by the WLAN subsystem. The application sets the required authentication from one of these modes using m2mb_wlan_set_param() with M2MB_WLAN_PARAM_AUTH_TYPE as the flag.

Note
This should be set before calling m2mb_wlan_connect or m2mb_wlan_create API
Enumerator
M2MB_WLAN_AUTH_TYPE_NONE 

Open mode authentication

M2MB_WLAN_AUTH_TYPE_WPA 

Wi-Fi protected Access v1

M2MB_WLAN_AUTH_TYPE_WPA2 

Wi-Fi protected Access v2

M2MB_WLAN_AUTH_TYPE_WPA_PSK 

Wi-Fi protected Access v1 PSK

M2MB_WLAN_AUTH_TYPE_WPA2_PSK 

Wi-Fi protected Access v2 PSK

M2MB_WLAN_AUTH_TYPE_WEP 

WEP mode authentication

M2MB_WLAN_AUTH_TYPE_WEP_SHARED 

WEP Shared mode authentication

M2MB_WLAN_AUTH_TYPE_WPA3 

WPA3 authentication

M2MB_WLAN_AUTH_TYPE_INVALID 

Definition at line 217 of file m2mb_wlan_driver.h.

◆ M2MB_WLAN_CB_ID_E

Events for an application registered CB functions.

WLAN driver invokes an application-registered callback function to indicate various asynchronous events to the application. This data structure enumerates the list of various event IDs for which the WLAN driver invokes the application-registered callback function.

Enumerator
M2MB_WLAN_SCAN_COMPLETE_CB 

ID to indicate scan complete

M2MB_WLAN_CONNECT_CB 

ID to indicate assoc complete

M2MB_WLAN_CONNECT_FAIL_CB 

ID to indicate assoc fail

M2MB_WLAN_DISCONNECT_CB 

ID to indicate disconnect

M2MB_WLAN_PROFILE_PNO_CB 

ID for PNO event

M2MB_WLAN_EVENT_WPS_CB 

ID for WPS event

M2MB_WLAN_EVENT_PROMISCOUS_CB 

ID for PROMISC event

M2MB_WLAN_EVENT_STA_CONN_CB 
M2MB_WLAN_EVENT_STA_DISCONN_CB 
M2MB_WLAN_CB_MAX 

Definition at line 507 of file m2mb_wlan_driver.h.

◆ M2MB_WLAN_DTIM_POLICY_E

DTIM policies.

Enumeration of supported DTIM policies.

Enumerator
M2MB_WLAN_DTIM_NORMAL 

Non-AP station wakeup at TIM intervals.

M2MB_WLAN_DTIM_STICK 

Non-AP station wakeup only at DTIM intervals.

M2MB_WLAN_DTIM_AUTO 

Non-AP station wakeup at both TIM and DTIM intervals.

Definition at line 694 of file m2mb_wlan_driver.h.

◆ M2MB_WLAN_ENCRYPT_TYPE_E

Different encryption modes supported by WLAN.

Enumeration that identifies encryption modes supported by the WLAN subsystem. The application sets the required encryption from one of these modes using m2mb_wlan_set_param() with M2MB_WLAN_PARAM_ENCRYPTION_TYPE as the flag.

Note
This should be set before calling m2mb_wlan_connect or m2mb_wlan_create API
Enumerator
M2MB_WLAN_ENCRYPT_TYPE_NONE 

No encryption

M2MB_WLAN_ENCRYPT_TYPE_WEP 

WEP encryption

M2MB_WLAN_ENCRYPT_TYPE_TKIP 

TKIP encryption

M2MB_WLAN_ENCRYPT_TYPE_AES 

AES encryption

M2MB_WLAN_ENCRYPT_TYPE_INVALID 

Definition at line 241 of file m2mb_wlan_driver.h.

◆ M2MB_WLAN_MGMT_FRAME_TYPE_E

MGMT frame types.

Enum declaration for management frame types.

Enumerator
M2MB_WLAN_FRAME_BEACON 

Beacon frame type.

M2MB_WLAN_FRAME_PROBE_REQ 

Probe request frame type.

M2MB_WLAN_FRAME_PROBE_RESP 

Probe response frame type.

M2MB_WLAN_FRAME_ASSOC_REQ 

Association request frame type

M2MB_WLAN_FRAME_ASSOC_RESP 

Association response frame type.

M2MB_WLAN_NUM_MGMT_FRAME 

Number of management frame types.

Definition at line 590 of file m2mb_wlan_driver.h.

◆ M2MB_WLAN_MODE_E

WLAN interface operating modes.

Enumeration that provides a list of supported operating modes for each virtual device.

Enumerator
M2MB_WLAN_MODE_STATION 

Infrastructure non-AP Station mode, supported in both Single Device mode and Concurrent mode. When operating in Concurrent mode, virtual device 1 must be used for the Station mode of operation.

M2MB_WLAN_MODE_ACCESS_POINT 

Infrastructure AP Station mode, supported in both Single Device mode and Concurrent mode. When operating in Concurrent mode, virtual device 0 must be used for the AP mode of operation.

M2MB_WLAN_MODE_ADHOC 

Independent BSS mode of operation, supported in Single Device mode only. Virtual device 0 must be used for the IBSS mode of operation.

M2MB_WLAN_MODE_INVALID 

Invalid device mode.

Definition at line 445 of file m2mb_wlan_driver.h.

◆ M2MB_WLAN_MODE_UP_E

Enumerator
M2MB_WLAN_MODE_DOWN 
M2MB_WLAN_MODE_STA_UP 
M2MB_WLAN_MODE_AP_UP 
M2MB_WLAN_MODE_BOTH_UP 

Definition at line 768 of file m2mb_wlan_driver.h.

◆ M2MB_WLAN_PARAM_FLAG_E

WLAN interface set or get flags.

Enumeration of flags which are used to set or get the parameters to the driver and from the driver. Some flags may support both set and get functionalities.

Enumerator
M2MB_WLAN_PARAM_SSID 

To GET or SET SSID, If the device is in AP mode, this SSID will acts like SSID for the network. If the device is in STA mode, SSID will be the SSID of the network to which STA wants to connect . M2MB_WLAN_MAX_SSID_LEN is the max length of SSID To GET or SET the channel number. If the device is in AP mode, this channel number is used as network channel network and the network will start in this channel. If the device is in STA mode, then this channel number is used to scanning purpose in a particular channel. channel values are set in numbers[1-14][36-165] not in frequencies

M2MB_WLAN_PARAM_CHANNEL 

To GET the MAC address. This works for both AP mode and STA mode also. MAC address can be set before association in STA mode and before starting the network in AP mode. MAC address can also be got at any time, until device is up. M2MB_WLAN_MAC_LEN is MAC address length, and array must be declared with above mentioned size

M2MB_WLAN_PARAM_MAC_ADDRESS 

To GET or SET the operating mode. STA mode and soft AP mode are two modes. device identifier 0 will supports both STA and AP modes. The device identifier 1 will supports only STA mode, so when the user starts WLAN in STA mode device ID 1 is assigned and when the user starts WLAN in AP mode device id 0 is assigned

M2MB_WLAN_PARAM_OPERATION_MODE 

To SET the listen interval. Setting of listen interval only supports in STA mode i.e operating mode should be STA. This value is used in association request frame. Listen interval is multiple of beacon intervals. For example value of 1 corresponds to 1 beacon interval

M2MB_WLAN_PARAM_LISTEN_INTERVAL 

To SET the DTIM interval. Setting of DTIM interval only supports in softAP mode i.e operating mode should be set to Soft AP and DTIM interval should set before the starting device in AP mode. DTIM interval is multiple of beacon intervals. For example, if it is set as 2 every beacon after 2 beacons is DTIM beacon, at which every station must wake and receive this DTIM beacon to know buffered packets is there or not for its association id

M2MB_WLAN_PARAM_DTIM_INTERVAL 

To enable or disable the hidden SSID feature. Setting this flag is only supports in softAP operating mode. Firstly, set the operating mode to AP mode and then enable or disable hidden SSID feature. This flag supports only to SET

M2MB_WLAN_PARAM_AP_ENABLE_HIDDEN_MODE 

To SET keep alive frame interval in sec. Setting this flag only supports in STA mode. If this value set to '0', the keep alive timer will be disabled

M2MB_WLAN_PARAM_STA_KEEP_ALIVE_IN_SEC 

To SET the beacon interval in TU(time units). This flag is set and applicable only if device is in softAP operating mode. One TU = 1024 microseconds. Number of TUs between every beacon

M2MB_WLAN_PARAM_BEACON_INTERVAL_TU 

To SET the beacon missing parameters. M2MB_STA_BMISS_CONFIG_T is used as the parameter to set to the driver. On receiving this request from user in STA mode, WLAN firmware reports a link loss after a specified interval. Either of the values will be set by user, bmiss_time_in_ms or num_beacons. The other value should be set to 0. Based on the values the WLAN firmware detects link loss and disconnected from the network

M2MB_WLAN_PARAM_BMISS_CONFIG 

To GET or SET the RSSI value. For setting, this RSSI value is used for setting the threshold. If the user wants to GET the RSSI value, it returns RSSI value in dB. TO DO Need some structure to set the threshold values

M2MB_WLAN_PARAM_RSSI 

To SET or GET the transmit power level in dBm. To set the transmit power level, the range is between 0-63. By default, the value is 63 (max)

M2MB_WLAN_PARAM_TX_POWER 

To GET the regulatory domain which driver is currently using. This flag is used to only get the regulatory domain

M2MB_WLAN_PARAM_REG_DOMAIN 

To GET or SET the WLAN rate of packets transmitted over radio. This flag is used to GET the transmission rate of received packets over radio, or to SET the transmission rate of the packets which is going to transmit over the radio. TO DO

M2MB_WLAN_PARAM_TX_RATE 

Need some clarification about setting values and setting power save

M2MB_WLAN_PARAM_POWER_SAVE_MODE 
M2MB_WLAN_PARAM_POWER_SAVE_POLICY 

To GET or SET the wireless PHY mode(a|b|g|an|ag|gn|agn). Use M2MB_WLAN_PHY_MODE_E. The SET operation should be done before establishing the connection . The GET operation can be done before or after the connection

M2MB_WLAN_PARAM_PHY_MODE 

To GET or SET the authentication type. Authentication should be set before connecting to the peer. 0 for none , 3 for wpa_psk, 4 for wpa2_psk

M2MB_WLAN_PARAM_AUTH_TYPE 
M2MB_WLAN_PARAM_AUTH_TYPE_NUM 
M2MB_WLAN_PARAM_ENCRYPTION_TYPE 
M2MB_WLAN_PARAM_ENCRYPTION_TYPE_NUM 
M2MB_WLAN_PARAM_SECURITY_MODE 
M2MB_WLAN_PARAM_BSSID 

To SET the passphrase for upcoming WPA/WPA2 association procedure. This should be set before initiating the association. The length should be between 8 and 64

M2MB_WLAN_PARAM_WPA_PSK 
M2MB_WLAN_PARAM_SECURITY_PASSPHRASE 

To SET or GET the WEP key index. SET should be done before initiating an association. The value should be set between 1 to 4. If user has given key index as 1, driver uses key at index 1 for upcoming association. If key is not present , then it will return error

M2MB_WLAN_PARAM_WEP_KEY_INDEX 

To SET or GET the {keyindex and key} pair for upcoming association. SET should be done before initiating the association. This is like setting a key for the given key index. This flag is used for getting the key at particular key index

M2MB_WLAN_PARAM_WEP_KEY_PAIR 

To SET the WPS credentials

M2MB_WLAN_PARAM_WPS_CREDENTIALS 
M2MB_WLAN_PARAM_GET_STATS 
M2MB_WLAN_PARAM_PNO_INFO 
M2MB_WLAN_SETTING_PROFILE_INFO 
M2MB_WLAN_COUNTRY_CODE 
M2MB_WLAN_11N_HT 
M2MB_WLAN_PARAM_AP_WPS_SUPPORT 
M2MB_WLAN_PARAM_PROMISC_FILTER_INFO 
M2MB_WLAN_PARAM_PROMISC_CMD 
M2MB_WLAN_PARAM_EAP_8021X 
M2MB_WLAN_PARAM_INACTIVITY_TIME_IN_MIN 
M2MB_WLAN_PARAM_SCAN_TIME 
M2MB_WLAN_UAPSD_CONFIG_FLAG 
M2MB_WLAN_PARAM_RXACTIVE_MODE 
M2MB_WLAN_PARAM_REG_USER_CALLBACK 
M2MB_WLAN_PARAM_MAX 

Definition at line 303 of file m2mb_wlan_driver.h.

◆ M2MB_WLAN_PHY_MODE_E

802.11 PHY modes.

Enumeration that provides a list of supported 802.11 PHY modes.

Enumerator
M2MB_WLAN_11A_MODE 

802.11a. WE310 doesn't support this

M2MB_WLAN_11G_MODE 

802.11g. WE310 doesn't support this

M2MB_WLAN_11AG_MODE 

802.11ag. WE310 doesn't support this

M2MB_WLAN_11B_MODE 

802.11b.

M2MB_WLAN_11GONLY_MODE 

802.11g. WE310 doesn't support this

M2MB_WLAN_11BG_MODE 

802.11bg WL865 doesn't support this

M2MB_WLAN_11BGN_MODE 

802.11bgn WL865 doesn't support this

M2MB_WLAN_11NONLY_MODE 

Definition at line 481 of file m2mb_wlan_driver.h.

◆ M2MB_WLAN_POWER_MODE_E

power save modes.

Enumeration of a list of supported power modes in the WLAN subsystem.

Enumerator
M2MB_WLAN_POWER_SAVE_MODE 

Power Save mode that enables both MAC and system power save.

M2MB_WLAN_MAX_PERF_MODE 

Maximum performance mode that disables both MAC and system power save.

M2MB_WLAN_INVALID_POWER_MODE 

Definition at line 651 of file m2mb_wlan_driver.h.

◆ M2MB_WLAN_POWER_MODULE_E

power save modes.

Enumeration of a list of supported power modes in the WLAN subsystem.

Enumerator
M2MB_WLAN_POWER_MODULE_USER 

If the application requires the system to be in Maximum Performance mode.

M2MB_WLAN_POWER_MODULE_INVALID 

Definition at line 667 of file m2mb_wlan_driver.h.

◆ M2MB_WLAN_RAW_MODE_HEADER_TYPE_E

802.11 header types.

Enumeration of a list of supported 802.11 header types for a Raw mode transmission.

Enumerator
M2MB_WLAN_RAW_MODE_HDR_TYPE_BEACON 

Raw mode frame header is of type beacon.

M2MB_WLAN_RAW_MODE_HDR_TYPE_PROBE_REQUEST 

Raw mode frame header is of type probe request data.

M2MB_WLAN_RAW_MODE_HDR_TYPE_PROBE_RESPONSE 

Raw mode frame header is of type probe response data.

M2MB_WLAN_RAW_MODE_HDR_TYPE_DATA 
M2MB_WLAN_RAW_MODE_HDR_TYPE_ACTION 

Definition at line 605 of file m2mb_wlan_driver.h.

◆ M2MB_WLAN_WPS_CONNECT_ACTION_E

action after WPS procedure success.

Enumerator
M2MB_WLAN_NO_ACTION_POST_WPS_PROCEDURE 

No action to be taken after WPS initiation succeeds.

M2MB_WLAN_L2_CONNECT_POST_WPS_PROCEDURE 

Set up a connection after WPS initiation succeeds.

Definition at line 534 of file m2mb_wlan_driver.h.

◆ M2MB_WLAN_WPS_MODE_E

WPS methods.

Enumeration for different types of WPS methods.

Enumerator
M2MB_WLAN_WPS_PIN_MODE 

WPS PIN method.

M2MB_WLAN_WPS_PBC_MODE 

WPS Pushbutton method.

M2MB_WLAN_WPS_DEFAULT_PIN_MODE 

Default PIN (No support)

Definition at line 526 of file m2mb_wlan_driver.h.

Function Documentation

◆ m2mb_wlan_add_ie_mgmt_frames()

INT32 m2mb_wlan_add_ie_mgmt_frames ( UINT8  device_id,
M2MB_WLAN_MGMT_FRAME_TYPE_E  frame_type,
INT8 oui,
INT8 vndr_spefc_data 
)

Adding information element for mgmt frames.

This API is used to add the information elements to the management frames. the management frames are any one of from M2MB_WLAN_MGMT_FRAME_TYPE_E enum.

Parameters
[in]device_idSpecific device Identifier [mandatory]
[in]frame_type[mandatory] Frame type to add IE. In STA mode, the IE can be added to probe request. In AP mode, the IE can be added to probe response and beacon frame.
[in]oui[mandatory] OUI of vendor specific element.
[in]vndr_spefc_data[mandatory] vendor specific data to be added in IE for the particular mgmt frame.
Returns
Returns 0 for success. Returns -1 for failure.
Note
m2mb_wlan_init and m2mb_wlan_interface_init should be issued first

m2mb_wlan_add_ie_mgmt_frames(device_id, frame_type, oui, vendor_content);

int main()
{
INT32 result;
UINT8 device_id = 2;
NULL, &device_id);
result = m2mb_wlan_add_ie_mgmt_frames(WHANDLE,
frame_type, oui, vendor_content);
if(result == 0)
{
return 0;
}
else
{
return -1;
}
}

◆ m2mb_wlan_connect()

INT8 m2mb_wlan_connect ( UINT8  device_id,
UINT8 ssid 
)

This API is part of connect process in non-AP station mode.

This function scans for particular SSID given by user and try to connects to it.If SSID is set to a non-empty string before calling this API then it is considered as a connect request. Then, user callback gets called after connect event with status.

Parameters
[in]device_idSpecific device Identifier [mandatory]
[in]ssidSSID of the particular Access Point to connect [mandatory]
Returns
0 - OK successful, -1 for ERROR
Note
Before calling m2m_wlan_connect, m2mb_wlan_init and m2mb_wlan_interface_init should be called and should return successful. If user wants to connect to an secured network, then use m2mb_set_wlan_param to set parameters. Refer M2MB_WLAN_PARAM_FLAG_E for setting secured parameters.

m2m_wlan_connect ( device_id, ssid);

void call_back(UINT8 device_id, UINT8 event_id, INT8 status, UINT8 *data)
{
switch(event_id)
{
{
if(status == TRUE)
{
//assoc done
}
else if(status == M2MB_WLAN_INVALID_PROFILE)
{
//handshake failed
}
else if(status == M2MB_WLAN_SEC_HS_TO_RECV_M1)
{
//handshake success
}
break;
}
}
}
int main()
{
UINT8 device_id = 2;
UINT8 *ssid = "scan_ap";
INT8 result;
result = m2m_wlan_init();
if (result != 0)
{
return -1;
}
if (result == -1)
{
return -1;
}
if(device_id != 0 || device_id != 1)
return -1;
result = m2m_wlan_connect ( device_id, ssid);
return 0;
}

◆ m2mb_wlan_create()

INT8 m2mb_wlan_create ( UINT8  device_id)

This API is part of create process in soft-AP mode.

This function creates the network with SSID and security types given by user. User should given channel number also. Or else default values will take

Parameters
[in]device_idSpecific device Identifier [mandatory]
Returns
0 - OK successful. -1 for ERROR
Note
Before calling m2m_wlan_create, m2mb_wlan_init and m2mb_wlan_interface_init should be called and should return successful. The user should set the channel, authentication, and encryption types by using m2mb_set_wlan_param function. Refer M2MB_WLAN_PARAM_FLAG_E enum for setting authentication and encryption parameters.

m2mb_wlan_create ( device_id);

void call_back(UINT8 device_id, UINT8 event_id, INT8 status, UINT8 *data)
{
switch(event_id)
{
{
if(connect_data->bssCon == TRUE)
{
//soft AP l2 start done
}
else
{
//failed
}
break;
}
}
}
int main()
{
UINT8 device_id = 2;
UINT8 *ssid = "scan_ap";
INT8 result;
UINT8 channel = 6;
result = m2mb_wlan_init ();
if (result != 0)
{
return -1;
}
NULL, &device_id);
if (result == -1)
{
return -1;
}
&channel);
result = m2m_wlan_create ( device_id);
if (result == -1)
{
return -1;
}
return 0;
}

◆ m2mb_wlan_deinit()

INT8 m2mb_wlan_deinit ( VOID  )

Disables the WLAN module.

This API disables the WLAN module. After this API, no WLAN API will work until application enables it again by using m2mb_wlan_init()

Returns
Returns 0 - OK Successful. Returns -1 - ERROR

m2mb_wlan_deinit();

int main()
{
INT8 result;
result = m2mb_wlan_init ();
if (result != 0)
{
return -1;
}
result = m2mb_wlan_deinit();
if (result != 0)
{
return -1;
}
return 0;
}

◆ m2mb_wlan_deregister_cb()

INT8 m2mb_wlan_deregister_cb ( UINT8  device_id)

Deregister the cb in WLAN driver.

This API allows to deregister the call back in WLAN driver.

Parameters
[in]device_idSpecific device Identifier [mandatory]
Returns
Returns 0 - OK Successful. Returns -1 - ERROR

m2mb_wlan_deregister_cb( device_id );

void b_call_back(UINT8 device_id, UINT8 event_id, INT8 status, UINT8 *data)
{
...
}
int main()
{
UINT8 device_id = 2;
INT8 result;
result = m2mb_wlan_init ();
if (result != 0)
{
return -1;
}
NULL, &device_id);
if (result == -1)
{
return -1;
}
result = m2mb_wlan_register_cb ( device_id, b_callback, NULL);
result = m2mb_wlan_deregister_cb (device_id);
return 0;
}

◆ m2mb_wlan_disconnect()

INT8 m2mb_wlan_disconnect ( UINT8  device_id)

Disconnects a device from a network.

This API allows the user to disconnect a device, or abort the current connection process. After disconnection, the user call back will get asynchronous event from WLAN driver

Parameters
[in]device_idSpecific device Identifier [mandatory]
Returns
Returns 0 - Ok SuccessFull, -1 - ERROR

m2mb_wlan_disconnect( device_id );

void call_back(UINT8 device_id, UINT8 event_id, INT8 status, UINT8 *data)
{
switch(event_id)
{
{
break; //disassoc done
}
}
}
int main()
{
UINT8 device_id = 2;
UINT8 *ssid = "scan_ap";
INT8 result;
result = m2m_wlan_init();
if (result != 0)
{
return -1;
}
if (result == -1)
{
return -1;
}
if(device_id != 0 || device_id != 1)
return -1;
result = m2m_wlan_connect ( device_id, ssid);
result = m2mb_wlan_disconnect( device_id );
return 0;
}

◆ m2mb_wlan_get_active_mode()

UINT8 m2mb_wlan_get_active_mode ( VOID  )

◆ m2mb_wlan_get_param()

INT32 m2mb_wlan_get_param ( UINT8  device_id,
M2MB_WLAN_PARAM_FLAG_E  flag,
void *  data 
)

Getting the value[M2M_WLAN_PARAM_FLAG_E] from WLAN.

This API returns the value of WLAN parameter requested by the user. The user can use M2M_WLAN_PARAM_FLAG_E flags as references to pass to WLAN driver.

Parameters
[in]device_idSpecific device Identifier [mandatory]
[in]flagGet the one of the flags from M2M_WLAN_PARAM_FLAG_E enumeration
[in,out]dataPass the pointer from user, it will be returned from the WLAN driver
Returns
Returns 0 - OK. Returns -1 - ERROR
Note
Before calling m2mb_wlan_get_param, m2mb_wlan_init followed by m2mb_wlan_interface_init should be called and return successful. Some of the flags only support set functionality.

m2mb_wlan_get_param(device_id, M2M_WLAN_PARAM_OPERATION_MODE, &operating_mode);

int main()
{
INT8 result;
UINT8 device_id = 0;
UINT8 operating_mode;
result = m2m_wlan_init();
if (result != 0)
{
return -1;
}
if (result == -1)
{
return -1;
}
if(device_id != 0 || device_id != 1)
return -1;
result = m2mb_wlan_get_param(device_id, M2M_WLAN_PARAM_OPERATION_MODE,
&operating_mode);
if(result != 0)
{
return -1;
}
return 0;
}

◆ m2mb_wlan_init()

INT8 m2mb_wlan_init ( M2MB_WLAN_11N_HT_E  mode)

WLAN module initialization.

This API enables and initializes WLAN module.

Returns
Returns 0 - OK -1 on error

m2mb_wlan_init();

int main()
{
INT8 result;
result = m2mb_wlan_init();
if (result != 0)
{
return -1;
}
return 0;
}

◆ m2mb_wlan_interface_deinit()

INT8 m2mb_wlan_interface_deinit ( UINT8  device_id)

Removes the interface from the WLAN driver.

This API used to remove the device id or interface from the WLAN driver. But, this API does not disable the WLAN module

Parameters
[in]device_idSpecific device Identifier [mandatory]
Returns
Returns 0 - OK Successful. Returns -1 - ERROR

m2mb_wlan_interface_deinit(device_id);

int main()
{
UINT8 device_id = 2;
INT8 result;
result = m2m_wlan_init();
if (result != 0)
{
return -1;
}
if (result == -1)
{
return -1;
}
if(device_id != 0 || device_id != 1)
return -1;
result = m2mb_wlan_interface_deinit(device_id);
if (result != 0)
{
return -1;
}
return 0;
}

◆ m2mb_wlan_interface_init()

INT8 m2mb_wlan_interface_init ( M2MB_WLAN_MODE_E  mode,
M2MB_WLAN_CALLBACK  m2m_wlan_user_cb,
VOID appCtx,
UINT8 device_id 
)

WLAN Interface Initialization.

This API initializes the interface depend on the mode given by the user and the WLAN driver returns the device_id after initialization. Since, m2mb_wlan_init is the dependency for this API, so m2mb_wlan_init should call before calling the m2m_wlan_interface_init.

Parameters
[in]modeUser should pass the mode using M2MB_WLAN_MODE_E.
[in]m2m_wlan_user_cbApplication call back for WLAn events
[in]appCtxApplication context
[in,out]device_idDevice ID user will get after successful m2mb_wlan_interface_init
Returns
Returns 0 on success, -1 for error
Note
m2mb_wlan_init function should be called properly before calling m2mb_wlan_interface_init function

m2mb_wlan_interface_init( M2MB_WLAN_MODE_E mode , M2MB_WLAN_CALLBACK m2mB_wlan_user_cb, VOID *appCtx, UINT8 *device_id);

void cb(UINT8 device_id, UINT8 event_id, INT32 status, VOID *data)
{
{
...
}
break;
{
...
}
break;
}
int main()
{
INT8 result;
UINT8 device_id = 2;
result = m2mb_wlan_init();
if (result != 0)
{
return -1;
}
if (result == -1)
{
return -1;
}
if(device_id != 0 || device_id != 1)
return -1;
return 0;
}

◆ m2mb_wlan_register_cb()

INT8 m2mb_wlan_register_cb ( UINT8  device_id,
M2MB_WLAN_CALLBACK  m2m_wlan_cb,
VOID ctx 
)

Registering a call back in WLAN driver to handle events.

This API allows to overwrite the callback function which was already registered by m2mb_wlan_interface_init function.

Parameters
[in]device_idSpecific device Identifier [mandatory]
[in]m2m_wlan_cbApplication call back for WLAn events
[in]ctxApplication context
Returns
Returns 0 - Ok SuccessFull. Returns -1 - ERROR

m2mb_wlan_register_cb( UINT8 device_id, M2MB_WLAN_CALLBACK m2m_wlan_cb, VOID *ctx );

void a_call_back(UINT8 device_id, UINT8 event_id, INT8 status, UINT8 *data)
{
...
}
void b_callback(UINT8 device_id, UINT8 event_id, INT8 status, UINT8 *data)
{
...
}
int main()
{
UINT8 device_id = 2;
INT8 result;
result = m2mb_wlan_init ();
if (result != 0)
{
return -1;
}
NULL, &device_id);
if (result == -1)
{
return -1;
}
result = m2mb_wlan_register_cb ( device_id, b_callback, NULL);
return 0;
}

◆ m2mb_wlan_register_wps_cb()

INT8 m2mb_wlan_register_wps_cb ( UINT8  device_id,
M2MB_WLAN_CALLBACK  m2m_wlan_cb,
VOID ctx 
)

Registering a call back for handling WPS events.

This API allows to register a callback function to handle WPS events from WLAN firmware.

Parameters
[in]device_idSpecific device Identifier [mandatory]
[in]m2m_wlan_cbcall back function [mandatory]
[in]ctxapp level context [mandatory]
Returns
Returns 0 - Ok SuccessFull. Returns -1 - ERROR

m2mb_wlan_register_wps_cb( UINT8 device_id, M2MB_WLAN_CALLBACK m2m_wlan_cb, VOID *ctx );

void callback(UINT8 device_id, UINT8 event_id, INT8 status, UINT8 *data)
{
{
...
}
break;
}
int main()
{
UINT8 device_id = 2;
INT8 result;
result = m2mb_wlan_init ();
if (result != 0)
{
return -1;
}
NULL, &device_id);
if (result == -1)
{
return -1;
}
result = m2mb_wlan_register_wps_cb ( device_id, callback, NULL);
result = m2mb_wlan_wps_start(device_id, method, l2connnectinfo, pin , ssid);
return 0;
}

◆ m2mb_wlan_scan()

INT8 m2mb_wlan_scan ( UINT8  device_id,
UINT8 ssid,
UINT8  no_of_channels,
UINT8 channel_list,
UINT8  scan_type,
UINT32  num_of_scan_entries,
M2MB_WLAN_BSS_SCAN_INFO_T result_buff,
M2MB_WLAN_CALLBACK  m2mb_user_cb,
VOID ctx 
)

This API is used to initiate a wireless scan to find nearby access points m2mb_wlan_init and m2mb_wlan_interface_init should call before calling m2mb_wlan_scan.

This function does the wireless scan depending on the parameters passed by the user, and WLAN driver fill the user buffer with the most recent scan results. User callback function gets the asynchronous event for scan complete after completion. The last parameter of user callback contains the scan results with count.

Parameters
[in]device_idSpecific device Identifier [mandatory]. Since device id 0 and device id 1 supports STA mode, user can pass any device id after initialization of it
[in]ssidSSID of the particular Access Point to scan [optional]
[in]no_of_channelsNumber of channels to scan [optional]. 0 for all channel scan
[in]channel_listList of channels that user wants to scan.
[in]scan_typeScanning type ; [active - 0] or [passive - 1]
[in]num_of_scan_entriesUser can pass number of entries of scan results and he should provide buffer of that number of scan results. Array of M2MB_WLAN_BSS_SCAN_INFO_T structures
[in,out]result_buffBuffer which is provided by the user to store scan results.
Returns
Returns 0 - OK successful, -1 for error
Note
Before calling m2mb_wlan_scan, m2mb_wlan_init and m2mb_wlan_interface_init should be called and should return successful. If mode is M2MB_WLAN_MODE_ACCESS_POINT in m2mb_wlan_interface_init then this API returns with failure case.

m2m_wlan_scan( deviceId, ssid, no_of_channels, channel_list, scan_type, 25, resultBuffer);

M2MB_WLAN_BSS_SCAN_INFO_T resultBuffer[25];
void call_back(UINT8 device_id, UINT8 event_id, INT8 status, UINT8 *data)
{
switch(event_id)
{
{
int entries = 0, i = 0;
entries = scan_info_cb->entries;
for (i = 0; i < entries; i++)
{
printf("scan results\n");
}
}
}
}
int main()
{
INT8 result;
UINT8 device_id = -1;
UINT8 no_of_channels = 3;
UINT8 channel_list[3] = {1, 6, 11};
UINT8 scan_type = 0;
UINT8 *ssid = NULL;
result = m2m_wlan_init();
if (result != 0)
{
return -1;
}
if (result == -1)
{
return -1;
}
if(device_id != 0 || device_id != 1)
return -1;
result = m2mb_wlan_scan ( device_id, ssid, no_of_channels, channel_list
scan_type, 25, resultBuffer);
if (result != 0)
{
return -1;
}
return 0;
}

◆ m2mb_wlan_send_raw_packet()

INT32 m2mb_wlan_send_raw_packet ( UINT8  device_id,
M2MB_WLAN_RAW_SEND_PARAMS_T params 
)

API to send raw packets in the air.

This API is used to send the raw packets or unsolicited tx.

Parameters
[in]device_idSpecific device Identifier [mandatory]
[in]params[mandatory] User should specifies the structure members accordingly.
Returns
Returns 0 for success. Non-zero for failure.
Note
m2mb_wlan_init and m2mb_wlan_interface_init should be issued first

m2mb_wlan_send_raw_packet(WHANDLE, &raw_packet_params);

int main()
{
INT32 result;
UINT8 device_id = 2;
M2MB_WLAN_RAW_SEND_PARAMS_T raw_packet_params; fill accordingly
NULL, &device_id);
result = m2mb_wlan_send_raw_packet(WHANDLE, &raw_packet_params);
if(result == 0)
{
return 0;
}
else
{
return -1;
}
}

◆ m2mb_wlan_set_param()

INT32 m2mb_wlan_set_param ( UINT8  device_id,
M2MB_WLAN_PARAM_FLAG_E  flag,
VOID data 
)

Setting the value[M2M_WLAN_PARAM_FLAG_E] to WLAN.

This API sets the value to WLAN driver sent by the user. The user can use M2M_WLAN_PARAM_FLAG_E flags as references to pass to WLAN driver.

Parameters
[in]device_idSpecific device Identifier [mandatory]
[in]flagSet the one of the flags from M2M_WLAN_PARAM_FLAG_E enumeration
[in,out]dataPass the pointer which contain the value from user, so that the value will be set in the WLAN driver
Returns
Returns 0 - OK. Returns -1 - ERROR
Note
Before calling m2m_set_wlan_param, m2mb_wlan_init followed by m2mb_wlan_interface_init should be called and return successful. Some of the flags only support get functionality.

m2mb_wlan_set_param(device_id, M2M_WLAN_PARAM_OPERATION_MODE, &operating_mode);

int main()
{
INT8 result;
UINT8 device_id = 0;
result = m2m_wlan_init();
if (result != 0)
{
return -1;
}
if (result == -1)
{
return -1;
}
if(device_id != 0 || device_id != 1)
return -1;
result = m2mb_wlan_set_param(device_id, M2M_WLAN_PARAM_OPERATION_MODE,
&operating_mode);
if(result != 0)
{
return -1;
}
return 0;
}

◆ m2mb_wlan_status_get()

INT8 m2mb_wlan_status_get ( INT8  device_id)

L2 association status for both STA and AP modes.

This API will return whether L2 connection is completed or not in STA and AP modes. Checking L2 connection for both device IDs.

Parameters
[in]device_idSpecific device Identifier [mandatory]
Returns
Returns 1 for success. Returns 0 for failure.
Note
m2mb_wlan_init and m2mb_wlan_interface_init should be issued first

m2mb_wlan_status_get(device_id);

int main()
{
INT8 result;
UINT8 device_id = 2;
NULL, &device_id);
result = m2mb_wlan_status_get(device_id);
}

◆ m2mb_wlan_wps_start()

INT32 m2mb_wlan_wps_start ( UINT8  device_id,
M2MB_WLAN_WPS_MODE_E  method,
M2MB_WLAN_WPS_CONNECT_ACTION_E  connect_action,
UINT8 pin,
UINT8 ssid 
)

This API is part of WPS procedure.

This function is used to set up the WPS information and start the method and L2 configuration given by the user in both STA and AP modes.

Parameters
[in]device_idSpecific device Identifier [mandatory]
[in]methodPIN or PUSH method [mandatory]
[in]connect_actionL2 connect action [mandatory]
[in]pinpin in PIN method [optional]
[in]ssidssid for default pin method[N/S] [optional]
Returns
0 - OK successful, -1 for ERROR
Note
Before calling m2mb_wlan_wps_start the user should call m2mb_wlan_init, m2mb_wlan_interface_init and m2mb_wlan_register_wps_cb to handled WPS events from WLAN firmware.

m2mb_wlan_wps_start(UINT8 device_id, UINT8 method, UINT8 connect_action, UINT8 *pin, UINT8 *ssid);

VOID m2mb_wlan_wps_l2_cb(UINT8 device_id, UINT32 event_id, INT32 status,
void *payload)
{
{
}
break;
{
}
break;
{
}
break;
}
int main()
{
UINT8 device_id = 2;
INT8 result;
result = m2mb_wlan_init ();
if (result != 0)
{
return -1;
}
NULL, &device_id);
if (result == -1)
{
return -1;
}
m2mb_wlan_register_wps_cb(device_id, m2mb_wlan_wps_l2_cb, NULL);
result = m2mb_wlan_wps_start ( device_id, method, connect_action, pin, ssid);
if (result == -1)
{
return -1;
}
return 0;
}