Zephyr API Documentation  3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
wifi_mgmt.h File Reference

WiFi L2 stack public header. More...

Go to the source code of this file.

Data Structures

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_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_mgmt_ops
 Wi-Fi management API. More...
 
struct  net_wifi_mgmt_offload
 Wi-Fi management offload API. More...
 

Macros

#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_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_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.
 

Typedefs

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

Enumerations

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_RTS_THRESHOLD ,
  NET_REQUEST_WIFI_CMD_AP_CONFIG_PARAM
}
 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
}
 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...
 

Functions

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.
 

Detailed Description

WiFi L2 stack public header.