Zephyr API 3.6.99
Loading...
Searching...
No Matches
Wi-Fi Management

Wi-Fi Management API. More...

Data Structures

struct  wifi_cipher_desc
 
struct  wifi_eap_cipher_config
 
struct  wifi_eap_config
 
struct  wifi_version
 Wi-Fi version. More...
 
struct  wifi_band_channel
 Wi-Fi structure to uniquely identify a band-channel pair. More...
 
struct  wifi_scan_params
 Wi-Fi scan parameters structure. More...
 
struct  wifi_scan_result
 Wi-Fi scan result, each result is provided to the net_mgmt_event_callback via its info attribute (see net_mgmt.h) More...
 
struct  wifi_connect_req_params
 Wi-Fi connect request parameters. More...
 
struct  wifi_status
 Generic Wi-Fi status for commands and events. More...
 
struct  wifi_iface_status
 Wi-Fi interface status. More...
 
struct  wifi_ps_params
 Wi-Fi power save parameters. More...
 
struct  wifi_twt_params
 Wi-Fi TWT parameters. More...
 
struct  wifi_twt_flow_info
 Wi-Fi TWT flow information. More...
 
struct  wifi_enterprise_creds_params
 Wi-Fi enterprise mode credentials. More...
 
struct  wifi_ps_config
 Wi-Fi power save configuration. More...
 
struct  wifi_reg_chan_info
 Per-channel regulatory attributes. More...
 
struct  wifi_reg_domain
 Regulatory domain information or configuration. More...
 
struct  wifi_raw_scan_result
 Wi-Fi raw scan result. More...
 
struct  wifi_ap_sta_info
 AP mode - connected STA details. More...
 
struct  wifi_mode_info
 Wi-Fi mode setup. More...
 
struct  wifi_filter_info
 Wi-Fi filter setting for monitor, prmoiscuous, TX-injection modes. More...
 
struct  wifi_channel_info
 Wi-Fi channel setting for monitor and TX-injection modes. More...
 
struct  wifi_ap_config_params
 Wi-Fi AP configuration parameter. More...
 
struct  wifi_wps_config_params
 Wi-Fi wps setup. More...
 
struct  wifi_mgmt_ops
 Wi-Fi management API. More...
 
struct  net_wifi_mgmt_offload
 Wi-Fi management offload API. More...
 

Macros

#define WIFI_COUNTRY_CODE_LEN   2
 Length of the country code string.
 
#define WIFI_SSID_MAX_LEN   32
 Max SSID length.
 
#define WIFI_PSK_MIN_LEN   8
 Minimum PSK length.
 
#define WIFI_PSK_MAX_LEN   64
 Maximum PSK length.
 
#define WIFI_SAE_PSWD_MAX_LEN   128
 Max SAW password length.
 
#define WIFI_MAC_ADDR_LEN   6
 MAC address length.
 
#define WIFI_ENT_IDENTITY_MAX_LEN   64
 Max enterprise identity length.
 
#define WIFI_ENT_PSWD_MAX_LEN   128
 Max enterprise password length.
 
#define WIFI_CHANNEL_MIN   1
 Minimum channel number.
 
#define WIFI_CHANNEL_MAX   233
 Maximum channel number.
 
#define WIFI_CHANNEL_ANY   255
 Any channel number.
 
#define WIFI_INTERFACE_INDEX_MIN   1
 Network interface index min value.
 
#define WIFI_INTERFACE_INDEX_MAX   255
 Network interface index max value.
 
#define NET_REQUEST_WIFI_SCAN    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_SCAN)
 Request a Wi-Fi scan.
 
#define NET_REQUEST_WIFI_CONNECT    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CONNECT)
 Request a Wi-Fi connect.
 
#define NET_REQUEST_WIFI_DISCONNECT    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_DISCONNECT)
 Request a Wi-Fi disconnect.
 
#define NET_REQUEST_WIFI_AP_ENABLE    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_ENABLE)
 Request a Wi-Fi access point enable.
 
#define NET_REQUEST_WIFI_AP_DISABLE    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_DISABLE)
 Request a Wi-Fi access point disable.
 
#define NET_REQUEST_WIFI_IFACE_STATUS    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_IFACE_STATUS)
 Request a Wi-Fi network interface status.
 
#define NET_REQUEST_WIFI_PS    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PS)
 Request a Wi-Fi power save.
 
#define NET_REQUEST_WIFI_TWT    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_TWT)
 Request a Wi-Fi TWT.
 
#define NET_REQUEST_WIFI_PS_CONFIG    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PS_CONFIG)
 Request a Wi-Fi power save configuration.
 
#define NET_REQUEST_WIFI_REG_DOMAIN    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_REG_DOMAIN)
 Request a Wi-Fi regulatory domain.
 
#define NET_REQUEST_WIFI_MODE    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_MODE)
 Request current Wi-Fi mode.
 
#define NET_REQUEST_WIFI_PACKET_FILTER    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PACKET_FILTER)
 Request Wi-Fi packet filter.
 
#define NET_REQUEST_WIFI_CHANNEL    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CHANNEL)
 Request a Wi-Fi channel.
 
#define NET_REQUEST_WIFI_AP_STA_DISCONNECT    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_STA_DISCONNECT)
 Request a Wi-Fi access point to disconnect a station.
 
#define NET_REQUEST_WIFI_VERSION    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_VERSION)
 Request a Wi-Fi version.
 
#define NET_REQUEST_WIFI_CONN_PARAMS    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CONN_PARAMS)
 Request a Wi-Fi connection parameters.
 
#define NET_REQUEST_WIFI_RTS_THRESHOLD    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_RTS_THRESHOLD)
 Request a Wi-Fi RTS threshold.
 
#define NET_REQUEST_WIFI_AP_CONFIG_PARAM    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_CONFIG_PARAM)
 Request a Wi-Fi AP parameters configuration.
 
#define NET_REQUEST_WIFI_PMKSA_FLUSH    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PMKSA_FLUSH)
 Request a Wi-Fi PMKSA cache entries flush.
 
#define NET_REQUEST_WIFI_ENTERPRISE_CREDS    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_ENTERPRISE_CREDS)
 Set Wi-Fi enterprise mode CA/client Cert and key.
 
#define NET_REQUEST_WIFI_RTS_THRESHOLD_CONFIG    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_RTS_THRESHOLD_CONFIG)
 Request a Wi-Fi RTS threshold configuration.
 
#define NET_REQUEST_WIFI_WPS_CONFIG   (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_WPS_CONFIG)
 
#define NET_EVENT_WIFI_SCAN_RESULT    (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_SCAN_RESULT)
 Event emitted for Wi-Fi scan result.
 
#define NET_EVENT_WIFI_SCAN_DONE    (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_SCAN_DONE)
 Event emitted when Wi-Fi scan is done.
 
#define NET_EVENT_WIFI_CONNECT_RESULT    (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_CONNECT_RESULT)
 Event emitted for Wi-Fi connect result.
 
#define NET_EVENT_WIFI_DISCONNECT_RESULT    (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_DISCONNECT_RESULT)
 Event emitted for Wi-Fi disconnect result.
 
#define NET_EVENT_WIFI_IFACE_STATUS    (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_IFACE_STATUS)
 Event emitted for Wi-Fi network interface status.
 
#define NET_EVENT_WIFI_TWT    (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_TWT)
 Event emitted for Wi-Fi TWT information.
 
#define NET_EVENT_WIFI_TWT_SLEEP_STATE    (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_TWT_SLEEP_STATE)
 Event emitted for Wi-Fi TWT sleep state.
 
#define NET_EVENT_WIFI_RAW_SCAN_RESULT    (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_RAW_SCAN_RESULT)
 Event emitted for Wi-Fi raw scan result.
 
#define NET_EVENT_WIFI_DISCONNECT_COMPLETE    (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_DISCONNECT_COMPLETE)
 Event emitted Wi-Fi disconnect is completed.
 
#define NET_EVENT_WIFI_AP_ENABLE_RESULT    (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_ENABLE_RESULT)
 Event emitted for Wi-Fi access point enable result.
 
#define NET_EVENT_WIFI_AP_DISABLE_RESULT    (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_DISABLE_RESULT)
 Event emitted for Wi-Fi access point disable result.
 
#define NET_EVENT_WIFI_AP_STA_CONNECTED    (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_STA_CONNECTED)
 Event emitted when Wi-Fi station is connected in AP mode.
 
#define NET_EVENT_WIFI_AP_STA_DISCONNECTED    (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_STA_DISCONNECTED)
 Event emitted Wi-Fi station is disconnected from AP.
 
#define MAX_REG_CHAN_NUM   42
 Max regulatory channel number.
 
#define WIFI_WPS_PIN_MAX_LEN   8
 

Typedefs

typedef void(* scan_result_cb_t) (struct net_if *iface, int status, struct wifi_scan_result *entry)
 Scan result callback.
 

Enumerations

enum  wifi_security_type {
  WIFI_SECURITY_TYPE_NONE = 0 , WIFI_SECURITY_TYPE_PSK , WIFI_SECURITY_TYPE_PSK_SHA256 , WIFI_SECURITY_TYPE_SAE ,
  WIFI_SECURITY_TYPE_SAE_HNP = WIFI_SECURITY_TYPE_SAE , WIFI_SECURITY_TYPE_SAE_H2E , WIFI_SECURITY_TYPE_SAE_AUTO , WIFI_SECURITY_TYPE_WAPI ,
  WIFI_SECURITY_TYPE_EAP , WIFI_SECURITY_TYPE_EAP_TLS = WIFI_SECURITY_TYPE_EAP , WIFI_SECURITY_TYPE_WEP , WIFI_SECURITY_TYPE_WPA_PSK ,
  WIFI_SECURITY_TYPE_WPA_AUTO_PERSONAL , WIFI_SECURITY_TYPE_DPP , WIFI_SECURITY_TYPE_EAP_PEAP_MSCHAPV2 , WIFI_SECURITY_TYPE_EAP_PEAP_GTC ,
  WIFI_SECURITY_TYPE_EAP_TTLS_MSCHAPV2 , WIFI_SECURITY_TYPE_EAP_PEAP_TLS , WIFI_SECURITY_TYPE_EAP_TLS_SHA256
}
 IEEE 802.11 security types. More...
 
enum  wifi_eap_type {
  WIFI_EAP_TYPE_NONE = 0 , WIFI_EAP_TYPE_GTC = 6 , WIFI_EAP_TYPE_TLS = 13 , WIFI_EAP_TYPE_TTLS = 21 ,
  WIFI_EAP_TYPE_PEAP = 25 , WIFI_EAP_TYPE_MSCHAPV2 = 26
}
 EPA method Types. More...
 
enum  wifi_suiteb_type { WIFI_SUITEB = 1 , WIFI_SUITEB_192 }
 Enterprise security WPA3 suiteb types. More...
 
enum  wifi_cipher_type { WPA_CAPA_ENC_CCMP , WPA_CAPA_ENC_GCMP , WPA_CAPA_ENC_GCMP_256 }
 Group cipher and pairwise cipher types. More...
 
enum  wifi_group_mgmt_cipher_type { WPA_CAPA_ENC_BIP , WPA_CAPA_ENC_BIP_GMAC_128 , WPA_CAPA_ENC_BIP_GMAC_256 }
 group mgmt cipher types. More...
 
enum  wifi_mfp_options { WIFI_MFP_DISABLE = 0 , WIFI_MFP_OPTIONAL , WIFI_MFP_REQUIRED }
 IEEE 802.11w - Management frame protection. More...
 
enum  wifi_frequency_bands {
  WIFI_FREQ_BAND_2_4_GHZ = 0 , WIFI_FREQ_BAND_5_GHZ , WIFI_FREQ_BAND_6_GHZ , __WIFI_FREQ_BAND_AFTER_LAST ,
  WIFI_FREQ_BAND_MAX = __WIFI_FREQ_BAND_AFTER_LAST - 1 , WIFI_FREQ_BAND_UNKNOWN
}
 IEEE 802.11 operational frequency bands (not exhaustive). More...
 
enum  wifi_iface_state {
  WIFI_STATE_DISCONNECTED = 0 , WIFI_STATE_INTERFACE_DISABLED , WIFI_STATE_INACTIVE , WIFI_STATE_SCANNING ,
  WIFI_STATE_AUTHENTICATING , WIFI_STATE_ASSOCIATING , WIFI_STATE_ASSOCIATED , WIFI_STATE_4WAY_HANDSHAKE ,
  WIFI_STATE_GROUP_HANDSHAKE , WIFI_STATE_COMPLETED
}
 Wi-Fi interface states. More...
 
enum  wifi_iface_mode {
  WIFI_MODE_INFRA = 0 , WIFI_MODE_IBSS = 1 , WIFI_MODE_AP = 2 , WIFI_MODE_P2P_GO = 3 ,
  WIFI_MODE_P2P_GROUP_FORMATION = 4 , WIFI_MODE_MESH = 5
}
 Wi-Fi interface modes. More...
 
enum  wifi_link_mode {
  WIFI_0 = 0 , WIFI_1 , WIFI_2 , WIFI_3 ,
  WIFI_4 , WIFI_5 , WIFI_6 , WIFI_6E ,
  WIFI_7
}
 Wi-Fi link operating modes. More...
 
enum  wifi_scan_type { WIFI_SCAN_TYPE_ACTIVE = 0 , WIFI_SCAN_TYPE_PASSIVE }
 Wi-Fi scanning types. More...
 
enum  wifi_ps { WIFI_PS_DISABLED = 0 , WIFI_PS_ENABLED }
 Wi-Fi power save states. More...
 
enum  wifi_ps_mode { WIFI_PS_MODE_LEGACY = 0 , WIFI_PS_MODE_WMM }
 Wi-Fi power save modes. More...
 
enum  wifi_operational_modes {
  WIFI_STA_MODE = BIT(0) , WIFI_MONITOR_MODE = BIT(1) , WIFI_TX_INJECTION_MODE = BIT(2) , WIFI_PROMISCUOUS_MODE = BIT(3) ,
  WIFI_AP_MODE = BIT(4) , WIFI_SOFTAP_MODE = BIT(5)
}
 Wifi operational mode. More...
 
enum  wifi_filter { WIFI_PACKET_FILTER_ALL = BIT(0) , WIFI_PACKET_FILTER_MGMT = BIT(1) , WIFI_PACKET_FILTER_DATA = BIT(2) , WIFI_PACKET_FILTER_CTRL = BIT(3) }
 Mode filter settings. More...
 
enum  wifi_twt_operation { WIFI_TWT_SETUP = 0 , WIFI_TWT_TEARDOWN }
 Wi-Fi Target Wake Time (TWT) operations. More...
 
enum  wifi_twt_negotiation_type { WIFI_TWT_INDIVIDUAL = 0 , WIFI_TWT_BROADCAST , WIFI_TWT_WAKE_TBTT }
 Wi-Fi Target Wake Time (TWT) negotiation types. More...
 
enum  wifi_twt_setup_cmd {
  WIFI_TWT_SETUP_CMD_REQUEST = 0 , WIFI_TWT_SETUP_CMD_SUGGEST , WIFI_TWT_SETUP_CMD_DEMAND , WIFI_TWT_SETUP_CMD_GROUPING ,
  WIFI_TWT_SETUP_CMD_ACCEPT , WIFI_TWT_SETUP_CMD_ALTERNATE , WIFI_TWT_SETUP_CMD_DICTATE , WIFI_TWT_SETUP_CMD_REJECT
}
 Wi-Fi Target Wake Time (TWT) setup commands. More...
 
enum  wifi_twt_setup_resp_status { WIFI_TWT_RESP_RECEIVED = 0 , WIFI_TWT_RESP_NOT_RECEIVED }
 Wi-Fi Target Wake Time (TWT) negotiation status. More...
 
enum  wifi_twt_fail_reason {
  WIFI_TWT_FAIL_UNSPECIFIED , WIFI_TWT_FAIL_CMD_EXEC_FAIL , WIFI_TWT_FAIL_OPERATION_NOT_SUPPORTED , WIFI_TWT_FAIL_UNABLE_TO_GET_IFACE_STATUS ,
  WIFI_TWT_FAIL_DEVICE_NOT_CONNECTED , WIFI_TWT_FAIL_PEER_NOT_HE_CAPAB , WIFI_TWT_FAIL_PEER_NOT_TWT_CAPAB , WIFI_TWT_FAIL_OPERATION_IN_PROGRESS ,
  WIFI_TWT_FAIL_INVALID_FLOW_ID , WIFI_TWT_FAIL_IP_NOT_ASSIGNED , WIFI_TWT_FAIL_FLOW_ALREADY_EXISTS
}
 Target Wake Time (TWT) error codes. More...
 
enum  wifi_twt_teardown_status { WIFI_TWT_TEARDOWN_SUCCESS = 0 , WIFI_TWT_TEARDOWN_FAILED }
 Wi-Fi Target Wake Time (TWT) teradown status. More...
 
enum  wifi_ps_param_type {
  WIFI_PS_PARAM_STATE , WIFI_PS_PARAM_LISTEN_INTERVAL , WIFI_PS_PARAM_WAKEUP_MODE , WIFI_PS_PARAM_MODE ,
  WIFI_PS_PARAM_EXIT_STRATEGY , WIFI_PS_PARAM_TIMEOUT
}
 Wi-Fi power save parameters. More...
 
enum  wifi_ps_wakeup_mode { WIFI_PS_WAKEUP_MODE_DTIM = 0 , WIFI_PS_WAKEUP_MODE_LISTEN_INTERVAL }
 Wi-Fi power save modes. More...
 
enum  wifi_ps_exit_strategy { WIFI_PS_EXIT_CUSTOM_ALGO = 0 , WIFI_PS_EXIT_EVERY_TIM }
 Wi-Fi power save exit strategy. More...
 
enum  wifi_config_ps_param_fail_reason {
  WIFI_PS_PARAM_FAIL_UNSPECIFIED , WIFI_PS_PARAM_FAIL_CMD_EXEC_FAIL , WIFI_PS_PARAM_FAIL_OPERATION_NOT_SUPPORTED , WIFI_PS_PARAM_FAIL_UNABLE_TO_GET_IFACE_STATUS ,
  WIFI_PS_PARAM_FAIL_DEVICE_NOT_CONNECTED , WIFI_PS_PARAM_FAIL_DEVICE_CONNECTED , WIFI_PS_PARAM_LISTEN_INTERVAL_RANGE_INVALID , WIFI_PS_PARAM_FAIL_INVALID_EXIT_STRATEGY
}
 Wi-Fi power save error codes. More...
 
enum  wifi_ap_config_param { WIFI_AP_CONFIG_PARAM_MAX_INACTIVITY = BIT(0) , WIFI_AP_CONFIG_PARAM_MAX_NUM_STA = BIT(1) }
 Wi-Fi AP mode configuration parameter. More...
 
enum  net_request_wifi_cmd {
  NET_REQUEST_WIFI_CMD_SCAN = 1 , NET_REQUEST_WIFI_CMD_CONNECT , NET_REQUEST_WIFI_CMD_DISCONNECT , NET_REQUEST_WIFI_CMD_AP_ENABLE ,
  NET_REQUEST_WIFI_CMD_AP_DISABLE , NET_REQUEST_WIFI_CMD_IFACE_STATUS , NET_REQUEST_WIFI_CMD_PS , NET_REQUEST_WIFI_CMD_TWT ,
  NET_REQUEST_WIFI_CMD_PS_CONFIG , NET_REQUEST_WIFI_CMD_REG_DOMAIN , NET_REQUEST_WIFI_CMD_MODE , NET_REQUEST_WIFI_CMD_PACKET_FILTER ,
  NET_REQUEST_WIFI_CMD_CHANNEL , NET_REQUEST_WIFI_CMD_AP_STA_DISCONNECT , NET_REQUEST_WIFI_CMD_VERSION , NET_REQUEST_WIFI_CMD_CONN_PARAMS ,
  NET_REQUEST_WIFI_CMD_RTS_THRESHOLD , NET_REQUEST_WIFI_CMD_AP_CONFIG_PARAM , NET_REQUEST_WIFI_CMD_DPP , NET_REQUEST_WIFI_CMD_PMKSA_FLUSH ,
  NET_REQUEST_WIFI_CMD_ENTERPRISE_CREDS , NET_REQUEST_WIFI_CMD_RTS_THRESHOLD_CONFIG , NET_REQUEST_WIFI_CMD_WPS_CONFIG
}
 Wi-Fi management commands. More...
 
enum  net_event_wifi_cmd {
  NET_EVENT_WIFI_CMD_SCAN_RESULT = 1 , NET_EVENT_WIFI_CMD_SCAN_DONE , NET_EVENT_WIFI_CMD_CONNECT_RESULT , NET_EVENT_WIFI_CMD_DISCONNECT_RESULT ,
  NET_EVENT_WIFI_CMD_IFACE_STATUS , NET_EVENT_WIFI_CMD_TWT , NET_EVENT_WIFI_CMD_TWT_SLEEP_STATE , NET_EVENT_WIFI_CMD_RAW_SCAN_RESULT ,
  NET_EVENT_WIFI_CMD_DISCONNECT_COMPLETE , NET_EVENT_WIFI_CMD_AP_ENABLE_RESULT , NET_EVENT_WIFI_CMD_AP_DISABLE_RESULT , NET_EVENT_WIFI_CMD_AP_STA_CONNECTED ,
  NET_EVENT_WIFI_CMD_AP_STA_DISCONNECTED , NET_EVENT_WIFI_CMD_SUPPLICANT
}
 Wi-Fi management events. More...
 
enum  wifi_conn_status {
  WIFI_STATUS_CONN_SUCCESS = 0 , WIFI_STATUS_CONN_FAIL , WIFI_STATUS_CONN_WRONG_PASSWORD , WIFI_STATUS_CONN_TIMEOUT ,
  WIFI_STATUS_CONN_AP_NOT_FOUND , WIFI_STATUS_CONN_LAST_STATUS , WIFI_STATUS_DISCONN_FIRST_STATUS = WIFI_STATUS_CONN_LAST_STATUS
}
 Wi-Fi connect result codes. More...
 
enum  wifi_disconn_reason {
  WIFI_REASON_DISCONN_SUCCESS = 0 , WIFI_REASON_DISCONN_UNSPECIFIED , WIFI_REASON_DISCONN_USER_REQUEST , WIFI_REASON_DISCONN_AP_LEAVING ,
  WIFI_REASON_DISCONN_INACTIVITY
}
 Wi-Fi disconnect reason codes. More...
 
enum  wifi_ap_status {
  WIFI_STATUS_AP_SUCCESS = 0 , WIFI_STATUS_AP_FAIL , WIFI_STATUS_AP_CHANNEL_NOT_SUPPORTED , WIFI_STATUS_AP_CHANNEL_NOT_ALLOWED ,
  WIFI_STATUS_AP_SSID_NOT_ALLOWED , WIFI_STATUS_AP_AUTH_TYPE_NOT_SUPPORTED , WIFI_STATUS_AP_OP_NOT_SUPPORTED , WIFI_STATUS_AP_OP_NOT_PERMITTED
}
 Wi-Fi AP mode result codes. More...
 
enum  wifi_mgmt_op { WIFI_MGMT_GET = 0 , WIFI_MGMT_SET = 1 }
 Generic get/set operation for any command. More...
 
enum  wifi_twt_sleep_state { WIFI_TWT_STATE_SLEEP = 0 , WIFI_TWT_STATE_AWAKE = 1 }
 Wi-Fi TWT sleep states. More...
 
enum  wifi_wps_op { WIFI_WPS_PBC = 0 , WIFI_WPS_PIN_GET = 1 , WIFI_WPS_PIN_SET = 2 }
 Operation for WPS. More...
 
enum  wifi_hostapd_iface_state {
  WIFI_HAPD_IFACE_UNINITIALIZED , WIFI_HAPD_IFACE_DISABLED , WIFI_HAPD_IFACE_COUNTRY_UPDATE , WIFI_HAPD_IFACE_ACS ,
  WIFI_HAPD_IFACE_HT_SCAN , WIFI_HAPD_IFACE_DFS , WIFI_HAPD_IFACE_ENABLED
}
 Wi-Fi AP status. More...
 

Functions

const char * wifi_security_txt (enum wifi_security_type security)
 Helper function to get user-friendly security type name.
 
const char * wifi_mfp_txt (enum wifi_mfp_options mfp)
 Helper function to get user-friendly MFP name.
 
const char * wifi_band_txt (enum wifi_frequency_bands band)
 Helper function to get user-friendly frequency band name.
 
const char * wifi_state_txt (enum wifi_iface_state state)
 Helper function to get user-friendly interface state name.
 
const char * wifi_mode_txt (enum wifi_iface_mode mode)
 Helper function to get user-friendly interface mode name.
 
const char * wifi_link_mode_txt (enum wifi_link_mode link_mode)
 Helper function to get user-friendly link mode name.
 
const char * wifi_ps_txt (enum wifi_ps ps_name)
 Helper function to get user-friendly ps name.
 
const char * wifi_ps_mode_txt (enum wifi_ps_mode ps_mode)
 Helper function to get user-friendly ps mode name.
 
const char * wifi_twt_operation_txt (enum wifi_twt_operation twt_operation)
 Helper function to get user-friendly twt operation name.
 
const char * wifi_twt_negotiation_type_txt (enum wifi_twt_negotiation_type twt_negotiation)
 Helper function to get user-friendly twt negotiation type name.
 
const char * wifi_twt_setup_cmd_txt (enum wifi_twt_setup_cmd twt_setup)
 Helper function to get user-friendly twt setup cmd name.
 
static const char * wifi_twt_get_err_code_str (int16_t err_no)
 Helper function to get user-friendly TWT error code name.
 
const char * wifi_ps_wakeup_mode_txt (enum wifi_ps_wakeup_mode ps_wakeup_mode)
 Helper function to get user-friendly ps wakeup mode name.
 
const char *const wifi_ps_exit_strategy_txt (enum wifi_ps_exit_strategy ps_exit_strategy)
 Helper function to get user-friendly ps exit strategy name.
 
static const char * wifi_ps_get_config_err_code_str (int16_t err_no)
 Helper function to get user-friendly power save error code name.
 
void wifi_mgmt_raise_connect_result_event (struct net_if *iface, int status)
 Wi-Fi management connect result event.
 
void wifi_mgmt_raise_disconnect_result_event (struct net_if *iface, int status)
 Wi-Fi management disconnect result event.
 
void wifi_mgmt_raise_iface_status_event (struct net_if *iface, struct wifi_iface_status *iface_status)
 Wi-Fi management interface status event.
 
void wifi_mgmt_raise_twt_event (struct net_if *iface, struct wifi_twt_params *twt_params)
 Wi-Fi management TWT event.
 
void wifi_mgmt_raise_twt_sleep_state (struct net_if *iface, int twt_sleep_state)
 Wi-Fi management TWT sleep state event.
 
void wifi_mgmt_raise_raw_scan_result_event (struct net_if *iface, struct wifi_raw_scan_result *raw_scan_info)
 Wi-Fi management raw scan result event.
 
void wifi_mgmt_raise_disconnect_complete_event (struct net_if *iface, int status)
 Wi-Fi management disconnect complete event.
 
void wifi_mgmt_raise_ap_enable_result_event (struct net_if *iface, enum wifi_ap_status status)
 Wi-Fi management AP mode enable result event.
 
void wifi_mgmt_raise_ap_disable_result_event (struct net_if *iface, enum wifi_ap_status status)
 Wi-Fi management AP mode disable result event.
 
void wifi_mgmt_raise_ap_sta_connected_event (struct net_if *iface, struct wifi_ap_sta_info *sta_info)
 Wi-Fi management AP mode STA connected event.
 
void wifi_mgmt_raise_ap_sta_disconnected_event (struct net_if *iface, struct wifi_ap_sta_info *sta_info)
 Wi-Fi management AP mode STA disconnected event.
 

Wi-Fi utility functions.

Utility functions for the Wi-Fi subsystem.

int wifi_utils_parse_scan_bands (char *scan_bands_str, uint8_t *band_map)
 Convert a band specification string to a bitmap representing the bands.
 
int wifi_utils_parse_scan_ssids (char *scan_ssids_str, const char *ssids[], uint8_t num_ssids)
 Append a string containing an SSID to an array of SSID strings.
 
int wifi_utils_parse_scan_chan (char *scan_chan_str, struct wifi_band_channel *chan, uint8_t max_channels)
 Convert a string containing a specification of scan channels to an array.
 
bool wifi_utils_validate_chan (uint8_t band, uint16_t chan)
 Validate a channel against a band.
 
bool wifi_utils_validate_chan_2g (uint16_t chan)
 Validate a channel against the 2.4 GHz band.
 
bool wifi_utils_validate_chan_5g (uint16_t chan)
 Validate a channel against the 5 GHz band.
 
bool wifi_utils_validate_chan_6g (uint16_t chan)
 Validate a channel against the 6 GHz band.
 
#define WIFI_UTILS_MAX_BAND_STR_LEN   3
 Maximum length of the band specification string.
 
#define WIFI_UTILS_MAX_CHAN_STR_LEN   4
 Maximum length of the channel specification string.
 

Detailed Description

Wi-Fi Management API.

Since
1.12
Version
0.8.0

Macro Definition Documentation

◆ MAX_REG_CHAN_NUM

#define MAX_REG_CHAN_NUM   42

#include <zephyr/net/wifi_mgmt.h>

Max regulatory channel number.

◆ NET_EVENT_WIFI_AP_DISABLE_RESULT

#define NET_EVENT_WIFI_AP_DISABLE_RESULT    (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_DISABLE_RESULT)

#include <zephyr/net/wifi_mgmt.h>

Event emitted for Wi-Fi access point disable result.

◆ NET_EVENT_WIFI_AP_ENABLE_RESULT

#define NET_EVENT_WIFI_AP_ENABLE_RESULT    (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_ENABLE_RESULT)

#include <zephyr/net/wifi_mgmt.h>

Event emitted for Wi-Fi access point enable result.

◆ NET_EVENT_WIFI_AP_STA_CONNECTED

#define NET_EVENT_WIFI_AP_STA_CONNECTED    (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_STA_CONNECTED)

#include <zephyr/net/wifi_mgmt.h>

Event emitted when Wi-Fi station is connected in AP mode.

◆ NET_EVENT_WIFI_AP_STA_DISCONNECTED

#define NET_EVENT_WIFI_AP_STA_DISCONNECTED    (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_STA_DISCONNECTED)

#include <zephyr/net/wifi_mgmt.h>

Event emitted Wi-Fi station is disconnected from AP.

◆ NET_EVENT_WIFI_CONNECT_RESULT

#define NET_EVENT_WIFI_CONNECT_RESULT    (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_CONNECT_RESULT)

#include <zephyr/net/wifi_mgmt.h>

Event emitted for Wi-Fi connect result.

◆ NET_EVENT_WIFI_DISCONNECT_COMPLETE

#define NET_EVENT_WIFI_DISCONNECT_COMPLETE    (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_DISCONNECT_COMPLETE)

#include <zephyr/net/wifi_mgmt.h>

Event emitted Wi-Fi disconnect is completed.

◆ NET_EVENT_WIFI_DISCONNECT_RESULT

#define NET_EVENT_WIFI_DISCONNECT_RESULT    (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_DISCONNECT_RESULT)

#include <zephyr/net/wifi_mgmt.h>

Event emitted for Wi-Fi disconnect result.

◆ NET_EVENT_WIFI_IFACE_STATUS

#define NET_EVENT_WIFI_IFACE_STATUS    (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_IFACE_STATUS)

#include <zephyr/net/wifi_mgmt.h>

Event emitted for Wi-Fi network interface status.

◆ NET_EVENT_WIFI_RAW_SCAN_RESULT

#define NET_EVENT_WIFI_RAW_SCAN_RESULT    (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_RAW_SCAN_RESULT)

#include <zephyr/net/wifi_mgmt.h>

Event emitted for Wi-Fi raw scan result.

◆ NET_EVENT_WIFI_SCAN_DONE

#define NET_EVENT_WIFI_SCAN_DONE    (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_SCAN_DONE)

#include <zephyr/net/wifi_mgmt.h>

Event emitted when Wi-Fi scan is done.

◆ NET_EVENT_WIFI_SCAN_RESULT

#define NET_EVENT_WIFI_SCAN_RESULT    (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_SCAN_RESULT)

#include <zephyr/net/wifi_mgmt.h>

Event emitted for Wi-Fi scan result.

◆ NET_EVENT_WIFI_TWT

#define NET_EVENT_WIFI_TWT    (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_TWT)

#include <zephyr/net/wifi_mgmt.h>

Event emitted for Wi-Fi TWT information.

◆ NET_EVENT_WIFI_TWT_SLEEP_STATE

#define NET_EVENT_WIFI_TWT_SLEEP_STATE    (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_TWT_SLEEP_STATE)

#include <zephyr/net/wifi_mgmt.h>

Event emitted for Wi-Fi TWT sleep state.

◆ NET_REQUEST_WIFI_AP_CONFIG_PARAM

#define NET_REQUEST_WIFI_AP_CONFIG_PARAM    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_CONFIG_PARAM)

#include <zephyr/net/wifi_mgmt.h>

Request a Wi-Fi AP parameters configuration.

◆ NET_REQUEST_WIFI_AP_DISABLE

#define NET_REQUEST_WIFI_AP_DISABLE    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_DISABLE)

#include <zephyr/net/wifi_mgmt.h>

Request a Wi-Fi access point disable.

◆ NET_REQUEST_WIFI_AP_ENABLE

#define NET_REQUEST_WIFI_AP_ENABLE    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_ENABLE)

#include <zephyr/net/wifi_mgmt.h>

Request a Wi-Fi access point enable.

◆ NET_REQUEST_WIFI_AP_STA_DISCONNECT

#define NET_REQUEST_WIFI_AP_STA_DISCONNECT    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_STA_DISCONNECT)

#include <zephyr/net/wifi_mgmt.h>

Request a Wi-Fi access point to disconnect a station.

◆ NET_REQUEST_WIFI_CHANNEL

#define NET_REQUEST_WIFI_CHANNEL    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CHANNEL)

#include <zephyr/net/wifi_mgmt.h>

Request a Wi-Fi channel.

◆ NET_REQUEST_WIFI_CONN_PARAMS

#define NET_REQUEST_WIFI_CONN_PARAMS    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CONN_PARAMS)

#include <zephyr/net/wifi_mgmt.h>

Request a Wi-Fi connection parameters.

◆ NET_REQUEST_WIFI_CONNECT

#define NET_REQUEST_WIFI_CONNECT    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CONNECT)

#include <zephyr/net/wifi_mgmt.h>

Request a Wi-Fi connect.

◆ NET_REQUEST_WIFI_DISCONNECT

#define NET_REQUEST_WIFI_DISCONNECT    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_DISCONNECT)

#include <zephyr/net/wifi_mgmt.h>

Request a Wi-Fi disconnect.

◆ NET_REQUEST_WIFI_ENTERPRISE_CREDS

#define NET_REQUEST_WIFI_ENTERPRISE_CREDS    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_ENTERPRISE_CREDS)

#include <zephyr/net/wifi_mgmt.h>

Set Wi-Fi enterprise mode CA/client Cert and key.

◆ NET_REQUEST_WIFI_IFACE_STATUS

#define NET_REQUEST_WIFI_IFACE_STATUS    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_IFACE_STATUS)

#include <zephyr/net/wifi_mgmt.h>

Request a Wi-Fi network interface status.

◆ NET_REQUEST_WIFI_MODE

#define NET_REQUEST_WIFI_MODE    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_MODE)

#include <zephyr/net/wifi_mgmt.h>

Request current Wi-Fi mode.

◆ NET_REQUEST_WIFI_PACKET_FILTER

#define NET_REQUEST_WIFI_PACKET_FILTER    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PACKET_FILTER)

#include <zephyr/net/wifi_mgmt.h>

Request Wi-Fi packet filter.

◆ NET_REQUEST_WIFI_PMKSA_FLUSH

#define NET_REQUEST_WIFI_PMKSA_FLUSH    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PMKSA_FLUSH)

#include <zephyr/net/wifi_mgmt.h>

Request a Wi-Fi PMKSA cache entries flush.

◆ NET_REQUEST_WIFI_PS

#define NET_REQUEST_WIFI_PS    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PS)

#include <zephyr/net/wifi_mgmt.h>

Request a Wi-Fi power save.

◆ NET_REQUEST_WIFI_PS_CONFIG

#define NET_REQUEST_WIFI_PS_CONFIG    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PS_CONFIG)

#include <zephyr/net/wifi_mgmt.h>

Request a Wi-Fi power save configuration.

◆ NET_REQUEST_WIFI_REG_DOMAIN

#define NET_REQUEST_WIFI_REG_DOMAIN    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_REG_DOMAIN)

#include <zephyr/net/wifi_mgmt.h>

Request a Wi-Fi regulatory domain.

◆ NET_REQUEST_WIFI_RTS_THRESHOLD

#define NET_REQUEST_WIFI_RTS_THRESHOLD    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_RTS_THRESHOLD)

#include <zephyr/net/wifi_mgmt.h>

Request a Wi-Fi RTS threshold.

◆ NET_REQUEST_WIFI_RTS_THRESHOLD_CONFIG

#define NET_REQUEST_WIFI_RTS_THRESHOLD_CONFIG    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_RTS_THRESHOLD_CONFIG)

#include <zephyr/net/wifi_mgmt.h>

Request a Wi-Fi RTS threshold configuration.

◆ NET_REQUEST_WIFI_SCAN

#define NET_REQUEST_WIFI_SCAN    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_SCAN)

#include <zephyr/net/wifi_mgmt.h>

Request a Wi-Fi scan.

◆ NET_REQUEST_WIFI_TWT

#define NET_REQUEST_WIFI_TWT    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_TWT)

#include <zephyr/net/wifi_mgmt.h>

Request a Wi-Fi TWT.

◆ NET_REQUEST_WIFI_VERSION

#define NET_REQUEST_WIFI_VERSION    (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_VERSION)

#include <zephyr/net/wifi_mgmt.h>

Request a Wi-Fi version.

◆ NET_REQUEST_WIFI_WPS_CONFIG

#define NET_REQUEST_WIFI_WPS_CONFIG   (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_WPS_CONFIG)

◆ WIFI_CHANNEL_ANY

#define WIFI_CHANNEL_ANY   255

#include <zephyr/net/wifi.h>

Any channel number.

◆ WIFI_CHANNEL_MAX

#define WIFI_CHANNEL_MAX   233

#include <zephyr/net/wifi.h>

Maximum channel number.

◆ WIFI_CHANNEL_MIN

#define WIFI_CHANNEL_MIN   1

#include <zephyr/net/wifi.h>

Minimum channel number.

◆ WIFI_COUNTRY_CODE_LEN

#define WIFI_COUNTRY_CODE_LEN   2

#include <zephyr/net/wifi.h>

Length of the country code string.

◆ WIFI_ENT_IDENTITY_MAX_LEN

#define WIFI_ENT_IDENTITY_MAX_LEN   64

#include <zephyr/net/wifi.h>

Max enterprise identity length.

◆ WIFI_ENT_PSWD_MAX_LEN

#define WIFI_ENT_PSWD_MAX_LEN   128

#include <zephyr/net/wifi.h>

Max enterprise password length.

◆ WIFI_INTERFACE_INDEX_MAX

#define WIFI_INTERFACE_INDEX_MAX   255

#include <zephyr/net/wifi.h>

Network interface index max value.

◆ WIFI_INTERFACE_INDEX_MIN

#define WIFI_INTERFACE_INDEX_MIN   1

#include <zephyr/net/wifi.h>

Network interface index min value.

◆ WIFI_MAC_ADDR_LEN

#define WIFI_MAC_ADDR_LEN   6

#include <zephyr/net/wifi.h>

MAC address length.

◆ WIFI_PSK_MAX_LEN

#define WIFI_PSK_MAX_LEN   64

#include <zephyr/net/wifi.h>

Maximum PSK length.

◆ WIFI_PSK_MIN_LEN

#define WIFI_PSK_MIN_LEN   8

#include <zephyr/net/wifi.h>

Minimum PSK length.

◆ WIFI_SAE_PSWD_MAX_LEN

#define WIFI_SAE_PSWD_MAX_LEN   128

#include <zephyr/net/wifi.h>

Max SAW password length.

◆ WIFI_SSID_MAX_LEN

#define WIFI_SSID_MAX_LEN   32

#include <zephyr/net/wifi.h>

Max SSID length.

◆ WIFI_UTILS_MAX_BAND_STR_LEN

#define WIFI_UTILS_MAX_BAND_STR_LEN   3

#include <zephyr/net/wifi_utils.h>

Maximum length of the band specification string.

◆ WIFI_UTILS_MAX_CHAN_STR_LEN

#define WIFI_UTILS_MAX_CHAN_STR_LEN   4

#include <zephyr/net/wifi_utils.h>

Maximum length of the channel specification string.

◆ WIFI_WPS_PIN_MAX_LEN

#define WIFI_WPS_PIN_MAX_LEN   8

Typedef Documentation

◆ scan_result_cb_t

typedef void(* scan_result_cb_t) (struct net_if *iface, int status, struct wifi_scan_result *entry)

#include <zephyr/net/wifi_mgmt.h>

Scan result callback.

Parameters
ifaceNetwork interface
statusScan result status
entryScan result entry

Enumeration Type Documentation

◆ net_event_wifi_cmd

#include <zephyr/net/wifi_mgmt.h>

Wi-Fi management events.

Enumerator
NET_EVENT_WIFI_CMD_SCAN_RESULT 

Scan results available.

NET_EVENT_WIFI_CMD_SCAN_DONE 

Scan done.

NET_EVENT_WIFI_CMD_CONNECT_RESULT 

Connect result.

NET_EVENT_WIFI_CMD_DISCONNECT_RESULT 

Disconnect result.

NET_EVENT_WIFI_CMD_IFACE_STATUS 

Interface status.

NET_EVENT_WIFI_CMD_TWT 

TWT events.

NET_EVENT_WIFI_CMD_TWT_SLEEP_STATE 

TWT sleep status: awake or sleeping, can be used by application to determine if it can send data or not.

NET_EVENT_WIFI_CMD_RAW_SCAN_RESULT 

Raw scan results available.

NET_EVENT_WIFI_CMD_DISCONNECT_COMPLETE 

Disconnect complete.

NET_EVENT_WIFI_CMD_AP_ENABLE_RESULT 

AP mode enable result.

NET_EVENT_WIFI_CMD_AP_DISABLE_RESULT 

AP mode disable result.

NET_EVENT_WIFI_CMD_AP_STA_CONNECTED 

STA connected to AP.

NET_EVENT_WIFI_CMD_AP_STA_DISCONNECTED 

STA disconnected from AP.

NET_EVENT_WIFI_CMD_SUPPLICANT 

Supplicant specific event.

◆ net_request_wifi_cmd

#include <zephyr/net/wifi_mgmt.h>

Wi-Fi management commands.

Enumerator
NET_REQUEST_WIFI_CMD_SCAN 

Scan for Wi-Fi networks.

NET_REQUEST_WIFI_CMD_CONNECT 

Connect to a Wi-Fi network.

NET_REQUEST_WIFI_CMD_DISCONNECT 

Disconnect from a Wi-Fi network.

NET_REQUEST_WIFI_CMD_AP_ENABLE 

Enable AP mode.

NET_REQUEST_WIFI_CMD_AP_DISABLE 

Disable AP mode.

NET_REQUEST_WIFI_CMD_IFACE_STATUS 

Get interface status.

NET_REQUEST_WIFI_CMD_PS 

Set power save status.

NET_REQUEST_WIFI_CMD_TWT 

Setup or teardown TWT flow.

NET_REQUEST_WIFI_CMD_PS_CONFIG 

Get power save config.

NET_REQUEST_WIFI_CMD_REG_DOMAIN 

Set or get regulatory domain.

NET_REQUEST_WIFI_CMD_MODE 

Set or get Mode of operation.

NET_REQUEST_WIFI_CMD_PACKET_FILTER 

Set or get packet filter setting for current mode.

NET_REQUEST_WIFI_CMD_CHANNEL 

Set or get Wi-Fi channel for Monitor or TX-Injection mode.

NET_REQUEST_WIFI_CMD_AP_STA_DISCONNECT 

Disconnect a STA from AP.

NET_REQUEST_WIFI_CMD_VERSION 

Get Wi-Fi driver and Firmware versions.

NET_REQUEST_WIFI_CMD_CONN_PARAMS 

Get Wi-Fi latest connection parameters.

NET_REQUEST_WIFI_CMD_RTS_THRESHOLD 

Set RTS threshold.

NET_REQUEST_WIFI_CMD_AP_CONFIG_PARAM 

Configure AP parameter.

NET_REQUEST_WIFI_CMD_DPP 

DPP actions.

NET_REQUEST_WIFI_CMD_PMKSA_FLUSH 

Flush PMKSA cache entries.

NET_REQUEST_WIFI_CMD_ENTERPRISE_CREDS 

Set enterprise mode credential.

NET_REQUEST_WIFI_CMD_RTS_THRESHOLD_CONFIG 

Get RTS threshold.

NET_REQUEST_WIFI_CMD_WPS_CONFIG 

WPS config.

◆ wifi_ap_config_param

#include <zephyr/net/wifi.h>

Wi-Fi AP mode configuration parameter.

Enumerator
WIFI_AP_CONFIG_PARAM_MAX_INACTIVITY 

Used for AP mode configuration parameter ap_max_inactivity.

WIFI_AP_CONFIG_PARAM_MAX_NUM_STA 

Used for AP mode configuration parameter max_num_sta.

◆ wifi_ap_status

#include <zephyr/net/wifi_mgmt.h>

Wi-Fi AP mode result codes.

To be overlaid on top of wifi_status in the AP mode enable or disable result event for detailed status.

Enumerator
WIFI_STATUS_AP_SUCCESS 

AP mode enable or disable successful.

WIFI_STATUS_AP_FAIL 

AP mode enable or disable failed - generic failure.

WIFI_STATUS_AP_CHANNEL_NOT_SUPPORTED 

AP mode enable failed - channel not supported.

WIFI_STATUS_AP_CHANNEL_NOT_ALLOWED 

AP mode enable failed - channel not allowed.

WIFI_STATUS_AP_SSID_NOT_ALLOWED 

AP mode enable failed - SSID not allowed.

WIFI_STATUS_AP_AUTH_TYPE_NOT_SUPPORTED 

AP mode enable failed - authentication type not supported.

WIFI_STATUS_AP_OP_NOT_SUPPORTED 

AP mode enable failed - operation not supported.

WIFI_STATUS_AP_OP_NOT_PERMITTED 

AP mode enable failed - operation not permitted.

◆ wifi_cipher_type

#include <zephyr/net/wifi.h>

Group cipher and pairwise cipher types.

Enumerator
WPA_CAPA_ENC_CCMP 

AES in counter mode with CBC-MAC (CCMP-128).

WPA_CAPA_ENC_GCMP 

128-bit Galois/Counter Mode Protocol.

WPA_CAPA_ENC_GCMP_256 

256-bit Galois/Counter Mode Protocol.

◆ wifi_config_ps_param_fail_reason

#include <zephyr/net/wifi.h>

Wi-Fi power save error codes.

Enumerator
WIFI_PS_PARAM_FAIL_UNSPECIFIED 

Unspecified error.

WIFI_PS_PARAM_FAIL_CMD_EXEC_FAIL 

Command execution failed.

WIFI_PS_PARAM_FAIL_OPERATION_NOT_SUPPORTED 

Parameter not supported.

WIFI_PS_PARAM_FAIL_UNABLE_TO_GET_IFACE_STATUS 

Unable to get interface status.

WIFI_PS_PARAM_FAIL_DEVICE_NOT_CONNECTED 

Device not connected to AP.

WIFI_PS_PARAM_FAIL_DEVICE_CONNECTED 

Device already connected to AP.

WIFI_PS_PARAM_LISTEN_INTERVAL_RANGE_INVALID 

Listen interval out of range.

WIFI_PS_PARAM_FAIL_INVALID_EXIT_STRATEGY 

Invalid exit strategy.

◆ wifi_conn_status

#include <zephyr/net/wifi_mgmt.h>

Wi-Fi connect result codes.

To be overlaid on top of wifi_status in the connect result event for detailed status.

Enumerator
WIFI_STATUS_CONN_SUCCESS 

Connection successful.

WIFI_STATUS_CONN_FAIL 

Connection failed - generic failure.

WIFI_STATUS_CONN_WRONG_PASSWORD 

Connection failed - wrong password Few possible reasons for 4-way handshake failure that we can guess are as follows: 1) Incorrect key 2) EAPoL frames lost causing timeout.

#1 is the likely cause, so, we convey to the user that it is due to Wrong passphrase/password.

WIFI_STATUS_CONN_TIMEOUT 

Connection timed out.

WIFI_STATUS_CONN_AP_NOT_FOUND 

Connection failed - AP not found.

WIFI_STATUS_CONN_LAST_STATUS 

Last connection status.

WIFI_STATUS_DISCONN_FIRST_STATUS 

Connection disconnected status.

◆ wifi_disconn_reason

#include <zephyr/net/wifi_mgmt.h>

Wi-Fi disconnect reason codes.

To be overlaid on top of wifi_status in the disconnect result event for detailed reason.

Enumerator
WIFI_REASON_DISCONN_SUCCESS 

Success, overload status as reason.

WIFI_REASON_DISCONN_UNSPECIFIED 

Unspecified reason.

WIFI_REASON_DISCONN_USER_REQUEST 

Disconnected due to user request.

WIFI_REASON_DISCONN_AP_LEAVING 

Disconnected due to AP leaving.

WIFI_REASON_DISCONN_INACTIVITY 

Disconnected due to inactivity.

◆ wifi_eap_type

#include <zephyr/net/wifi.h>

EPA method Types.

Enumerator
WIFI_EAP_TYPE_NONE 

No EPA security.

WIFI_EAP_TYPE_GTC 

EPA GTC security, refer to rfc3748 chapter 5.

WIFI_EAP_TYPE_TLS 

EPA TLS security, refer to rfc5216.

WIFI_EAP_TYPE_TTLS 

EPA TTLS security, refer to rfc5281.

WIFI_EAP_TYPE_PEAP 

EPA PEAP security, refer to draft-josefsson-pppext-eap-tls-eap-06.txt.

WIFI_EAP_TYPE_MSCHAPV2 

EPA MSCHAPV2 security, refer to draft-kamath-pppext-eap-mschapv2-00.txt.

◆ wifi_filter

#include <zephyr/net/wifi.h>

Mode filter settings.

Enumerator
WIFI_PACKET_FILTER_ALL 

Support management, data and control packet sniffing.

WIFI_PACKET_FILTER_MGMT 

Support only sniffing of management packets.

WIFI_PACKET_FILTER_DATA 

Support only sniffing of data packets.

WIFI_PACKET_FILTER_CTRL 

Support only sniffing of control packets.

◆ wifi_frequency_bands

#include <zephyr/net/wifi.h>

IEEE 802.11 operational frequency bands (not exhaustive).

Enumerator
WIFI_FREQ_BAND_2_4_GHZ 

2.4 GHz band.

WIFI_FREQ_BAND_5_GHZ 

5 GHz band.

WIFI_FREQ_BAND_6_GHZ 

6 GHz band (Wi-Fi 6E, also extends to 7GHz).

WIFI_FREQ_BAND_MAX 

Highest frequency band available.

WIFI_FREQ_BAND_UNKNOWN 

Invalid frequency band.

◆ wifi_group_mgmt_cipher_type

#include <zephyr/net/wifi.h>

group mgmt cipher types.

Enumerator
WPA_CAPA_ENC_BIP 

128-bit Broadcast/Multicast Integrity Protocol Cipher-based Message Authentication Code .

WPA_CAPA_ENC_BIP_GMAC_128 

128-bit Broadcast/Multicast Integrity Protocol Galois Message Authentication Code .

WPA_CAPA_ENC_BIP_GMAC_256 

256-bit Broadcast/Multicast Integrity Protocol Galois Message Authentication Code .

◆ wifi_hostapd_iface_state

#include <zephyr/net/wifi_mgmt.h>

Wi-Fi AP status.

Enumerator
WIFI_HAPD_IFACE_UNINITIALIZED 
WIFI_HAPD_IFACE_DISABLED 
WIFI_HAPD_IFACE_COUNTRY_UPDATE 
WIFI_HAPD_IFACE_ACS 
WIFI_HAPD_IFACE_HT_SCAN 
WIFI_HAPD_IFACE_DFS 
WIFI_HAPD_IFACE_ENABLED 

◆ wifi_iface_mode

#include <zephyr/net/wifi.h>

Wi-Fi interface modes.

Based on https://w1.fi/wpa_supplicant/devel/defs_8h.html#a4aeb27c1e4abd046df3064ea9756f0bc

Enumerator
WIFI_MODE_INFRA 

Infrastructure station mode.

WIFI_MODE_IBSS 

IBSS (ad-hoc) station mode.

WIFI_MODE_AP 

AP mode.

WIFI_MODE_P2P_GO 

P2P group owner mode.

WIFI_MODE_P2P_GROUP_FORMATION 

P2P group formation mode.

WIFI_MODE_MESH 

802.11s Mesh mode.

◆ wifi_iface_state

#include <zephyr/net/wifi.h>

Wi-Fi interface states.

Based on https://w1.fi/wpa_supplicant/devel/defs_8h.html#a4aeb27c1e4abd046df3064ea9756f0bc

Enumerator
WIFI_STATE_DISCONNECTED 

Interface is disconnected.

WIFI_STATE_INTERFACE_DISABLED 

Interface is disabled (administratively).

WIFI_STATE_INACTIVE 

No enabled networks in the configuration.

WIFI_STATE_SCANNING 

Interface is scanning for networks.

WIFI_STATE_AUTHENTICATING 

Authentication with a network is in progress.

WIFI_STATE_ASSOCIATING 

Association with a network is in progress.

WIFI_STATE_ASSOCIATED 

Association with a network completed.

WIFI_STATE_4WAY_HANDSHAKE 

4-way handshake with a network is in progress.

WIFI_STATE_GROUP_HANDSHAKE 

Group Key exchange with a network is in progress.

WIFI_STATE_COMPLETED 

All authentication completed, ready to pass data.

◆ wifi_link_mode

#include <zephyr/net/wifi.h>

Wi-Fi link operating modes.

As per https://en.wikipedia.org/wiki/Wi-Fi#Versions_and_generations.

Enumerator
WIFI_0 

802.11 (legacy).

WIFI_1 

802.11b.

WIFI_2 

802.11a.

WIFI_3 

802.11g.

WIFI_4 

802.11n.

WIFI_5 

802.11ac.

WIFI_6 

802.11ax.

WIFI_6E 

802.11ax 6GHz.

WIFI_7 

802.11be.

◆ wifi_mfp_options

#include <zephyr/net/wifi.h>

IEEE 802.11w - Management frame protection.

Enumerator
WIFI_MFP_DISABLE 

MFP disabled.

WIFI_MFP_OPTIONAL 

MFP optional.

WIFI_MFP_REQUIRED 

MFP required.

◆ wifi_mgmt_op

#include <zephyr/net/wifi_mgmt.h>

Generic get/set operation for any command.

Enumerator
WIFI_MGMT_GET 

Get operation.

WIFI_MGMT_SET 

Set operation.

◆ wifi_operational_modes

#include <zephyr/net/wifi.h>

Wifi operational mode.

Enumerator
WIFI_STA_MODE 

STA mode setting enable.

WIFI_MONITOR_MODE 

Monitor mode setting enable.

WIFI_TX_INJECTION_MODE 

TX injection mode setting enable.

WIFI_PROMISCUOUS_MODE 

Promiscuous mode setting enable.

WIFI_AP_MODE 

AP mode setting enable.

WIFI_SOFTAP_MODE 

Softap mode setting enable.

◆ wifi_ps

enum wifi_ps

#include <zephyr/net/wifi.h>

Wi-Fi power save states.

Enumerator
WIFI_PS_DISABLED 

Power save disabled.

WIFI_PS_ENABLED 

Power save enabled.

◆ wifi_ps_exit_strategy

#include <zephyr/net/wifi.h>

Wi-Fi power save exit strategy.

Enumerator
WIFI_PS_EXIT_CUSTOM_ALGO 

PS-Poll frame based.

WIFI_PS_EXIT_EVERY_TIM 

QoS NULL frame based.

◆ wifi_ps_mode

#include <zephyr/net/wifi.h>

Wi-Fi power save modes.

Enumerator
WIFI_PS_MODE_LEGACY 

Legacy power save mode.

WIFI_PS_MODE_WMM 

WMM power save mode.

◆ wifi_ps_param_type

#include <zephyr/net/wifi.h>

Wi-Fi power save parameters.

Enumerator
WIFI_PS_PARAM_STATE 

Power save state.

WIFI_PS_PARAM_LISTEN_INTERVAL 

Power save listen interval.

WIFI_PS_PARAM_WAKEUP_MODE 

Power save wakeup mode.

WIFI_PS_PARAM_MODE 

Power save mode.

WIFI_PS_PARAM_EXIT_STRATEGY 

Power save exit strategy.

WIFI_PS_PARAM_TIMEOUT 

Power save timeout.

◆ wifi_ps_wakeup_mode

#include <zephyr/net/wifi.h>

Wi-Fi power save modes.

Enumerator
WIFI_PS_WAKEUP_MODE_DTIM 

DTIM based wakeup.

WIFI_PS_WAKEUP_MODE_LISTEN_INTERVAL 

Listen interval based wakeup.

◆ wifi_scan_type

#include <zephyr/net/wifi.h>

Wi-Fi scanning types.

Enumerator
WIFI_SCAN_TYPE_ACTIVE 

Active scanning (default).

WIFI_SCAN_TYPE_PASSIVE 

Passive scanning.

◆ wifi_security_type

#include <zephyr/net/wifi.h>

IEEE 802.11 security types.

Enumerator
WIFI_SECURITY_TYPE_NONE 

No security.

WIFI_SECURITY_TYPE_PSK 

WPA2-PSK security.

WIFI_SECURITY_TYPE_PSK_SHA256 

WPA2-PSK-SHA256 security.

WIFI_SECURITY_TYPE_SAE 

WPA3-SAE security.

WIFI_SECURITY_TYPE_SAE_HNP 

WPA3-SAE security with hunting-and-pecking loop.

WIFI_SECURITY_TYPE_SAE_H2E 

WPA3-SAE security with hash-to-element.

WIFI_SECURITY_TYPE_SAE_AUTO 

WPA3-SAE security with both hunting-and-pecking loop and hash-to-element enabled.

WIFI_SECURITY_TYPE_WAPI 

GB 15629.11-2003 WAPI security.

WIFI_SECURITY_TYPE_EAP 

EAP security - Enterprise.

WIFI_SECURITY_TYPE_EAP_TLS 

EAP TLS security - Enterprise.

WIFI_SECURITY_TYPE_WEP 

WEP security.

WIFI_SECURITY_TYPE_WPA_PSK 

WPA-PSK security.

WIFI_SECURITY_TYPE_WPA_AUTO_PERSONAL 

WPA/WPA2/WPA3 PSK security.

WIFI_SECURITY_TYPE_DPP 

DPP security.

WIFI_SECURITY_TYPE_EAP_PEAP_MSCHAPV2 

EAP PEAP MSCHAPV2 security - Enterprise.

WIFI_SECURITY_TYPE_EAP_PEAP_GTC 

EAP PEAP GTC security - Enterprise.

WIFI_SECURITY_TYPE_EAP_TTLS_MSCHAPV2 

EAP TTLS MSCHAPV2 security - Enterprise.

WIFI_SECURITY_TYPE_EAP_PEAP_TLS 

EAP PEAP security - Enterprise.

WIFI_SECURITY_TYPE_EAP_TLS_SHA256 

EAP TLS SHA256 security - Enterprise.

◆ wifi_suiteb_type

#include <zephyr/net/wifi.h>

Enterprise security WPA3 suiteb types.

Enumerator
WIFI_SUITEB 

suiteb.

WIFI_SUITEB_192 

suiteb-192.

◆ wifi_twt_fail_reason

#include <zephyr/net/wifi.h>

Target Wake Time (TWT) error codes.

Enumerator
WIFI_TWT_FAIL_UNSPECIFIED 

Unspecified error.

WIFI_TWT_FAIL_CMD_EXEC_FAIL 

Command execution failed.

WIFI_TWT_FAIL_OPERATION_NOT_SUPPORTED 

Operation not supported.

WIFI_TWT_FAIL_UNABLE_TO_GET_IFACE_STATUS 

Unable to get interface status.

WIFI_TWT_FAIL_DEVICE_NOT_CONNECTED 

Device not connected to AP.

WIFI_TWT_FAIL_PEER_NOT_HE_CAPAB 

Peer not HE (802.11ax/Wi-Fi 6) capable.

WIFI_TWT_FAIL_PEER_NOT_TWT_CAPAB 

Peer not TWT capable.

WIFI_TWT_FAIL_OPERATION_IN_PROGRESS 

A TWT flow is already in progress.

WIFI_TWT_FAIL_INVALID_FLOW_ID 

Invalid negotiated flow id.

WIFI_TWT_FAIL_IP_NOT_ASSIGNED 

IP address not assigned or configured.

WIFI_TWT_FAIL_FLOW_ALREADY_EXISTS 

Flow already exists.

◆ wifi_twt_negotiation_type

#include <zephyr/net/wifi.h>

Wi-Fi Target Wake Time (TWT) negotiation types.

Enumerator
WIFI_TWT_INDIVIDUAL 

TWT individual negotiation.

WIFI_TWT_BROADCAST 

TWT broadcast negotiation.

WIFI_TWT_WAKE_TBTT 

TWT wake TBTT negotiation.

◆ wifi_twt_operation

#include <zephyr/net/wifi.h>

Wi-Fi Target Wake Time (TWT) operations.

Enumerator
WIFI_TWT_SETUP 

TWT setup operation.

WIFI_TWT_TEARDOWN 

TWT teardown operation.

◆ wifi_twt_setup_cmd

#include <zephyr/net/wifi.h>

Wi-Fi Target Wake Time (TWT) setup commands.

Enumerator
WIFI_TWT_SETUP_CMD_REQUEST 

TWT setup request.

WIFI_TWT_SETUP_CMD_SUGGEST 

TWT setup suggest (parameters can be changed by AP)

WIFI_TWT_SETUP_CMD_DEMAND 

TWT setup demand (parameters can not be changed by AP)

WIFI_TWT_SETUP_CMD_GROUPING 

TWT setup grouping (grouping of TWT flows)

WIFI_TWT_SETUP_CMD_ACCEPT 

TWT setup accept (parameters accepted by AP)

WIFI_TWT_SETUP_CMD_ALTERNATE 

TWT setup alternate (alternate parameters suggested by AP)

WIFI_TWT_SETUP_CMD_DICTATE 

TWT setup dictate (parameters dictated by AP)

WIFI_TWT_SETUP_CMD_REJECT 

TWT setup reject (parameters rejected by AP)

◆ wifi_twt_setup_resp_status

#include <zephyr/net/wifi.h>

Wi-Fi Target Wake Time (TWT) negotiation status.

Enumerator
WIFI_TWT_RESP_RECEIVED 

TWT response received for TWT request.

WIFI_TWT_RESP_NOT_RECEIVED 

TWT response not received for TWT request.

◆ wifi_twt_sleep_state

#include <zephyr/net/wifi_mgmt.h>

Wi-Fi TWT sleep states.

Enumerator
WIFI_TWT_STATE_SLEEP 

TWT sleep state: sleeping.

WIFI_TWT_STATE_AWAKE 

TWT sleep state: awake.

◆ wifi_twt_teardown_status

#include <zephyr/net/wifi.h>

Wi-Fi Target Wake Time (TWT) teradown status.

Enumerator
WIFI_TWT_TEARDOWN_SUCCESS 

TWT teardown success.

WIFI_TWT_TEARDOWN_FAILED 

TWT teardown failure.

◆ wifi_wps_op

#include <zephyr/net/wifi_mgmt.h>

Operation for WPS.

Enumerator
WIFI_WPS_PBC 

WPS pbc.

WIFI_WPS_PIN_GET 

Get WPS pin number.

WIFI_WPS_PIN_SET 

Set WPS pin number.

Function Documentation

◆ wifi_band_txt()

const char * wifi_band_txt ( enum wifi_frequency_bands band)

#include <zephyr/net/wifi.h>

Helper function to get user-friendly frequency band name.

◆ wifi_link_mode_txt()

const char * wifi_link_mode_txt ( enum wifi_link_mode link_mode)

#include <zephyr/net/wifi.h>

Helper function to get user-friendly link mode name.

◆ wifi_mfp_txt()

const char * wifi_mfp_txt ( enum wifi_mfp_options mfp)

#include <zephyr/net/wifi.h>

Helper function to get user-friendly MFP name.

◆ wifi_mgmt_raise_ap_disable_result_event()

void wifi_mgmt_raise_ap_disable_result_event ( struct net_if * iface,
enum wifi_ap_status status )

#include <zephyr/net/wifi_mgmt.h>

Wi-Fi management AP mode disable result event.

Parameters
ifaceNetwork interface
statusAP mode disable result status

◆ wifi_mgmt_raise_ap_enable_result_event()

void wifi_mgmt_raise_ap_enable_result_event ( struct net_if * iface,
enum wifi_ap_status status )

#include <zephyr/net/wifi_mgmt.h>

Wi-Fi management AP mode enable result event.

Parameters
ifaceNetwork interface
statusAP mode enable result status

◆ wifi_mgmt_raise_ap_sta_connected_event()

void wifi_mgmt_raise_ap_sta_connected_event ( struct net_if * iface,
struct wifi_ap_sta_info * sta_info )

#include <zephyr/net/wifi_mgmt.h>

Wi-Fi management AP mode STA connected event.

Parameters
ifaceNetwork interface
sta_infoSTA information

◆ wifi_mgmt_raise_ap_sta_disconnected_event()

void wifi_mgmt_raise_ap_sta_disconnected_event ( struct net_if * iface,
struct wifi_ap_sta_info * sta_info )

#include <zephyr/net/wifi_mgmt.h>

Wi-Fi management AP mode STA disconnected event.

Parameters
ifaceNetwork interface
sta_infoSTA information

◆ wifi_mgmt_raise_connect_result_event()

void wifi_mgmt_raise_connect_result_event ( struct net_if * iface,
int status )

#include <zephyr/net/wifi_mgmt.h>

Wi-Fi management connect result event.

Parameters
ifaceNetwork interface
statusConnect result status

◆ wifi_mgmt_raise_disconnect_complete_event()

void wifi_mgmt_raise_disconnect_complete_event ( struct net_if * iface,
int status )

#include <zephyr/net/wifi_mgmt.h>

Wi-Fi management disconnect complete event.

Parameters
ifaceNetwork interface
statusDisconnect complete status

◆ wifi_mgmt_raise_disconnect_result_event()

void wifi_mgmt_raise_disconnect_result_event ( struct net_if * iface,
int status )

#include <zephyr/net/wifi_mgmt.h>

Wi-Fi management disconnect result event.

Parameters
ifaceNetwork interface
statusDisconnect result status

◆ wifi_mgmt_raise_iface_status_event()

void wifi_mgmt_raise_iface_status_event ( struct net_if * iface,
struct wifi_iface_status * iface_status )

#include <zephyr/net/wifi_mgmt.h>

Wi-Fi management interface status event.

Parameters
ifaceNetwork interface
iface_statusInterface status

◆ wifi_mgmt_raise_raw_scan_result_event()

void wifi_mgmt_raise_raw_scan_result_event ( struct net_if * iface,
struct wifi_raw_scan_result * raw_scan_info )

#include <zephyr/net/wifi_mgmt.h>

Wi-Fi management raw scan result event.

Parameters
ifaceNetwork interface
raw_scan_infoRaw scan result

◆ wifi_mgmt_raise_twt_event()

void wifi_mgmt_raise_twt_event ( struct net_if * iface,
struct wifi_twt_params * twt_params )

#include <zephyr/net/wifi_mgmt.h>

Wi-Fi management TWT event.

Parameters
ifaceNetwork interface
twt_paramsTWT parameters

◆ wifi_mgmt_raise_twt_sleep_state()

void wifi_mgmt_raise_twt_sleep_state ( struct net_if * iface,
int twt_sleep_state )

#include <zephyr/net/wifi_mgmt.h>

Wi-Fi management TWT sleep state event.

Parameters
ifaceNetwork interface
twt_sleep_stateTWT sleep state

◆ wifi_mode_txt()

const char * wifi_mode_txt ( enum wifi_iface_mode mode)

#include <zephyr/net/wifi.h>

Helper function to get user-friendly interface mode name.

◆ wifi_ps_exit_strategy_txt()

const char *const wifi_ps_exit_strategy_txt ( enum wifi_ps_exit_strategy ps_exit_strategy)

#include <zephyr/net/wifi.h>

Helper function to get user-friendly ps exit strategy name.

◆ wifi_ps_get_config_err_code_str()

static const char * wifi_ps_get_config_err_code_str ( int16_t err_no)
inlinestatic

#include <zephyr/net/wifi.h>

Helper function to get user-friendly power save error code name.

◆ wifi_ps_mode_txt()

const char * wifi_ps_mode_txt ( enum wifi_ps_mode ps_mode)

#include <zephyr/net/wifi.h>

Helper function to get user-friendly ps mode name.

◆ wifi_ps_txt()

const char * wifi_ps_txt ( enum wifi_ps ps_name)

#include <zephyr/net/wifi.h>

Helper function to get user-friendly ps name.

◆ wifi_ps_wakeup_mode_txt()

const char * wifi_ps_wakeup_mode_txt ( enum wifi_ps_wakeup_mode ps_wakeup_mode)

#include <zephyr/net/wifi.h>

Helper function to get user-friendly ps wakeup mode name.

◆ wifi_security_txt()

const char * wifi_security_txt ( enum wifi_security_type security)

#include <zephyr/net/wifi.h>

Helper function to get user-friendly security type name.

◆ wifi_state_txt()

const char * wifi_state_txt ( enum wifi_iface_state state)

#include <zephyr/net/wifi.h>

Helper function to get user-friendly interface state name.

◆ wifi_twt_get_err_code_str()

static const char * wifi_twt_get_err_code_str ( int16_t err_no)
inlinestatic

#include <zephyr/net/wifi.h>

Helper function to get user-friendly TWT error code name.

◆ wifi_twt_negotiation_type_txt()

const char * wifi_twt_negotiation_type_txt ( enum wifi_twt_negotiation_type twt_negotiation)

#include <zephyr/net/wifi.h>

Helper function to get user-friendly twt negotiation type name.

◆ wifi_twt_operation_txt()

const char * wifi_twt_operation_txt ( enum wifi_twt_operation twt_operation)

#include <zephyr/net/wifi.h>

Helper function to get user-friendly twt operation name.

◆ wifi_twt_setup_cmd_txt()

const char * wifi_twt_setup_cmd_txt ( enum wifi_twt_setup_cmd twt_setup)

#include <zephyr/net/wifi.h>

Helper function to get user-friendly twt setup cmd name.

◆ wifi_utils_parse_scan_bands()

int wifi_utils_parse_scan_bands ( char * scan_bands_str,
uint8_t * band_map )

#include <zephyr/net/wifi_utils.h>

Convert a band specification string to a bitmap representing the bands.

The function will parse a string which specifies Wi-Fi frequency band values as a comma separated string and convert it to a bitmap. The string can use the following characters to represent the bands:

  • 2: 2.4 GHz
  • 5: 5 GHz
  • 6: 6 GHz

For the bitmap generated refer to wifi_frequency_bands for bit position of each band.

E.g. a string "2,5,6" will be converted to a bitmap value of 0x7

Parameters
scan_bands_strString which spe.
band_mapPointer to the bitmap variable to be updated.
Return values
0on success.
-errnovalue in case of failure.

◆ wifi_utils_parse_scan_chan()

int wifi_utils_parse_scan_chan ( char * scan_chan_str,
struct wifi_band_channel * chan,
uint8_t max_channels )

#include <zephyr/net/wifi_utils.h>

Convert a string containing a specification of scan channels to an array.

The function will parse a string which specifies channels to be scanned as a string and convert it to an array.

The channel string has to be formatted using the colon (:), comma(,), hyphen (-) and underscore (_) delimiters as follows:

  • A colon identifies the value preceding it as a band. A band value (2: 2.4 GHz, 5: 5 GHz 6: 6 GHz) has to precede the channels in that band (e.g. 2: etc)
  • Hyphens (-) are used to identify channel ranges (e.g. 2-7, 32-48 etc)
  • Commas are used to separate channel values within a band. Channels can be specified as individual values (2,6,48 etc) or channel ranges using hyphens (1-14, 32-48 etc)
  • Underscores (_) are used to specify multiple band-channel sets (e.g. 2:1,2_5:36,40 etc)
  • No spaces should be used anywhere, i.e. before/after commas, before/after hyphens etc.

An example channel specification specifying channels in the 2.4 GHz and 5 GHz bands is as below: 2:1,5,7,9-11_5:36-48,100,163-167

Parameters
scan_chan_strList of channels expressed in the format described above.
chanPointer to an array where the parsed channels are to be stored.
max_channelsMaximum number of channels to store
Return values
0on success.
-errnovalue in case of failure.

◆ wifi_utils_parse_scan_ssids()

int wifi_utils_parse_scan_ssids ( char * scan_ssids_str,
const char * ssids[],
uint8_t num_ssids )

#include <zephyr/net/wifi_utils.h>

Append a string containing an SSID to an array of SSID strings.

Parameters
scan_ssids_strstring to be appended in the list of scanned SSIDs.
ssidsPointer to an array where the SSIDs pointers are to be stored.
num_ssidsMaximum number of SSIDs that can be stored.
Return values
0on success.
-errnovalue in case of failure.

◆ wifi_utils_validate_chan()

bool wifi_utils_validate_chan ( uint8_t band,
uint16_t chan )

#include <zephyr/net/wifi_utils.h>

Validate a channel against a band.

Parameters
bandBand to validate the channel against.
chanChannel to validate.
Return values
trueif the channel is valid for the band.
falseif the channel is not valid for the band.

◆ wifi_utils_validate_chan_2g()

bool wifi_utils_validate_chan_2g ( uint16_t chan)

#include <zephyr/net/wifi_utils.h>

Validate a channel against the 2.4 GHz band.

Parameters
chanChannel to validate.
Return values
trueif the channel is valid for the band.
falseif the channel is not valid for the band.

◆ wifi_utils_validate_chan_5g()

bool wifi_utils_validate_chan_5g ( uint16_t chan)

#include <zephyr/net/wifi_utils.h>

Validate a channel against the 5 GHz band.

Parameters
chanChannel to validate.
Return values
trueif the channel is valid for the band.
falseif the channel is not valid for the band.

◆ wifi_utils_validate_chan_6g()

bool wifi_utils_validate_chan_6g ( uint16_t chan)

#include <zephyr/net/wifi_utils.h>

Validate a channel against the 6 GHz band.

Parameters
chanChannel to validate.
Return values
trueif the channel is valid for the band.
falseif the channel is not valid for the band.