12#ifndef ZEPHYR_INCLUDE_NET_WIFI_MGMT_H_
13#define ZEPHYR_INCLUDE_NET_WIFI_MGMT_H_
31#define _NET_WIFI_LAYER NET_MGMT_LAYER_L2
32#define _NET_WIFI_CODE 0x156
33#define _NET_WIFI_BASE (NET_MGMT_IFACE_BIT | \
34 NET_MGMT_LAYER(_NET_WIFI_LAYER) | \
35 NET_MGMT_LAYER_CODE(_NET_WIFI_CODE))
36#define _NET_WIFI_EVENT (_NET_WIFI_BASE | NET_MGMT_EVENT_BIT)
38#ifdef CONFIG_WIFI_MGMT_SCAN_SSID_FILT_MAX
39#define WIFI_MGMT_SCAN_SSID_FILT_MAX CONFIG_WIFI_MGMT_SCAN_SSID_FILT_MAX
41#define WIFI_MGMT_SCAN_SSID_FILT_MAX 1
44#ifdef CONFIG_WIFI_MGMT_SCAN_CHAN_MAX_MANUAL
45#define WIFI_MGMT_SCAN_CHAN_MAX_MANUAL CONFIG_WIFI_MGMT_SCAN_CHAN_MAX_MANUAL
47#define WIFI_MGMT_SCAN_CHAN_MAX_MANUAL 1
50#define WIFI_MGMT_BAND_STR_SIZE_MAX 8
91#define NET_REQUEST_WIFI_SCAN \
92 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_SCAN)
96#define NET_REQUEST_WIFI_CONNECT \
97 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CONNECT)
101#define NET_REQUEST_WIFI_DISCONNECT \
102 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_DISCONNECT)
106#define NET_REQUEST_WIFI_AP_ENABLE \
107 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_ENABLE)
111#define NET_REQUEST_WIFI_AP_DISABLE \
112 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_DISABLE)
116#define NET_REQUEST_WIFI_IFACE_STATUS \
117 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_IFACE_STATUS)
121#define NET_REQUEST_WIFI_PS \
122 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PS)
126#define NET_REQUEST_WIFI_PS_MODE \
127 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PS_MODE)
131#define NET_REQUEST_WIFI_TWT \
132 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_TWT)
136#define NET_REQUEST_WIFI_PS_CONFIG \
137 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PS_CONFIG)
140#define NET_REQUEST_WIFI_REG_DOMAIN \
141 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_REG_DOMAIN)
145#define NET_REQUEST_WIFI_PS_TIMEOUT \
146 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PS_TIMEOUT)
150#define NET_REQUEST_WIFI_MODE \
151 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_MODE)
155#define NET_REQUEST_WIFI_PACKET_FILTER \
156 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PACKET_FILTER)
160#define NET_REQUEST_WIFI_CHANNEL \
161 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CHANNEL)
165#define NET_REQUEST_WIFI_AP_STA_DISCONNECT \
166 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_STA_DISCONNECT)
170#define NET_REQUEST_WIFI_VERSION \
171 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_VERSION)
207#define NET_EVENT_WIFI_SCAN_RESULT \
208 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_SCAN_RESULT)
210#define NET_EVENT_WIFI_SCAN_DONE \
211 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_SCAN_DONE)
213#define NET_EVENT_WIFI_CONNECT_RESULT \
214 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_CONNECT_RESULT)
216#define NET_EVENT_WIFI_DISCONNECT_RESULT \
217 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_DISCONNECT_RESULT)
219#define NET_EVENT_WIFI_IFACE_STATUS \
220 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_IFACE_STATUS)
222#define NET_EVENT_WIFI_TWT \
223 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_TWT)
225#define NET_EVENT_WIFI_TWT_SLEEP_STATE \
226 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_TWT_SLEEP_STATE)
228#define NET_EVENT_WIFI_RAW_SCAN_RESULT \
229 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_RAW_SCAN_RESULT)
231#define NET_EVENT_WIFI_DISCONNECT_COMPLETE \
232 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_DISCONNECT_COMPLETE)
234#define NET_EVENT_WIFI_AP_ENABLE_RESULT \
235 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_ENABLE_RESULT)
237#define NET_EVENT_WIFI_AP_DISABLE_RESULT \
238 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_DISABLE_RESULT)
240#define NET_EVENT_WIFI_AP_STA_CONNECTED \
241 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_STA_CONNECTED)
243#define NET_EVENT_WIFI_AP_STA_DISCONNECTED \
244 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_STA_DISCONNECTED)
534#define WIFI_MAX_TWT_FLOWS 8
535#define WIFI_MAX_TWT_INTERVAL_US (LONG_MAX - 1)
537#define WIFI_MAX_TWT_WAKE_INTERVAL_US 262144
538#define WIFI_MAX_TWT_WAKE_AHEAD_DURATION_US (LONG_MAX - 1)
582#define MAX_REG_CHAN_NUM 42
620#if defined(CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS) || defined(__DOXYGEN__)
651#ifdef CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS
701#ifdef CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS
708typedef void (*raw_scan_result_cb_t)(
struct net_if *iface,
int status,
776#if defined(CONFIG_NET_STATISTICS_WIFI) || defined(__DOXYGEN__)
865#if defined(CONFIG_WIFI_USE_NATIVE_NETWORKING) || defined(__DOXYGEN__)
875#if defined(CONFIG_WIFI_NM_WPA_SUPPLICANT) || defined(__DOXYGEN__)
881#if defined(CONFIG_WIFI_NM_WPA_SUPPLICANT)
929#if defined(CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS) || defined(__DOXYGEN__)
#define NET_MGMT_DEFINE_REQUEST_HANDLER(_mgmt_request)
Definition: net_mgmt.h:96
void wifi_mgmt_raise_connect_result_event(struct net_if *iface, int status)
Wi-Fi management connect result event.
wifi_ps
Wi-Fi power save states.
Definition: wifi.h:211
#define NET_REQUEST_WIFI_PS_CONFIG
Definition: wifi_mgmt.h:136
void wifi_mgmt_raise_twt_sleep_state(struct net_if *iface, int twt_sleep_state)
Wi-Fi management TWT sleep state event.
#define NET_REQUEST_WIFI_SCAN
Definition: wifi_mgmt.h:91
wifi_frequency_bands
IEEE 802.11 operational frequency bands (not exhaustive).
Definition: wifi.h:81
wifi_mfp_options
IEEE 802.11w - Management frame protection.
Definition: wifi.h:62
#define WIFI_MAC_ADDR_LEN
Definition: wifi.h:104
#define NET_REQUEST_WIFI_REG_DOMAIN
Definition: wifi_mgmt.h:140
#define NET_REQUEST_WIFI_PACKET_FILTER
Definition: wifi_mgmt.h:155
wifi_twt_setup_cmd
Wi-Fi Target Wake Time (TWT) setup commands.
Definition: wifi.h:292
wifi_twt_sleep_state
Wi-Fi TWT sleep states.
Definition: wifi_mgmt.h:613
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_disconnect_result_event(struct net_if *iface, int status)
Wi-Fi management disconnect result event.
#define NET_REQUEST_WIFI_IFACE_STATUS
Definition: wifi_mgmt.h:116
#define NET_REQUEST_WIFI_VERSION
Definition: wifi_mgmt.h:170
#define NET_REQUEST_WIFI_PS_MODE
Definition: wifi_mgmt.h:126
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.
wifi_twt_setup_resp_status
Wi-Fi Target Wake Time (TWT) negotiation status.
Definition: wifi.h:315
#define WIFI_MGMT_SCAN_CHAN_MAX_MANUAL
Definition: wifi_mgmt.h:47
wifi_iface_mode
Wi-Fi interface modes.
Definition: wifi.h:148
#define NET_REQUEST_WIFI_PS_TIMEOUT
Definition: wifi_mgmt.h:145
#define WIFI_MAX_TWT_FLOWS
Definition: wifi_mgmt.h:534
#define NET_REQUEST_WIFI_AP_ENABLE
Definition: wifi_mgmt.h:106
#define WIFI_COUNTRY_CODE_LEN
Definition: wifi.h:25
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.
#define NET_REQUEST_WIFI_PS
Definition: wifi_mgmt.h:121
wifi_twt_negotiation_type
Wi-Fi Target Wake Time (TWT) negotiation types.
Definition: wifi.h:279
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_iface_status_event(struct net_if *iface, struct wifi_iface_status *iface_status)
Wi-Fi management interface status event.
wifi_conn_status
Wi-Fi connect result codes.
Definition: wifi_mgmt.h:369
#define WIFI_MGMT_SCAN_SSID_FILT_MAX
Definition: wifi_mgmt.h:41
#define NET_REQUEST_WIFI_DISCONNECT
Definition: wifi_mgmt.h:101
wifi_twt_fail_reason
Target Wake Time (TWT) error codes.
Definition: wifi.h:323
net_request_wifi_cmd
Wi-Fi management commands.
Definition: wifi_mgmt.h:53
#define NET_REQUEST_WIFI_MODE
Definition: wifi_mgmt.h:150
#define NET_REQUEST_WIFI_AP_STA_DISCONNECT
Definition: wifi_mgmt.h:165
void wifi_mgmt_raise_disconnect_complete_event(struct net_if *iface, int status)
Wi-Fi management disconnect complete event.
#define NET_REQUEST_WIFI_CONNECT
Definition: wifi_mgmt.h:96
wifi_ap_status
Wi-Fi AP mode result codes.
Definition: wifi_mgmt.h:399
#define NET_REQUEST_WIFI_TWT
Definition: wifi_mgmt.h:131
wifi_link_mode
Wi-Fi link operating modes.
Definition: wifi.h:174
wifi_ps_param_type
Wi-Fi power save parameters.
Definition: wifi.h:390
net_event_wifi_cmd
Wi-Fi management events.
Definition: wifi_mgmt.h:176
wifi_disconn_reason
Wi-Fi disconnect reason codes.
Definition: wifi_mgmt.h:385
wifi_ps_wakeup_mode
Wi-Fi power save modes.
Definition: wifi.h:404
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.
wifi_twt_operation
Wi-Fi Target Wake Time (TWT) operations.
Definition: wifi.h:268
wifi_scan_type
Wi-Fi scanning types.
Definition: wifi.h:203
void(* scan_result_cb_t)(struct net_if *iface, int status, struct wifi_scan_result *entry)
Scan result callback.
Definition: wifi_mgmt.h:698
wifi_twt_teardown_status
Wi-Fi Target Wake Time (TWT) teradown status.
Definition: wifi.h:349
#define WIFI_SSID_MAX_LEN
Definition: wifi.h:100
#define NET_REQUEST_WIFI_CHANNEL
Definition: wifi_mgmt.h:160
wifi_config_ps_param_fail_reason
Wi-Fi power save error codes.
Definition: wifi.h:415
wifi_security_type
IEEE 802.11 security types.
Definition: wifi.h:35
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.
wifi_mgmt_op
Generic get/set operation for any command.
Definition: wifi_mgmt.h:575
#define NET_REQUEST_WIFI_AP_DISABLE
Definition: wifi_mgmt.h:111
wifi_ps_mode
Wi-Fi power save modes.
Definition: wifi.h:222
@ WIFI_TWT_STATE_SLEEP
TWT sleep state: sleeping.
Definition: wifi_mgmt.h:615
@ WIFI_TWT_STATE_AWAKE
TWT sleep state: awake.
Definition: wifi_mgmt.h:617
@ WIFI_STATUS_CONN_AP_NOT_FOUND
Connection failed - AP not found.
Definition: wifi_mgmt.h:379
@ WIFI_STATUS_CONN_SUCCESS
Connection successful.
Definition: wifi_mgmt.h:371
@ WIFI_STATUS_CONN_WRONG_PASSWORD
Connection failed - wrong password.
Definition: wifi_mgmt.h:375
@ WIFI_STATUS_CONN_FAIL
Connection failed - generic failure.
Definition: wifi_mgmt.h:373
@ WIFI_STATUS_CONN_TIMEOUT
Connection timed out.
Definition: wifi_mgmt.h:377
@ NET_REQUEST_WIFI_CMD_TWT
Setup or teardown TWT flow.
Definition: wifi_mgmt.h:71
@ NET_REQUEST_WIFI_CMD_PACKET_FILTER
Set or get packet filter setting for current mode.
Definition: wifi_mgmt.h:81
@ NET_REQUEST_WIFI_CMD_AP_ENABLE
Enable AP mode.
Definition: wifi_mgmt.h:61
@ NET_REQUEST_WIFI_CMD_REG_DOMAIN
Set or get regulatory domain.
Definition: wifi_mgmt.h:75
@ NET_REQUEST_WIFI_CMD_SCAN
Scan for Wi-Fi networks.
Definition: wifi_mgmt.h:55
@ NET_REQUEST_WIFI_CMD_IFACE_STATUS
Get interface status.
Definition: wifi_mgmt.h:65
@ NET_REQUEST_WIFI_CMD_AP_STA_DISCONNECT
Disconnect a STA from AP.
Definition: wifi_mgmt.h:85
@ NET_REQUEST_WIFI_CMD_AP_DISABLE
Disable AP mode.
Definition: wifi_mgmt.h:63
@ NET_REQUEST_WIFI_CMD_CONNECT
Connect to a Wi-Fi network.
Definition: wifi_mgmt.h:57
@ NET_REQUEST_WIFI_CMD_PS_MODE
Set power save mode.
Definition: wifi_mgmt.h:69
@ NET_REQUEST_WIFI_CMD_VERSION
Get Wi-Fi driver and Firmware versions.
Definition: wifi_mgmt.h:87
@ NET_REQUEST_WIFI_CMD_CHANNEL
Set or get Wi-Fi channel for Monitor or TX-Injection mode.
Definition: wifi_mgmt.h:83
@ NET_REQUEST_WIFI_CMD_MODE
Set or get Mode of operation.
Definition: wifi_mgmt.h:79
@ NET_REQUEST_WIFI_CMD_PS
Set power save status.
Definition: wifi_mgmt.h:67
@ NET_REQUEST_WIFI_CMD_DISCONNECT
Disconnect from a Wi-Fi network.
Definition: wifi_mgmt.h:59
@ NET_REQUEST_WIFI_CMD_PS_CONFIG
Get power save config.
Definition: wifi_mgmt.h:73
@ NET_REQUEST_WIFI_CMD_MAX
Definition: wifi_mgmt.h:88
@ NET_REQUEST_WIFI_CMD_PS_TIMEOUT
Set power save timeout.
Definition: wifi_mgmt.h:77
@ WIFI_STATUS_AP_CHANNEL_NOT_ALLOWED
AP mode enable failed - channel not allowed.
Definition: wifi_mgmt.h:407
@ WIFI_STATUS_AP_SUCCESS
AP mode enable or disable successful.
Definition: wifi_mgmt.h:401
@ WIFI_STATUS_AP_OP_NOT_SUPPORTED
AP mode enable failed - operation not supported.
Definition: wifi_mgmt.h:413
@ WIFI_STATUS_AP_OP_NOT_PERMITTED
AP mode enable failed - operation not permitted.
Definition: wifi_mgmt.h:415
@ WIFI_STATUS_AP_CHANNEL_NOT_SUPPORTED
AP mode enable failed - channel not supported.
Definition: wifi_mgmt.h:405
@ WIFI_STATUS_AP_FAIL
AP mode enable or disable failed - generic failure.
Definition: wifi_mgmt.h:403
@ WIFI_STATUS_AP_AUTH_TYPE_NOT_SUPPORTED
AP mode enable failed - authentication type not supported.
Definition: wifi_mgmt.h:411
@ WIFI_STATUS_AP_SSID_NOT_ALLOWED
AP mode enable failed - SSID not allowed.
Definition: wifi_mgmt.h:409
@ NET_EVENT_WIFI_CMD_AP_STA_DISCONNECTED
STA disconnected from AP.
Definition: wifi_mgmt.h:204
@ NET_EVENT_WIFI_CMD_SCAN_RESULT
Scan results available.
Definition: wifi_mgmt.h:178
@ NET_EVENT_WIFI_CMD_DISCONNECT_RESULT
Disconnect result.
Definition: wifi_mgmt.h:184
@ 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 n...
Definition: wifi_mgmt.h:192
@ NET_EVENT_WIFI_CMD_AP_ENABLE_RESULT
AP mode enable result.
Definition: wifi_mgmt.h:198
@ NET_EVENT_WIFI_CMD_AP_STA_CONNECTED
STA connected to AP.
Definition: wifi_mgmt.h:202
@ NET_EVENT_WIFI_CMD_SCAN_DONE
Scan done.
Definition: wifi_mgmt.h:180
@ NET_EVENT_WIFI_CMD_TWT
TWT events.
Definition: wifi_mgmt.h:188
@ NET_EVENT_WIFI_CMD_RAW_SCAN_RESULT
Raw scan results available.
Definition: wifi_mgmt.h:194
@ NET_EVENT_WIFI_CMD_AP_DISABLE_RESULT
AP mode disable result.
Definition: wifi_mgmt.h:200
@ NET_EVENT_WIFI_CMD_DISCONNECT_COMPLETE
Disconnect complete.
Definition: wifi_mgmt.h:196
@ NET_EVENT_WIFI_CMD_IFACE_STATUS
Interface status.
Definition: wifi_mgmt.h:186
@ NET_EVENT_WIFI_CMD_CONNECT_RESULT
Connect result.
Definition: wifi_mgmt.h:182
@ WIFI_REASON_DISCONN_INACTIVITY
Disconnected due to inactivity.
Definition: wifi_mgmt.h:393
@ WIFI_REASON_DISCONN_AP_LEAVING
Disconnected due to AP leaving.
Definition: wifi_mgmt.h:391
@ WIFI_REASON_DISCONN_UNSPECIFIED
Unspecified reason.
Definition: wifi_mgmt.h:387
@ WIFI_REASON_DISCONN_USER_REQUEST
Disconnected due to user request.
Definition: wifi_mgmt.h:389
@ WIFI_MGMT_GET
Get operation.
Definition: wifi_mgmt.h:577
@ WIFI_MGMT_SET
Set operation.
Definition: wifi_mgmt.h:579
Public API for network interface.
Network Management API public header.
Offloaded network device iface API.
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90
__UINT64_TYPE__ uint64_t
Definition: stdint.h:91
__UINT8_TYPE__ uint8_t
Definition: stdint.h:88
__UINT16_TYPE__ uint16_t
Definition: stdint.h:89
__INT8_TYPE__ int8_t
Definition: stdint.h:72
Runtime device structure (in ROM) per driver instance.
Definition: device.h:387
Definition: ethernet.h:473
Network Interface structure.
Definition: net_if.h:615
All Wi-Fi specific statistics.
Definition: net_stats.h:490
Wi-Fi management offload API.
Definition: wifi_mgmt.h:858
void * wifi_drv_ops
Wi-Fi supplicant driver API.
Definition: wifi_mgmt.h:877
struct ethernet_api wifi_iface
Mandatory to get in first position.
Definition: wifi_mgmt.h:867
const struct wifi_mgmt_ops *const wifi_mgmt_api
Wi-Fi management API.
Definition: wifi_mgmt.h:873
Extended net_if_api for offloaded ifaces/network devices, allowing handling of admin up/down state ch...
Definition: offloaded_netdev.h:51
AP mode - connected STA details.
Definition: wifi_mgmt.h:635
enum wifi_link_mode link_mode
Link mode, see enum wifi_link_mode.
Definition: wifi_mgmt.h:637
uint8_t mac[WIFI_MAC_ADDR_LEN]
MAC address.
Definition: wifi_mgmt.h:639
uint8_t mac_length
MAC address length.
Definition: wifi_mgmt.h:641
bool twt_capable
is TWT capable ?
Definition: wifi_mgmt.h:643
Wi-Fi structure to uniquely identify a band-channel pair.
Definition: wifi_mgmt.h:257
uint8_t band
Frequency band.
Definition: wifi_mgmt.h:259
uint8_t channel
Channel.
Definition: wifi_mgmt.h:261
Wi-Fi channel setting for monitor and TX-injection modes.
Definition: wifi_mgmt.h:681
uint8_t if_index
Interface index.
Definition: wifi_mgmt.h:685
uint16_t channel
Channel value to set.
Definition: wifi_mgmt.h:683
enum wifi_mgmt_op oper
Get or set operation.
Definition: wifi_mgmt.h:687
Wi-Fi connect request parameters.
Definition: wifi_mgmt.h:341
enum wifi_security_type security
Security type.
Definition: wifi_mgmt.h:359
const uint8_t * sae_password
SAE password (same as PSK but with no length restrictions), optional.
Definition: wifi_mgmt.h:351
uint8_t channel
Channel.
Definition: wifi_mgmt.h:357
uint8_t ssid_length
SSID length.
Definition: wifi_mgmt.h:345
int timeout
Connect timeout in seconds, SYS_FOREVER_MS for no timeout.
Definition: wifi_mgmt.h:363
enum wifi_mfp_options mfp
MFP options.
Definition: wifi_mgmt.h:361
uint8_t sae_password_length
SAE password length.
Definition: wifi_mgmt.h:353
uint8_t band
Frequency band.
Definition: wifi_mgmt.h:355
const uint8_t * psk
Pre-shared key.
Definition: wifi_mgmt.h:347
uint8_t psk_length
Pre-shared key length.
Definition: wifi_mgmt.h:349
const uint8_t * ssid
SSID.
Definition: wifi_mgmt.h:343
Wi-Fi filter setting for monitor, prmoiscuous, TX-injection modes.
Definition: wifi_mgmt.h:669
uint16_t buffer_size
Filter buffer size.
Definition: wifi_mgmt.h:675
uint8_t filter
Filter setting.
Definition: wifi_mgmt.h:671
enum wifi_mgmt_op oper
Get or set operation.
Definition: wifi_mgmt.h:677
uint8_t if_index
Interface index.
Definition: wifi_mgmt.h:673
Wi-Fi interface status.
Definition: wifi_mgmt.h:429
char ssid[WIFI_SSID_MAX_LEN]
SSID.
Definition: wifi_mgmt.h:435
unsigned short beacon_interval
Beacon interval.
Definition: wifi_mgmt.h:455
int rssi
RSSI.
Definition: wifi_mgmt.h:451
char bssid[WIFI_MAC_ADDR_LEN]
BSSID.
Definition: wifi_mgmt.h:437
enum wifi_security_type security
Security type, see enum wifi_security_type.
Definition: wifi_mgmt.h:447
unsigned int channel
Channel.
Definition: wifi_mgmt.h:441
enum wifi_mfp_options mfp
MFP options, see enum wifi_mfp_options.
Definition: wifi_mgmt.h:449
unsigned char dtim_period
DTIM period.
Definition: wifi_mgmt.h:453
int state
Interface state, see enum wifi_iface_state.
Definition: wifi_mgmt.h:431
bool twt_capable
is TWT capable?
Definition: wifi_mgmt.h:457
enum wifi_iface_mode iface_mode
Interface mode, see enum wifi_iface_mode.
Definition: wifi_mgmt.h:443
unsigned int ssid_len
SSID length.
Definition: wifi_mgmt.h:433
enum wifi_frequency_bands band
Frequency band.
Definition: wifi_mgmt.h:439
enum wifi_link_mode link_mode
Link mode, see enum wifi_link_mode.
Definition: wifi_mgmt.h:445
Wi-Fi management API.
Definition: wifi_mgmt.h:713
int(* reg_domain)(const struct device *dev, struct wifi_reg_domain *reg_domain)
Set or get regulatory domain.
Definition: wifi_mgmt.h:817
int(* scan)(const struct device *dev, struct wifi_scan_params *params, scan_result_cb_t cb)
Scan for Wi-Fi networks.
Definition: wifi_mgmt.h:725
int(* get_power_save_config)(const struct device *dev, struct wifi_ps_config *config)
Get power save config.
Definition: wifi_mgmt.h:809
int(* disconnect)(const struct device *dev)
Disconnect from a Wi-Fi network.
Definition: wifi_mgmt.h:743
int(* ap_disable)(const struct device *dev)
Disable AP mode.
Definition: wifi_mgmt.h:759
int(* get_stats)(const struct device *dev, struct net_stats_wifi *stats)
Get Wi-Fi statistics.
Definition: wifi_mgmt.h:784
int(* get_version)(const struct device *dev, struct wifi_version *params)
Get Version of WiFi driver and Firmware.
Definition: wifi_mgmt.h:854
int(* set_twt)(const struct device *dev, struct wifi_twt_params *params)
Setup or teardown TWT flow.
Definition: wifi_mgmt.h:801
int(* set_power_save)(const struct device *dev, struct wifi_ps_params *params)
Set power save status.
Definition: wifi_mgmt.h:793
int(* ap_enable)(const struct device *dev, struct wifi_connect_req_params *params)
Enable AP mode.
Definition: wifi_mgmt.h:751
int(* filter)(const struct device *dev, struct wifi_filter_info *filter)
Set or get packet filter settings for monitor and promiscuous modes.
Definition: wifi_mgmt.h:825
int(* iface_status)(const struct device *dev, struct wifi_iface_status *status)
Get interface status.
Definition: wifi_mgmt.h:775
int(* mode)(const struct device *dev, struct wifi_mode_info *mode)
Set or get mode of operation.
Definition: wifi_mgmt.h:833
int(* connect)(const struct device *dev, struct wifi_connect_req_params *params)
Connect to a Wi-Fi network.
Definition: wifi_mgmt.h:735
int(* ap_sta_disconnect)(const struct device *dev, const uint8_t *mac)
Disconnect a STA from AP.
Definition: wifi_mgmt.h:767
int(* channel)(const struct device *dev, struct wifi_channel_info *channel)
Set or get current channel of operation.
Definition: wifi_mgmt.h:841
Wi-Fi mode setup.
Definition: wifi_mgmt.h:659
enum wifi_mgmt_op oper
Get or set operation.
Definition: wifi_mgmt.h:665
uint8_t mode
Mode setting for a specific mode of operation.
Definition: wifi_mgmt.h:661
uint8_t if_index
Interface index.
Definition: wifi_mgmt.h:663
Wi-Fi power save configuration.
Definition: wifi_mgmt.h:565
struct wifi_ps_params ps_params
Power save configuration.
Definition: wifi_mgmt.h:571
char num_twt_flows
Number of TWT flows.
Definition: wifi_mgmt.h:567
struct wifi_twt_flow_info twt_flows[8]
TWT flow details.
Definition: wifi_mgmt.h:569
Wi-Fi power save parameters.
Definition: wifi_mgmt.h:461
enum wifi_ps_mode mode
Wi-Fi power save mode.
Definition: wifi_mgmt.h:469
enum wifi_config_ps_param_fail_reason fail_reason
Wi-Fi power save fail reason.
Definition: wifi_mgmt.h:482
enum wifi_ps_wakeup_mode wakeup_mode
Wi-Fi power save wakeup mode.
Definition: wifi_mgmt.h:467
unsigned short listen_interval
Definition: wifi_mgmt.h:465
enum wifi_ps enabled
Definition: wifi_mgmt.h:463
unsigned int timeout_ms
Wi-Fi power save timeout.
Definition: wifi_mgmt.h:478
enum wifi_ps_param_type type
Wi-Fi power save type.
Definition: wifi_mgmt.h:480
Wi-Fi raw scan result.
Definition: wifi_mgmt.h:622
int8_t rssi
RSSI.
Definition: wifi_mgmt.h:624
uint8_t data[CONFIG_WIFI_MGMT_RAW_SCAN_RESULT_LENGTH]
Raw scan data.
Definition: wifi_mgmt.h:630
int frame_length
Frame length.
Definition: wifi_mgmt.h:626
unsigned short frequency
Frequency.
Definition: wifi_mgmt.h:628
Per-channel regulatory attributes.
Definition: wifi_mgmt.h:585
unsigned short center_frequency
Center frequency in MHz.
Definition: wifi_mgmt.h:587
unsigned short dfs
Is a DFS channel.
Definition: wifi_mgmt.h:595
unsigned short supported
Is channel supported or not.
Definition: wifi_mgmt.h:591
unsigned short passive_only
Passive transmissions only.
Definition: wifi_mgmt.h:593
unsigned short max_power
Maximum transmission power (in dBm)
Definition: wifi_mgmt.h:589
Regulatory domain information or configuration.
Definition: wifi_mgmt.h:599
unsigned int num_channels
Number of channels supported.
Definition: wifi_mgmt.h:607
enum wifi_mgmt_op oper
Definition: wifi_mgmt.h:601
struct wifi_reg_chan_info * chan_info
Channels information.
Definition: wifi_mgmt.h:609
bool force
Ignore all other regulatory hints over this one.
Definition: wifi_mgmt.h:603
uint8_t country_code[WIFI_COUNTRY_CODE_LEN]
Country code: ISO/IEC 3166-1 alpha-2.
Definition: wifi_mgmt.h:605
Wi-Fi scan parameters structure.
Definition: wifi_mgmt.h:269
uint16_t max_bss_cnt
Specifies the maximum number of scan results to return.
Definition: wifi_mgmt.h:298
uint16_t dwell_time_active
Active scan dwell time (in ms) on a channel.
Definition: wifi_mgmt.h:284
enum wifi_scan_type scan_type
Scan type, see enum wifi_scan_type.
Definition: wifi_mgmt.h:277
uint8_t bands
Bitmap of bands to be scanned.
Definition: wifi_mgmt.h:281
uint16_t dwell_time_passive
Passive scan dwell time (in ms) on a channel.
Definition: wifi_mgmt.h:287
const char * ssids[1]
Array of SSID strings to scan.
Definition: wifi_mgmt.h:290
struct wifi_band_channel band_chan[1]
Channel information array indexed on Wi-Fi frequency bands and channels within that band.
Definition: wifi_mgmt.h:313
Wi-Fi scan result, each result is provided to the net_mgmt_event_callback via its info attribute (see...
Definition: wifi_mgmt.h:319
uint8_t ssid_length
SSID length.
Definition: wifi_mgmt.h:323
uint8_t band
Frequency band.
Definition: wifi_mgmt.h:325
uint8_t mac[WIFI_MAC_ADDR_LEN]
BSSID.
Definition: wifi_mgmt.h:335
int8_t rssi
RSSI.
Definition: wifi_mgmt.h:333
uint8_t mac_length
BSSID length.
Definition: wifi_mgmt.h:337
enum wifi_mfp_options mfp
MFP options.
Definition: wifi_mgmt.h:331
uint8_t channel
Channel.
Definition: wifi_mgmt.h:327
uint8_t ssid[WIFI_SSID_MAX_LEN]
SSID.
Definition: wifi_mgmt.h:321
enum wifi_security_type security
Security type.
Definition: wifi_mgmt.h:329
Generic Wi-Fi status for commands and events.
Definition: wifi_mgmt.h:419
enum wifi_ap_status ap_status
Definition: wifi_mgmt.h:424
enum wifi_conn_status conn_status
Definition: wifi_mgmt.h:422
enum wifi_disconn_reason disconn_reason
Definition: wifi_mgmt.h:423
int status
Definition: wifi_mgmt.h:421
Wi-Fi TWT flow information.
Definition: wifi_mgmt.h:541
uint8_t dialog_token
Dialog token, used to map requests to responses.
Definition: wifi_mgmt.h:545
enum wifi_twt_negotiation_type negotiation_type
TWT negotiation type, see enum wifi_twt_negotiation_type.
Definition: wifi_mgmt.h:549
uint32_t twt_wake_ahead_duration
Definition: wifi_mgmt.h:561
bool trigger
Trigger enabled or disabled.
Definition: wifi_mgmt.h:553
bool responder
Requestor or responder.
Definition: wifi_mgmt.h:551
uint8_t flow_id
Flow ID, used to map setup with teardown.
Definition: wifi_mgmt.h:547
uint64_t twt_interval
Interval = Wake up time + Sleeping time.
Definition: wifi_mgmt.h:543
uint32_t twt_wake_interval
Wake up time.
Definition: wifi_mgmt.h:559
bool implicit
Implicit or explicit.
Definition: wifi_mgmt.h:555
bool announce
Announced or unannounced.
Definition: wifi_mgmt.h:557
Wi-Fi TWT parameters.
Definition: wifi_mgmt.h:486
bool announce
Announced or unannounced.
Definition: wifi_mgmt.h:513
bool teardown_all
Teardown all flows.
Definition: wifi_mgmt.h:526
enum wifi_twt_setup_cmd setup_cmd
TWT setup command, see enum wifi_twt_setup_cmd.
Definition: wifi_mgmt.h:492
bool trigger
Trigger enabled or disabled.
Definition: wifi_mgmt.h:509
enum wifi_twt_negotiation_type negotiation_type
TWT negotiation type, see enum wifi_twt_negotiation_type.
Definition: wifi_mgmt.h:490
enum wifi_twt_operation operation
TWT operation, see enum wifi_twt_operation.
Definition: wifi_mgmt.h:488
uint32_t twt_wake_ahead_duration
Definition: wifi_mgmt.h:521
enum wifi_twt_fail_reason fail_reason
TWT fail reason, see enum wifi_twt_fail_reason.
Definition: wifi_mgmt.h:530
uint32_t twt_wake_interval
Wake up time.
Definition: wifi_mgmt.h:515
enum wifi_twt_setup_resp_status resp_status
TWT setup response status, see enum wifi_twt_setup_resp_status.
Definition: wifi_mgmt.h:494
bool implicit
Implicit or explicit.
Definition: wifi_mgmt.h:511
struct wifi_twt_params::@353::@355 setup
Setup specific parameters.
uint8_t flow_id
Flow ID, used to map setup with teardown.
Definition: wifi_mgmt.h:500
enum wifi_twt_teardown_status teardown_status
TWT teardown cmd status, see enum wifi_twt_teardown_status.
Definition: wifi_mgmt.h:496
uint64_t twt_interval
Interval = Wake up time + Sleeping time.
Definition: wifi_mgmt.h:505
struct wifi_twt_params::@353::@356 teardown
Teardown specific parameters.
uint8_t dialog_token
Dialog token, used to map requests to responses.
Definition: wifi_mgmt.h:498
bool responder
Requestor or responder.
Definition: wifi_mgmt.h:507
Wi-Fi version.
Definition: wifi_mgmt.h:247
const char * fw_version
Firmware version.
Definition: wifi_mgmt.h:251
const char * drv_version
Driver version.
Definition: wifi_mgmt.h:249
Definition: wifi_mgmt.h:647
struct wifi_ap_sta_info ap_sta_info
Definition: wifi_mgmt.h:655
struct wifi_iface_status iface_status
Definition: wifi_mgmt.h:650
struct wifi_status connect_status
Definition: wifi_mgmt.h:649
struct wifi_scan_result scan_result
Definition: wifi_mgmt.h:648
struct wifi_twt_params twt_params
Definition: wifi_mgmt.h:654
IEEE 802.11 protocol and general Wi-Fi definitions.