Zephyr API Documentation 3.7.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
wifi_mgmt.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2017 Intel Corporation.
3 * Copyright 2024 NXP
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 */
7
13#ifndef ZEPHYR_INCLUDE_NET_WIFI_MGMT_H_
14#define ZEPHYR_INCLUDE_NET_WIFI_MGMT_H_
15
16#include <zephyr/net/net_mgmt.h>
17#include <zephyr/net/wifi.h>
18#include <zephyr/net/ethernet.h>
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
30/* Management part definitions */
31
34#define _NET_WIFI_LAYER NET_MGMT_LAYER_L2
35#define _NET_WIFI_CODE 0x156
36#define _NET_WIFI_BASE (NET_MGMT_IFACE_BIT | \
37 NET_MGMT_LAYER(_NET_WIFI_LAYER) | \
38 NET_MGMT_LAYER_CODE(_NET_WIFI_CODE))
39#define _NET_WIFI_EVENT (_NET_WIFI_BASE | NET_MGMT_EVENT_BIT)
40
41#ifdef CONFIG_WIFI_MGMT_SCAN_SSID_FILT_MAX
42#define WIFI_MGMT_SCAN_SSID_FILT_MAX CONFIG_WIFI_MGMT_SCAN_SSID_FILT_MAX
43#else
44#define WIFI_MGMT_SCAN_SSID_FILT_MAX 1
45#endif /* CONFIG_WIFI_MGMT_SCAN_SSID_FILT_MAX */
46
47#ifdef CONFIG_WIFI_MGMT_SCAN_CHAN_MAX_MANUAL
48#define WIFI_MGMT_SCAN_CHAN_MAX_MANUAL CONFIG_WIFI_MGMT_SCAN_CHAN_MAX_MANUAL
49#else
50#define WIFI_MGMT_SCAN_CHAN_MAX_MANUAL 1
51#endif /* CONFIG_WIFI_MGMT_SCAN_CHAN_MAX_MANUAL */
52
53#define WIFI_MGMT_BAND_STR_SIZE_MAX 8
54#define WIFI_MGMT_SCAN_MAX_BSS_CNT 65535
55
56#define WIFI_MGMT_SKIP_INACTIVITY_POLL IS_ENABLED(CONFIG_WIFI_MGMT_AP_STA_SKIP_INACTIVITY_POLL)
115
117#define NET_REQUEST_WIFI_SCAN \
118 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_SCAN)
119
121
123#define NET_REQUEST_WIFI_CONNECT \
124 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CONNECT)
125
127
129#define NET_REQUEST_WIFI_DISCONNECT \
130 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_DISCONNECT)
131
133
135#define NET_REQUEST_WIFI_AP_ENABLE \
136 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_ENABLE)
137
139
141#define NET_REQUEST_WIFI_AP_DISABLE \
142 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_DISABLE)
143
145
147#define NET_REQUEST_WIFI_IFACE_STATUS \
148 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_IFACE_STATUS)
149
151
153#define NET_REQUEST_WIFI_PS \
154 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PS)
155
157
159#define NET_REQUEST_WIFI_TWT \
160 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_TWT)
161
163
165#define NET_REQUEST_WIFI_PS_CONFIG \
166 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PS_CONFIG)
167
169
171#define NET_REQUEST_WIFI_REG_DOMAIN \
172 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_REG_DOMAIN)
173
175
177#define NET_REQUEST_WIFI_MODE \
178 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_MODE)
179
181
183#define NET_REQUEST_WIFI_PACKET_FILTER \
184 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PACKET_FILTER)
185
187
189#define NET_REQUEST_WIFI_CHANNEL \
190 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CHANNEL)
191
193
195#define NET_REQUEST_WIFI_AP_STA_DISCONNECT \
196 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_STA_DISCONNECT)
197
199
201#define NET_REQUEST_WIFI_VERSION \
202 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_VERSION)
203
205
207#define NET_REQUEST_WIFI_CONN_PARAMS \
208 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CONN_PARAMS)
209
211
213#define NET_REQUEST_WIFI_RTS_THRESHOLD \
214 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_RTS_THRESHOLD)
215
217
219#define NET_REQUEST_WIFI_AP_CONFIG_PARAM \
220 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_CONFIG_PARAM)
221
223
225#define NET_REQUEST_WIFI_DPP \
226 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_DPP)
227
229
230#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_WNM
232#define NET_REQUEST_WIFI_BTM_QUERY (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_BTM_QUERY)
233
234NET_MGMT_DEFINE_REQUEST_HANDLER(NET_REQUEST_WIFI_BTM_QUERY);
235#endif
236
238#define NET_REQUEST_WIFI_PMKSA_FLUSH \
239 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PMKSA_FLUSH)
240
242
244#define NET_REQUEST_WIFI_ENTERPRISE_CREDS \
245 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_ENTERPRISE_CREDS)
246
248
250#define NET_REQUEST_WIFI_RTS_THRESHOLD_CONFIG \
251 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_RTS_THRESHOLD_CONFIG)
252
254
255#define NET_REQUEST_WIFI_WPS_CONFIG (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_WPS_CONFIG)
256
258
290
292#define NET_EVENT_WIFI_SCAN_RESULT \
293 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_SCAN_RESULT)
294
296#define NET_EVENT_WIFI_SCAN_DONE \
297 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_SCAN_DONE)
298
300#define NET_EVENT_WIFI_CONNECT_RESULT \
301 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_CONNECT_RESULT)
302
304#define NET_EVENT_WIFI_DISCONNECT_RESULT \
305 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_DISCONNECT_RESULT)
306
308#define NET_EVENT_WIFI_IFACE_STATUS \
309 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_IFACE_STATUS)
310
312#define NET_EVENT_WIFI_TWT \
313 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_TWT)
314
316#define NET_EVENT_WIFI_TWT_SLEEP_STATE \
317 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_TWT_SLEEP_STATE)
318
320#define NET_EVENT_WIFI_RAW_SCAN_RESULT \
321 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_RAW_SCAN_RESULT)
322
324#define NET_EVENT_WIFI_DISCONNECT_COMPLETE \
325 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_DISCONNECT_COMPLETE)
326
328#define NET_EVENT_WIFI_AP_ENABLE_RESULT \
329 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_ENABLE_RESULT)
330
332#define NET_EVENT_WIFI_AP_DISABLE_RESULT \
333 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_DISABLE_RESULT)
334
336#define NET_EVENT_WIFI_AP_STA_CONNECTED \
337 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_STA_CONNECTED)
338
340#define NET_EVENT_WIFI_AP_STA_DISCONNECTED \
341 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_STA_DISCONNECTED)
342
346 const char *drv_version;
348 const char *fw_version;
349};
350
360
412
436
472
499
515
537
551
585
610
658
661/* Flow ID is only 3 bits */
662#define WIFI_MAX_TWT_FLOWS 8
663#define WIFI_MAX_TWT_INTERVAL_US (LONG_MAX - 1)
664/* 256 (u8) * 1TU */
665#define WIFI_MAX_TWT_WAKE_INTERVAL_US 262144
666#define WIFI_MAX_TWT_WAKE_AHEAD_DURATION_US (LONG_MAX - 1)
667
693
709
715 struct wifi_twt_flow_info twt_flows[WIFI_MAX_TWT_FLOWS];
718};
719
727
729#define MAX_REG_CHAN_NUM 42
730
734 unsigned short center_frequency;
736 unsigned short max_power:8;
738 unsigned short supported:1;
740 unsigned short passive_only:1;
742 unsigned short dfs:1;
743} __packed;
744
758
766
767#if defined(CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS) || defined(__DOXYGEN__)
775 unsigned short frequency;
777 uint8_t data[CONFIG_WIFI_MGMT_RAW_SCAN_RESULT_LENGTH];
778};
779#endif /* CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS */
780
792
795/* for use in max info size calculations */
796union wifi_mgmt_events {
797 struct wifi_scan_result scan_result;
798 struct wifi_status connect_status;
799 struct wifi_iface_status iface_status;
800#ifdef CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS
801 struct wifi_raw_scan_result raw_scan_result;
802#endif /* CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS */
803 struct wifi_twt_params twt_params;
804 struct wifi_ap_sta_info ap_sta_info;
805};
806
818
830
840
842#define WIFI_AP_STA_MAX_INACTIVITY (LONG_MAX - 1)
854
857#define WIFI_DPP_QRCODE_MAX_LEN 255
858
884
902
914
929
944
950 union {
952 struct wifi_dpp_configurator_add_params {
954 int curve;
959 struct wifi_dpp_auth_init_params {
961 int peer;
965 int role;
967 int conf;
969 char ssid[WIFI_SSID_MAX_LEN + 1];
972 struct wifi_dpp_chirp_params {
974 int id;
976 int freq;
979 struct wifi_dpp_listen_params {
981 int freq;
983 int role;
986 struct wifi_dpp_bootstrap_gen_params {
988 int type;
992 int chan;
994 int curve;
999 struct wifi_dpp_configurator_set_params {
1001 int peer;
1003 int configurator;
1005 int role;
1007 int conf;
1009 int curve;
1011 int net_access_key_curve;
1013 char ssid[WIFI_SSID_MAX_LEN + 1];
1016 int id;
1028 };
1029};
1030
1031#define WIFI_WPS_PIN_MAX_LEN 8
1032
1042
1050
1051#include <zephyr/net/net_if.h>
1052
1059typedef void (*scan_result_cb_t)(struct net_if *iface, int status,
1060 struct wifi_scan_result *entry);
1061
1062#ifdef CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS
1069typedef void (*raw_scan_result_cb_t)(struct net_if *iface, int status,
1070 struct wifi_raw_scan_result *entry);
1071#endif /* CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS */
1072
1086 int (*scan)(const struct device *dev,
1087 struct wifi_scan_params *params,
1088 scan_result_cb_t cb);
1096 int (*connect)(const struct device *dev,
1097 struct wifi_connect_req_params *params);
1104 int (*disconnect)(const struct device *dev);
1112 int (*ap_enable)(const struct device *dev,
1113 struct wifi_connect_req_params *params);
1120 int (*ap_disable)(const struct device *dev);
1128 int (*ap_sta_disconnect)(const struct device *dev, const uint8_t *mac);
1136 int (*iface_status)(const struct device *dev, struct wifi_iface_status *status);
1137#if defined(CONFIG_NET_STATISTICS_WIFI) || defined(__DOXYGEN__)
1145 int (*get_stats)(const struct device *dev, struct net_stats_wifi *stats);
1152 int (*reset_stats)(const struct device *dev);
1153#endif /* CONFIG_NET_STATISTICS_WIFI */
1161 int (*set_power_save)(const struct device *dev, struct wifi_ps_params *params);
1169 int (*set_twt)(const struct device *dev, struct wifi_twt_params *params);
1177 int (*get_power_save_config)(const struct device *dev, struct wifi_ps_config *config);
1185 int (*reg_domain)(const struct device *dev, struct wifi_reg_domain *reg_domain);
1193 int (*filter)(const struct device *dev, struct wifi_filter_info *filter);
1201 int (*mode)(const struct device *dev, struct wifi_mode_info *mode);
1209 int (*channel)(const struct device *dev, struct wifi_channel_info *channel);
1210#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_WNM
1218 int (*btm_query)(const struct device *dev, uint8_t reason);
1219#endif
1232 int (*get_version)(const struct device *dev, struct wifi_version *params);
1240 int (*get_conn_params)(const struct device *dev, struct wifi_connect_req_params *params);
1248 int (*set_rts_threshold)(const struct device *dev, unsigned int rts_threshold);
1256 int (*ap_config_params)(const struct device *dev, struct wifi_ap_config_params *params);
1264 int (*dpp_dispatch)(const struct device *dev, struct wifi_dpp_params *params);
1271 int (*pmksa_flush)(const struct device *dev);
1279#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE
1280 int (*enterprise_creds)(const struct device *dev,
1281 struct wifi_enterprise_creds_params *creds);
1282#endif
1290 int (*get_rts_threshold)(const struct device *dev, unsigned int *rts_threshold);
1298 int (*wps_config)(const struct device *dev, struct wifi_wps_config_params *params);
1299};
1300
1309#if defined(CONFIG_WIFI_USE_NATIVE_NETWORKING) || defined(__DOXYGEN__)
1312#else
1315#endif
1317 const struct wifi_mgmt_ops *const wifi_mgmt_api;
1318
1319#if defined(CONFIG_WIFI_NM_WPA_SUPPLICANT) || defined(__DOXYGEN__)
1321 const void *wifi_drv_ops;
1322#endif
1323};
1324
1325#if defined(CONFIG_WIFI_NM_WPA_SUPPLICANT)
1326/* Make sure wifi_drv_ops is after wifi_mgmt_api */
1327BUILD_ASSERT(offsetof(struct net_wifi_mgmt_offload, wifi_mgmt_api) <
1328 offsetof(struct net_wifi_mgmt_offload, wifi_drv_ops));
1329#endif
1330
1331/* Make sure that the network interface API is properly setup inside
1332 * Wifi mgmt offload API struct (it is the first one).
1333 */
1334BUILD_ASSERT(offsetof(struct net_wifi_mgmt_offload, wifi_iface) == 0);
1335
1341void wifi_mgmt_raise_connect_result_event(struct net_if *iface, int status);
1342
1348void wifi_mgmt_raise_disconnect_result_event(struct net_if *iface, int status);
1349
1357
1364 struct wifi_twt_params *twt_params);
1365
1371void wifi_mgmt_raise_twt_sleep_state(struct net_if *iface, int twt_sleep_state);
1372
1373#if defined(CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS) || defined(__DOXYGEN__)
1380 struct wifi_raw_scan_result *raw_scan_info);
1381#endif /* CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS */
1382
1389
1396
1403
1410 struct wifi_ap_sta_info *sta_info);
1411
1417 struct wifi_ap_sta_info *sta_info);
1418
1422#ifdef __cplusplus
1423}
1424#endif
1425
1426#endif /* ZEPHYR_INCLUDE_NET_WIFI_MGMT_H_ */
Ethernet.
#define NET_MGMT_DEFINE_REQUEST_HANDLER(_mgmt_request)
Declare a request handler function for the given network event.
Definition net_mgmt.h:111
void wifi_mgmt_raise_connect_result_event(struct net_if *iface, int status)
Wi-Fi management connect result event.
#define NET_REQUEST_WIFI_DPP
Request a Wi-Fi DPP operation.
Definition wifi_mgmt.h:225
wifi_ps
Wi-Fi power save states.
Definition wifi.h:264
#define NET_REQUEST_WIFI_PS_CONFIG
Request a Wi-Fi power save configuration.
Definition wifi_mgmt.h:165
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
Request a Wi-Fi scan.
Definition wifi_mgmt.h:117
wifi_frequency_bands
IEEE 802.11 operational frequency bands (not exhaustive).
Definition wifi.h:104
wifi_mfp_options
IEEE 802.11w - Management frame protection.
Definition wifi.h:83
#define NET_REQUEST_WIFI_RTS_THRESHOLD
Request a Wi-Fi RTS threshold.
Definition wifi_mgmt.h:213
#define WIFI_WPS_PIN_MAX_LEN
Definition wifi_mgmt.h:1031
#define NET_REQUEST_WIFI_RTS_THRESHOLD_CONFIG
Request a Wi-Fi RTS threshold configuration.
Definition wifi_mgmt.h:250
#define WIFI_MAC_ADDR_LEN
MAC address length.
Definition wifi.h:132
#define NET_REQUEST_WIFI_REG_DOMAIN
Request a Wi-Fi regulatory domain.
Definition wifi_mgmt.h:171
#define NET_REQUEST_WIFI_PACKET_FILTER
Request Wi-Fi packet filter.
Definition wifi_mgmt.h:183
wifi_twt_setup_cmd
Wi-Fi Target Wake Time (TWT) setup commands.
Definition wifi.h:346
wifi_twt_sleep_state
Wi-Fi TWT sleep states.
Definition wifi_mgmt.h:760
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
Request a Wi-Fi network interface status.
Definition wifi_mgmt.h:147
#define NET_REQUEST_WIFI_VERSION
Request a Wi-Fi version.
Definition wifi_mgmt.h:201
#define WIFI_DPP_QRCODE_MAX_LEN
Wi-Fi DPP configuration parameter.
Definition wifi_mgmt.h:857
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_wps_op
Operation for WPS.
Definition wifi_mgmt.h:1034
wifi_twt_setup_resp_status
Wi-Fi Target Wake Time (TWT) negotiation status.
Definition wifi.h:369
wifi_iface_mode
Wi-Fi interface modes.
Definition wifi.h:197
wifi_dpp_role
Wi-Fi DPP role.
Definition wifi_mgmt.h:904
#define NET_REQUEST_WIFI_AP_ENABLE
Request a Wi-Fi access point enable.
Definition wifi_mgmt.h:135
#define NET_REQUEST_WIFI_WPS_CONFIG
Definition wifi_mgmt.h:255
#define WIFI_COUNTRY_CODE_LEN
Length of the country code string.
Definition wifi.h:28
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
Request a Wi-Fi power save.
Definition wifi_mgmt.h:153
wifi_twt_negotiation_type
Wi-Fi Target Wake Time (TWT) negotiation types.
Definition wifi.h:333
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_ap_config_param
Wi-Fi AP mode configuration parameter.
Definition wifi.h:528
wifi_conn_status
Wi-Fi connect result codes.
Definition wifi_mgmt.h:476
wifi_dpp_bootstrap_type
Wi-Fi DPP bootstrap type.
Definition wifi_mgmt.h:934
#define NET_REQUEST_WIFI_PMKSA_FLUSH
Request a Wi-Fi PMKSA cache entries flush.
Definition wifi_mgmt.h:238
#define NET_REQUEST_WIFI_DISCONNECT
Request a Wi-Fi disconnect.
Definition wifi_mgmt.h:129
wifi_twt_fail_reason
Target Wake Time (TWT) error codes.
Definition wifi.h:377
net_request_wifi_cmd
Wi-Fi management commands.
Definition wifi_mgmt.h:60
wifi_dpp_op
Wi-Fi DPP operations.
Definition wifi_mgmt.h:860
#define NET_REQUEST_WIFI_MODE
Request current Wi-Fi mode.
Definition wifi_mgmt.h:177
#define NET_REQUEST_WIFI_AP_STA_DISCONNECT
Request a Wi-Fi access point to disconnect a station.
Definition wifi_mgmt.h:195
void wifi_mgmt_raise_disconnect_complete_event(struct net_if *iface, int status)
Wi-Fi management disconnect complete event.
#define NET_REQUEST_WIFI_CONNECT
Request a Wi-Fi connect.
Definition wifi_mgmt.h:123
wifi_ap_status
Wi-Fi AP mode result codes.
Definition wifi_mgmt.h:519
wifi_dpp_conf
Wi-Fi DPP security type.
Definition wifi_mgmt.h:919
#define NET_REQUEST_WIFI_TWT
Request a Wi-Fi TWT.
Definition wifi_mgmt.h:159
wifi_link_mode
Wi-Fi link operating modes.
Definition wifi.h:225
wifi_ps_param_type
Wi-Fi power save parameters.
Definition wifi.h:444
net_event_wifi_cmd
Wi-Fi management events.
Definition wifi_mgmt.h:260
#define NET_REQUEST_WIFI_CONN_PARAMS
Request a Wi-Fi connection parameters.
Definition wifi_mgmt.h:207
wifi_disconn_reason
Wi-Fi disconnect reason codes.
Definition wifi_mgmt.h:503
wifi_ps_wakeup_mode
Wi-Fi power save modes.
Definition wifi.h:458
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:322
wifi_scan_type
Wi-Fi scanning types.
Definition wifi.h:256
void(* scan_result_cb_t)(struct net_if *iface, int status, struct wifi_scan_result *entry)
Scan result callback.
Definition wifi_mgmt.h:1059
wifi_twt_teardown_status
Wi-Fi Target Wake Time (TWT) teradown status.
Definition wifi.h:403
#define WIFI_SSID_MAX_LEN
Max SSID length.
Definition wifi.h:124
#define NET_REQUEST_WIFI_CHANNEL
Request a Wi-Fi channel.
Definition wifi_mgmt.h:189
wifi_config_ps_param_fail_reason
Wi-Fi power save error codes.
Definition wifi.h:469
wifi_security_type
IEEE 802.11 security types.
Definition wifi.h:42
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:721
#define NET_REQUEST_WIFI_ENTERPRISE_CREDS
Set Wi-Fi enterprise mode CA/client Cert and key.
Definition wifi_mgmt.h:244
wifi_dpp_curves
Wi-Fi DPP crypto Elliptic Curves.
Definition wifi_mgmt.h:886
#define NET_REQUEST_WIFI_AP_CONFIG_PARAM
Request a Wi-Fi AP parameters configuration.
Definition wifi_mgmt.h:219
#define NET_REQUEST_WIFI_AP_DISABLE
Request a Wi-Fi access point disable.
Definition wifi_mgmt.h:141
wifi_ps_mode
Wi-Fi power save modes.
Definition wifi.h:275
@ WIFI_TWT_STATE_SLEEP
TWT sleep state: sleeping.
Definition wifi_mgmt.h:762
@ WIFI_TWT_STATE_AWAKE
TWT sleep state: awake.
Definition wifi_mgmt.h:764
@ WIFI_WPS_PBC
WPS pbc.
Definition wifi_mgmt.h:1036
@ WIFI_WPS_PIN_SET
Set WPS pin number.
Definition wifi_mgmt.h:1040
@ WIFI_WPS_PIN_GET
Get WPS pin number.
Definition wifi_mgmt.h:1038
@ WIFI_DPP_ROLE_ENROLLEE
Enrollee gets AP config and connect to AP.
Definition wifi_mgmt.h:910
@ WIFI_DPP_ROLE_CONFIGURATOR
Configurator passes AP config to enrollee.
Definition wifi_mgmt.h:908
@ WIFI_DPP_ROLE_EITHER
Both configurator and enrollee might be chosen.
Definition wifi_mgmt.h:912
@ WIFI_DPP_ROLE_UNSET
Unset role.
Definition wifi_mgmt.h:906
@ WIFI_STATUS_CONN_AP_NOT_FOUND
Connection failed - AP not found.
Definition wifi_mgmt.h:493
@ WIFI_STATUS_CONN_SUCCESS
Connection successful.
Definition wifi_mgmt.h:478
@ WIFI_STATUS_CONN_WRONG_PASSWORD
Connection failed - wrong password Few possible reasons for 4-way handshake failure that we can guess...
Definition wifi_mgmt.h:489
@ WIFI_STATUS_CONN_FAIL
Connection failed - generic failure.
Definition wifi_mgmt.h:480
@ WIFI_STATUS_CONN_TIMEOUT
Connection timed out.
Definition wifi_mgmt.h:491
@ WIFI_STATUS_DISCONN_FIRST_STATUS
Connection disconnected status.
Definition wifi_mgmt.h:497
@ WIFI_STATUS_CONN_LAST_STATUS
Last connection status.
Definition wifi_mgmt.h:495
@ WIFI_DPP_BOOTSTRAP_TYPE_UNSET
Unset type.
Definition wifi_mgmt.h:936
@ WIFI_DPP_BOOTSTRAP_TYPE_QRCODE
qrcode
Definition wifi_mgmt.h:938
@ WIFI_DPP_BOOTSTRAP_TYPE_NFC_URI
nfc
Definition wifi_mgmt.h:942
@ WIFI_DPP_BOOTSTRAP_TYPE_PKEX
pkex
Definition wifi_mgmt.h:940
@ NET_REQUEST_WIFI_CMD_AP_CONFIG_PARAM
Configure AP parameter.
Definition wifi_mgmt.h:96
@ NET_REQUEST_WIFI_CMD_TWT
Setup or teardown TWT flow.
Definition wifi_mgmt.h:76
@ NET_REQUEST_WIFI_CMD_PMKSA_FLUSH
Flush PMKSA cache entries.
Definition wifi_mgmt.h:104
@ NET_REQUEST_WIFI_CMD_PACKET_FILTER
Set or get packet filter setting for current mode.
Definition wifi_mgmt.h:84
@ NET_REQUEST_WIFI_CMD_AP_ENABLE
Enable AP mode.
Definition wifi_mgmt.h:68
@ NET_REQUEST_WIFI_CMD_REG_DOMAIN
Set or get regulatory domain.
Definition wifi_mgmt.h:80
@ NET_REQUEST_WIFI_CMD_SCAN
Scan for Wi-Fi networks.
Definition wifi_mgmt.h:62
@ NET_REQUEST_WIFI_CMD_IFACE_STATUS
Get interface status.
Definition wifi_mgmt.h:72
@ NET_REQUEST_WIFI_CMD_AP_STA_DISCONNECT
Disconnect a STA from AP.
Definition wifi_mgmt.h:88
@ NET_REQUEST_WIFI_CMD_DPP
DPP actions.
Definition wifi_mgmt.h:98
@ NET_REQUEST_WIFI_CMD_AP_DISABLE
Disable AP mode.
Definition wifi_mgmt.h:70
@ NET_REQUEST_WIFI_CMD_RTS_THRESHOLD
Set RTS threshold.
Definition wifi_mgmt.h:94
@ NET_REQUEST_WIFI_CMD_CONNECT
Connect to a Wi-Fi network.
Definition wifi_mgmt.h:64
@ NET_REQUEST_WIFI_CMD_VERSION
Get Wi-Fi driver and Firmware versions.
Definition wifi_mgmt.h:90
@ NET_REQUEST_WIFI_CMD_ENTERPRISE_CREDS
Set enterprise mode credential.
Definition wifi_mgmt.h:106
@ NET_REQUEST_WIFI_CMD_CONN_PARAMS
Get Wi-Fi latest connection parameters.
Definition wifi_mgmt.h:92
@ NET_REQUEST_WIFI_CMD_CHANNEL
Set or get Wi-Fi channel for Monitor or TX-Injection mode.
Definition wifi_mgmt.h:86
@ NET_REQUEST_WIFI_CMD_MODE
Set or get Mode of operation.
Definition wifi_mgmt.h:82
@ NET_REQUEST_WIFI_CMD_RTS_THRESHOLD_CONFIG
Get RTS threshold.
Definition wifi_mgmt.h:108
@ NET_REQUEST_WIFI_CMD_PS
Set power save status.
Definition wifi_mgmt.h:74
@ NET_REQUEST_WIFI_CMD_DISCONNECT
Disconnect from a Wi-Fi network.
Definition wifi_mgmt.h:66
@ NET_REQUEST_WIFI_CMD_PS_CONFIG
Get power save config.
Definition wifi_mgmt.h:78
@ NET_REQUEST_WIFI_CMD_WPS_CONFIG
WPS config.
Definition wifi_mgmt.h:110
@ WIFI_DPP_BOOTSTRAP_GET_URI
Get a bootstrap uri for external device to scan.
Definition wifi_mgmt.h:876
@ WIFI_DPP_SET_CONF_PARAM
Set configurator parameters.
Definition wifi_mgmt.h:878
@ WIFI_DPP_CONFIGURATOR_ADD
Add configurator.
Definition wifi_mgmt.h:864
@ WIFI_DPP_QR_CODE
Scan qr_code as parameter.
Definition wifi_mgmt.h:868
@ WIFI_DPP_RECONFIG
Reconfigure DPP network.
Definition wifi_mgmt.h:882
@ WIFI_DPP_BOOTSTRAP_GEN
Generate a bootstrap like qrcode.
Definition wifi_mgmt.h:874
@ WIFI_DPP_LISTEN
Listen on specific frequency.
Definition wifi_mgmt.h:872
@ WIFI_DPP_SET_WAIT_RESP_TIME
Set DPP rx response wait timeout.
Definition wifi_mgmt.h:880
@ WIFI_DPP_CHIRP
Start DPP chirp to send DPP announcement.
Definition wifi_mgmt.h:870
@ WIFI_DPP_OP_INVALID
Unset invalid operation.
Definition wifi_mgmt.h:862
@ WIFI_DPP_AUTH_INIT
Start DPP auth as configurator or enrollee.
Definition wifi_mgmt.h:866
@ WIFI_STATUS_AP_CHANNEL_NOT_ALLOWED
AP mode enable failed - channel not allowed.
Definition wifi_mgmt.h:527
@ WIFI_STATUS_AP_SUCCESS
AP mode enable or disable successful.
Definition wifi_mgmt.h:521
@ WIFI_STATUS_AP_OP_NOT_SUPPORTED
AP mode enable failed - operation not supported.
Definition wifi_mgmt.h:533
@ WIFI_STATUS_AP_OP_NOT_PERMITTED
AP mode enable failed - operation not permitted.
Definition wifi_mgmt.h:535
@ WIFI_STATUS_AP_CHANNEL_NOT_SUPPORTED
AP mode enable failed - channel not supported.
Definition wifi_mgmt.h:525
@ WIFI_STATUS_AP_FAIL
AP mode enable or disable failed - generic failure.
Definition wifi_mgmt.h:523
@ WIFI_STATUS_AP_AUTH_TYPE_NOT_SUPPORTED
AP mode enable failed - authentication type not supported.
Definition wifi_mgmt.h:531
@ WIFI_STATUS_AP_SSID_NOT_ALLOWED
AP mode enable failed - SSID not allowed.
Definition wifi_mgmt.h:529
@ WIFI_DPP_CONF_AP
conf=ap-dpp, AKM DPP only for ap
Definition wifi_mgmt.h:925
@ WIFI_DPP_CONF_UNSET
Unset conf.
Definition wifi_mgmt.h:921
@ WIFI_DPP_CONF_STA
conf=sta-dpp, AKM DPP only for sta
Definition wifi_mgmt.h:923
@ WIFI_DPP_CONF_QUERY
conf=query, query for AKM
Definition wifi_mgmt.h:927
@ NET_EVENT_WIFI_CMD_AP_STA_DISCONNECTED
STA disconnected from AP.
Definition wifi_mgmt.h:288
@ NET_EVENT_WIFI_CMD_SCAN_RESULT
Scan results available.
Definition wifi_mgmt.h:262
@ NET_EVENT_WIFI_CMD_DISCONNECT_RESULT
Disconnect result.
Definition wifi_mgmt.h:268
@ 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:276
@ NET_EVENT_WIFI_CMD_AP_ENABLE_RESULT
AP mode enable result.
Definition wifi_mgmt.h:282
@ NET_EVENT_WIFI_CMD_AP_STA_CONNECTED
STA connected to AP.
Definition wifi_mgmt.h:286
@ NET_EVENT_WIFI_CMD_SCAN_DONE
Scan done.
Definition wifi_mgmt.h:264
@ NET_EVENT_WIFI_CMD_TWT
TWT events.
Definition wifi_mgmt.h:272
@ NET_EVENT_WIFI_CMD_RAW_SCAN_RESULT
Raw scan results available.
Definition wifi_mgmt.h:278
@ NET_EVENT_WIFI_CMD_AP_DISABLE_RESULT
AP mode disable result.
Definition wifi_mgmt.h:284
@ NET_EVENT_WIFI_CMD_DISCONNECT_COMPLETE
Disconnect complete.
Definition wifi_mgmt.h:280
@ NET_EVENT_WIFI_CMD_IFACE_STATUS
Interface status.
Definition wifi_mgmt.h:270
@ NET_EVENT_WIFI_CMD_CONNECT_RESULT
Connect result.
Definition wifi_mgmt.h:266
@ WIFI_REASON_DISCONN_INACTIVITY
Disconnected due to inactivity.
Definition wifi_mgmt.h:513
@ WIFI_REASON_DISCONN_AP_LEAVING
Disconnected due to AP leaving.
Definition wifi_mgmt.h:511
@ WIFI_REASON_DISCONN_SUCCESS
Success, overload status as reason.
Definition wifi_mgmt.h:505
@ WIFI_REASON_DISCONN_UNSPECIFIED
Unspecified reason.
Definition wifi_mgmt.h:507
@ WIFI_REASON_DISCONN_USER_REQUEST
Disconnected due to user request.
Definition wifi_mgmt.h:509
@ WIFI_MGMT_GET
Get operation.
Definition wifi_mgmt.h:723
@ WIFI_MGMT_SET
Set operation.
Definition wifi_mgmt.h:725
@ WIFI_DPP_CURVES_DEFAULT
Unset default use P-256.
Definition wifi_mgmt.h:888
@ WIFI_DPP_CURVES_P_512
secp521r1
Definition wifi_mgmt.h:894
@ WIFI_DPP_CURVES_P_256
prime256v1
Definition wifi_mgmt.h:890
@ WIFI_DPP_CURVES_BP_384
brainpoolP384r1
Definition wifi_mgmt.h:898
@ WIFI_DPP_CURVES_P_384
secp384r1
Definition wifi_mgmt.h:892
@ WIFI_DPP_CURVES_BP_256
brainpoolP256r1
Definition wifi_mgmt.h:896
@ WIFI_DPP_CURVES_BP_512
brainpoolP512r1
Definition wifi_mgmt.h:900
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:412
Ethernet L2 API operations.
Definition ethernet.h:528
Network Interface structure.
Definition net_if.h:680
All Wi-Fi specific statistics.
Definition net_stats.h:624
Wi-Fi management offload API.
Definition wifi_mgmt.h:1302
struct ethernet_api wifi_iface
Mandatory to get in first position.
Definition wifi_mgmt.h:1311
const struct wifi_mgmt_ops *const wifi_mgmt_api
Wi-Fi management API.
Definition wifi_mgmt.h:1317
const void * wifi_drv_ops
Wi-Fi supplicant driver API.
Definition wifi_mgmt.h:1321
Extended net_if_api for offloaded ifaces/network devices, allowing handling of admin up/down state ch...
Definition offloaded_netdev.h:53
Wi-Fi AP configuration parameter.
Definition wifi_mgmt.h:846
uint32_t max_inactivity
Parameter used for setting maximum inactivity duration for stations.
Definition wifi_mgmt.h:850
enum wifi_ap_config_param type
Parameter used to identify the different AP parameters.
Definition wifi_mgmt.h:848
uint32_t max_num_sta
Parameter used for setting maximum number of stations.
Definition wifi_mgmt.h:852
AP mode - connected STA details.
Definition wifi_mgmt.h:782
uint8_t mac[6]
MAC address.
Definition wifi_mgmt.h:786
enum wifi_link_mode link_mode
Link mode, see enum wifi_link_mode.
Definition wifi_mgmt.h:784
uint8_t mac_length
MAC address length.
Definition wifi_mgmt.h:788
bool twt_capable
is TWT capable ?
Definition wifi_mgmt.h:790
Wi-Fi structure to uniquely identify a band-channel pair.
Definition wifi_mgmt.h:354
uint8_t band
Frequency band.
Definition wifi_mgmt.h:356
uint8_t channel
Channel.
Definition wifi_mgmt.h:358
Wi-Fi channel setting for monitor and TX-injection modes.
Definition wifi_mgmt.h:832
uint8_t if_index
Interface index.
Definition wifi_mgmt.h:836
uint16_t channel
Channel value to set.
Definition wifi_mgmt.h:834
enum wifi_mgmt_op oper
Get or set operation.
Definition wifi_mgmt.h:838
Wi-Fi connect request parameters.
Definition wifi_mgmt.h:438
enum wifi_security_type security
Security type.
Definition wifi_mgmt.h:456
uint8_t aid_length
anon_id length
Definition wifi_mgmt.h:466
const uint8_t * sae_password
SAE password (same as PSK but with no length restrictions), optional.
Definition wifi_mgmt.h:448
const uint8_t * key_passwd
Private key passwd for enterprise mode.
Definition wifi_mgmt.h:468
uint8_t bssid[6]
BSSID.
Definition wifi_mgmt.h:460
uint8_t channel
Channel.
Definition wifi_mgmt.h:454
uint8_t ssid_length
SSID length.
Definition wifi_mgmt.h:442
int timeout
Connect timeout in seconds, SYS_FOREVER_MS for no timeout.
Definition wifi_mgmt.h:462
enum wifi_mfp_options mfp
MFP options.
Definition wifi_mgmt.h:458
uint8_t sae_password_length
SAE password length.
Definition wifi_mgmt.h:450
const uint8_t * anon_id
anonymous identity
Definition wifi_mgmt.h:464
uint8_t key_passwd_length
Private key passwd length.
Definition wifi_mgmt.h:470
uint8_t band
Frequency band.
Definition wifi_mgmt.h:452
const uint8_t * psk
Pre-shared key.
Definition wifi_mgmt.h:444
uint8_t psk_length
Pre-shared key length.
Definition wifi_mgmt.h:446
const uint8_t * ssid
SSID.
Definition wifi_mgmt.h:440
Wi-Fi DPP params for various operations.
Definition wifi_mgmt.h:947
struct wifi_dpp_params::@419::wifi_dpp_chirp_params chirp
int id
Own bootstrap id.
Definition wifi_mgmt.h:974
uint8_t dpp_qr_code[255+1]
DPP QR-CODE, max for SHA512.
Definition wifi_mgmt.h:1022
int chan
Own working channel.
Definition wifi_mgmt.h:992
int type
Bootstrap type.
Definition wifi_mgmt.h:988
struct wifi_dpp_params::@419::wifi_dpp_configurator_set_params configurator_set
char resp[255+1]
Request response reusing request buffer.
Definition wifi_mgmt.h:1027
int freq
Chirp on frequency.
Definition wifi_mgmt.h:976
struct wifi_dpp_params::@419::wifi_dpp_configurator_add_params configurator_add
int conf
Security type.
Definition wifi_mgmt.h:967
int op_class
Own operating class.
Definition wifi_mgmt.h:990
struct wifi_dpp_params::@419::wifi_dpp_auth_init_params auth_init
int dpp_resp_wait_time
Timeout for DPP frame response rx.
Definition wifi_mgmt.h:1018
int configurator
Configuration parameter id.
Definition wifi_mgmt.h:963
int curve
ECP curves for private key.
Definition wifi_mgmt.h:954
int net_access_key_curve
ECP curves for net access key.
Definition wifi_mgmt.h:956
int action
Operation enum.
Definition wifi_mgmt.h:949
int network_id
network id for reconfig
Definition wifi_mgmt.h:1020
int role
Role configurator or enrollee.
Definition wifi_mgmt.h:965
struct wifi_dpp_params::@419::wifi_dpp_listen_params listen
int peer
Peer bootstrap id.
Definition wifi_mgmt.h:961
struct wifi_dpp_params::@419::wifi_dpp_bootstrap_gen_params bootstrap_gen
Wi-Fi enterprise mode credentials.
Definition wifi_mgmt.h:695
uint32_t client_key_len
Client key length.
Definition wifi_mgmt.h:707
uint32_t client_cert_len
Client certification length.
Definition wifi_mgmt.h:703
uint32_t ca_cert_len
CA certification length.
Definition wifi_mgmt.h:699
uint8_t * client_cert
Client certification.
Definition wifi_mgmt.h:701
uint8_t * client_key
Client key.
Definition wifi_mgmt.h:705
uint8_t * ca_cert
CA certification.
Definition wifi_mgmt.h:697
Wi-Fi filter setting for monitor, prmoiscuous, TX-injection modes.
Definition wifi_mgmt.h:820
uint16_t buffer_size
Filter buffer size.
Definition wifi_mgmt.h:826
uint8_t filter
Filter setting.
Definition wifi_mgmt.h:822
enum wifi_mgmt_op oper
Get or set operation.
Definition wifi_mgmt.h:828
uint8_t if_index
Interface index.
Definition wifi_mgmt.h:824
Wi-Fi interface status.
Definition wifi_mgmt.h:553
unsigned short beacon_interval
Beacon interval.
Definition wifi_mgmt.h:579
char bssid[6]
BSSID.
Definition wifi_mgmt.h:561
char ssid[32]
SSID.
Definition wifi_mgmt.h:559
int rssi
RSSI.
Definition wifi_mgmt.h:575
int current_phy_rate
The current 802.11 PHY data rate.
Definition wifi_mgmt.h:583
enum wifi_security_type security
Security type, see enum wifi_security_type.
Definition wifi_mgmt.h:571
unsigned int channel
Channel.
Definition wifi_mgmt.h:565
enum wifi_mfp_options mfp
MFP options, see enum wifi_mfp_options.
Definition wifi_mgmt.h:573
unsigned char dtim_period
DTIM period.
Definition wifi_mgmt.h:577
int state
Interface state, see enum wifi_iface_state.
Definition wifi_mgmt.h:555
bool twt_capable
is TWT capable?
Definition wifi_mgmt.h:581
enum wifi_iface_mode iface_mode
Interface mode, see enum wifi_iface_mode.
Definition wifi_mgmt.h:567
unsigned int ssid_len
SSID length.
Definition wifi_mgmt.h:557
enum wifi_frequency_bands band
Frequency band.
Definition wifi_mgmt.h:563
enum wifi_link_mode link_mode
Link mode, see enum wifi_link_mode.
Definition wifi_mgmt.h:569
Wi-Fi management API.
Definition wifi_mgmt.h:1074
int(* reg_domain)(const struct device *dev, struct wifi_reg_domain *reg_domain)
Set or get regulatory domain.
Definition wifi_mgmt.h:1185
int(* get_rts_threshold)(const struct device *dev, unsigned int *rts_threshold)
Set Wi-Fi enterprise mode CA/client Cert and key.
Definition wifi_mgmt.h:1290
int(* ap_config_params)(const struct device *dev, struct wifi_ap_config_params *params)
Configure AP parameter.
Definition wifi_mgmt.h:1256
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:1086
int(* dpp_dispatch)(const struct device *dev, struct wifi_dpp_params *params)
Dispatch DPP operations by action enum, with or without arguments in string format.
Definition wifi_mgmt.h:1264
int(* get_conn_params)(const struct device *dev, struct wifi_connect_req_params *params)
Get Wi-Fi connection parameters recently used.
Definition wifi_mgmt.h:1240
int(* set_rts_threshold)(const struct device *dev, unsigned int rts_threshold)
Set RTS threshold value.
Definition wifi_mgmt.h:1248
int(* get_power_save_config)(const struct device *dev, struct wifi_ps_config *config)
Get power save config.
Definition wifi_mgmt.h:1177
int(* disconnect)(const struct device *dev)
Disconnect from a Wi-Fi network.
Definition wifi_mgmt.h:1104
int(* ap_disable)(const struct device *dev)
Disable AP mode.
Definition wifi_mgmt.h:1120
int(* get_stats)(const struct device *dev, struct net_stats_wifi *stats)
Get Wi-Fi statistics.
Definition wifi_mgmt.h:1145
int(* get_version)(const struct device *dev, struct wifi_version *params)
Get Version of WiFi driver and Firmware.
Definition wifi_mgmt.h:1232
int(* pmksa_flush)(const struct device *dev)
Flush PMKSA cache entries.
Definition wifi_mgmt.h:1271
int(* wps_config)(const struct device *dev, struct wifi_wps_config_params *params)
Start a WPS PBC/PIN connection.
Definition wifi_mgmt.h:1298
int(* set_twt)(const struct device *dev, struct wifi_twt_params *params)
Setup or teardown TWT flow.
Definition wifi_mgmt.h:1169
int(* set_power_save)(const struct device *dev, struct wifi_ps_params *params)
Set power save status.
Definition wifi_mgmt.h:1161
int(* ap_enable)(const struct device *dev, struct wifi_connect_req_params *params)
Enable AP mode.
Definition wifi_mgmt.h:1112
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:1193
int(* iface_status)(const struct device *dev, struct wifi_iface_status *status)
Get interface status.
Definition wifi_mgmt.h:1136
int(* mode)(const struct device *dev, struct wifi_mode_info *mode)
Set or get mode of operation.
Definition wifi_mgmt.h:1201
int(* connect)(const struct device *dev, struct wifi_connect_req_params *params)
Connect to a Wi-Fi network.
Definition wifi_mgmt.h:1096
int(* reset_stats)(const struct device *dev)
Reset Wi-Fi statistics.
Definition wifi_mgmt.h:1152
int(* ap_sta_disconnect)(const struct device *dev, const uint8_t *mac)
Disconnect a STA from AP.
Definition wifi_mgmt.h:1128
int(* channel)(const struct device *dev, struct wifi_channel_info *channel)
Set or get current channel of operation.
Definition wifi_mgmt.h:1209
Wi-Fi mode setup.
Definition wifi_mgmt.h:810
enum wifi_mgmt_op oper
Get or set operation.
Definition wifi_mgmt.h:816
uint8_t mode
Mode setting for a specific mode of operation.
Definition wifi_mgmt.h:812
uint8_t if_index
Interface index.
Definition wifi_mgmt.h:814
Wi-Fi power save configuration.
Definition wifi_mgmt.h:711
struct wifi_ps_params ps_params
Power save configuration.
Definition wifi_mgmt.h:717
char num_twt_flows
Number of TWT flows.
Definition wifi_mgmt.h:713
struct wifi_twt_flow_info twt_flows[WIFI_MAX_TWT_FLOWS]
TWT flow details.
Definition wifi_mgmt.h:715
Wi-Fi power save parameters.
Definition wifi_mgmt.h:587
enum wifi_ps_mode mode
Wi-Fi power save mode.
Definition wifi_mgmt.h:595
enum wifi_config_ps_param_fail_reason fail_reason
Wi-Fi power save fail reason.
Definition wifi_mgmt.h:608
enum wifi_ps_wakeup_mode wakeup_mode
Wi-Fi power save wakeup mode.
Definition wifi_mgmt.h:593
unsigned short listen_interval
Listen interval.
Definition wifi_mgmt.h:591
enum wifi_ps enabled
Power save state.
Definition wifi_mgmt.h:589
unsigned int timeout_ms
Wi-Fi power save timeout.
Definition wifi_mgmt.h:604
enum wifi_ps_param_type type
Wi-Fi power save type.
Definition wifi_mgmt.h:606
Wi-Fi raw scan result.
Definition wifi_mgmt.h:769
int8_t rssi
RSSI.
Definition wifi_mgmt.h:771
uint8_t data[CONFIG_WIFI_MGMT_RAW_SCAN_RESULT_LENGTH]
Raw scan data.
Definition wifi_mgmt.h:777
int frame_length
Frame length.
Definition wifi_mgmt.h:773
unsigned short frequency
Frequency.
Definition wifi_mgmt.h:775
Per-channel regulatory attributes.
Definition wifi_mgmt.h:732
unsigned short center_frequency
Center frequency in MHz.
Definition wifi_mgmt.h:734
unsigned short dfs
Is a DFS channel.
Definition wifi_mgmt.h:742
unsigned short supported
Is channel supported or not.
Definition wifi_mgmt.h:738
unsigned short passive_only
Passive transmissions only.
Definition wifi_mgmt.h:740
unsigned short max_power
Maximum transmission power (in dBm)
Definition wifi_mgmt.h:736
Regulatory domain information or configuration.
Definition wifi_mgmt.h:746
unsigned int num_channels
Number of channels supported.
Definition wifi_mgmt.h:754
enum wifi_mgmt_op oper
Regulatory domain operation.
Definition wifi_mgmt.h:748
struct wifi_reg_chan_info * chan_info
Channels information.
Definition wifi_mgmt.h:756
bool force
Ignore all other regulatory hints over this one.
Definition wifi_mgmt.h:750
uint8_t country_code[2]
Country code: ISO/IEC 3166-1 alpha-2.
Definition wifi_mgmt.h:752
Wi-Fi scan parameters structure.
Definition wifi_mgmt.h:366
uint16_t max_bss_cnt
Specifies the maximum number of scan results to return.
Definition wifi_mgmt.h:395
uint16_t dwell_time_active
Active scan dwell time (in ms) on a channel.
Definition wifi_mgmt.h:381
enum wifi_scan_type scan_type
Scan type, see enum wifi_scan_type.
Definition wifi_mgmt.h:374
uint8_t bands
Bitmap of bands to be scanned.
Definition wifi_mgmt.h:378
uint16_t dwell_time_passive
Passive scan dwell time (in ms) on a channel.
Definition wifi_mgmt.h:384
struct wifi_band_channel band_chan[WIFI_MGMT_SCAN_CHAN_MAX_MANUAL]
Channel information array indexed on Wi-Fi frequency bands and channels within that band.
Definition wifi_mgmt.h:410
const char * ssids[WIFI_MGMT_SCAN_SSID_FILT_MAX]
Array of SSID strings to scan.
Definition wifi_mgmt.h:387
Wi-Fi scan result, each result is provided to the net_mgmt_event_callback via its info attribute (see...
Definition wifi_mgmt.h:416
uint8_t ssid_length
SSID length.
Definition wifi_mgmt.h:420
uint8_t band
Frequency band.
Definition wifi_mgmt.h:422
int8_t rssi
RSSI.
Definition wifi_mgmt.h:430
uint8_t ssid[32]
SSID.
Definition wifi_mgmt.h:418
uint8_t mac_length
BSSID length.
Definition wifi_mgmt.h:434
uint8_t mac[6]
BSSID.
Definition wifi_mgmt.h:432
enum wifi_mfp_options mfp
MFP options.
Definition wifi_mgmt.h:428
uint8_t channel
Channel.
Definition wifi_mgmt.h:424
enum wifi_security_type security
Security type.
Definition wifi_mgmt.h:426
Generic Wi-Fi status for commands and events.
Definition wifi_mgmt.h:539
enum wifi_ap_status ap_status
Access point status.
Definition wifi_mgmt.h:548
enum wifi_conn_status conn_status
Connection status.
Definition wifi_mgmt.h:544
enum wifi_disconn_reason disconn_reason
Disconnection reason status.
Definition wifi_mgmt.h:546
int status
Status value.
Definition wifi_mgmt.h:542
Wi-Fi TWT flow information.
Definition wifi_mgmt.h:671
uint8_t dialog_token
Dialog token, used to map requests to responses.
Definition wifi_mgmt.h:675
enum wifi_twt_negotiation_type negotiation_type
TWT negotiation type, see enum wifi_twt_negotiation_type.
Definition wifi_mgmt.h:679
uint32_t twt_wake_ahead_duration
Wake ahead duration.
Definition wifi_mgmt.h:691
bool trigger
Trigger enabled or disabled.
Definition wifi_mgmt.h:683
bool responder
Requestor or responder.
Definition wifi_mgmt.h:681
uint8_t flow_id
Flow ID, used to map setup with teardown.
Definition wifi_mgmt.h:677
uint64_t twt_interval
Interval = Wake up time + Sleeping time.
Definition wifi_mgmt.h:673
uint32_t twt_wake_interval
Wake up time.
Definition wifi_mgmt.h:689
bool implicit
Implicit or explicit.
Definition wifi_mgmt.h:685
bool announce
Announced or unannounced.
Definition wifi_mgmt.h:687
Wi-Fi TWT parameters.
Definition wifi_mgmt.h:612
bool announce
Announced or unannounced.
Definition wifi_mgmt.h:639
bool teardown_all
Teardown all flows.
Definition wifi_mgmt.h:652
struct wifi_twt_params::@415::@418 teardown
Teardown specific parameters.
enum wifi_twt_setup_cmd setup_cmd
TWT setup command, see enum wifi_twt_setup_cmd.
Definition wifi_mgmt.h:618
bool trigger
Trigger enabled or disabled.
Definition wifi_mgmt.h:635
enum wifi_twt_negotiation_type negotiation_type
TWT negotiation type, see enum wifi_twt_negotiation_type.
Definition wifi_mgmt.h:616
enum wifi_twt_operation operation
TWT operation, see enum wifi_twt_operation.
Definition wifi_mgmt.h:614
uint32_t twt_wake_ahead_duration
Wake ahead notification is sent earlier than TWT Service period (SP) start based on this duration.
Definition wifi_mgmt.h:647
enum wifi_twt_fail_reason fail_reason
TWT fail reason, see enum wifi_twt_fail_reason.
Definition wifi_mgmt.h:656
uint32_t twt_wake_interval
Wake up time.
Definition wifi_mgmt.h:641
enum wifi_twt_setup_resp_status resp_status
TWT setup response status, see enum wifi_twt_setup_resp_status.
Definition wifi_mgmt.h:620
bool implicit
Implicit or explicit.
Definition wifi_mgmt.h:637
uint8_t flow_id
Flow ID, used to map setup with teardown.
Definition wifi_mgmt.h:626
enum wifi_twt_teardown_status teardown_status
TWT teardown cmd status, see enum wifi_twt_teardown_status.
Definition wifi_mgmt.h:622
uint64_t twt_interval
Interval = Wake up time + Sleeping time.
Definition wifi_mgmt.h:631
struct wifi_twt_params::@415::@417 setup
Setup specific parameters.
uint8_t dialog_token
Dialog token, used to map requests to responses.
Definition wifi_mgmt.h:624
bool responder
Requestor or responder.
Definition wifi_mgmt.h:633
Wi-Fi version.
Definition wifi_mgmt.h:344
const char * fw_version
Firmware version.
Definition wifi_mgmt.h:348
const char * drv_version
Driver version.
Definition wifi_mgmt.h:346
Wi-Fi wps setup.
Definition wifi_mgmt.h:1044
char pin[8+1]
pin value
Definition wifi_mgmt.h:1048
enum wifi_wps_op oper
wps operation
Definition wifi_mgmt.h:1046
IEEE 802.11 protocol and general Wi-Fi definitions.