Infineon Logo Wi-Fi Host Driver (WHD) Public API Reference Guide
 
WHD Wi-Fi Utility API

General Description

Allows WHD to perform utility operations.

Functions

whd_result_t whd_wifi_set_channel (whd_interface_t ifp, uint32_t channel)
 Set the current channel on the WLAN radio. More...
 
whd_result_t whd_wifi_get_channel (whd_interface_t ifp, uint32_t *channel)
 Get the current channel on the WLAN radio. More...
 
whd_result_t whd_wifi_get_channels (whd_interface_t ifp, whd_list_t *channel_list)
 Gets the supported channels. More...
 
whd_result_t whd_wifi_set_passphrase (whd_interface_t ifp, const uint8_t *security_key, uint8_t key_length)
 Set the passphrase. More...
 
whd_result_t whd_wifi_sae_password (whd_interface_t ifp, const uint8_t *security_key, uint8_t key_length)
 Set the SAE password. More...
 
whd_result_t whd_wifi_offload_config (whd_interface_t ifp, uint32_t ol_feat, uint32_t reset)
 Set the offload configuration. More...
 
whd_result_t whd_wifi_offload_ipv4_update (whd_interface_t ifp, uint32_t ol_feat, uint32_t ipv4_addr, whd_bool_t is_add)
 Update IPV4 address. More...
 
whd_result_t whd_wifi_offload_ipv6_update (whd_interface_t ifp, uint32_t ol_feat, uint32_t *ipv6_addr, uint8_t type, whd_bool_t is_add)
 Update IPV6 address. More...
 
whd_result_t whd_wifi_offload_enable (whd_interface_t ifp, uint32_t ol_feat, uint32_t enable)
 Enable the offload module. More...
 
whd_result_t whd_configure_wowl (whd_interface_t ifp, uint32_t set_wowl)
 Configure the offload module. More...
 
whd_result_t whd_wifi_keepalive_config (whd_interface_t ifp, whd_keep_alive_t *packet, uint8_t flag)
 Configure the Keep Alive offload module. More...
 
whd_result_t whd_configure_tko_offload (whd_interface_t ifp, whd_bool_t enable)
 Configure the TKO offload module. More...
 
whd_result_t whd_configure_tko_filter (whd_interface_t ifp, whd_tko_auto_filter_t *whd_filter, uint8_t filter_flag)
 Configure the TKO filter module. More...
 
whd_result_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...
 
whd_result_t whd_wifi_set_pmk (whd_interface_t ifp, const uint8_t *security_key, uint8_t key_length)
 Set the PMK Key. More...
 
whd_result_t whd_wifi_set_roam_time_threshold (whd_interface_t ifp, uint32_t roam_time_threshold)
 Set the Roam time threshold. More...
 
whd_result_t whd_wifi_enable_supplicant (whd_interface_t ifp, whd_security_t auth_type)
 Enable WHD internal supplicant. More...
 
whd_result_t whd_wifi_set_pmksa (whd_interface_t ifp, const pmkid_t *pmkid)
 Set PMKID in Device (WLAN) More...
 
whd_result_t whd_wifi_pmkid_clear (whd_interface_t ifp)
 Clear all PMKIDs in Device (WLAN), especially the PMKIDs in Supplicant module. More...
 
whd_result_t whd_wifi_get_rssi (whd_interface_t ifp, int32_t *rssi)
 Retrieve the latest RSSI value. More...
 
whd_result_t whd_wifi_get_roam_time_threshold (whd_interface_t ifp, uint32_t *roam_time_threshold)
 Retrieve the latest Roam time threshold value. More...
 
whd_result_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...
 
whd_result_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...
 
whd_result_t whd_wifi_get_bssid (whd_interface_t ifp, whd_mac_t *bssid)
 Get the BSSID of the interface. More...
 
whd_result_t whd_wifi_register_multicast_address (whd_interface_t ifp, const whd_mac_t *mac)
 Registers interest in a multicast address. More...
 
whd_result_t whd_wifi_unregister_multicast_address (whd_interface_t ifp, const whd_mac_t *mac)
 Unregisters interest in a multicast address. More...
 
whd_result_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...
 
whd_result_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...
 
whd_result_t whd_wifi_is_ready_to_transceive (whd_interface_t ifp)
 Determines if a particular interface is ready to transceive ethernet packets. More...
 
whd_result_t whd_wifi_get_acparams (whd_interface_t ifp, whd_edcf_ac_param_t *acp)
 Retrieve the latest STA EDCF AC parameters. More...
 
whd_result_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...
 
whd_result_t whd_wifi_send_action_frame (whd_interface_t ifp, whd_af_params_t *af_params)
 Send a pre-prepared action frame. More...
 
whd_result_t whd_wifi_send_auth_frame (whd_interface_t ifp, whd_auth_params_t *auth_params)
 Send a pre-prepared authentication frame. More...
 
whd_result_t whd_wifi_he_omi (whd_interface_t ifp, whd_he_omi_params_t *he_omi_params)
 Configure HE OM Control. More...
 
whd_result_t whd_wifi_bss_max_idle (whd_interface_t ifp, uint16_t period)
 Configure BSS Max Idle Time. More...
 
whd_result_t whd_wifi_itwt_setup (whd_interface_t ifp, whd_itwt_setup_params_t *twt_params)
 Trigger individual TWT session(used by STA) More...
 
whd_result_t whd_wifi_btwt_join (whd_interface_t ifp, whd_btwt_join_params_t *twt_params)
 Trigger Join broadcast TWT session(used by STA) More...
 
whd_result_t whd_wifi_twt_teardown (whd_interface_t ifp, whd_twt_teardown_params_t *twt_params)
 Trigger teardown all individual or broadcast TWT sessions. More...
 
whd_result_t whd_wifi_twt_information_frame (whd_interface_t ifp, whd_twt_information_params_t *twt_params)
 Trigger TWT information frame(used by STA) More...
 
whd_result_t whd_wifi_btwt_config (whd_interface_t ifp, whd_btwt_config_params_t *twt_params)
 Configure TWT IE in beacon(used by AP) More...
 
whd_result_t whd_wifi_set_coex_config (whd_interface_t ifp, whd_coex_config_t *coex_config)
 Set coex configuration. More...
 
whd_result_t whd_wifi_set_auth_status (whd_interface_t ifp, whd_auth_req_status_t *status)
 Set auth status used for External AUTH(SAE) More...
 
whd_result_t whd_wifi_get_fwcap (whd_interface_t ifp, uint32_t *value)
 Get FW(chip) Capability. 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, uint8_t 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...
 
whd_result_t whd_tko_filter (whd_interface_t ifp, whd_tko_auto_filter_t *whd_filter, uint8_t filter_flag)
 Return the stats associated with a filter. More...
 

Function Documentation

◆ whd_wifi_set_channel()

whd_result_t whd_wifi_set_channel ( whd_interface_t  ifp,
uint32_t  channel 
)

Set the current channel on the WLAN radio.

Note
On most WLAN devices this will set the channel for both AP AND STA (since there is only one radio - it cannot be on two channels simulaneously)
Parameters
ifpPointer to handle instance of whd interface
channelThe desired channel
Returns
WHD_SUCCESS if the channel was successfully set Error code if the channel was not successfully set

◆ whd_wifi_get_channel()

whd_result_t whd_wifi_get_channel ( whd_interface_t  ifp,
uint32_t *  channel 
)

Get the current channel on the WLAN radio.

Note
On most WLAN devices this will get the channel for both AP AND STA (since there is only one radio - it cannot be on two channels simulaneously)
Parameters
ifpPointer to handle instance of whd interface
channelPointer to receive the current channel
Returns
WHD_SUCCESS if the channel was successfully retrieved Error code if the channel was not successfully retrieved

◆ whd_wifi_get_channels()

whd_result_t whd_wifi_get_channels ( whd_interface_t  ifp,
whd_list_t channel_list 
)

Gets the supported channels.

Parameters
ifpPointer to handle instance of whd interface
channel_listBuffer to store list of the supported channels and max channel is MAXCHANNEL
Returns
WHD_SUCCESS if the active connections was successfully read WHD_ERROR if the active connections was not successfully read

◆ whd_wifi_set_passphrase()

whd_result_t whd_wifi_set_passphrase ( whd_interface_t  ifp,
const uint8_t *  security_key,
uint8_t  key_length 
)

Set the passphrase.

Parameters
ifpPointer to handle instance of whd interface
security_keyThe security key (passphrase) which is to be set
key_lengthlength of the key
Returns
WHD_SUCCESS when the key is set Error code if an error occurred

◆ whd_wifi_sae_password()

whd_result_t whd_wifi_sae_password ( whd_interface_t  ifp,
const uint8_t *  security_key,
uint8_t  key_length 
)

Set the SAE password.

Parameters
ifpPointer to handle instance of whd interface
security_keyThe security key (password) which is to be set
key_lengthlength of the key
Returns
WHD_SUCCESS when the key is set Error code if an error occurred

◆ whd_wifi_offload_config()

whd_result_t whd_wifi_offload_config ( whd_interface_t  ifp,
uint32_t  ol_feat,
uint32_t  reset 
)

Set the offload configuration.

Parameters
ifpPointer to handle instance of whd interface
ol_featOffload Skip bitmap
resetreset or set configuration
Returns
WHD_SUCCESS when the offload config is set/reset Error code if an error occurred

◆ whd_wifi_offload_ipv4_update()

whd_result_t whd_wifi_offload_ipv4_update ( whd_interface_t  ifp,
uint32_t  ol_feat,
uint32_t  ipv4_addr,
whd_bool_t  is_add 
)

Update IPV4 address.

Parameters
ifpPointer to handle instance of whd interface
ol_featOffload Skip bitmap
ipv4_addrset ipv4 address
is_addTo add or delete IPV4 address
Returns
WHD_SUCCESS when the ipv4 address updated or not Error code if an error occurred

◆ whd_wifi_offload_ipv6_update()

whd_result_t whd_wifi_offload_ipv6_update ( whd_interface_t  ifp,
uint32_t  ol_feat,
uint32_t *  ipv6_addr,
uint8_t  type,
whd_bool_t  is_add 
)

Update IPV6 address.

Parameters
ifpPointer to handle instance of whd interface
ol_featOffload Skip bitmap
ipv6_addrset ipv6 address
typeset 0:unicast 1:anycast
is_addTo add or delete IPV6 address
Returns
WHD_SUCCESS when the ipv6 address updated or not Error code if an error occurred

◆ whd_wifi_offload_enable()

whd_result_t whd_wifi_offload_enable ( whd_interface_t  ifp,
uint32_t  ol_feat,
uint32_t  enable 
)

Enable the offload module.

Parameters
ifpPointer to handle instance of whd interface
ol_featOffload Skip bitmap
enableEnable/Disable offload module
Returns
WHD_SUCCESS when offload module enabled or not Error code if an error occurred

◆ whd_configure_wowl()

whd_result_t whd_configure_wowl ( whd_interface_t  ifp,
uint32_t  set_wowl 
)

Configure the offload module.

Parameters
ifpPointer to handle instance of whd interface
set_wowlvalue indicates, which are all wowl bits to be set
Returns
WHD_SUCCESS when offload module enabled or not Error code if an error occurred

◆ whd_wifi_keepalive_config()

whd_result_t whd_wifi_keepalive_config ( whd_interface_t  ifp,
whd_keep_alive_t packet,
uint8_t  flag 
)

Configure the Keep Alive offload module.

Parameters
ifpPointer to handle instance of whd interface
packetwhd period,len_bytes & Data parameter structure
flagFlag to set NULL(0)/NAT(1) keepalive
Returns
WHD_SUCCESS when offload module enabled or not Error code if an error occurred

◆ whd_configure_tko_offload()

whd_result_t whd_configure_tko_offload ( whd_interface_t  ifp,
whd_bool_t  enable 
)

Configure the TKO offload module.

Parameters
ifpPointer to handle instance of whd interface
enableEnable/Disable TCP Keepalive offload
Returns
WHD_SUCCESS when offload module enabled or not Error code if an error occurred

◆ whd_configure_tko_filter()

whd_result_t whd_configure_tko_filter ( whd_interface_t  ifp,
whd_tko_auto_filter_t *  whd_filter,
uint8_t  filter_flag 
)

Configure the TKO filter module.

Parameters
ifpPointer to handle instance of whd interface
whd_filterwl_filter structure buffer from Firmware
filter_flagTo set filter
Returns
WHD_SUCCESS when offload module enabled or not Error code if an error occurred

◆ whd_wifi_enable_sup_set_passphrase()

whd_result_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.

Parameters
ifpPointer to handle instance of whd interface
security_key_pskThe security key (passphrase) which is to be set
psk_lengthlength of the key
auth_typeAuthentication type: WHD_SECURITY_WPA3_WPA2_PSK
Returns
WHD_SUCCESS when the supplicant variable and wpa2 passphrase is set Error code if an error occurred

◆ whd_wifi_set_pmk()

whd_result_t whd_wifi_set_pmk ( whd_interface_t  ifp,
const uint8_t *  security_key,
uint8_t  key_length 
)

Set the PMK Key.

Parameters
ifpPointer to handle instance of whd interface
security_keyThe security key (PMK) which is to be set
key_lengthlength of the PMK(It must be 32 bytes)
Returns
WHD_SUCCESS when the key is set Error code if an error occurred

◆ whd_wifi_set_roam_time_threshold()

whd_result_t whd_wifi_set_roam_time_threshold ( whd_interface_t  ifp,
uint32_t  roam_time_threshold 
)

Set the Roam time threshold.

Parameters
ifpPointer to handle instance of whd interface
roam_time_thresholdThe maximum roam time threshold which is to be set
Returns
WHD_SUCCESS when the roam_time_threshold is set Error code if an error occurred

◆ whd_wifi_enable_supplicant()

whd_result_t whd_wifi_enable_supplicant ( whd_interface_t  ifp,
whd_security_t  auth_type 
)

Enable WHD internal supplicant.

Parameters
ifpPointer to handle instance of whd interface
auth_typeAuthentication type
Returns
WHD_SUCCESS when the supplicant variable is set Error code if an error occurred

◆ whd_wifi_set_pmksa()

whd_result_t whd_wifi_set_pmksa ( whd_interface_t  ifp,
const pmkid_t pmkid 
)

Set PMKID in Device (WLAN)

Parameters
ifpPointer to handle instance of whd interface
pmkidPointer to BSSID and PMKID(16 bytes)
Returns
whd_result_t

◆ whd_wifi_pmkid_clear()

whd_result_t whd_wifi_pmkid_clear ( whd_interface_t  ifp)

Clear all PMKIDs in Device (WLAN), especially the PMKIDs in Supplicant module.

Parameters
ifpPointer to handle instance of whd interface
Returns
whd_result_t

◆ whd_wifi_get_rssi()

whd_result_t whd_wifi_get_rssi ( whd_interface_t  ifp,
int32_t *  rssi 
)

Retrieve the latest RSSI value.

Parameters
ifpPointer to handle instance of whd interface
rssiThe location where the RSSI value will be stored
Returns
WHD_SUCCESS if the RSSI was successfully retrieved Error code if the RSSI was not retrieved

◆ whd_wifi_get_roam_time_threshold()

whd_result_t whd_wifi_get_roam_time_threshold ( whd_interface_t  ifp,
uint32_t *  roam_time_threshold 
)

Retrieve the latest Roam time threshold value.

Parameters
ifpPointer to handle instance of whd interface
roam_time_thresholdThe location where the roam time threshold value will be stored
Returns
WHD_SUCCESS if the roam time threshold was successfully retrieved Error code if the roam time threshold was not retrieved

◆ whd_wifi_get_ap_client_rssi()

whd_result_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.

Parameters
ifp: Pointer to handle instance of whd interface
rssi: The location where the RSSI value will be stored
client_mac: Pointer to associated client's MAC address
Returns
WHD_SUCCESS : if the RSSI was successfully retrieved Error code : if the RSSI was not retrieved

◆ whd_wifi_get_mac_address()

whd_result_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.

Parameters
ifpPointer to handle instance of whd interface
macPointer to a variable that the current MAC address will be written to
Returns
WHD_SUCCESS or Error code

◆ whd_wifi_get_bssid()

whd_result_t whd_wifi_get_bssid ( whd_interface_t  ifp,
whd_mac_t bssid 
)

Get the BSSID of the interface.

Parameters
ifpPointer to the whd_interface_t
bssidReturns the BSSID address (mac address) if associated
Returns
WHD_SUCCESS or Error code

◆ whd_wifi_register_multicast_address()

whd_result_t whd_wifi_register_multicast_address ( whd_interface_t  ifp,
const whd_mac_t mac 
)

Registers interest in a multicast address.

Once a multicast address has been registered, all packets detected on the medium destined for that address are forwarded to the host. Otherwise they are ignored.

Parameters
ifpPointer to handle instance of whd interface
macEthernet MAC address
Returns
WHD_SUCCESS if the address was registered successfully Error code if the address was not registered

◆ whd_wifi_unregister_multicast_address()

whd_result_t whd_wifi_unregister_multicast_address ( whd_interface_t  ifp,
const whd_mac_t mac 
)

Unregisters interest in a multicast address.

Once a multicast address has been unregistered, all packets detected on the medium destined for that address are ignored.

Parameters
ifpPointer to handle instance of whd interface
macEthernet MAC address
Returns
WHD_SUCCESS if the address was unregistered successfully Error code if the address was not unregistered

◆ whd_wifi_set_listen_interval()

whd_result_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.

The listen interval will be set to (listen_interval x time_unit) seconds.

The default value for the listen interval is 0. With the default value of 0 set, the Wi-Fi device wakes to listen for AP beacons every DTIM period.

If the DTIM listen interval is non-zero, the DTIM listen interval will over ride the beacon listen interval value.

Parameters
ifpPointer to handle instance of whd interface
listen_intervalThe desired beacon listen interval
time_unitThe listen interval time unit; options are beacon period or DTIM period.
Returns
WHD_SUCCESS If the listen interval was successfully set. Error code If the listen interval was not successfully set.

◆ whd_wifi_get_listen_interval()

whd_result_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.

Parameters
ifpPointer to handle instance of whd interface
liPowersave listen interval values
  • listen_interval_beacon : The current value of the listen interval set as a multiple of the beacon period
  • listen_interval_dtim : The current value of the listen interval set as a multiple of the DTIM period
  • listen_interval_assoc : The current value of the listen interval sent to access points in an association request frame
Returns
WHD_SUCCESS If all listen interval values are read successfully Error code If at least one of the listen interval values are NOT read successfully

◆ whd_wifi_is_ready_to_transceive()

whd_result_t whd_wifi_is_ready_to_transceive ( whd_interface_t  ifp)

Determines if a particular interface is ready to transceive ethernet packets.

Parameters
ifpPointer to handle instance of whd interface
Returns
WHD_SUCCESS if the interface is ready to transceive ethernet packets WHD_NOTFOUND no AP with a matching SSID was found WHD_NOT_AUTHENTICATED Matching AP was found but it won't let you authenticate. This can occur if this device is in the block list on the AP. WHD_NOT_KEYED Device has authenticated and associated but has not completed the key exchange. This can occur if the passphrase is incorrect. Error code if the interface is not ready to transceive ethernet packets

◆ whd_wifi_get_acparams()

whd_result_t whd_wifi_get_acparams ( whd_interface_t  ifp,
whd_edcf_ac_param_t *  acp 
)

Retrieve the latest STA EDCF AC parameters.

Retrieve the latest Station (STA) interface EDCF (Enhanced Distributed Coordination Function) Access Category parameters

Parameters
ifpPointer to handle instance of whd interface
acpThe location where the array of AC parameters will be stored
Returns
WHD_SUCCESS if the AC Parameters were successfully retrieved Error code if the AC Parameters were not retrieved

◆ whd_wifi_manage_custom_ie()

whd_result_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.

Parameters
ifpPointer to handle instance of whd interface
actionthe action to take (add or remove IE)
ouithe oui of the custom IE
subtypethe IE sub-type
dataa pointer to the buffer that hold the custom IE
lengththe length of the buffer pointed to by 'data'
which_packetsA mask to indicate in which all packets this IE should be included. See whd_ie_packet_flag_t.
Returns
WHD_SUCCESS if the custom IE action was successful Error code if the custom IE action failed

◆ whd_wifi_send_action_frame()

whd_result_t whd_wifi_send_action_frame ( whd_interface_t  ifp,
whd_af_params_t *  af_params 
)

Send a pre-prepared action frame.

Parameters
ifpPointer to handle instance of whd interface
af_paramsA pointer to a pre-prepared action frame structure
Returns
WHD_SUCCESS or Error code

◆ whd_wifi_send_auth_frame()

whd_result_t whd_wifi_send_auth_frame ( whd_interface_t  ifp,
whd_auth_params_t auth_params 
)

Send a pre-prepared authentication frame.

Parameters
ifpPointer to handle instance of whd interface
auth_paramspointer to a pre-prepared authentication frame structure
Returns
WHD_SUCCESS or Error code

◆ whd_wifi_he_omi()

whd_result_t whd_wifi_he_omi ( whd_interface_t  ifp,
whd_he_omi_params_t he_omi_params 
)

Configure HE OM Control.

Parameters
ifpPointer to handle instance of whd interface
he_omi_paramspointer to he_omi parameters
Returns
WHD_SUCCESS or Error code

◆ whd_wifi_bss_max_idle()

whd_result_t whd_wifi_bss_max_idle ( whd_interface_t  ifp,
uint16_t  period 
)

Configure BSS Max Idle Time.

Parameters
ifpPointer to handle instance of whd interface
periodThe bss max idle period time unit(seconds)
Returns
WHD_SUCCESS or Error code

◆ whd_wifi_itwt_setup()

whd_result_t whd_wifi_itwt_setup ( whd_interface_t  ifp,
whd_itwt_setup_params_t twt_params 
)

Trigger individual TWT session(used by STA)

Parameters
ifpPointer to handle instance of whd interface
twt_paramspointer to itwt_setup parameters
Returns
WHD_SUCCESS or Error code

◆ whd_wifi_btwt_join()

whd_result_t whd_wifi_btwt_join ( whd_interface_t  ifp,
whd_btwt_join_params_t twt_params 
)

Trigger Join broadcast TWT session(used by STA)

Parameters
ifpPointer to handle instance of whd interface
twt_paramspointer to btwt_join parameters
Returns
WHD_SUCCESS or Error code

◆ whd_wifi_twt_teardown()

whd_result_t whd_wifi_twt_teardown ( whd_interface_t  ifp,
whd_twt_teardown_params_t twt_params 
)

Trigger teardown all individual or broadcast TWT sessions.

Parameters
ifpPointer to handle instance of whd interface
twt_paramspointer to twt_taerdown parameters
Returns
WHD_SUCCESS or Error code

◆ whd_wifi_twt_information_frame()

whd_result_t whd_wifi_twt_information_frame ( whd_interface_t  ifp,
whd_twt_information_params_t twt_params 
)

Trigger TWT information frame(used by STA)

Parameters
ifpPointer to handle instance of whd interface
twt_paramspointer to twt_information parameters
Returns
WHD_SUCCESS or Error code

◆ whd_wifi_btwt_config()

whd_result_t whd_wifi_btwt_config ( whd_interface_t  ifp,
whd_btwt_config_params_t twt_params 
)

Configure TWT IE in beacon(used by AP)

Parameters
ifpPointer to handle instance of whd interface
twt_paramspointer to btwt_config parameters
Returns
WHD_SUCCESS or Error code

◆ whd_wifi_set_coex_config()

whd_result_t whd_wifi_set_coex_config ( whd_interface_t  ifp,
whd_coex_config_t coex_config 
)

Set coex configuration.

Parameters
ifpPointer to handle instance of whd interface
coex_configPointer to the structure whd_coex_config_t
Returns
WHD_SUCCESS or Error code

◆ whd_wifi_set_auth_status()

whd_result_t whd_wifi_set_auth_status ( whd_interface_t  ifp,
whd_auth_req_status_t status 
)

Set auth status used for External AUTH(SAE)

Parameters
ifpPointer to handle instance of whd interface
statusPointer to Auth_Status structure
Returns
WHD_SUCCESS or Error code

◆ whd_wifi_get_fwcap()

whd_result_t whd_wifi_get_fwcap ( whd_interface_t  ifp,
uint32_t *  value 
)

Get FW(chip) Capability.

Parameters
ifpPointer to handle instance of whd interface
valueEnum value of the current FW capability, ex: sae or sae_ext or ...etc, (enum value map to whd_fwcap_id_t)
Returns
WHD_SUCCESS or Error code

◆ whd_arp_version()

whd_result_t whd_arp_version ( whd_interface_t  ifp,
uint32_t *  version 
)

Get version of Device (WLAN) Firmware.

Parameters
[in]ifp: pointer to handle instance of whd interface
[out]version: pointer to store version #
Returns
whd_result_t

◆ whd_arp_peerage_get()

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.

Parameters
[in]ifp: pointer to handle instance of whd interface
[out]seconds: pointer to store value
Returns
whd_result_t

◆ whd_arp_peerage_set()

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.

Parameters
[in]ifp: pointer to handle instance of whd interface
[in]seconds: Seconds to age out IP
Returns
whd_result_t

◆ whd_arp_arpoe_get()

whd_result_t whd_arp_arpoe_get ( whd_interface_t  ifp,
uint32_t *  agent_enable 
)

Get ARP Offload Agent Enable from Device (WLAN)

Parameters
[in]ifp: pointer to handle instance of whd interface
[out]agent_enable: pointer to store value
Returns
whd_result_t

◆ whd_arp_arpoe_set()

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.

Parameters
[in]ifp: pointer to handle instance of whd interface
[in]agent_enable: Enable=1 / Disable=0
Returns
whd_result_t

◆ whd_arp_cache_clear()

whd_result_t whd_arp_cache_clear ( whd_interface_t  ifp)

Clear ARP Offload cache in Device (WLAN)

Parameters
[in]ifp: pointer to handle instance of whd interface
Returns
whd_result_t

◆ whd_arp_features_get()

whd_result_t whd_arp_features_get ( whd_interface_t  ifp,
uint32_t *  features 
)

Get ARP Offload Feature Flags from Device (WLAN)

Parameters
[in]ifp: pointer to handle instance of whd interface
[out]features: ptr to store currently set features - bit flags CY_ARP_OL_AGENT_ENABLE, etc. ARL_OL_AGENT | ARL_OL_SNOOP | ARP_OL_HOST_AUTO_REPLY | ARP_OL_PEER_AUTO_REPLY
Returns
whd_result_t

◆ whd_arp_features_set()

whd_result_t whd_arp_features_set ( whd_interface_t  ifp,
uint32_t  features 
)

Set ARP Offload Feature Flags in Device (WLAN)

Parameters
[in]ifp: pointer to handle instance of whd interface
[in]features: features to set value (you can OR ('|') multiple flags) CY_ARP_OL_AGENT_ENABLE, etc. ARL_OL_AGENT | ARL_OL_SNOOP | ARP_OL_HOST_AUTO_REPLY | ARP_OL_PEER_AUTO_REPLY
Returns
whd_result_t

◆ whd_arp_features_print()

whd_result_t whd_arp_features_print ( uint32_t  features,
const char *  title 
)

Print ARP Offload Feature Flags in Human readable form to console.

Parameters
[in]features: feature flags to set (you can OR '|' multiple flags) CY_ARP_OL_AGENT_ENABLE, etc. ARL_OL_AGENT | ARL_OL_SNOOP | ARP_OL_HOST_AUTO_REPLY | ARP_OL_PEER_AUTO_REPLY
[in]title: Optional: Title for output (NULL == no title)
Returns
whd_result_t

◆ whd_arp_hostip_list_add()

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)

Parameters
[in]ifp: pointer to handle instance of whd interface
[in]host_ipv4_list: pointer to host_ip data (IPv4, 1 uint32_t per ip addr)
[in]count: Number of array elements in host_ip
Returns
whd_result_t

◆ whd_arp_hostip_list_add_string()

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)

Parameters
[in]ifp: pointer to handle instance of whd interface
[in]ip_addr: pointer to ip string (as returned from mbedos calls)
Returns
whd_result_t

◆ whd_arp_hostip_list_clear_id()

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)

Parameters
[in]ifp: pointer to handle instance of whd interface
[in]ipv4_addr: ip addr expressed as a uint32_t
Returns
whd_result_t

◆ whd_arp_hostip_list_clear_id_string()

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)

Parameters
[in]ifp: pointer to handle instance of whd interface
[in]ip_addr: pointer to ip string (as returned from mbedos calls)
Returns
whd_result_t

◆ whd_arp_hostip_list_clear()

whd_result_t whd_arp_hostip_list_clear ( whd_interface_t  ifp)

Clear all ARP Offload Host IP Identifier List.

Parameters
[in]ifp: pointer to handle instance of whd interface
Returns
whd_result_t

◆ whd_arp_hostip_list_get()

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)

Parameters
[in]ifp: pointer to handle instance of whd interface
[in]count: Number of array elements in host_ip
[out]host_ipv4_list: Pointer to structure array to store host_ip data
[out]filled: Number of array elements filled by this routine
Returns
whd_result_t

◆ whd_arp_stats_clear()

whd_result_t whd_arp_stats_clear ( whd_interface_t  ifp)

Clear ARP Offload statistics in Device (WLAN)

Parameters
[in]ifp: pointer to handle instance of whd interface
Returns
whd_result_t

◆ whd_arp_stats_get()

whd_result_t whd_arp_stats_get ( whd_interface_t  ifp,
whd_arp_stats_t *  stats 
)

Get ARP Offload statistics from Device (WLAN)

Parameters
[in]ifp: pointer to handle instance of whd interface
[out]stats: Ptr to store statistics whd_arp_stats_t
Returns
whd_result_t

◆ whd_arp_stats_print()

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.

Parameters
[in]arp_stats: Ptr to ARP statistics structure
[in]title: Optional: Title for output (NULL == no title)
Returns
whd_result_t

◆ whd_pf_add_packet_filter()

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.

created) before it can be enabled.

Parameters
[in]ifp: pointer to handle instance of whd interface
[in]settings: Ptr to filter settings whd_packet_filter_t
Returns
whd_result_t

◆ whd_pf_remove_packet_filter()

whd_result_t whd_pf_remove_packet_filter ( whd_interface_t  ifp,
uint8_t  filter_id 
)

Remove a previously added filter.

Parameters
[in]ifp: pointer to handle instance of whd interface
[in]filter_id: filter to remove
Returns
whd_result_t

◆ whd_pf_enable_packet_filter()

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.

Parameters
[in]ifp: pointer to handle instance of whd interface
[in]filter_id: filter to enable
Returns
whd_result_t

◆ whd_pf_disable_packet_filter()

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.

Parameters
[in]ifp: pointer to handle instance of whd interface
[in]filter_id: filter to disable
Returns
whd_result_t

◆ whd_wifi_toggle_packet_filter()

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.

Parameters
[in]ifp: pointer to handle instance of whd interface
[in]filter_id: filter to disable/enable
[in]enable: Enable/Disable Flag
Returns
whd_result_t

◆ whd_pf_get_packet_filter_mask_and_pattern()

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.

This API retrieves the pattern and mask.

Parameters
[in]ifp: pointer to handle instance of whd interface
[in]filter_id: which filter to retrieve
[in]max_size: size of both mask and pattern buffers
[out]mask: mask for this filter
[out]pattern: pattern for this filter
[out]size_out: length of both mask and pattern
Returns
whd_result_t

◆ whd_wifi_clear_packet_filter_stats()

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.

Parameters
[in]ifp: pointer to handle instance of whd interface
[in]filter_id: which filter
Returns
whd_result_t

◆ whd_pf_get_packet_filter_stats()

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.

Parameters
[in]ifp: pointer to handle instance of whd interface
[in]filter_id: which filter
[out]stats: Ptr to store statistics wl_pkt_filter_stats_t
Returns
whd_result_t

◆ whd_tko_param()

whd_result_t whd_tko_param ( whd_interface_t  ifp,
whd_tko_retry_t *  whd_tko_retry,
uint8_t  set 
)

Set/Get TKO retry & interval parameters.

Parameters
[in]ifp: Pointer to handle instance of whd interface
[in]whd_tko_retry: whd retry & interval parameters structure
[in]set: Set(1)/Get(0) Flag
Returns
whd_result_t

◆ whd_tko_get_status()

whd_result_t whd_tko_get_status ( whd_interface_t  ifp,
whd_tko_status_t *  tko_status 
)

Return the tko status for all indexes.

Parameters
[in]ifp: Pointer to handle instance of whd interface
[out]tko_status: Ptr to store tko_status
Returns
whd_result_t

◆ whd_tko_max_assoc()

whd_result_t whd_tko_max_assoc ( whd_interface_t  ifp,
uint8_t *  max 
)

Return the stats associated with a filter.

Parameters
[in]ifp: Pointer to handle instance of whd interface
[out]max: returns Max TCP connections supported by WLAN Firmware
Returns
whd_result_t

◆ whd_tko_get_FW_connect()

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.

Parameters
[in]ifp: Pointer to handle instance of whd interface
[in]index: index for TCP offload connection
[out]whd_connect: tko_connect structure buffer from Firmware
[in]buflen: Buffer given for tko_connect
Returns
whd_result_t

◆ whd_tko_toggle()

whd_result_t whd_tko_toggle ( whd_interface_t  ifp,
whd_bool_t  enable 
)

Return the stats associated with a filter.

Parameters
[in]ifp: Pointer to handle instance of whd interface
[in]enable: Enable/Disable TCP Keepalive offload
Returns
whd_result_t

◆ whd_tko_filter()

whd_result_t whd_tko_filter ( whd_interface_t  ifp,
whd_tko_auto_filter_t *  whd_filter,
uint8_t  filter_flag 
)

Return the stats associated with a filter.

Parameters
[in]ifp: Pointer to handle instance of whd interface
[in]whd_filter: wl_filter structure buffer from Firmware
[in]filter_flagTo set filter
Returns
whd_result_t