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)
41#define NET_REQUEST_WIFI_SCAN \
42 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_SCAN)
46#define NET_REQUEST_WIFI_CONNECT \
47 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CONNECT)
51#define NET_REQUEST_WIFI_DISCONNECT \
52 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_DISCONNECT)
56#define NET_REQUEST_WIFI_AP_ENABLE \
57 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_ENABLE)
61#define NET_REQUEST_WIFI_AP_DISABLE \
62 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_DISABLE)
66#define NET_REQUEST_WIFI_IFACE_STATUS \
67 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_IFACE_STATUS)
79#define NET_EVENT_WIFI_SCAN_RESULT \
80 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_SCAN_RESULT)
82#define NET_EVENT_WIFI_SCAN_DONE \
83 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_SCAN_DONE)
85#define NET_EVENT_WIFI_CONNECT_RESULT \
86 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_CONNECT_RESULT)
88#define NET_EVENT_WIFI_DISCONNECT_RESULT \
89 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_DISCONNECT_RESULT)
91#define NET_EVENT_WIFI_IFACE_STATUS \
92 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_IFACE_STATUS)
159#ifdef CONFIG_WIFI_USE_NATIVE_NETWORKING
177#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.
__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:435
Definition: ethernet.h:404
Network Interface structure.
Definition: net_if.h:480
All Wi-Fi specific statistics.
Definition: net_stats.h:489
Definition: wifi_mgmt.h:152
struct net_if_api wifi_iface
Definition: wifi_mgmt.h:162
int(* scan)(const struct device *dev, scan_result_cb_t cb)
Definition: wifi_mgmt.h:169
int(* disconnect)(const struct device *dev)
Definition: wifi_mgmt.h:172
int(* ap_disable)(const struct device *dev)
Definition: wifi_mgmt.h:175
int(* ap_enable)(const struct device *dev, struct wifi_connect_req_params *params)
Definition: wifi_mgmt.h:173
int(* connect)(const struct device *dev, struct wifi_connect_req_params *params)
Definition: wifi_mgmt.h:170
int(* iface_status)(const struct device *dev, struct wifi_iface_status *status)
Definition: wifi_mgmt.h:176
Definition: wifi_mgmt.h:112
enum wifi_security_type security
Definition: wifi_mgmt.h:124
uint8_t * psk
Definition: wifi_mgmt.h:116
uint8_t channel
Definition: wifi_mgmt.h:123
uint8_t ssid_length
Definition: wifi_mgmt.h:114
int timeout
Definition: wifi_mgmt.h:126
enum wifi_mfp_options mfp
Definition: wifi_mgmt.h:125
uint8_t sae_password_length
Definition: wifi_mgmt.h:120
uint8_t band
Definition: wifi_mgmt.h:122
uint8_t * sae_password
Definition: wifi_mgmt.h:119
uint8_t psk_length
Definition: wifi_mgmt.h:117
const uint8_t * ssid
Definition: wifi_mgmt.h:113
Definition: wifi_mgmt.h:133
char ssid[WIFI_SSID_MAX_LEN]
Definition: wifi_mgmt.h:136
int rssi
Definition: wifi_mgmt.h:144
char bssid[WIFI_MAC_ADDR_LEN]
Definition: wifi_mgmt.h:137
enum wifi_security_type security
Definition: wifi_mgmt.h:142
unsigned int channel
Definition: wifi_mgmt.h:139
enum wifi_mfp_options mfp
Definition: wifi_mgmt.h:143
int state
Definition: wifi_mgmt.h:134
enum wifi_iface_mode iface_mode
Definition: wifi_mgmt.h:140
unsigned int ssid_len
Definition: wifi_mgmt.h:135
enum wifi_frequency_bands band
Definition: wifi_mgmt.h:138
enum wifi_link_mode link_mode
Definition: wifi_mgmt.h:141
Definition: wifi_mgmt.h:98
uint8_t ssid_length
Definition: wifi_mgmt.h:100
uint8_t band
Definition: wifi_mgmt.h:102
uint8_t mac[WIFI_MAC_ADDR_LEN]
Definition: wifi_mgmt.h:108
int8_t rssi
Definition: wifi_mgmt.h:106
uint8_t mac_length
Definition: wifi_mgmt.h:109
enum wifi_mfp_options mfp
Definition: wifi_mgmt.h:105
uint8_t channel
Definition: wifi_mgmt.h:103
uint8_t ssid[WIFI_SSID_MAX_LEN]
Definition: wifi_mgmt.h:99
enum wifi_security_type security
Definition: wifi_mgmt.h:104
Definition: wifi_mgmt.h:129
int status
Definition: wifi_mgmt.h:130
General WiFi Definitions.
wifi_frequency_bands
Definition: wifi.h:78
wifi_mfp_options
Definition: wifi.h:50
#define WIFI_MAC_ADDR_LEN
Definition: wifi.h:108
wifi_iface_mode
Definition: wifi.h:164
wifi_link_mode
Definition: wifi.h:202
#define WIFI_SSID_MAX_LEN
Definition: wifi.h:106
wifi_security_type
Definition: wifi.h:18
void wifi_mgmt_raise_connect_result_event(struct net_if *iface, int status)
#define NET_REQUEST_WIFI_SCAN
Definition: wifi_mgmt.h:41
void wifi_mgmt_raise_disconnect_result_event(struct net_if *iface, int status)
#define NET_REQUEST_WIFI_IFACE_STATUS
Definition: wifi_mgmt.h:66
#define NET_REQUEST_WIFI_AP_ENABLE
Definition: wifi_mgmt.h:56
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:51
net_request_wifi_cmd
Definition: wifi_mgmt.h:32
@ NET_REQUEST_WIFI_CMD_AP_ENABLE
Definition: wifi_mgmt.h:36
@ 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_DISCONNECT
Definition: wifi_mgmt.h:35
#define NET_REQUEST_WIFI_CONNECT
Definition: wifi_mgmt.h:46
net_event_wifi_cmd
Definition: wifi_mgmt.h:71
@ NET_EVENT_WIFI_CMD_SCAN_RESULT
Definition: wifi_mgmt.h:72
@ NET_EVENT_WIFI_CMD_DISCONNECT_RESULT
Definition: wifi_mgmt.h:75
@ NET_EVENT_WIFI_CMD_SCAN_DONE
Definition: wifi_mgmt.h:73
@ NET_EVENT_WIFI_CMD_IFACE_STATUS
Definition: wifi_mgmt.h:76
@ NET_EVENT_WIFI_CMD_CONNECT_RESULT
Definition: wifi_mgmt.h:74
void(* scan_result_cb_t)(struct net_if *iface, int status, struct wifi_scan_result *entry)
Definition: wifi_mgmt.h:149
#define NET_REQUEST_WIFI_AP_DISABLE
Definition: wifi_mgmt.h:61