30 #ifndef INCLUDED_WHD_WIFI_API_H 31 #define INCLUDED_WHD_WIFI_API_H 253 const uint16_t *optional_channel_list,
284 const uint8_t *security_key, uint8_t key_length);
469 const uint8_t *security_key, uint8_t key_length, uint8_t channel);
509 uint16_t buffer_length);
728 const uint8_t *oui, uint8_t subtype,
const void *data,
729 uint16_t length, uint16_t which_packets);
966 uint8_t *pattern, uint32_t *size_out);
1071 uint16_t out_length);
1085 uint32_t paramlen, uint8_t *out_buffer, uint32_t out_length);
whd_result_t whd_arp_arpoe_get(whd_interface_t ifp, uint32_t *agent_enable)
Get ARP Offload Agent Enable from Device (WLAN)
whd_result_t whd_arp_version(whd_interface_t ifp, uint32_t *version)
Get version of Device (WLAN) Firmware.
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.
uint32_t whd_wifi_set_passphrase(whd_interface_t ifp, const uint8_t *security_key, uint8_t key_length)
Set the passphrase.
uint32_t whd_wifi_leave(whd_interface_t ifp)
Disassociates from a Wi-Fi network.
Contains functions which allows WHD to pass received data to the network stack, to send an ethernet f...
whd_result_t whd_arp_stats_clear(whd_interface_t ifp)
Clear ARP Offload statistics in Device (WLAN)
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.
Structure to store scan result parameters for each AP.
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.
Get/Set TKO intervals & retrys.
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...
uint32_t whd_wifi_get_powersave_mode(whd_interface_t ifp, uint32_t *value)
Get powersave mode on specified interface.
uint32_t whd_wifi_sae_password(whd_interface_t ifp, const uint8_t *security_key, uint8_t key_length)
Set the SAE password.
Provides abstract pointer type to act as instance for: driver, interface, buffer funcs, network funcs, resource funcs and bus funcs.
void whd_bus_sdio_detach(whd_driver_t whd_driver)
Detach the WLAN Device to a specific SDIO bus.
Structure for SDIO config parameters which can be set by application during whd power up...
Structure for storing extended scan parameters.
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.
uint32_t whd_wifi_get_bss_info(whd_interface_t ifp, wl_bss_info_t *bi)
Retrives the bss info.
uint32_t whd_wifi_set_up(whd_interface_t ifp)
Brings up the Wi-Fi core.
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) ...
Structure for storing scan results.
whd_scan_type_t
Enumeration of methods of scanning.
uint32_t whd_wifi_enable_powersave(whd_interface_t ifp)
Enables powersave mode on specified interface without regard for throughput reduction.
whd_security_t
Enumeration of Wi-Fi security modes.
uint32_t whd_wifi_get_wifi_version(whd_interface_t ifp, char *version, uint8_t length)
Retrieves the WLAN firmware version.
Structure for storing a Service Set Identifier (i.e.
uint32_t whd_wifi_get_channel(whd_interface_t ifp, uint32_t *channel)
Get the current channel on the WLAN radio.
whd_result_t whd_arp_features_set(whd_interface_t ifp, uint32_t features)
Set ARP Offload Feature Flags in Device (WLAN)
uint32_t whd_wifi_get_rssi(whd_interface_t ifp, int32_t *rssi)
Retrieve the latest RSSI value.
uint32_t whd_network_get_ifidx_from_ifp(whd_interface_t ifp, uint8_t *ifidx)
Retrieves the ifidx from interface pointer.
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.
uint32_t whd_wifi_stop_scan(whd_interface_t ifp)
Abort a previously issued scan.
uint32_t whd_add_secondary_interface(whd_driver_t whd_drv, whd_mac_t *mac_addr, whd_interface_t *ifpp)
Creates a secondary interface.
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.
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.
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 ...
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.
whd_bool_t
Boolean values.
uint32_t whd_wifi_get_acparams(whd_interface_t ifp, whd_edcf_ac_param_t *acp)
Retrieve the latest STA EDCF AC parameters.
Defines common data types used with WHD.
Structure for storing 802.11 powersave listen interval values See whd_wifi_get_listen_interval for m...
uint32_t whd_wifi_is_ready_to_transceive(whd_interface_t ifp)
Determines if a particular interface is ready to transceive ethernet packets.
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.
whd_result_t whd_tko_get_status(whd_interface_t ifp, whd_tko_status_t *tko_status)
Return the tko status for all indexes.
whd_result_t whd_tko_toggle(whd_interface_t ifp, whd_bool_t enable)
Return the stats associated with a filter.
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.
uint32_t whd_wifi_unregister_multicast_address(whd_interface_t ifp, const whd_mac_t *mac)
Unregisters interest in a multicast address.
Structure for storing a MAC address (Wi-Fi Media Access Control address).
whd_result_t whd_arp_cache_clear(whd_interface_t ifp)
Clear ARP Offload cache in Device (WLAN)
uint32_t whd_wifi_get_clm_version(whd_interface_t ifp, char *version, uint8_t length)
Retrieves the WLAN CLM version.
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...
uint32_t whd_wifi_print_whd_log(whd_driver_t whd_drv)
To print whd log information.
uint32_t whd_result_t
WHD result is specified as uint32_t value.
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.
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.
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.
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) ...
Structure for coex config parameters which can be set by application.
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 opti...
uint32_t whd_wifi_enable_supplicant(whd_interface_t ifp, whd_security_t auth_type)
Enable WHD internal supplicant.
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)
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.
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.
uint32_t whd_wifi_read_wlan_log(whd_driver_t whd_drv, char *buffer, uint32_t buffer_size)
To print whd log information.
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.
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...
uint32_t whd_wifi_off(whd_interface_t ifp)
Turn off the Wi-Fi device.
uint32_t whd_wifi_set_down(whd_interface_t ifp)
Bring down the Wi-Fi core.
uint32_t whd_wifi_disable_powersave(whd_interface_t ifp)
Disables 802.11 power save mode on specified interface.
uint32_t whd_wifi_register_multicast_address(whd_interface_t ifp, const whd_mac_t *mac)
Registers interest in a multicast address.
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)
whd_listen_interval_time_unit_t
Enumeration of listen interval time unit types.
uint32_t whd_wifi_ap_set_dtim_interval(whd_interface_t ifp, uint16_t interval)
Set the DTIM interval.
uint32_t whd_print_stats(whd_driver_t whd_drv, whd_bool_t reset_after_print)
Prints WHD stats.
Structure describing a packet filter list item.
Structure for storing WHD init configurations.
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.
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.
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 th...
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 ...
uint32_t whd_deinit(whd_interface_t ifp)
Shutdown this instance of the wifi driver, freeing all used resources.
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)
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.
whd_result_t whd_arp_features_get(whd_interface_t ifp, uint32_t *features)
Get ARP Offload Feature Flags from Device (WLAN)
whd_result_t whd_pf_remove_packet_filter(whd_interface_t ifp, uint8_t filter_id)
Remove a previously added filter.
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.
Allows WHD to perform buffer related operations like, allocating, releasing, retrieving the current p...
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)
whd_scan_status_t
Structure for storing scan status.
uint32_t whd_network_get_bsscfgidx_from_ifp(whd_interface_t ifp, uint8_t *bsscfgidx)
Retrieves the bsscfgidx from interface pointer.
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...
whd_dot11_reason_code_t
Enumeration of Dot11 Reason Codes.
uint32_t whd_wifi_send_action_frame(whd_interface_t ifp, whd_af_params_t *af_params)
Send a pre-prepared action frame.
BSS(Basic Service Set) information structure.
whd_result_t whd_arp_stats_get(whd_interface_t ifp, whd_arp_stats_t *stats)
Get ARP Offload statistics from Device (WLAN)
whd_result_t whd_arp_features_print(uint32_t features, const char *title)
Print ARP Offload Feature Flags in Human readable form to console.
uint32_t whd_wifi_get_bssid(whd_interface_t ifp, whd_mac_t *bssid)
Get the BSSID of the interface.
whd_result_t whd_tko_max_assoc(whd_interface_t ifp, uint8_t *max)
Return the stats associated with a filter.
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.
whd_result_t whd_arp_hostip_list_clear(whd_interface_t ifp)
Clear all ARP Offload Host IP Identifier List.
Structure for SPI config parameters which can be set by application during whd power up...
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.
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.
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.
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.
whd_bss_type_t
Enumeration of network types.
void whd_bus_spi_detach(whd_driver_t whd_driver)
Detach the WLAN Device to a specific SPI bus.
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.
uint32_t whd_wifi_get_ap_info(whd_interface_t ifp, whd_bss_info_t *ap_info, whd_security_t *security)
Retrieves AP information.
uint32_t whd_wifi_on(whd_driver_t whd_driver, whd_interface_t *ifpp)
Turn on the Wi-Fi device.
uint32_t whd_wifi_set_channel(whd_interface_t ifp, uint32_t channel)
Set the current channel on the WLAN radio.
whd_custom_ie_action_t
Enumeration of custom IE(Information Element) management actions.
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.
uint32_t whd_wifi_set_coex_config(whd_interface_t ifp, whd_coex_config_t *coex_config)
Set coex configuration.
uint32_t whd_wifi_ap_set_beacon_interval(whd_interface_t ifp, uint16_t interval)
Set the beacon interval.
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.
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.
Interface to a data source that provides external resources to the radio driver.
uint32_t whd_wifi_stop_ap(whd_interface_t ifp)
Stops an existing infrastructure WiFi network.