Low Level CYW43 driver interface. More...

Files

file  cyw43_ll.h
 Low Level CYW43 driver interface.
 

Data Structures

struct  _cyw43_ev_scan_result_t
 Structure to return wifi scan results. More...
 
struct  _cyw43_async_event_t
 
struct  _cyw43_wifi_scan_options_t
 wifi scan options passed to cyw43_wifi_scan More...
 
struct  _cyw43_ll_t
 

Macros

#define CYW43_IOCTL_GET_SSID   (0x32)
 
#define CYW43_IOCTL_GET_CHANNEL   (0x3a)
 
#define CYW43_IOCTL_SET_DISASSOC   (0x69)
 
#define CYW43_IOCTL_GET_ANTDIV   (0x7e)
 
#define CYW43_IOCTL_SET_ANTDIV   (0x81)
 
#define CYW43_IOCTL_SET_MONITOR   (0xd9)
 
#define CYW43_IOCTL_GET_RSSI   (0xfe)
 
#define CYW43_IOCTL_GET_VAR   (0x20c)
 
#define CYW43_IOCTL_SET_VAR   (0x20f)
 
#define CYW43_EV_SET_SSID   (0)
 
#define CYW43_EV_JOIN   (1)
 
#define CYW43_EV_AUTH   (3)
 
#define CYW43_EV_DEAUTH   (5)
 
#define CYW43_EV_DEAUTH_IND   (6)
 
#define CYW43_EV_ASSOC   (7)
 
#define CYW43_EV_DISASSOC   (11)
 
#define CYW43_EV_DISASSOC_IND   (12)
 
#define CYW43_EV_LINK   (16)
 
#define CYW43_EV_PRUNE   (23)
 
#define CYW43_EV_PSK_SUP   (46)
 
#define CYW43_EV_ESCAN_RESULT   (69)
 
#define CYW43_EV_CSA_COMPLETE_IND   (80)
 
#define CYW43_EV_ASSOC_REQ_IE   (87)
 
#define CYW43_EV_ASSOC_RESP_IE   (88)
 
#define CYW43_STATUS_SUCCESS   (0)
 
#define CYW43_STATUS_FAIL   (1)
 
#define CYW43_STATUS_TIMEOUT   (2)
 
#define CYW43_STATUS_NO_NETWORKS   (3)
 
#define CYW43_STATUS_ABORT   (4)
 
#define CYW43_STATUS_NO_ACK   (5)
 
#define CYW43_STATUS_UNSOLICITED   (6)
 
#define CYW43_STATUS_ATTEMPT   (7)
 
#define CYW43_STATUS_PARTIAL   (8)
 
#define CYW43_STATUS_NEWSCAN   (9)
 
#define CYW43_STATUS_NEWASSOC   (10)
 
#define CYW43_SUP_DISCONNECTED   (0)
 
#define CYW43_SUP_CONNECTING   (1)
 
#define CYW43_SUP_IDREQUIRED   (2)
 
#define CYW43_SUP_AUTHENTICATING   (3)
 
#define CYW43_SUP_AUTHENTICATED   (4)
 
#define CYW43_SUP_KEYXCHANGE   (5)
 
#define CYW43_SUP_KEYED   (6)
 
#define CYW43_SUP_TIMEOUT   (7)
 
#define CYW43_SUP_LAST_BASIC_STATE   (8)
 
#define CYW43_SUP_KEYXCHANGE_WAIT_M1   CYW43_SUP_AUTHENTICATED
 
#define CYW43_SUP_KEYXCHANGE_PREP_M2   CYW43_SUP_KEYXCHANGE
 
#define CYW43_SUP_KEYXCHANGE_WAIT_M3   CYW43_SUP_LAST_BASIC_STATE
 
#define CYW43_SUP_KEYXCHANGE_PREP_M4   (9)
 
#define CYW43_SUP_KEYXCHANGE_WAIT_G1   (10)
 
#define CYW43_SUP_KEYXCHANGE_PREP_G2   (11)
 
#define CYW43_REASON_INITIAL_ASSOC   (0)
 
#define CYW43_REASON_LOW_RSSI   (1)
 
#define CYW43_REASON_DEAUTH   (2)
 
#define CYW43_REASON_DISASSOC   (3)
 
#define CYW43_REASON_BCNS_LOST   (4)
 
#define CYW43_REASON_FAST_ROAM_FAILED   (5)
 
#define CYW43_REASON_DIRECTED_ROAM   (6)
 
#define CYW43_REASON_TSPEC_REJECTED   (7)
 
#define CYW43_REASON_BETTER_AP   (8)
 
#define CYW43_REASON_PRUNE_ENCR_MISMATCH   (1)
 
#define CYW43_REASON_PRUNE_BCAST_BSSID   (2)
 
#define CYW43_REASON_PRUNE_MAC_DENY   (3)
 
#define CYW43_REASON_PRUNE_MAC_NA   (4)
 
#define CYW43_REASON_PRUNE_REG_PASSV   (5)
 
#define CYW43_REASON_PRUNE_SPCT_MGMT   (6)
 
#define CYW43_REASON_PRUNE_RADAR   (7)
 
#define CYW43_REASON_RSN_MISMATCH   (8)
 
#define CYW43_REASON_PRUNE_NO_COMMON_RATES   (9)
 
#define CYW43_REASON_PRUNE_BASIC_RATES   (10)
 
#define CYW43_REASON_PRUNE_CCXFAST_PREVAP   (11)
 
#define CYW43_REASON_PRUNE_CIPHER_NA   (12)
 
#define CYW43_REASON_PRUNE_KNOWN_STA   (13)
 
#define CYW43_REASON_PRUNE_CCXFAST_DROAM   (14)
 
#define CYW43_REASON_PRUNE_WDS_PEER   (15)
 
#define CYW43_REASON_PRUNE_QBSS_LOAD   (16)
 
#define CYW43_REASON_PRUNE_HOME_AP   (17)
 
#define CYW43_REASON_PRUNE_AP_BLOCKED   (18)
 
#define CYW43_REASON_PRUNE_NO_DIAG_SUPPORT   (19)
 
#define CYW43_REASON_SUP_OTHER   (0)
 
#define CYW43_REASON_SUP_DECRYPT_KEY_DATA   (1)
 
#define CYW43_REASON_SUP_BAD_UCAST_WEP128   (2)
 
#define CYW43_REASON_SUP_BAD_UCAST_WEP40   (3)
 
#define CYW43_REASON_SUP_UNSUP_KEY_LEN   (4)
 
#define CYW43_REASON_SUP_PW_KEY_CIPHER   (5)
 
#define CYW43_REASON_SUP_MSG3_TOO_MANY_IE   (6)
 
#define CYW43_REASON_SUP_MSG3_IE_MISMATCH   (7)
 
#define CYW43_REASON_SUP_NO_INSTALL_FLAG   (8)
 
#define CYW43_REASON_SUP_MSG3_NO_GTK   (9)
 
#define CYW43_REASON_SUP_GRP_KEY_CIPHER   (10)
 
#define CYW43_REASON_SUP_GRP_MSG1_NO_GTK   (11)
 
#define CYW43_REASON_SUP_GTK_DECRYPT_FAIL   (12)
 
#define CYW43_REASON_SUP_SEND_FAIL   (13)
 
#define CYW43_REASON_SUP_DEAUTH   (14)
 
#define CYW43_REASON_SUP_WPA_PSK_TMO   (15)
 
#define CYW43_WPA_AUTH_PSK   (0x0004)
 
#define CYW43_WPA2_AUTH_PSK   (0x0080)
 
#define CYW43_NO_POWERSAVE_MODE   (0)
 Power save mode paramter passed to cyw43_ll_wifi_pm. More...
 
#define CYW43_PM1_POWERSAVE_MODE   (1)
 Powersave mode on specified interface without regard for throughput reduction.
 
#define CYW43_PM2_POWERSAVE_MODE   (2)
 Powersave mode on specified interface with High throughput.
 
#define CYW43_BUS_MAX_BLOCK_SIZE   16384
 
#define CYW43_CHANNEL_NONE   (0xffffffff)
 To indicate no specific channel when calling cyw43_ll_wifi_join with bssid specified. More...
 

Typedefs

typedef struct _cyw43_async_event_t cyw43_async_event_t
 
typedef struct _cyw43_ll_t cyw43_ll_t
 

Functions

void cyw43_ll_init (cyw43_ll_t *self, void *cb_data)
 
void cyw43_ll_deinit (cyw43_ll_t *self)
 
int cyw43_ll_bus_init (cyw43_ll_t *self, const uint8_t *mac)
 
void cyw43_ll_bus_sleep (cyw43_ll_t *self, bool can_sleep)
 
void cyw43_ll_process_packets (cyw43_ll_t *self)
 
int cyw43_ll_ioctl (cyw43_ll_t *self, uint32_t cmd, size_t len, uint8_t *buf, uint32_t iface)
 
int cyw43_ll_send_ethernet (cyw43_ll_t *self, int itf, size_t len, const void *buf, bool is_pbuf)
 
int cyw43_ll_wifi_on (cyw43_ll_t *self, uint32_t country)
 
int cyw43_ll_wifi_pm (cyw43_ll_t *self, uint32_t pm, uint32_t pm_sleep_ret, uint32_t li_bcn, uint32_t li_dtim, uint32_t li_assoc)
 
int cyw43_ll_wifi_get_pm (cyw43_ll_t *self, uint32_t *pm, uint32_t *pm_sleep_ret, uint32_t *li_bcn, uint32_t *li_dtim, uint32_t *li_assoc)
 
int cyw43_ll_wifi_scan (cyw43_ll_t *self, cyw43_wifi_scan_options_t *opts)
 
int cyw43_ll_wifi_join (cyw43_ll_t *self, size_t ssid_len, const uint8_t *ssid, size_t key_len, const uint8_t *key, uint32_t auth_type, const uint8_t *bssid, uint32_t channel)
 
void cyw43_ll_wifi_set_wpa_auth (cyw43_ll_t *self)
 
void cyw43_ll_wifi_rejoin (cyw43_ll_t *self)
 
int cyw43_ll_wifi_get_bssid (cyw43_ll_t *self_in, uint8_t *bssid)
 
int cyw43_ll_wifi_ap_init (cyw43_ll_t *self, size_t ssid_len, const uint8_t *ssid, uint32_t auth, size_t key_len, const uint8_t *key, uint32_t channel)
 
int cyw43_ll_wifi_ap_set_up (cyw43_ll_t *self, bool up)
 
int cyw43_ll_wifi_ap_get_stas (cyw43_ll_t *self, int *num_stas, uint8_t *macs)
 
int cyw43_ll_wifi_get_mac (cyw43_ll_t *self_in, uint8_t *addr)
 
int cyw43_ll_wifi_update_multicast_filter (cyw43_ll_t *self_in, uint8_t *addr, bool add)
 
bool cyw43_ll_has_work (cyw43_ll_t *self)
 
bool cyw43_ll_bt_has_work (cyw43_ll_t *self)
 
int cyw43_cb_read_host_interrupt_pin (void *cb_data)
 
void cyw43_cb_ensure_awake (void *cb_data)
 
void cyw43_cb_process_async_event (void *cb_data, const cyw43_async_event_t *ev)
 
void cyw43_cb_process_ethernet (void *cb_data, int itf, size_t len, const uint8_t *buf)
 
void cyw43_ll_write_backplane_reg (cyw43_ll_t *self_in, uint32_t addr, uint32_t val)
 
uint32_t cyw43_ll_read_backplane_reg (cyw43_ll_t *self_in, uint32_t addr)
 
int cyw43_ll_write_backplane_mem (cyw43_ll_t *self_in, uint32_t addr, uint32_t len, const uint8_t *buf)
 
int cyw43_ll_read_backplane_mem (cyw43_ll_t *self_in, uint32_t addr, uint32_t len, uint8_t *buf)
 

Authorization types

Used when setting up an access point, or connecting to an access point

#define CYW43_AUTH_OPEN   (0)
 No authorisation required (open)
 
#define CYW43_AUTH_WPA_TKIP_PSK   (0x00200002)
 WPA authorisation.
 
#define CYW43_AUTH_WPA2_AES_PSK   (0x00400004)
 WPA2 authorisation (preferred)
 
#define CYW43_AUTH_WPA2_MIXED_PSK   (0x00400006)
 
enum  { CYW43_ITF_STA, CYW43_ITF_AP }
 Network interface types. More...
 
typedef struct _cyw43_ev_scan_result_t cyw43_ev_scan_result_t
 Structure to return wifi scan results.
 
typedef struct _cyw43_wifi_scan_options_t cyw43_wifi_scan_options_t
 wifi scan options passed to cyw43_wifi_scan
 

Detailed Description

Low Level CYW43 driver interface.

Macro Definition Documentation

◆ CYW43_AUTH_WPA2_MIXED_PSK

#define CYW43_AUTH_WPA2_MIXED_PSK   (0x00400006)

WPA2/WPA mixed authorisation

◆ CYW43_CHANNEL_NONE

#define CYW43_CHANNEL_NONE   (0xffffffff)

To indicate no specific channel when calling cyw43_ll_wifi_join with bssid specified.

No Channel specified (use the AP's channel)

◆ CYW43_NO_POWERSAVE_MODE

#define CYW43_NO_POWERSAVE_MODE   (0)

Power save mode paramter passed to cyw43_ll_wifi_pm.

No Powersave mode

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

Network interface types.

Enumerator
CYW43_ITF_STA 

Client interface STA mode.

CYW43_ITF_AP 

Access point (AP) interface mode.