12#ifndef ZEPHYR_INCLUDE_NET_WIFI_MGMT_H_
13#define ZEPHYR_INCLUDE_NET_WIFI_MGMT_H_
25#define _NET_WIFI_LAYER NET_MGMT_LAYER_L2
26#define _NET_WIFI_CODE 0x156
27#define _NET_WIFI_BASE (NET_MGMT_IFACE_BIT | \
28 NET_MGMT_LAYER(_NET_WIFI_LAYER) | \
29 NET_MGMT_LAYER_CODE(_NET_WIFI_CODE))
30#define _NET_WIFI_EVENT (_NET_WIFI_BASE | NET_MGMT_EVENT_BIT)
47#define NET_REQUEST_WIFI_SCAN \
48 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_SCAN)
52#define NET_REQUEST_WIFI_CONNECT \
53 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CONNECT)
57#define NET_REQUEST_WIFI_DISCONNECT \
58 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_DISCONNECT)
62#define NET_REQUEST_WIFI_AP_ENABLE \
63 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_ENABLE)
67#define NET_REQUEST_WIFI_AP_DISABLE \
68 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_DISABLE)
72#define NET_REQUEST_WIFI_IFACE_STATUS \
73 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_IFACE_STATUS)
77#define NET_REQUEST_WIFI_PS \
78 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PS)
82#define NET_REQUEST_WIFI_PS_MODE \
83 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PS_MODE)
87#define NET_REQUEST_WIFI_TWT \
88 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_TWT)
92#define NET_REQUEST_WIFI_PS_CONFIG \
93 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PS_CONFIG)
96#define NET_REQUEST_WIFI_REG_DOMAIN \
97 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_REG_DOMAIN)
101#define NET_REQUEST_WIFI_PS_TIMEOUT \
102 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PS_TIMEOUT)
115#define NET_EVENT_WIFI_SCAN_RESULT \
116 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_SCAN_RESULT)
118#define NET_EVENT_WIFI_SCAN_DONE \
119 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_SCAN_DONE)
121#define NET_EVENT_WIFI_CONNECT_RESULT \
122 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_CONNECT_RESULT)
124#define NET_EVENT_WIFI_DISCONNECT_RESULT \
125 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_DISCONNECT_RESULT)
127#define NET_EVENT_WIFI_IFACE_STATUS \
128 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_IFACE_STATUS)
130#define NET_EVENT_WIFI_TWT \
131 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_TWT)
224#define WIFI_MAX_TWT_FLOWS 8
225#define WIFI_MAX_TWT_INTERVAL_MS 0x7FFFFFFF
274#ifdef CONFIG_WIFI_USE_NATIVE_NETWORKING
292#ifdef CONFIG_NET_STATISTICS_WIFI
#define NET_MGMT_DEFINE_REQUEST_HANDLER(_mgmt_request)
Definition: net_mgmt.h:95
Public API for network interface.
Network Management API public header.
__UINT32_TYPE__ uint32_t
Definition: stdint.h:90
__UINT8_TYPE__ uint8_t
Definition: stdint.h:88
__INT8_TYPE__ int8_t
Definition: stdint.h:72
Runtime device structure (in ROM) per driver instance.
Definition: device.h:378
Definition: ethernet.h:404
Network Interface structure.
Definition: net_if.h:510
All Wi-Fi specific statistics.
Definition: net_stats.h:490
Definition: wifi_mgmt.h:267
int(* set_twt)(const struct device *dev, struct wifi_twt_params *params)
Definition: wifi_mgmt.h:297
struct net_if_api wifi_iface
Definition: wifi_mgmt.h:277
int(* set_power_save_mode)(const struct device *dev, struct wifi_ps_mode_params *params)
Definition: wifi_mgmt.h:296
int(* get_power_save_config)(const struct device *dev, struct wifi_ps_config *config)
Definition: wifi_mgmt.h:298
int(* set_power_save)(const struct device *dev, struct wifi_ps_params *params)
Definition: wifi_mgmt.h:295
int(* scan)(const struct device *dev, scan_result_cb_t cb)
Definition: wifi_mgmt.h:284
int(* disconnect)(const struct device *dev)
Definition: wifi_mgmt.h:287
int(* set_power_save_timeout)(const struct device *dev, struct wifi_ps_timeout_params *ps_timeout)
Definition: wifi_mgmt.h:300
int(* reg_domain)(const struct device *dev, struct wifi_reg_domain *reg_domain)
Definition: wifi_mgmt.h:299
int(* ap_disable)(const struct device *dev)
Definition: wifi_mgmt.h:290
int(* ap_enable)(const struct device *dev, struct wifi_connect_req_params *params)
Definition: wifi_mgmt.h:288
int(* connect)(const struct device *dev, struct wifi_connect_req_params *params)
Definition: wifi_mgmt.h:285
int(* iface_status)(const struct device *dev, struct wifi_iface_status *status)
Definition: wifi_mgmt.h:291
Definition: wifi_mgmt.h:150
enum wifi_security_type security
Definition: wifi_mgmt.h:162
uint8_t * psk
Definition: wifi_mgmt.h:154
uint8_t channel
Definition: wifi_mgmt.h:161
uint8_t ssid_length
Definition: wifi_mgmt.h:152
int timeout
Definition: wifi_mgmt.h:164
enum wifi_mfp_options mfp
Definition: wifi_mgmt.h:163
uint8_t sae_password_length
Definition: wifi_mgmt.h:158
uint8_t band
Definition: wifi_mgmt.h:160
uint8_t * sae_password
Definition: wifi_mgmt.h:157
uint8_t psk_length
Definition: wifi_mgmt.h:155
const uint8_t * ssid
Definition: wifi_mgmt.h:151
Definition: wifi_mgmt.h:171
char ssid[WIFI_SSID_MAX_LEN]
Definition: wifi_mgmt.h:174
int rssi
Definition: wifi_mgmt.h:182
char bssid[WIFI_MAC_ADDR_LEN]
Definition: wifi_mgmt.h:175
enum wifi_security_type security
Definition: wifi_mgmt.h:180
unsigned int channel
Definition: wifi_mgmt.h:177
enum wifi_mfp_options mfp
Definition: wifi_mgmt.h:181
int state
Definition: wifi_mgmt.h:172
enum wifi_iface_mode iface_mode
Definition: wifi_mgmt.h:178
unsigned int ssid_len
Definition: wifi_mgmt.h:173
enum wifi_frequency_bands band
Definition: wifi_mgmt.h:176
enum wifi_link_mode link_mode
Definition: wifi_mgmt.h:179
Definition: wifi_mgmt.h:242
bool enabled
Definition: wifi_mgmt.h:244
char num_twt_flows
Definition: wifi_mgmt.h:246
struct wifi_twt_flow_info twt_flows[8]
Definition: wifi_mgmt.h:243
enum wifi_ps_mode mode
Definition: wifi_mgmt.h:245
Definition: wifi_mgmt.h:189
enum wifi_ps_mode mode
Definition: wifi_mgmt.h:190
Definition: wifi_mgmt.h:185
enum wifi_ps enabled
Definition: wifi_mgmt.h:186
Definition: wifi_mgmt.h:193
int timeout_ms
Definition: wifi_mgmt.h:194
Definition: wifi_mgmt.h:255
enum wifi_mgmt_op oper
Definition: wifi_mgmt.h:256
bool force
Definition: wifi_mgmt.h:258
uint8_t country_code[WIFI_COUNTRY_CODE_LEN]
Definition: wifi_mgmt.h:259
Definition: wifi_mgmt.h:136
uint8_t ssid_length
Definition: wifi_mgmt.h:138
uint8_t band
Definition: wifi_mgmt.h:140
uint8_t mac[WIFI_MAC_ADDR_LEN]
Definition: wifi_mgmt.h:146
int8_t rssi
Definition: wifi_mgmt.h:144
uint8_t mac_length
Definition: wifi_mgmt.h:147
enum wifi_mfp_options mfp
Definition: wifi_mgmt.h:143
uint8_t channel
Definition: wifi_mgmt.h:141
uint8_t ssid[WIFI_SSID_MAX_LEN]
Definition: wifi_mgmt.h:137
enum wifi_security_type security
Definition: wifi_mgmt.h:142
Definition: wifi_mgmt.h:167
int status
Definition: wifi_mgmt.h:168
Definition: wifi_mgmt.h:226
uint8_t dialog_token
Definition: wifi_mgmt.h:230
uint8_t twt_wake_interval_ms
Definition: wifi_mgmt.h:239
uint32_t twt_interval_ms
Definition: wifi_mgmt.h:228
enum wifi_twt_negotiation_type negotiation_type
Definition: wifi_mgmt.h:233
bool trigger
Definition: wifi_mgmt.h:235
bool responder
Definition: wifi_mgmt.h:234
uint8_t flow_id
Definition: wifi_mgmt.h:232
bool implicit
Definition: wifi_mgmt.h:236
bool announce
Definition: wifi_mgmt.h:237
Definition: wifi_mgmt.h:197
bool announce
Definition: wifi_mgmt.h:212
bool teardown_all
Definition: wifi_mgmt.h:218
uint8_t twt_wake_interval_ms
Definition: wifi_mgmt.h:214
uint32_t twt_interval_ms
Definition: wifi_mgmt.h:208
enum wifi_twt_setup_cmd setup_cmd
Definition: wifi_mgmt.h:200
bool trigger
Definition: wifi_mgmt.h:210
enum wifi_twt_negotiation_type negotiation_type
Definition: wifi_mgmt.h:199
enum wifi_twt_operation operation
Definition: wifi_mgmt.h:198
struct wifi_twt_params::@262::@265 teardown
bool implicit
Definition: wifi_mgmt.h:211
uint8_t flow_id
Definition: wifi_mgmt.h:204
struct wifi_twt_params::@262::@264 setup
uint8_t dialog_token
Definition: wifi_mgmt.h:202
bool responder
Definition: wifi_mgmt.h:209
General WiFi Definitions.
wifi_ps
Definition: wifi.h:250
wifi_frequency_bands
Definition: wifi.h:80
wifi_mfp_options
Definition: wifi.h:52
#define WIFI_MAC_ADDR_LEN
Definition: wifi.h:110
wifi_twt_setup_cmd
Definition: wifi.h:295
wifi_iface_mode
Definition: wifi.h:166
#define WIFI_COUNTRY_CODE_LEN
Definition: wifi.h:15
wifi_twt_negotiation_type
Definition: wifi.h:283
wifi_link_mode
Definition: wifi.h:204
wifi_twt_operation
Definition: wifi.h:273
#define WIFI_SSID_MAX_LEN
Definition: wifi.h:108
wifi_security_type
Definition: wifi.h:20
wifi_ps_mode
Definition: wifi.h:260
void wifi_mgmt_raise_connect_result_event(struct net_if *iface, int status)
#define NET_REQUEST_WIFI_PS_CONFIG
Definition: wifi_mgmt.h:92
#define NET_REQUEST_WIFI_SCAN
Definition: wifi_mgmt.h:47
#define NET_REQUEST_WIFI_REG_DOMAIN
Definition: wifi_mgmt.h:96
void wifi_mgmt_raise_twt_event(struct net_if *iface, struct wifi_twt_params *twt_params)
void wifi_mgmt_raise_disconnect_result_event(struct net_if *iface, int status)
#define NET_REQUEST_WIFI_IFACE_STATUS
Definition: wifi_mgmt.h:72
#define NET_REQUEST_WIFI_PS_MODE
Definition: wifi_mgmt.h:82
#define NET_REQUEST_WIFI_PS_TIMEOUT
Definition: wifi_mgmt.h:101
#define WIFI_MAX_TWT_FLOWS
Definition: wifi_mgmt.h:224
#define NET_REQUEST_WIFI_AP_ENABLE
Definition: wifi_mgmt.h:62
#define NET_REQUEST_WIFI_PS
Definition: wifi_mgmt.h:77
void wifi_mgmt_raise_iface_status_event(struct net_if *iface, struct wifi_iface_status *iface_status)
#define NET_REQUEST_WIFI_DISCONNECT
Definition: wifi_mgmt.h:57
net_request_wifi_cmd
Definition: wifi_mgmt.h:32
@ NET_REQUEST_WIFI_CMD_TWT
Definition: wifi_mgmt.h:41
@ NET_REQUEST_WIFI_CMD_AP_ENABLE
Definition: wifi_mgmt.h:36
@ NET_REQUEST_WIFI_CMD_REG_DOMAIN
Definition: wifi_mgmt.h:43
@ NET_REQUEST_WIFI_CMD_SCAN
Definition: wifi_mgmt.h:33
@ NET_REQUEST_WIFI_CMD_IFACE_STATUS
Definition: wifi_mgmt.h:38
@ NET_REQUEST_WIFI_CMD_AP_DISABLE
Definition: wifi_mgmt.h:37
@ NET_REQUEST_WIFI_CMD_CONNECT
Definition: wifi_mgmt.h:34
@ NET_REQUEST_WIFI_CMD_PS_MODE
Definition: wifi_mgmt.h:40
@ NET_REQUEST_WIFI_CMD_PS
Definition: wifi_mgmt.h:39
@ NET_REQUEST_WIFI_CMD_DISCONNECT
Definition: wifi_mgmt.h:35
@ NET_REQUEST_WIFI_CMD_PS_CONFIG
Definition: wifi_mgmt.h:42
@ NET_REQUEST_WIFI_CMD_PS_TIMEOUT
Definition: wifi_mgmt.h:44
#define NET_REQUEST_WIFI_CONNECT
Definition: wifi_mgmt.h:52
#define NET_REQUEST_WIFI_TWT
Definition: wifi_mgmt.h:87
net_event_wifi_cmd
Definition: wifi_mgmt.h:106
@ NET_EVENT_WIFI_CMD_SCAN_RESULT
Definition: wifi_mgmt.h:107
@ NET_EVENT_WIFI_CMD_DISCONNECT_RESULT
Definition: wifi_mgmt.h:110
@ NET_EVENT_WIFI_CMD_SCAN_DONE
Definition: wifi_mgmt.h:108
@ NET_EVENT_WIFI_CMD_TWT
Definition: wifi_mgmt.h:112
@ NET_EVENT_WIFI_CMD_IFACE_STATUS
Definition: wifi_mgmt.h:111
@ NET_EVENT_WIFI_CMD_CONNECT_RESULT
Definition: wifi_mgmt.h:109
void(* scan_result_cb_t)(struct net_if *iface, int status, struct wifi_scan_result *entry)
Definition: wifi_mgmt.h:264
wifi_mgmt_op
Definition: wifi_mgmt.h:250
@ WIFI_MGMT_GET
Definition: wifi_mgmt.h:251
@ WIFI_MGMT_SET
Definition: wifi_mgmt.h:252
#define NET_REQUEST_WIFI_AP_DISABLE
Definition: wifi_mgmt.h:67