Mistake on this page?
Report an issue in GitHub or email us
Typedefs | Functions
whd_wifi_api.h File Reference

Prototypes of functions for controlling the Wi-Fi system. More...

#include "whd.h"
#include "whd_types.h"

Go to the source code of this file.

Typedefs

typedef void(* whd_scan_result_callback_t) (whd_scan_result_t **result_ptr, void *user_data, whd_scan_status_t status)
 Scan result callback function pointer type. More...
 

Functions

uint32_t whd_init (whd_driver_t *whd_driver_ptr, whd_init_config_t *whd_init_config, whd_resource_source_t *resource_ops, whd_buffer_funcs_t *buffer_ops, whd_netif_funcs_t *network_ops)
 Initialize an instance of the WHD driver. More...
 
uint32_t whd_bus_sdio_attach (whd_driver_t whd_driver, whd_sdio_config_t *whd_config, cyhal_sdio_t *sdio_obj)
 Attach the WLAN Device to a specific SDIO bus. More...
 
void whd_bus_sdio_detach (whd_driver_t whd_driver)
 Detach the WLAN Device to a specific SDIO bus. More...
 
uint32_t whd_bus_spi_attach (whd_driver_t whd_driver, whd_spi_config_t *whd_config, cyhal_spi_t *spi_obj)
 Attach the WLAN Device to a specific SPI bus. More...
 
void whd_bus_spi_detach (whd_driver_t whd_driver)
 Detach the WLAN Device to a specific SPI bus. More...
 
uint32_t whd_wifi_on (whd_driver_t whd_driver, whd_interface_t *ifpp)
 Turn on the Wi-Fi device. More...
 
uint32_t whd_wifi_off (whd_interface_t ifp)
 Turn off the Wi-Fi device. More...
 
uint32_t whd_deinit (whd_interface_t ifp)
 Shutdown this instance of the wifi driver, freeing all used resources. More...
 
uint32_t whd_wifi_set_up (whd_interface_t ifp)
 Brings up the Wi-Fi core. More...
 
uint32_t whd_wifi_set_down (whd_interface_t ifp)
 Bring down the Wi-Fi core. More...
 
uint32_t whd_add_secondary_interface (whd_driver_t whd_drv, whd_mac_t *mac_addr, whd_interface_t *ifpp)
 Creates a secondary interface. More...
 
uint32_t whd_wifi_scan_synch (whd_interface_t ifp, whd_sync_scan_result_t *scan_result, uint32_t count)
 Initiates a scan to search for 802.11 networks. More...
 
uint32_t whd_wifi_scan (whd_interface_t ifp, whd_scan_type_t scan_type, whd_bss_type_t bss_type, const whd_ssid_t *optional_ssid, const whd_mac_t *optional_mac, const uint16_t *optional_channel_list, const whd_scan_extended_params_t *optional_extended_params, whd_scan_result_callback_t callback, whd_scan_result_t *result_ptr, void *user_data)
 Initiates a scan to search for 802.11 networks. More...
 
uint32_t whd_wifi_stop_scan (whd_interface_t ifp)
 Abort a previously issued scan. More...
 
uint32_t whd_wifi_join (whd_interface_t ifp, const whd_ssid_t *ssid, whd_security_t auth_type, const uint8_t *security_key, uint8_t key_length)
 Joins a Wi-Fi network. More...
 
uint32_t whd_wifi_join_specific (whd_interface_t ifp, const whd_scan_result_t *ap, const uint8_t *security_key, uint8_t key_length)
 Joins a specific Wi-Fi network. More...
 
uint32_t whd_wifi_set_channel (whd_interface_t ifp, uint32_t channel)
 Set the current channel on the WLAN radio. More...
 
uint32_t whd_wifi_get_channel (whd_interface_t ifp, uint32_t *channel)
 Get the current channel on the WLAN radio. More...
 
uint32_t whd_wifi_set_passphrase (whd_interface_t ifp, const uint8_t *security_key, uint8_t key_length)
 Set the passphrase. More...
 
uint32_t whd_wifi_sae_password (whd_interface_t ifp, const uint8_t *security_key, uint8_t key_length)
 Set the SAE password. More...
 
uint32_t whd_wifi_enable_sup_set_passphrase (whd_interface_t ifp, const uint8_t *security_key_psk, uint8_t psk_length, whd_security_t auth_type)
 Enable WHD internal supplicant and set WPA2 passphrase in case of WPA3/WPA2 transition mode. More...
 
uint32_t whd_wifi_enable_supplicant (whd_interface_t ifp, whd_security_t auth_type)
 Enable WHD internal supplicant. More...
 
uint32_t whd_wifi_get_rssi (whd_interface_t ifp, int32_t *rssi)
 Retrieve the latest RSSI value. More...
 
uint32_t whd_wifi_get_ap_client_rssi (whd_interface_t ifp, int32_t *rssi, const whd_mac_t *client_mac)
 Retrieve the associated STA's RSSI value. More...
 
uint32_t whd_wifi_leave (whd_interface_t ifp)
 Disassociates from a Wi-Fi network. More...
 
uint32_t whd_wifi_get_mac_address (whd_interface_t ifp, whd_mac_t *mac)
 Retrieves the current Media Access Control (MAC) address (or Ethernet hardware address) of the 802.11 device. More...
 
uint32_t whd_wifi_get_bssid (whd_interface_t ifp, whd_mac_t *bssid)
 Get the BSSID of the interface. More...
 
uint32_t whd_wifi_init_ap (whd_interface_t ifp, whd_ssid_t *ssid, whd_security_t auth_type, const uint8_t *security_key, uint8_t key_length, uint8_t channel)
 Initialises an infrastructure WiFi network (SoftAP) More...
 
uint32_t whd_wifi_start_ap (whd_interface_t ifp)
 Start the infrastructure WiFi network (SoftAP) using the parameter set by whd_wifi_init_ap() and optionaly by whd_wifi_manage_custom_ie() More...
 
uint32_t whd_wifi_stop_ap (whd_interface_t ifp)
 Stops an existing infrastructure WiFi network. More...
 
uint32_t whd_wifi_ap_get_max_assoc (whd_interface_t ifp, uint32_t *max_assoc)
 Get the maximum number of associations supported by AP interfaces. More...
 
uint32_t whd_wifi_get_associated_client_list (whd_interface_t ifp, void *client_list_buffer, uint16_t buffer_length)
 Gets the current number of active connections. More...
 
uint32_t whd_wifi_deauth_sta (whd_interface_t ifp, whd_mac_t *mac, whd_dot11_reason_code_t reason)
 Deauthenticates a STA which may or may not be associated to SoftAP. More...
 
uint32_t whd_wifi_get_ap_info (whd_interface_t ifp, whd_bss_info_t *ap_info, whd_security_t *security)
 Retrieves AP information. More...
 
uint32_t whd_wifi_ap_set_beacon_interval (whd_interface_t ifp, uint16_t interval)
 Set the beacon interval. More...
 
uint32_t whd_wifi_ap_set_dtim_interval (whd_interface_t ifp, uint16_t interval)
 Set the DTIM interval. More...
 
uint32_t whd_wifi_enable_powersave (whd_interface_t ifp)
 Enables powersave mode on specified interface without regard for throughput reduction. More...
 
uint32_t whd_wifi_enable_powersave_with_throughput (whd_interface_t ifp, uint16_t return_to_sleep_delay)
 Enables powersave mode on specified interface while attempting to maximise throughput. More...
 
uint32_t whd_wifi_get_powersave_mode (whd_interface_t ifp, uint32_t *value)
 Get powersave mode on specified interface. More...
 
uint32_t whd_wifi_disable_powersave (whd_interface_t ifp)
 Disables 802.11 power save mode on specified interface. More...
 
uint32_t whd_wifi_register_multicast_address (whd_interface_t ifp, const whd_mac_t *mac)
 Registers interest in a multicast address. More...
 
uint32_t whd_wifi_unregister_multicast_address (whd_interface_t ifp, const whd_mac_t *mac)
 Unregisters interest in a multicast address. More...
 
uint32_t whd_wifi_set_listen_interval (whd_interface_t ifp, uint8_t listen_interval, whd_listen_interval_time_unit_t time_unit)
 Sets the 802.11 powersave listen interval for a Wi-Fi client, and communicates the listen interval to the Access Point. More...
 
uint32_t whd_wifi_get_listen_interval (whd_interface_t ifp, whd_listen_interval_t *li)
 Gets the current value of all beacon listen interval variables. More...
 
uint32_t whd_wifi_is_ready_to_transceive (whd_interface_t ifp)
 Determines if a particular interface is ready to transceive ethernet packets. More...
 
uint32_t whd_wifi_get_acparams (whd_interface_t ifp, whd_edcf_ac_param_t *acp)
 Retrieve the latest STA EDCF AC parameters. More...
 
uint32_t whd_wifi_manage_custom_ie (whd_interface_t ifp, whd_custom_ie_action_t action, const uint8_t *oui, uint8_t subtype, const void *data, uint16_t length, uint16_t which_packets)
 Manage the addition and removal of custom IEs. More...
 
uint32_t whd_wifi_send_action_frame (whd_interface_t ifp, whd_af_params_t *af_params)
 Send a pre-prepared action frame. More...
 
uint32_t whd_wifi_set_coex_config (whd_interface_t ifp, whd_coex_config_t *coex_config)
 Set coex configuration. More...
 
whd_result_t whd_arp_version (whd_interface_t ifp, uint32_t *version)
 Get version of Device (WLAN) Firmware. More...
 
whd_result_t whd_arp_peerage_get (whd_interface_t ifp, uint32_t *seconds)
 Get ARP Offload Peer Age from Device (WLAN) Length of time in seconds before aging out an entry in the WLAN processor ARP table. More...
 
whd_result_t whd_arp_peerage_set (whd_interface_t ifp, uint32_t seconds)
 Set ARP Offload Peer Age in Device (WLAN) Length of time in seconds before aging out an entry in the WLAN processor ARP table. More...
 
whd_result_t whd_arp_arpoe_get (whd_interface_t ifp, uint32_t *agent_enable)
 Get ARP Offload Agent Enable from Device (WLAN) More...
 
whd_result_t whd_arp_arpoe_set (whd_interface_t ifp, uint32_t agent_enable)
 Set ARP Offload Agent Enable in Device (WLAN) Set Enable/Disable of ARP Offload Agent. More...
 
whd_result_t whd_arp_cache_clear (whd_interface_t ifp)
 Clear ARP Offload cache in Device (WLAN) More...
 
whd_result_t whd_arp_features_get (whd_interface_t ifp, uint32_t *features)
 Get ARP Offload Feature Flags from Device (WLAN) More...
 
whd_result_t whd_arp_features_set (whd_interface_t ifp, uint32_t features)
 Set ARP Offload Feature Flags in Device (WLAN) More...
 
whd_result_t whd_arp_features_print (uint32_t features, const char *title)
 Print ARP Offload Feature Flags in Human readable form to console. More...
 
whd_result_t whd_arp_hostip_list_add (whd_interface_t ifp, uint32_t *host_ipv4_list, uint32_t count)
 Add ARP Offload Host IP Identifier(s) to HostIP List to Device (WLAN) More...
 
whd_result_t whd_arp_hostip_list_add_string (whd_interface_t ifp, const char *ip_addr)
 Add One ARP Offload Host IP Identifier to HostIP List (mbed-style IP string) to Device (WLAN) More...
 
whd_result_t whd_arp_hostip_list_clear_id (whd_interface_t ifp, uint32_t ipv4_addr)
 Clear One ARP Offload Host IP Identifier from Host IP List in Device (WLAN) More...
 
whd_result_t whd_arp_hostip_list_clear_id_string (whd_interface_t ifp, const char *ip_addr)
 Clear One ARP Offload Host IP Identifier from Host IP List (mbed-style IP string) in Device (WLAN) More...
 
whd_result_t whd_arp_hostip_list_clear (whd_interface_t ifp)
 Clear all ARP Offload Host IP Identifier List. More...
 
whd_result_t whd_arp_hostip_list_get (whd_interface_t ifp, uint32_t count, uint32_t *host_ipv4_list, uint32_t *filled)
 Get ARP Offload Host IP Identifiers from Device (WLAN) More...
 
whd_result_t whd_arp_stats_clear (whd_interface_t ifp)
 Clear ARP Offload statistics in Device (WLAN) More...
 
whd_result_t whd_arp_stats_get (whd_interface_t ifp, whd_arp_stats_t *stats)
 Get ARP Offload statistics from Device (WLAN) More...
 
whd_result_t whd_arp_stats_print (whd_arp_stats_t *arp_stats, const char *title)
 Print ARP Offload statistics NOTE: call whd_arp_stats_get(), then print them using this function. More...
 
whd_result_t whd_pf_add_packet_filter (whd_interface_t ifp, const whd_packet_filter_t *settings)
 A filter must be added (e.g. More...
 
whd_result_t whd_pf_remove_packet_filter (whd_interface_t ifp, uint8_t filter_id)
 Remove a previously added filter. More...
 
whd_result_t whd_pf_enable_packet_filter (whd_interface_t ifp, uint8_t filter_id)
 After a filter has been added it can be enabled or disabled as needed. More...
 
whd_result_t whd_pf_disable_packet_filter (whd_interface_t ifp, uint8_t filter_id)
 After a filter has been added it can be enabled or disabled as needed. More...
 
whd_result_t whd_wifi_toggle_packet_filter (whd_interface_t ifp, uint8_t filter_id, whd_bool_t enable)
 After a filter has been added it can be enabled or disabled as needed. More...
 
whd_result_t whd_pf_get_packet_filter_mask_and_pattern (whd_interface_t ifp, uint8_t filter_id, uint32_t max_size, uint8_t *mask, uint8_t *pattern, uint32_t *size_out)
 Filters are implemented in WLAN subsystem as a bit pattern and matching bit mask that are applied to incoming packets. More...
 
whd_result_t whd_wifi_clear_packet_filter_stats (whd_interface_t ifp, uint32_t filter_id)
 Clear the packet filter stats associated with a filter id. More...
 
whd_result_t whd_pf_get_packet_filter_stats (whd_interface_t ifp, uint8_t filter_id, whd_pkt_filter_stats_t *stats)
 Return the stats associated with a filter. More...
 
whd_result_t whd_tko_param (whd_interface_t ifp, whd_tko_retry_t *whd_tko_retry, int set)
 Set/Get TKO retry & interval parameters. More...
 
whd_result_t whd_tko_get_status (whd_interface_t ifp, whd_tko_status_t *tko_status)
 Return the tko status for all indexes. More...
 
whd_result_t whd_tko_max_assoc (whd_interface_t ifp, uint8_t *max)
 Return the stats associated with a filter. More...
 
whd_result_t whd_tko_get_FW_connect (whd_interface_t ifp, uint8_t index, whd_tko_connect_t *whd_connect, uint16_t buflen)
 Return the stats associated with a filter. More...
 
whd_result_t whd_tko_toggle (whd_interface_t ifp, whd_bool_t enable)
 Return the stats associated with a filter. More...
 
uint32_t whd_wifi_set_ioctl_value (whd_interface_t ifp, uint32_t ioctl, uint32_t value)
 Sends an IOCTL command - CDC_SET IOCTL value. More...
 
uint32_t whd_wifi_get_ioctl_value (whd_interface_t ifp, uint32_t ioctl, uint32_t *value)
 Sends an IOCTL command - CDC_GET IOCTL value. More...
 
uint32_t whd_wifi_set_ioctl_buffer (whd_interface_t ifp, uint32_t ioctl, void *buffer, uint16_t buffer_length)
 Sends an IOCTL command - CDC_SET IOCTL buffer. More...
 
uint32_t whd_wifi_get_ioctl_buffer (whd_interface_t ifp, uint32_t ioctl, uint8_t *out_buffer, uint16_t out_length)
 Sends an IOCTL command - CDC_GET IOCTL buffer. More...
 
uint32_t whd_wifi_get_iovar_buffer_with_param (whd_interface_t ifp, const char *iovar_name, void *param, uint32_t paramlen, uint8_t *out_buffer, uint32_t out_length)
 Sends an IOVAR command. More...
 
uint32_t whd_wifi_get_wifi_version (whd_interface_t ifp, char *version, uint8_t length)
 Retrieves the WLAN firmware version. More...
 
uint32_t whd_wifi_get_clm_version (whd_interface_t ifp, char *version, uint8_t length)
 Retrieves the WLAN CLM version. More...
 
uint32_t whd_wifi_read_wlan_log (whd_driver_t whd_drv, char *buffer, uint32_t buffer_size)
 To print whd log information. More...
 
uint32_t whd_wifi_print_whd_log (whd_driver_t whd_drv)
 To print whd log information. More...
 
uint32_t whd_network_get_ifidx_from_ifp (whd_interface_t ifp, uint8_t *ifidx)
 Retrieves the ifidx from interface pointer. More...
 
uint32_t whd_network_get_bsscfgidx_from_ifp (whd_interface_t ifp, uint8_t *bsscfgidx)
 Retrieves the bsscfgidx from interface pointer. More...
 
uint32_t whd_wifi_get_bss_info (whd_interface_t ifp, wl_bss_info_t *bi)
 Retrives the bss info. More...
 
uint32_t whd_print_stats (whd_driver_t whd_drv, whd_bool_t reset_after_print)
 Prints WHD stats. More...
 

Detailed Description

Prototypes of functions for controlling the Wi-Fi system.

This file provides prototypes for end-user functions which allow actions such as scanning for Wi-Fi networks, joining Wi-Fi networks, getting the MAC address, etc

Definition in file whd_wifi_api.h.

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.