Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
wifi_mgmt_ops Struct Reference

Wi-Fi management API. More...

#include <zephyr/net/wifi_mgmt.h>

Data Fields

int(* scan )(const struct device *dev, struct net_if *iface, struct wifi_scan_params *params, scan_result_cb_t cb)
 Scan for Wi-Fi networks.
int(* connect )(const struct device *dev, struct net_if *iface, struct wifi_connect_req_params *params)
 Connect to a Wi-Fi network.
int(* disconnect )(const struct device *dev, struct net_if *iface)
 Disconnect from a Wi-Fi network.
int(* ap_enable )(const struct device *dev, struct net_if *iface, struct wifi_connect_req_params *params)
 Enable AP mode.
int(* ap_disable )(const struct device *dev, struct net_if *iface)
 Disable AP mode.
int(* ap_sta_disconnect )(const struct device *dev, struct net_if *iface, const uint8_t *mac)
 Disconnect a STA from AP.
int(* iface_status )(const struct device *dev, struct net_if *iface, struct wifi_iface_status *status)
 Get interface status.
int(* get_stats )(const struct device *dev, struct net_if *iface, struct net_stats_wifi *stats)
 Get Wi-Fi statistics.
int(* reset_stats )(const struct device *dev, struct net_if *iface)
 Reset Wi-Fi statistics.
int(* cfg_11k )(const struct device *dev, struct net_if *iface, struct wifi_11k_params *params)
 Set or get 11K status.
int(* send_11k_neighbor_request )(const struct device *dev, struct net_if *iface, struct wifi_11k_params *params)
 Send 11k neighbor request.
int(* set_power_save )(const struct device *dev, struct net_if *iface, struct wifi_ps_params *params)
 Set power save status.
int(* set_twt )(const struct device *dev, struct net_if *iface, struct wifi_twt_params *params)
 Setup or teardown TWT flow.
int(* set_btwt )(const struct device *dev, struct net_if *iface, struct wifi_twt_params *params)
 Setup BTWT flow.
int(* get_power_save_config )(const struct device *dev, struct net_if *iface, struct wifi_ps_config *config)
 Get power save config.
int(* reg_domain )(const struct device *dev, struct net_if *iface, struct wifi_reg_domain *reg_domain)
 Set or get regulatory domain.
int(* filter )(const struct device *dev, struct net_if *iface, struct wifi_filter_info *filter)
 Set or get packet filter settings for monitor and promiscuous modes.
int(* mode )(const struct device *dev, struct net_if *iface, struct wifi_mode_info *mode)
 Set or get mode of operation.
int(* channel )(const struct device *dev, struct net_if *iface, struct wifi_channel_info *channel)
 Set or get current channel of operation.
int(* btm_query )(const struct device *dev, struct net_if *iface, uint8_t reason)
 Send BTM query.
bool(* bss_support_neighbor_rep )(const struct device *dev, struct net_if *iface)
 Check if ap support Neighbor Report or not.
int(* bss_ext_capab )(const struct device *dev, struct net_if *iface, int capab)
 Judge ap whether support the capability.
int(* legacy_roam )(const struct device *dev, struct net_if *iface)
 Send legacy scan.
int(* get_version )(const struct device *dev, struct net_if *iface, struct wifi_version *params)
 Get Version of WiFi driver and Firmware.
int(* get_conn_params )(const struct device *dev, struct net_if *iface, struct wifi_connect_req_params *params)
 Get Wi-Fi connection parameters recently used.
int(* set_rts_threshold )(const struct device *dev, struct net_if *iface, unsigned int rts_threshold)
 Set RTS threshold value.
int(* ap_config_params )(const struct device *dev, struct net_if *iface, struct wifi_ap_config_params *params)
 Configure AP parameter.
int(* config_params )(const struct device *dev, struct net_if *iface, struct wifi_config_params *params)
 Configure STA parameter.
int(* pmksa_flush )(const struct device *dev, struct net_if *iface)
 Flush PMKSA cache entries.
int(* get_rts_threshold )(const struct device *dev, struct net_if *iface, unsigned int *rts_threshold)
 Set Wi-Fi enterprise mode CA/client Cert and key.
int(* wps_config )(const struct device *dev, struct net_if *iface, struct wifi_wps_config_params *params)
 Start a WPS PBC/PIN connection.
int(* candidate_scan )(const struct device *dev, struct net_if *iface, struct wifi_scan_params *params)
 Trigger candidate scan.
int(* start_11r_roaming )(const struct device *dev, struct net_if *iface)
 Start 11r roaming.
int(* set_bss_max_idle_period )(const struct device *dev, struct net_if *iface, unsigned short bss_max_idle_period)
 Set BSS max idle period.
int(* set_bgscan )(const struct device *dev, struct net_if *iface, struct wifi_bgscan_params *params)
 Configure background scanning.

Detailed Description

Wi-Fi management API.

Field Documentation

◆ ap_config_params

int(* wifi_mgmt_ops::ap_config_params) (const struct device *dev, struct net_if *iface, struct wifi_ap_config_params *params)

Configure AP parameter.

Parameters
devPointer to the device structure for the driver instance.
ifaceNetwork interface to use for the AP parameter configuration operation
paramsAP mode parameter configuration parameter info
Returns
0 if ok, < 0 if error

◆ ap_disable

int(* wifi_mgmt_ops::ap_disable) (const struct device *dev, struct net_if *iface)

Disable AP mode.

Parameters
devPointer to the device structure for the driver instance.
ifaceNetwork interface to use for the AP
Returns
0 if ok, < 0 if error

◆ ap_enable

int(* wifi_mgmt_ops::ap_enable) (const struct device *dev, struct net_if *iface, struct wifi_connect_req_params *params)

Enable AP mode.

Parameters
devPointer to the device structure for the driver instance.
ifaceNetwork interface to use for the AP
paramsAP mode parameters
Returns
0 if ok, < 0 if error

◆ ap_sta_disconnect

int(* wifi_mgmt_ops::ap_sta_disconnect) (const struct device *dev, struct net_if *iface, const uint8_t *mac)

Disconnect a STA from AP.

Parameters
devPointer to the device structure for the driver instance.
ifaceNetwork interface to use for the AP
macMAC address of the STA to disconnect
Returns
0 if ok, < 0 if error

◆ bss_ext_capab

int(* wifi_mgmt_ops::bss_ext_capab) (const struct device *dev, struct net_if *iface, int capab)

Judge ap whether support the capability.

Parameters
devPointer to the device structure for the driver instance.
ifaceNetwork interface to use for the capability operation
capabis the capability to judge
Returns
1 if support, 0 if not support

◆ bss_support_neighbor_rep

bool(* wifi_mgmt_ops::bss_support_neighbor_rep) (const struct device *dev, struct net_if *iface)

Check if ap support Neighbor Report or not.

Parameters
devPointer to the device structure for the driver instance.
ifaceNetwork interface to use for the Neighbor Report operation
Returns
true if support, false if not support

◆ btm_query

int(* wifi_mgmt_ops::btm_query) (const struct device *dev, struct net_if *iface, uint8_t reason)

Send BTM query.

Parameters
devPointer to the device structure for the driver instance.
ifaceNetwork interface to use for the BTM query operation
reasonquery reason
Returns
0 if ok, < 0 if error

◆ candidate_scan

int(* wifi_mgmt_ops::candidate_scan) (const struct device *dev, struct net_if *iface, struct wifi_scan_params *params)

Trigger candidate scan.

Parameters
devPointer to the device structure for the driver instance
ifaceNetwork interface to use for the scan operation
paramsScan parameters
Returns
0 if ok, < 0 if error

◆ cfg_11k

int(* wifi_mgmt_ops::cfg_11k) (const struct device *dev, struct net_if *iface, struct wifi_11k_params *params)

Set or get 11K status.

Parameters
devPointer to the device structure for the driver instance.
ifaceNetwork interface to use for the 11k operation
params11k parameters
Returns
0 if ok, < 0 if error

◆ channel

int(* wifi_mgmt_ops::channel) (const struct device *dev, struct net_if *iface, struct wifi_channel_info *channel)

Set or get current channel of operation.

Parameters
devPointer to the device structure for the driver instance.
ifaceNetwork interface to use for the channel operation
channelsettings
Returns
0 if ok, < 0 if error

◆ config_params

int(* wifi_mgmt_ops::config_params) (const struct device *dev, struct net_if *iface, struct wifi_config_params *params)

Configure STA parameter.

Parameters
devPointer to the device structure for the driver instance.
ifaceNetwork interface to use for the STA parameter configuration operation
paramsSTA mode parameter configuration parameter info
Returns
0 if ok, < 0 if error

◆ connect

int(* wifi_mgmt_ops::connect) (const struct device *dev, struct net_if *iface, struct wifi_connect_req_params *params)

Connect to a Wi-Fi network.

Parameters
devPointer to the device structure for the driver instance.
ifaceNetwork interface to use for the connection
paramsConnect parameters
Returns
0 if ok, < 0 if error

◆ disconnect

int(* wifi_mgmt_ops::disconnect) (const struct device *dev, struct net_if *iface)

Disconnect from a Wi-Fi network.

Parameters
devPointer to the device structure for the driver instance.
ifaceNetwork interface to disconnect
Returns
0 if ok, < 0 if error

◆ filter

int(* wifi_mgmt_ops::filter) (const struct device *dev, struct net_if *iface, struct wifi_filter_info *filter)

Set or get packet filter settings for monitor and promiscuous modes.

Parameters
devPointer to the device structure for the driver instance.
ifaceNetwork interface to use for the filter operation
packetfilter settings
Returns
0 if ok, < 0 if error

◆ get_conn_params

int(* wifi_mgmt_ops::get_conn_params) (const struct device *dev, struct net_if *iface, struct wifi_connect_req_params *params)

Get Wi-Fi connection parameters recently used.

Parameters
devPointer to the device structure for the driver instance
ifaceNetwork interface to use for the get connection parameters operation
paramsthe Wi-Fi connection parameters recently used
Returns
0 if ok, < 0 if error

◆ get_power_save_config

int(* wifi_mgmt_ops::get_power_save_config) (const struct device *dev, struct net_if *iface, struct wifi_ps_config *config)

Get power save config.

Parameters
devPointer to the device structure for the driver instance.
ifaceNetwork interface to use for the power save operation
configPower save config
Returns
0 if ok, < 0 if error

◆ get_rts_threshold

int(* wifi_mgmt_ops::get_rts_threshold) (const struct device *dev, struct net_if *iface, unsigned int *rts_threshold)

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

Parameters
devPointer to the device structure for the driver instance.
ifaceNetwork interface to use for the enterprise credentials operation
credsPointer to the CA/client Cert and key.
Returns
0 if ok, < 0 if error Get RTS threshold value
Parameters
devPointer to the device structure for the driver instance.
ifaceNetwork interface to use for the RTS threshold operation
rts_thresholdPointer to the RTS threshold value.
Returns
0 if ok, < 0 if error

◆ get_stats

int(* wifi_mgmt_ops::get_stats) (const struct device *dev, struct net_if *iface, struct net_stats_wifi *stats)

Get Wi-Fi statistics.

Parameters
devPointer to the device structure for the driver instance.
ifaceNetwork interface to get the statistics
statsWi-Fi statistics
Returns
0 if ok, < 0 if error

◆ get_version

int(* wifi_mgmt_ops::get_version) (const struct device *dev, struct net_if *iface, struct wifi_version *params)

Get Version of WiFi driver and Firmware.

The driver that implements the get_version function must not use stack to allocate the version information pointers that are returned as params struct members. The version pointer parameters should point to a static memory either in ROM (preferred) or in RAM.

Parameters
devPointer to the device structure for the driver instance
ifaceNetwork interface to use for the get version operation
paramsVersion parameters
Returns
0 if ok, < 0 if error

◆ iface_status

int(* wifi_mgmt_ops::iface_status) (const struct device *dev, struct net_if *iface, struct wifi_iface_status *status)

Get interface status.

Parameters
devPointer to the device structure for the driver instance.
ifaceNetwork interface to get the status
statusInterface status
Returns
0 if ok, < 0 if error

◆ legacy_roam

int(* wifi_mgmt_ops::legacy_roam) (const struct device *dev, struct net_if *iface)

Send legacy scan.

Parameters
devPointer to the device structure for the driver instance.
ifaceNetwork interface to use for the legacy scan operation
Returns
0 if ok, < 0 if error

◆ mode

int(* wifi_mgmt_ops::mode) (const struct device *dev, struct net_if *iface, struct wifi_mode_info *mode)

Set or get mode of operation.

Parameters
devPointer to the device structure for the driver instance.
ifaceNetwork interface to use for the mode operation
modesettings
Returns
0 if ok, < 0 if error

◆ pmksa_flush

int(* wifi_mgmt_ops::pmksa_flush) (const struct device *dev, struct net_if *iface)

Flush PMKSA cache entries.

Parameters
devPointer to the device structure for the driver instance.
ifaceNetwork interface to use for the PMKSA flush operation
Returns
0 if ok, < 0 if error

◆ reg_domain

int(* wifi_mgmt_ops::reg_domain) (const struct device *dev, struct net_if *iface, struct wifi_reg_domain *reg_domain)

Set or get regulatory domain.

Parameters
devPointer to the device structure for the driver instance.
ifaceNetwork interface to use for the regulatory domain operation
reg_domainRegulatory domain
Returns
0 if ok, < 0 if error

◆ reset_stats

int(* wifi_mgmt_ops::reset_stats) (const struct device *dev, struct net_if *iface)

Reset Wi-Fi statistics.

Parameters
devPointer to the device structure for the driver instance.
ifaceNetwork interface to reset the statistics
Returns
0 if ok, < 0 if error

◆ scan

int(* wifi_mgmt_ops::scan) (const struct device *dev, struct net_if *iface, struct wifi_scan_params *params, scan_result_cb_t cb)

Scan for Wi-Fi networks.

Parameters
devPointer to the device structure for the driver instance.
ifaceNetwork interface to use for the scan
paramsScan parameters
cbCallback to be called for each result cb parameter is the cb that should be called for each result by the driver. The wifi mgmt part will take care of raising the necessary event etc.
Returns
0 if ok, < 0 if error

◆ send_11k_neighbor_request

int(* wifi_mgmt_ops::send_11k_neighbor_request) (const struct device *dev, struct net_if *iface, struct wifi_11k_params *params)

Send 11k neighbor request.

Parameters
devPointer to the device structure for the driver instance.
ifaceNetwork interface to use for the 11k operation
params11k parameters
Returns
0 if ok, < 0 if error

◆ set_bgscan

int(* wifi_mgmt_ops::set_bgscan) (const struct device *dev, struct net_if *iface, struct wifi_bgscan_params *params)

Configure background scanning.

Parameters
devPointer to the device structure for the driver instance.
ifaceNetwork interface to use for the background scanning operation
paramsBackground scanning configuration parameters
Returns
0 if ok, < 0 if error

◆ set_bss_max_idle_period

int(* wifi_mgmt_ops::set_bss_max_idle_period) (const struct device *dev, struct net_if *iface, unsigned short bss_max_idle_period)

Set BSS max idle period.

Parameters
devPointer to the device structure for the driver instance.
ifaceNetwork interface to use for the BSS max idle period operation
bss_max_idle_periodmax idle period value
Returns
0 if ok, < 0 if error

◆ set_btwt

int(* wifi_mgmt_ops::set_btwt) (const struct device *dev, struct net_if *iface, struct wifi_twt_params *params)

Setup BTWT flow.

Parameters
devPointer to the device structure for the driver instance.
ifaceNetwork interface to use for the BTWT operation
paramsBTWT parameters
Returns
0 if ok, < 0 if error

◆ set_power_save

int(* wifi_mgmt_ops::set_power_save) (const struct device *dev, struct net_if *iface, struct wifi_ps_params *params)

Set power save status.

Parameters
devPointer to the device structure for the driver instance.
ifaceNetwork interface to use for the power save operation
paramsPower save parameters
Returns
0 if ok, < 0 if error

◆ set_rts_threshold

int(* wifi_mgmt_ops::set_rts_threshold) (const struct device *dev, struct net_if *iface, unsigned int rts_threshold)

Set RTS threshold value.

Parameters
devPointer to the device structure for the driver instance.
ifaceNetwork interface to use for the RTS threshold operation
RTSthreshold value
Returns
0 if ok, < 0 if error

◆ set_twt

int(* wifi_mgmt_ops::set_twt) (const struct device *dev, struct net_if *iface, struct wifi_twt_params *params)

Setup or teardown TWT flow.

Parameters
devPointer to the device structure for the driver instance.
ifaceNetwork interface to use for the TWT operation
paramsTWT parameters
Returns
0 if ok, < 0 if error

◆ start_11r_roaming

int(* wifi_mgmt_ops::start_11r_roaming) (const struct device *dev, struct net_if *iface)

Start 11r roaming.

Parameters
devPointer to the device structure for the driver instance
ifaceNetwork interface to use for the roaming operation
Returns
0 if ok, < 0 if error

◆ wps_config

int(* wifi_mgmt_ops::wps_config) (const struct device *dev, struct net_if *iface, struct wifi_wps_config_params *params)

Start a WPS PBC/PIN connection.

Parameters
devPointer to the device structure for the driver instance
ifaceNetwork interface to use for the WPS operation
paramswps operarion parameters
Returns
0 if ok, < 0 if error

The documentation for this struct was generated from the following file: