CC33XX API Documentation  2.30.00.15
Files | Classes | Macros | Typedefs | Enumerations | Functions
upper MAC

This module implements the user interface for the upper MAC. More...

Files

file  wlan_if.h
 upper MAC user interface
 

Classes

struct  WlanNetworkEntry_t
 
struct  WlanNetworkEntryExtended_t
 
struct  WlanSecParams_t
 
struct  WpsParams
 
struct  P2pParams
 
struct  RoleUpApCmd
 
struct  WlanLongSleepInterval
 
struct  __PACKED__
 
struct  CalibratorCommandWrapper_t
 
struct  WlanEventConnect_t
 
struct  WlanEventConnecting_t
 
struct  WlanEventDisconnect_t
 
struct  WlanEventScanResult_t
 
struct  WlanEventExtendedScanResult_t
 
struct  WlanEventSTAAdded_t
 
struct  WlanEvenWfdMgmtFrame_t
 
union  WlanEventData_u
 
struct  WlanEvent_t
 
struct  StartRoleApps_t
 
struct  scan_ssid_t
 
struct  scanCommon_t
 
struct  WlanMacAddress_t
 
struct  WlanFWVersions_t
 
struct  WlanCtrlBlk_t
 
struct  dbg_cntr_trnspt_t
 
struct  dbg_counters_get_t
 
struct  device_info_t
 
struct  wlanSetVendorInfo_t
 
struct  wlanSetExtWpsSession_t
 
struct  WlanPeer_t
 
struct  WlanGOPeer_t
 
struct  WlanProvDiscResp_t
 
struct  WlanProvDiscReq_t
 
union  WlanActionParam_t
 
struct  WlanBuildActionBuffer_t
 
struct  WlanROCExt_t
 
struct  WlanActionBuff_t
 
struct  WlanActionTxExt_t
 
struct  WlanExternalApp_t
 

Macros

#define DEVICE_ON   (1)
 
#define DEVICE_OFF   (0)
 
#define WLAN_WAIT_FOREVER   (0xFFFFFFFF)
 
#define WLAN_NO_WAIT   (0x00000000)
 
#define WLAN_MAX_SCAN_COUNT   (20)
 
#define WLAN_BSSID_LENGTH   (6)
 
#define WLAN_SSID_MAX_LENGTH   (32)
 
#define WLAN_DOT11_MAX_SUPPORTED_RATES   (32)
 
#define WLAN_DOT11_HT_CAPABILITIES_ELE_LEN   (26)
 
#define WLAN_DOT11_ERP_ELE_LEN   (1)
 
#define WLAN_MAX_BEACON_BODY_LENGTH   (700)
 
#define WLAN_DOT11_MAX_RSNE_SIZE   (257)
 
#define WLAN_DOT11_MAX_BEACON_BODY_LENGTH   (700)
 
#define WLAN_DOT11_MAX_WPSIE_SIZE   (350)
 
#define WLAN_LEN_OF_IE_HEADER   (2)
 
#define MAC_ADDRESS_LEN   (6)
 
#define WLAN_MAX_MAC_ADDRESSES   (4)
 
#define WLAN_DISCONNECT_UNSPECIFIED   (1)
 
#define WLAN_DISCONNECT_AUTH_NO_LONGER_VALID   (2)
 
#define WLAN_DISCONNECT_DEAUTH_SENDING_STA_LEAVING   (3)
 
#define WLAN_DISCONNECT_INACTIVITY   (4)
 
#define WLAN_DISCONNECT_TOO_MANY_STA   (5)
 
#define WLAN_DISCONNECT_FRAME_FROM_NONAUTH_STA   (6)
 
#define WLAN_DISCONNECT_FRAME_FROM_NONASSOC_STA   (7)
 
#define WLAN_DISCONNECT_DISS_SENDING_STA_LEAVING   (8)
 
#define WLAN_DISCONNECT_STA_NOT_AUTH   (9)
 
#define WLAN_DISCONNECT_POWER_CAPABILITY_INVALID   (10)
 
#define WLAN_DISCONNECT_SUPPORTED_CHANNELS_INVALID   (11)
 
#define WLAN_DISCONNECT_INVALID_IE   (13)
 
#define WLAN_DISCONNECT_MIC_FAILURE   (14)
 
#define WLAN_DISCONNECT_FOURWAY_HANDSHAKE_TIMEOUT   (15)
 
#define WLAN_DISCONNECT_GROUPKEY_HANDSHAKE_TIMEOUT   (16)
 
#define WLAN_DISCONNECT_REASSOC_INVALID_IE   (17)
 
#define WLAN_DISCONNECT_INVALID_GROUP_CIPHER   (18)
 
#define WLAN_DISCONNECT_INVALID_PAIRWISE_CIPHER   (19)
 
#define WLAN_DISCONNECT_INVALID_AKMP   (20)
 
#define WLAN_DISCONNECT_UNSUPPORTED_RSN_VERSION   (21)
 
#define WLAN_DISCONNECT_INVALID_RSN_CAPABILITIES   (22)
 
#define WLAN_DISCONNECT_IEEE_802_1X_AUTHENTICATION_FAILED   (23)
 
#define WLAN_DISCONNECT_CIPHER_SUITE_REJECTED   (24)
 
#define WLAN_DISCONNECT_DISASSOC_QOS   (32)
 
#define WLAN_DISCONNECT_DISASSOC_QOS_BANDWIDTH   (33)
 
#define WLAN_DISCONNECT_DISASSOC_EXCESSIVE_ACK_PENDING   (34)
 
#define WLAN_DISCONNECT_DISASSOC_TXOP_LIMIT   (35)
 
#define WLAN_DISCONNECT_STA_LEAVING   (36)
 
#define WLAN_DISCONNECT_STA_DECLINED   (37)
 
#define WLAN_DISCONNECT_STA_UNKNOWN_BA   (38)
 
#define WLAN_DISCONNECT_STA_TIMEOUT   (39)
 
#define WLAN_DISCONNECT_STA_UNSUPPORTED_CIPHER_SUITE   (40)
 
#define WLAN_DISCONNECT_ROAMING_TRIGGER_NONE   (100)
 
#define WLAN_DISCONNECT_ROAMING_TRIGGER_LOW_TX_RATE   (104)
 
#define WLAN_DISCONNECT_ROAMING_TRIGGER_LOW_SNR   (105)
 
#define WLAN_DISCONNECT_ROAMING_TRIGGER_LOW_QUALITY   (106)
 
#define WLAN_DISCONNECT_ROAMING_TRIGGER_TSPEC_REJECTED   (107)
 
#define WLAN_DISCONNECT_ROAMING_TRIGGER_MAX_TX_RETRIES   (108)
 
#define WLAN_DISCONNECT_ROAMING_TRIGGER_BSS_LOSS   (109)
 
#define WLAN_DISCONNECT_ROAMING_TRIGGER_BSS_LOSS_DUE_TO_MAX_TX_RETRY   (110)
 
#define WLAN_DISCONNECT_ROAMING_TRIGGER_SWITCH_CHANNEL   (111)
 
#define WLAN_DISCONNECT_ROAMING_TRIGGER_AP_DISCONNECT   (112)
 
#define WLAN_DISCONNECT_ROAMING_TRIGGER_SECURITY_ATTACK   (113)
 
#define WLAN_DISCONNECT_USER_INITIATED   (200)
 
#define WLAN_DISCONNECT_AUTH_TIMEOUT   (202)
 
#define WLAN_DISCONNECT_ASSOC_TIMEOUT   (203)
 
#define WLAN_DISCONNECT_SECURITY_FAILURE   (204)
 
#define WLAN_DISCONNECT_WHILE_CONNNECTING   (208)
 
#define WLAN_DISCONNECT_MISSING_CERT   (209)
 
#define WLAN_DISCONNECT_CERTIFICATE_EXPIRED   (210)
 
#define WLAN_SEC_TYPE_OPEN   (0)
 
#define WLAN_SEC_TYPE_WEP   (1)
 
#define WLAN_SEC_TYPE_WPA   (2) /* deprecated */
 
#define WLAN_SEC_TYPE_WPA_WPA2   (2)
 
#define WLAN_SEC_TYPE_WPS_PBC   (3)
 
#define WLAN_SEC_TYPE_WPS_PIN   (4)
 
#define WLAN_SEC_TYPE_WPA_ENT   (5)
 
#define WLAN_SEC_TYPE_P2P_PBC   (6)
 
#define WLAN_SEC_TYPE_P2P_PIN_KEYPAD   (7)
 
#define WLAN_SEC_TYPE_P2P_PIN_DISPLAY   (8)
 
#define WLAN_SEC_TYPE_P2P_PIN_AUTO   (9) /* NOT Supported yet */
 
#define WLAN_SEC_TYPE_WEP_SHARED   (10)
 
#define WLAN_SEC_TYPE_WPA2_PLUS   (11) /* Support to WPA2 WPA2+PMF (Protected Managmant Frame) networks */
 
#define WLAN_SEC_TYPE_WPA3   (12) /* Support WPA3 only networks */
 
#define WLAN_SEC_TYPE_WPA_PMK   (15)
 
#define WLAN_SEC_TYPE_WPA2_WPA3   (16) /*transition mode WPA2 WPA2+PMF WPA3 */
 
#define WLAN_AP_ACCESS_LIST_MODE_DISABLED   0
 
#define WLAN_AP_ACCESS_LIST_MODE_DENY_LIST   1
 
#define WLAN_AP_ACCESS_LIST_MODE_ALLOW_LIST   2
 
#define WLAN_AP_ACCESS_LIST_UPDATE_RAM_FLASH   0
 
#define WLAN_AP_ACCESS_LIST_UPDATE_RAM_ONLY   1
 
#define WLAN_MAX_ACCESS_LIST_STATIONS   16
 
#define WLAN_AP_ACCESS_LIST_WILDCARD_LEN   6
 
#define SL_WLAN_SCAN_RESULT_SEC_TYPE_MASK   0x7
 
#define SL_WLAN_SCAN_RESULT_SEC_TYPE_POSITION   8
 
#define SL_WLAN_SCAN_RESULT_GROUP_CIPHER_MASK   0xf
 
#define SL_WLAN_SCAN_RESULT_GROUP_CIPHER_POSITION   0
 
#define SL_WLAN_SCAN_RESULT_UNICAST_CIPHER_MASK   0xf
 
#define SL_WLAN_SCAN_RESULT_UNICAST_CIPHER_POSITION   4
 
#define SL_WLAN_SCAN_RESULT_KEY_MGMT_MASK   0x3
 
#define SL_WLAN_SCAN_RESULT_KEY_MGMT_POSITION   11
 
#define WLAN_SCAN_RESULT_GROUP_CIPHER(SecurityInfo)   (SecurityInfo & 0xF) /* Possible values: NONE,TKIP,CCMP */
 
#define WLAN_SCAN_RESULT_UNICAST_CIPHER_BITMAP(SecurityInfo)   ((SecurityInfo & 0xF0) >> 4 ) /* Possible values: NONE,WEP40,WEP104,TKIP,CCMP*/
 
#define WLAN_SCAN_RESULT_HIDDEN_SSID(SecurityInfo)   (SecurityInfo & 0x2000 ) >> 13 /* Possible values: TRUE/FALSE */
 
#define WLAN_SCAN_RESULT_KEY_MGMT_SUITES_BITMAP(SecurityInfo)   (SecurityInfo & 0x1800 ) >> 11 /* Possible values: OPEN, PSK*/
 
#define WLAN_SCAN_RESULT_SEC_TYPE_BITMAP(SecurityInfo)   ((SecurityInfo & (SL_WLAN_SCAN_RESULT_SEC_TYPE_MASK << SL_WLAN_SCAN_RESULT_SEC_TYPE_POSITION)) >> SL_WLAN_SCAN_RESULT_SEC_TYPE_POSITION) /* Possible values: SL_WLAN_SECURITY_TYPE_BITMAP_OPEN, SL_WLAN_SECURITY_TYPE_BITMAP_WEP, SL_WLAN_SECURITY_TYPE_BITMAP_WPA, SL_WLAN_SECURITY_TYPE_BITMAP_WPA2, 0x6 (mix mode) SL_WLAN_SECURITY_TYPE_BITMAP_WPA | SL_WLAN_SECURITY_TYPE_BITMAP_WPA2 */
 
#define WLAN_SCAN_RESULT_PMF_ENABLE(SecurityInfo)   ((SecurityInfo & 0x4000 ) >> 14) /* Possible values: TRUE/FALSE */
 
#define WLAN_SCAN_RESULT_PMF_REQUIRED(SecurityInfo)   ((SecurityInfo & 0x8000 ) >> 15) /* Possible values: TRUE/FALSE */
 
#define WLAN_BEACON_MAX_SIZE   450
 
#define WLAN_MAX_SCAN_SSID   5
 

Typedefs

typedef struct WpsParams WpsParams_t
 
typedef struct P2pParams P2pParams_t
 
typedef struct RoleUpApCmd RoleUpApCmd_t
 
typedef struct __PACKED__ CalibratorSetTransmitOmiParams_t
 
typedef struct __PACKED__ CalibratorSetPowerHeaderParams_t
 
typedef struct __PACKED__ CalibratorSetPsmParams_t
 
typedef struct __PACKED__ CalibratorSetUplinkMuDataParams_t
 
typedef struct __PACKED__ CalibratorSetMcsRateParams_t
 
typedef struct __PACKED__ CalibratorOperationModeControlParams_t
 
typedef struct __PACKED__ CalibratorUplinkMuParams_t
 
typedef struct __PACKED__ CalibratorGiLtfModeParams_t
 
typedef struct __PACKED__ CalibratorBeaconRssiParams_t
 
typedef struct __PACKED__ CalibratorRateOverrideParams_t
 
typedef struct __PACKED__ CalibratorGetRxParams_t
 
typedef struct __PACKED__ CalibratorChannelTuneParams_t
 
typedef struct __PACKED__ CalibratorStartTxParams_t
 
typedef struct __PACKED__ CalibratorStartTxToneParams_t
 
typedef struct __PACKED__ CalibratorSetIoCfgParams_t
 
typedef struct __PACKED__ CalibratorGetIoCfgParams_t
 
typedef struct __PACKED__ CalibratorStartRxParams_t
 
typedef struct WlanEventSTAAdded_t WlanEventSTARemoved_t
 
typedef void(* WlanEventHandlerCB_t) (WlanEvent_t *pWlanEvent)
 
typedef struct __PACKED__ WlanBeaconRssi_t
 
typedef enum wlan_p2p_action_frame_type WlanP2pActionFrameType_t
 
typedef enum wlan_p2p_status_code WlanP2pStatusCode_t
 
typedef void(* WlanNetworkDataRecvCB_t) (WlanRole_e role_id, uint8_t *input, uint32_t input_len)
 

Enumerations

enum  WlanEventId_e {
  WLAN_EVENT_CONNECT = 1, WLAN_EVENT_DISCONNECT, WLAN_EVENT_SCAN_RESULT, WLAN_EVENT_ADD_PEER,
  WLAN_EVENT_REMOVE_PEER, WLAN_EVENT_CONNECTING, WLAN_EVENT_ACTION_FRAME_RX, WLAN_EVENT_ASSOCIATED,
  WLAN_EVENT_AP_EXT_WPS_SETTING_FAILED, WLAN_EVENT_BLE_ENABLED, WLAN_EVENT_CS_FINISH, WLAN_EVENT_ROC_DONE,
  WLAN_EVENT_CROC_DONE, WLAN_EVENT_SEND_ACTION_DONE, WLAN_EVENT_EXTENDED_SCAN_RESULT, WLAN_EVENT_MAX = 0xFFFF
}
 
enum  WlanMacAddOffset_e {
  WLAN_MAC_OFFSET_ROLE_STA, WLAN_MAC_OFFSET_ROLE_BLE, WLAN_MAC_OFFSET_ROLE_DEVICE, WLAN_MAC_OFFSET_ROLE_AP,
  WLAN_MAC_OFFSET_ROLE_P2P_GO = WLAN_MAC_OFFSET_ROLE_AP
}
 
enum  WlanRole_e {
  WLAN_ROLE_STA, WLAN_ROLE_IBSS, WLAN_ROLE_AP, WLAN_ROLE_DEVICE,
  WLAN_ROLE_P2P_CL, WLAN_ROLE_P2P_GO, WLAN_ROLE_RESERVED
}
 
enum  WlanPowerSave_e { WLAN_STATION_AUTO_PS_MODE, WLAN_STATION_ACTIVE_MODE, WLAN_STATION_POWER_SAVE_MODE, WLAN_STATION_NUM_OF_MODES }
 
enum  WlanPowerManagement_e { POWER_MANAGEMENT_ALWAYS_ACTIVE_MODE, POWER_MANAGEMENT_POWER_DOWN_MODE, POWER_MANAGEMENT_ELP_MODE, POWER_MANAGEMENT_NUM_OF_MODES }
 
enum  WlanWakeUpEvent_e { WAKE_UP_EVENT_BEACON = 0x01, WAKE_UP_EVENT_DTIM = 0x02, WAKE_UP_EVENT_N_DTIM = 0x04, WAKE_UP_EVENT_LIMIT = WAKE_UP_EVENT_N_DTIM }
 
enum  WlanBandCfg_e { BAND_SEL_ONLY_2_4GHZ, BAND_SEL_ONLY_5GHZ, BAND_SEL_BOTH }
 
enum  WlanSet_e {
  WLAN_SET_MACADDRESS, WLAN_SET_POWER_SAVE, WLAN_SET_POWER_MANAGEMENT, WLAN_SET_LSI,
  WLAN_SET_CALIBRATOR_POWER_MODE, WLAN_SET_CALIBRATOR_CHANNEL_TUNE, WLAN_SET_CALIBRATOR_TX_START, WLAN_SET_CALIBRATOR_TX_TONE_START,
  WLAN_SET_CALIBRATOR_TX_STOP, WLAN_SET_CALIBRATOR_START_RX, WLAN_SET_CALIBRATOR_STOP_RX, WLAN_SET_CALIBRATOR_TX_PARAMS,
  WLAN_SET_CALIBRATOR_TB_TX_PARAMS, WLAN_SET_CALIBRATOR_RATE_OVERRIDE, WLAN_SET_CALIBRATOR_GI_LTF, WLAN_SET_CALIBRATOR_UPLINK_MU,
  WLAN_SET_CALIBRATOR_OPERATION_MODE_CONTROL, WLAN_SET_CALIBRATOR_SWITCH_ANT, WLAN_SET_CALIBRATOR_MCS_RATE, WLAN_SET_CALIBRATOR_UPLINK_MU_DATA,
  WLAN_SET_CALIBRATOR_PSM, WLAN_SET_CALIBRATOR_UPLINK_POWER_HEADER, WLAN_SET_CALIBRATOR_TRANSMIT_OSI, WLAN_SET_CALIBRATOR_MANUAL_CALIBRATION,
  WLAN_SET_CALIBRATOR_SET_IO_CFG, WLAN_SET_CALIBRATOR_BLE_ENABLE, WLAN_SET_RESET_COUNTERS, WLAN_SET_ANTENNA_SELECT,
  WLAN_SET_VENDOR_IE, WLAN_SET_TX_CTRL, WLAN_SET_EXTERNAL, WLAN_SET_EXT_P2P_BUILD_ACTION_FRAME,
  WLAN_SET_EXT_OFFCHANNEL_ROC, WLAN_SET_EXT_OFFCHANNEL_SEND_RAW_ACTION, WLAN_SET_EXT_WPS_SESSION, WLAN_EXTENDED_SCAN_RESULTS,
  WLAN_SET_BLE_ENABLE
}
 
enum  WlanGet_e {
  WLAN_GET_MACADDRESS, WLAN_GET_POWER_SAVE, WLAN_GET_CALIBRATOR_TX_PARAMS, WLAN_GET_CALIBRATOR_RX_STATS,
  WLAN_GET_CALIBRATOR_GET_IO_CFG, WLAN_GET_ANTENNA_SELECT, WLAN_GET_RSSI, WLAN_GET_FWVERSION,
  WLAN_GET_DEVICE_INFO, WLAN_GET_CALIBRATOR_BEACON_RSSI, WLAN_GET_COUNTERS, WLAN_GET_CONNECTION_KEY_MANAGEMENT,
  WLAN_GET_EXTERNAL
}
 
enum  CalibratorAction_e {
  CALIBRATOR_ACTION_SET_POWER_MODE, CALIBRATOR_ACTION_CHANNEL_TUNE, CALIBRATOR_ACTION_TX_START, CALIBRATOR_ACTION_TX_STOP,
  CALIBRATOR_ACTION_TX_TONE_START, CALIBRATOR_ACTION_START_RX, CALIBRATOR_ACTION_STOP_RX, CALIBRATOR_ACTION_GET_RX_STATS,
  CALIBRATOR_ACTION_SET_TX_PARAMS, CALIBRATOR_ACTION_GET_TX_PARAMS, CALIBRATOR_ACTION_SET_TB_TX_PARAMS, CALIBRATOR_ACTION_RATE_OVERRIDE,
  CALIBRATOR_ACTION_GET_BEACON_RSSI, CALIBRATOR_ACTION_SET_GI_LTF, CALIBRATOR_ACTION_SET_UPLINK_MU, CALIBRATOR_ACTION_SET_OPERATION_MODE_CONTROL,
  CALIBRATOR_ACTION_SET_MCS_RATE, CALIBRATOR_ACTION_SET_UPLINK_MU_DATA, CALIBRATOR_ACTION_SET_PSM, CALIBRATOR_ACTION_SET_UPLINK_POWER_HEADER,
  CALIBRATOR_ACTION_SET_TRANSMIT_OMI, CALIBRATOR_ACTION_MANUAL_CALIBRATION, CALIBRATOR_ACTION_SWITCH_ANT, CALIBRATOR_ACTION_SET_IO_CFG,
  CALIBRATOR_ACTION_GET_IO_CFG, CALIBRATOR_ACTION__BLE_ENABLE
}
 
enum  CalibratorPowerModes_e { PLT_OFF, PLT_ON }
 
enum  CalibratorSetTxBits_e {
  CALIBRATOR_SET_TX_PREAMBLE_TYPE_BIT, CALIBRATOR_SET_TX_PHY_RATE_BIT, CALIBRATOR_SET_TX_TX_POWER_BIT, CALIBRATOR_SET_TX_GI_LTF_TYPE_BIT,
  CALIBRATOR_SET_TX_DCM_BIT, CALIBRATOR_SET_TX_LENGTH_BIT, CALIBRATOR_SET_TX_DELAY_BIT, CALIBRATOR_SET_TX_PACKET_MODE_BIT,
  CALIBRATOR_SET_TX_NUMBER_OF_PACKETS_BIT, CALIBRATOR_SET_TX_DATA_MODE_BIT, CALIBRATOR_SET_TX_DATA_CONST_VALUE_BIT, CALIBRATOR_SET_TX_ENABLE_CCA_BIT,
  CALIBRATOR_SET_TX_BSS_COLOR_BIT, CALIBRATOR_SET_TX_SU_ER_BANDWIDTH_BIT, CALIBRATOR_SET_TX_PARTIAL_AID_BIT, CALIBRATOR_SET_TX_SRC_ADDR_BIT,
  CALIBRATOR_SET_TX_DST_ADDR_BIT, CALIBRATOR_SET_TX_NOMINAL_PACKET_EXTENSION_BIT, CALIBRATOR_SET_TX_FEEDBACK_STATUS_BIT, CALIBRATOR_SET_TX_AID_BIT,
  CALIBRATOR_SET_TX_GROUP_ID_BIT, CALIBRATOR_SET_TX_LTF_MODE_BIT, CALIBRATOR_SET_TX_HE_LTF_NUM_BIT, CALIBRATOR_SET_TX_PRE_FEC_PADDING_FACTOR_BIT,
  CALIBRATOR_SET_TX_COMMON_INFO_LEN_BIT, CALIBRATOR_SET_TX_RU_ALLOC_BIT, CALIBRATOR_SET_TX_UL_BW_BIT, CALIBRATOR_SET_TX_STARTS_STS_NUM_BIT,
  CALIBRATOR_SET_TX_TB_AUTO_MODE_BIT, CALIBRATOR_SET_TX_TB_DISAMB_MODE_BIT
}
 
enum  wlan_p2p_action_frame_type {
  WLAN_P2P_GO_NEG_REQ = 0, WLAN_P2P_GO_NEG_RESP = 1, WLAN_P2P_GO_NEG_CONF = 2, WLAN_P2P_INVITATION_REQ = 3,
  WLAN_P2P_INVITATION_RESP = 4, WLAN_P2P_DEV_DISC_REQ = 5, WLAN_P2P_DEV_DISC_RESP = 6, WLAN_P2P_PROV_DISC_REQ = 7,
  WLAN_P2P_PROV_DISC_RESP = 8
}
 
enum  wlan_p2p_status_code {
  WLAN_P2P_SC_SUCCESS = 0, WLAN_P2P_SC_FAIL_INFO_CURRENTLY_UNAVAILABLE = 1, WLAN_P2P_SC_FAIL_INCOMPATIBLE_PARAMS = 2, WLAN_P2P_SC_FAIL_LIMIT_REACHED = 3,
  WLAN_P2P_SC_FAIL_INVALID_PARAMS = 4, WLAN_P2P_SC_FAIL_UNABLE_TO_ACCOMMODATE = 5, WLAN_P2P_SC_FAIL_PREV_PROTOCOL_ERROR = 6, WLAN_P2P_SC_FAIL_NO_COMMON_CHANNELS = 7,
  WLAN_P2P_SC_FAIL_UNKNOWN_GROUP = 8, WLAN_P2P_SC_FAIL_BOTH_GO_INTENT_15 = 9, WLAN_P2P_SC_FAIL_INCOMPATIBLE_PROV_METHOD = 10, WLAN_P2P_SC_FAIL_REJECTED_BY_USER = 11,
  WLAN_P2P_SC_SUCCESS_DEFERRED = 12
}
 

Functions

int ctrlCmdFw_EnableBLECmd (void)
 Enable BLE. More...
 
int ctrlCmdFw_SetBdAddrCmd (const unsigned char *pBdAddr)
 Set BLE BD Address. More...
 
int Wlan_Start (WlanEventHandlerCB_t eventHandlerCB)
 start the wlan More...
 
int Wlan_Stop (void)
 stop the wlan More...
 
int Wlan_RoleUp (WlanRole_e roleType, void *params, unsigned long int timeout)
 role up the wlan More...
 
int Wlan_RoleDown (WlanRole_e roleType, unsigned long int timeout)
 role down the wlan More...
 
int Wlan_Connect (const signed char *pName, const int NameLen, const unsigned char *pMacAddr, char SecType, const char *pPass, const char PassLen)
 Connect to wlan network as a station. More...
 
int Wlan_Disconnect ()
 Wlan disconnect. More...
 
int Wlan_Scan (WlanRole_e role, void *params, const unsigned char ScanResultsSize)
 Wlan scan. More...
 
int Wlan_Get (WlanGet_e wlanGetType, void *params)
 Wlan_Get. More...
 
int Wlan_Set (WlanSet_e wlanSetType, void *params)
 Wlan_Set. More...
 
int Wlan_EtherPacketSend (WlanRole_e role, uint8_t *inbuf, uint32_t inbuf_len, uint32_t flags)
 Wlan Ethernet Packet Send. More...
 
int Wlan_EtherPacketRecvRegisterCallback (WlanRole_e role, WlanNetworkDataRecvCB_t cb)
 Wlan Ethernet Packet recv callback. More...
 

Detailed Description

This module implements the user interface for the upper MAC.

Function Documentation

§ ctrlCmdFw_EnableBLECmd()

int ctrlCmdFw_EnableBLECmd ( void  )

Enable BLE.

This function enable the BLE core and changes power save mode to active

Returns
Zero on success, or a negative value if an error occurred
See also
Note
This API will power up the BLE core and changes power save mode to active
Warning

§ ctrlCmdFw_SetBdAddrCmd()

int ctrlCmdFw_SetBdAddrCmd ( const unsigned char *  pBdAddr)

Set BLE BD Address.

This function sets the BLE BD address

Parameters
[in]pBdAddr6 bytes for BD address
Returns
Zero on success, or a negative value if an error occurred
See also
Note
This API will set the BLE BD address
Warning

§ Wlan_Connect()

int Wlan_Connect ( const signed char *  pName,
const int  NameLen,
const unsigned char *  pMacAddr,
char  SecType,
const char *  pPass,
const char  PassLen 
)

Connect to wlan network as a station.

Parameters
[in]pNameUp to 32 bytes in case of STA the name is the SSID of the Access Point
[in]NameLenName length
[in]pMacAddr6 bytes for MAC address
[in]SecTypeSecurity type security types options:
  • CME_SEC_TYPE_OPEN
  • CME_SEC_TYPE_WEP
  • CME_SEC_TYPE_WPA_WPA2
[in]pPassUp to 32 bytes password
[in]PassLenPassword length
Returns
Zero on success, or negative error code on failure
See also
Wlan_Disconnect

§ Wlan_Disconnect()

int Wlan_Disconnect ( )

Wlan disconnect.

Disconnect connection

Returns
Zero disconnected done successfully, other already disconnected
See also
WlanConnect
Note
belongs to ext_api
Warning

§ Wlan_EtherPacketRecvRegisterCallback()

int Wlan_EtherPacketRecvRegisterCallback ( WlanRole_e  role,
WlanNetworkDataRecvCB_t  cb 
)

Wlan Ethernet Packet recv callback.

This function is used for the network stack to attach the receive callback of ethernet packets to be called upon RX

Parameters
[in]roleWLAN_ROLE_STA or WLAN_ROLE_AP
[in]WlanNetworkDataRecvCB_trecv callback function
Returns
Zero on success other, error
See also
Wlan_EtherPacketSend
Warning

§ Wlan_EtherPacketSend()

int Wlan_EtherPacketSend ( WlanRole_e  role,
uint8_t *  inbuf,
uint32_t  inbuf_len,
uint32_t  flags 
)

Wlan Ethernet Packet Send.

This function is used for the network stack to send ethernet packets over link in a certain role

Parameters
[in]roleWLAN_ROLE_STA or WLAN_ROLE_AP
[in]inbufinput buffer of ethernet packet
[in]inbuf_leninput buffer length of ethernet packet
[in]flagsreserved
Returns
Zero on success other, error
See also
Wlan_EtherPacketRecvRegisterCallback
Note
this function copies the ethernet frame
Warning

§ Wlan_Get()

int Wlan_Get ( WlanGet_e  wlanGetType,
void *  params 
)

Wlan_Get.

Get commands and parameters to the FW

Parameters
[in]wlanGetTypeWlan Get type (WlanGet_e)
[in]paramspointer to params
Returns
Zero on success, other when failed
See also
Wlan_Set
Note
belongs to ext_api
Warning

§ Wlan_RoleDown()

int Wlan_RoleDown ( WlanRole_e  roleType,
unsigned long int  timeout 
)

role down the wlan

This function is stop the specific role

Parameters
[in]Configuration- role type timeout - Blocking API
Returns
Zero on success, or a negative value if an error occurred
See also
Wlan_RoleUp
Note
This API deactivate the role
Warning

§ Wlan_RoleUp()

int Wlan_RoleUp ( WlanRole_e  roleType,
void *  params,
unsigned long int  timeout 
)

role up the wlan

This function start the specific role with the parameters per role type.

Parameters
[in]Configuration- role type Configuration - *params (per role) timeout - Blocking API
Returns
role id, Zero on success, or a negative value if an error occurred
See also
Wlan_RoleDown
Note
This API will start STA/AP depend on the role type
Warning

§ Wlan_Scan()

int Wlan_Scan ( WlanRole_e  role,
void *  params,
const unsigned char  ScanResultsSize 
)

Wlan scan.

scan the network for APs

Parameters
[in]pPassUp to 32 bytes password
[in]PassLenPassword length
[in]paramsscan params
Returns
Zero disconnected done successfully, other already disconnected
See also
Wlan_Connect
Note
belongs to ext_api
Warning

§ Wlan_Set()

int Wlan_Set ( WlanSet_e  wlanSetType,
void *  params 
)

Wlan_Set.

Set commands and parameters to the FW

Parameters
[in]wlanSetTypeWlan Set type (WlanSet_e)
[in]paramspointer to params
Returns
Zero on success, other when failed
See also
Wlan_Get
Note
belongs to ext_api
Warning

§ Wlan_Start()

int Wlan_Start ( WlanEventHandlerCB_t  eventHandlerCB)

start the wlan

This function is turn on the wlan device, initialize the upper mac thread, and initialize the SPI interface

Parameters
[in]eventHandlerCBevent callback function
Returns
Zero on success, or a negative value if an error occurred
See also
Wlan_Stop
Note
This API will power up the device and invoke the initialize the SPI i/f
Warning

§ Wlan_Stop()

int Wlan_Stop ( void  )

stop the wlan

This function is turn off the wlan device, and deactivate the SPI interface

Returns
Zero on success, or a negative value if an error occurred
See also
Wlan_Activate
Note
This API will power off the device and invoke the deactivate the SPI i/f
Warning