Zephyr API Documentation 4.0.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 * Copyright (c) 2024 Nordic Semiconductor ASA
5 *
6 * SPDX-License-Identifier: Apache-2.0
7 */
8
14#ifndef ZEPHYR_INCLUDE_NET_WIFI_MGMT_H_
15#define ZEPHYR_INCLUDE_NET_WIFI_MGMT_H_
16
17#include <zephyr/net/net_mgmt.h>
18#include <zephyr/net/wifi.h>
19#include <zephyr/net/ethernet.h>
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
31/* Management part definitions */
32
35#define _NET_WIFI_LAYER NET_MGMT_LAYER_L2
36#define _NET_WIFI_CODE 0x156
37#define _NET_WIFI_BASE (NET_MGMT_IFACE_BIT | \
38 NET_MGMT_LAYER(_NET_WIFI_LAYER) | \
39 NET_MGMT_LAYER_CODE(_NET_WIFI_CODE))
40#define _NET_WIFI_EVENT (_NET_WIFI_BASE | NET_MGMT_EVENT_BIT)
41
42#ifdef CONFIG_WIFI_MGMT_SCAN_SSID_FILT_MAX
43#define WIFI_MGMT_SCAN_SSID_FILT_MAX CONFIG_WIFI_MGMT_SCAN_SSID_FILT_MAX
44#else
45#define WIFI_MGMT_SCAN_SSID_FILT_MAX 1
46#endif /* CONFIG_WIFI_MGMT_SCAN_SSID_FILT_MAX */
47
48#ifdef CONFIG_WIFI_MGMT_SCAN_CHAN_MAX_MANUAL
49#define WIFI_MGMT_SCAN_CHAN_MAX_MANUAL CONFIG_WIFI_MGMT_SCAN_CHAN_MAX_MANUAL
50#else
51#define WIFI_MGMT_SCAN_CHAN_MAX_MANUAL 1
52#endif /* CONFIG_WIFI_MGMT_SCAN_CHAN_MAX_MANUAL */
53
54#ifdef CONFIG_WIFI_ENT_IDENTITY_MAX_USERS
55#define WIFI_ENT_IDENTITY_MAX_USERS CONFIG_WIFI_ENT_IDENTITY_MAX_USERS
56#else
57#define WIFI_ENT_IDENTITY_MAX_USERS 1
58#endif /* CONFIG_WIFI_ENT_IDENTITY_MAX_USERS */
59
60#define WIFI_MGMT_BAND_STR_SIZE_MAX 8
61#define WIFI_MGMT_SCAN_MAX_BSS_CNT 65535
62
63#define WIFI_MGMT_SKIP_INACTIVITY_POLL IS_ENABLED(CONFIG_WIFI_MGMT_AP_STA_SKIP_INACTIVITY_POLL)
138
140#define NET_REQUEST_WIFI_SCAN \
141 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_SCAN)
142
144
146#define NET_REQUEST_WIFI_CONNECT \
147 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CONNECT)
148
150
152#define NET_REQUEST_WIFI_DISCONNECT \
153 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_DISCONNECT)
154
156
158#define NET_REQUEST_WIFI_AP_ENABLE \
159 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_ENABLE)
160
162
164#define NET_REQUEST_WIFI_AP_DISABLE \
165 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_DISABLE)
166
168
170#define NET_REQUEST_WIFI_IFACE_STATUS \
171 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_IFACE_STATUS)
172
174
175#define NET_REQUEST_WIFI_11K_CONFIG \
176 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_11K_CONFIG)
177
179
180#define NET_REQUEST_WIFI_11K_NEIGHBOR_REQUEST \
181 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_11K_NEIGHBOR_REQUEST)
182
184
186#define NET_REQUEST_WIFI_PS \
187 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PS)
188
190
192#define NET_REQUEST_WIFI_TWT \
193 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_TWT)
194
196
198#define NET_REQUEST_WIFI_PS_CONFIG \
199 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PS_CONFIG)
200
202
204#define NET_REQUEST_WIFI_REG_DOMAIN \
205 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_REG_DOMAIN)
206
208
210#define NET_REQUEST_WIFI_MODE \
211 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_MODE)
212
214
216#define NET_REQUEST_WIFI_PACKET_FILTER \
217 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PACKET_FILTER)
218
220
222#define NET_REQUEST_WIFI_CHANNEL \
223 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CHANNEL)
224
226
228#define NET_REQUEST_WIFI_AP_STA_DISCONNECT \
229 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_STA_DISCONNECT)
230
232
234#define NET_REQUEST_WIFI_VERSION \
235 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_VERSION)
236
238
240#define NET_REQUEST_WIFI_CONN_PARAMS \
241 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CONN_PARAMS)
242
244
246#define NET_REQUEST_WIFI_RTS_THRESHOLD \
247 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_RTS_THRESHOLD)
248
250
252#define NET_REQUEST_WIFI_AP_CONFIG_PARAM \
253 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_CONFIG_PARAM)
254
256
257#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_DPP
259#define NET_REQUEST_WIFI_DPP \
260 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_DPP)
261
262NET_MGMT_DEFINE_REQUEST_HANDLER(NET_REQUEST_WIFI_DPP);
263#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_DPP */
264
265#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_WNM
267#define NET_REQUEST_WIFI_BTM_QUERY (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_BTM_QUERY)
268
269NET_MGMT_DEFINE_REQUEST_HANDLER(NET_REQUEST_WIFI_BTM_QUERY);
270#endif
271
273#define NET_REQUEST_WIFI_PMKSA_FLUSH \
274 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PMKSA_FLUSH)
275
277
279#define NET_REQUEST_WIFI_ENTERPRISE_CREDS \
280 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_ENTERPRISE_CREDS)
281
283
285#define NET_REQUEST_WIFI_RTS_THRESHOLD_CONFIG \
286 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_RTS_THRESHOLD_CONFIG)
287
289
290#define NET_REQUEST_WIFI_WPS_CONFIG (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_WPS_CONFIG)
291
293#ifdef CONFIG_WIFI_CREDENTIALS_CONNECT_STORED
294#define NET_REQUEST_WIFI_CONNECT_STORED (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CONNECT_STORED)
295
296NET_MGMT_DEFINE_REQUEST_HANDLER(NET_REQUEST_WIFI_CONNECT_STORED);
297#endif
298
299#define NET_REQUEST_WIFI_START_ROAMING \
300 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_START_ROAMING)
301
303
304#define NET_REQUEST_WIFI_NEIGHBOR_REP_COMPLETE \
305 (_NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_NEIGHBOR_REP_COMPLETE)
306
308
348
350#define NET_EVENT_WIFI_SCAN_RESULT \
351 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_SCAN_RESULT)
352
354#define NET_EVENT_WIFI_SCAN_DONE \
355 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_SCAN_DONE)
356
358#define NET_EVENT_WIFI_CONNECT_RESULT \
359 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_CONNECT_RESULT)
360
362#define NET_EVENT_WIFI_DISCONNECT_RESULT \
363 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_DISCONNECT_RESULT)
364
366#define NET_EVENT_WIFI_IFACE_STATUS \
367 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_IFACE_STATUS)
368
370#define NET_EVENT_WIFI_TWT \
371 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_TWT)
372
374#define NET_EVENT_WIFI_TWT_SLEEP_STATE \
375 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_TWT_SLEEP_STATE)
376
378#define NET_EVENT_WIFI_RAW_SCAN_RESULT \
379 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_RAW_SCAN_RESULT)
380
382#define NET_EVENT_WIFI_DISCONNECT_COMPLETE \
383 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_DISCONNECT_COMPLETE)
384
386#define NET_EVENT_WIFI_SIGNAL_CHANGE \
387 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_SIGNAL_CHANGE)
388
390#define NET_EVENT_WIFI_NEIGHBOR_REP_COMP \
391 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_NEIGHBOR_REP_COMPLETE)
392
394#define NET_EVENT_WIFI_AP_ENABLE_RESULT \
395 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_ENABLE_RESULT)
396
398#define NET_EVENT_WIFI_AP_DISABLE_RESULT \
399 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_DISABLE_RESULT)
400
402#define NET_EVENT_WIFI_AP_STA_CONNECTED \
403 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_STA_CONNECTED)
404
406#define NET_EVENT_WIFI_AP_STA_DISCONNECTED \
407 (_NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_STA_DISCONNECTED)
408
412 const char *drv_version;
414 const char *fw_version;
415};
416
426
478
502
564
591
607
629
643
677
704
752
755/* Flow ID is only 3 bits */
756#define WIFI_MAX_TWT_FLOWS 8
757#define WIFI_MAX_TWT_INTERVAL_US (LONG_MAX - 1)
758/* 256 (u8) * 1TU */
759#define WIFI_MAX_TWT_WAKE_INTERVAL_US 262144
760#define WIFI_MAX_TWT_WAKE_AHEAD_DURATION_US (LONG_MAX - 1)
761
787
827
833 struct wifi_twt_flow_info twt_flows[WIFI_MAX_TWT_FLOWS];
836};
837
845
855
857#define MAX_REG_CHAN_NUM 42
858
862 unsigned short center_frequency;
864 unsigned short max_power:8;
866 unsigned short supported:1;
868 unsigned short passive_only:1;
870 unsigned short dfs:1;
871} __packed;
872
886
894
895#if defined(CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS) || defined(__DOXYGEN__)
903 unsigned short frequency;
905 uint8_t data[CONFIG_WIFI_MGMT_RAW_SCAN_RESULT_LENGTH];
906};
907#endif /* CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS */
908
920
923/* for use in max info size calculations */
924union wifi_mgmt_events {
925 struct wifi_scan_result scan_result;
926 struct wifi_status connect_status;
927 struct wifi_iface_status iface_status;
928#ifdef CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS
929 struct wifi_raw_scan_result raw_scan_result;
930#endif /* CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS */
931 struct wifi_twt_params twt_params;
932 struct wifi_ap_sta_info ap_sta_info;
933};
934
946
958
968
970#define WIFI_AP_STA_MAX_INACTIVITY (LONG_MAX - 1)
982
983#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_DPP
986#define WIFI_DPP_QRCODE_MAX_LEN 255
987
989enum wifi_dpp_op {
991 WIFI_DPP_OP_INVALID = 0,
993 WIFI_DPP_CONFIGURATOR_ADD,
995 WIFI_DPP_AUTH_INIT,
997 WIFI_DPP_QR_CODE,
999 WIFI_DPP_CHIRP,
1001 WIFI_DPP_LISTEN,
1003 WIFI_DPP_BOOTSTRAP_GEN,
1005 WIFI_DPP_BOOTSTRAP_GET_URI,
1007 WIFI_DPP_SET_CONF_PARAM,
1009 WIFI_DPP_SET_WAIT_RESP_TIME,
1011 WIFI_DPP_RECONFIG
1012};
1013
1015enum wifi_dpp_curves {
1017 WIFI_DPP_CURVES_DEFAULT = 0,
1019 WIFI_DPP_CURVES_P_256,
1021 WIFI_DPP_CURVES_P_384,
1023 WIFI_DPP_CURVES_P_512,
1025 WIFI_DPP_CURVES_BP_256,
1027 WIFI_DPP_CURVES_BP_384,
1029 WIFI_DPP_CURVES_BP_512
1030};
1031
1033enum wifi_dpp_role {
1035 WIFI_DPP_ROLE_UNSET = 0,
1037 WIFI_DPP_ROLE_CONFIGURATOR,
1039 WIFI_DPP_ROLE_ENROLLEE,
1041 WIFI_DPP_ROLE_EITHER
1042};
1043
1048enum wifi_dpp_conf {
1050 WIFI_DPP_CONF_UNSET = 0,
1052 WIFI_DPP_CONF_STA,
1054 WIFI_DPP_CONF_AP,
1056 WIFI_DPP_CONF_QUERY
1057};
1058
1063enum wifi_dpp_bootstrap_type {
1065 WIFI_DPP_BOOTSTRAP_TYPE_UNSET = 0,
1067 WIFI_DPP_BOOTSTRAP_TYPE_QRCODE,
1069 WIFI_DPP_BOOTSTRAP_TYPE_PKEX,
1071 WIFI_DPP_BOOTSTRAP_TYPE_NFC_URI
1072};
1073
1075struct wifi_dpp_configurator_add_params {
1077 int curve;
1079 int net_access_key_curve;
1080};
1081
1083struct wifi_dpp_auth_init_params {
1085 int peer;
1087 int configurator;
1089 int role;
1091 int conf;
1093 char ssid[WIFI_SSID_MAX_LEN + 1];
1094};
1095
1097struct wifi_dpp_chirp_params {
1099 int id;
1101 int freq;
1102};
1103
1105struct wifi_dpp_listen_params {
1107 int freq;
1109 int role;
1110};
1111
1113struct wifi_dpp_bootstrap_gen_params {
1115 int type;
1117 int op_class;
1119 int chan;
1121 int curve;
1124};
1125
1127struct wifi_dpp_configurator_set_params {
1129 int peer;
1131 int configurator;
1133 int role;
1135 int conf;
1137 int curve;
1139 int net_access_key_curve;
1141 char ssid[WIFI_SSID_MAX_LEN + 1];
1142};
1143
1146struct wifi_dpp_params {
1148 int action;
1149 union {
1151 struct wifi_dpp_configurator_add_params configurator_add;
1153 struct wifi_dpp_auth_init_params auth_init;
1155 struct wifi_dpp_chirp_params chirp;
1157 struct wifi_dpp_listen_params listen;
1159 struct wifi_dpp_bootstrap_gen_params bootstrap_gen;
1161 struct wifi_dpp_configurator_set_params configurator_set;
1163 int id;
1165 int dpp_resp_wait_time;
1167 int network_id;
1169 uint8_t dpp_qr_code[WIFI_DPP_QRCODE_MAX_LEN + 1];
1174 char resp[WIFI_DPP_QRCODE_MAX_LEN + 1];
1175 };
1176};
1177#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_DPP */
1178
1179#define WIFI_WPS_PIN_MAX_LEN 8
1180
1190
1198
1210
1211#include <zephyr/net/net_if.h>
1212
1219typedef void (*scan_result_cb_t)(struct net_if *iface, int status,
1220 struct wifi_scan_result *entry);
1221
1222#ifdef CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS
1229typedef void (*raw_scan_result_cb_t)(struct net_if *iface, int status,
1230 struct wifi_raw_scan_result *entry);
1231#endif /* CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS */
1232
1246 int (*scan)(const struct device *dev,
1247 struct wifi_scan_params *params,
1248 scan_result_cb_t cb);
1256 int (*connect)(const struct device *dev,
1257 struct wifi_connect_req_params *params);
1264 int (*disconnect)(const struct device *dev);
1272 int (*ap_enable)(const struct device *dev,
1273 struct wifi_connect_req_params *params);
1280 int (*ap_disable)(const struct device *dev);
1288 int (*ap_sta_disconnect)(const struct device *dev, const uint8_t *mac);
1296 int (*iface_status)(const struct device *dev, struct wifi_iface_status *status);
1297#if defined(CONFIG_NET_STATISTICS_WIFI) || defined(__DOXYGEN__)
1305 int (*get_stats)(const struct device *dev, struct net_stats_wifi *stats);
1312 int (*reset_stats)(const struct device *dev);
1313#endif /* CONFIG_NET_STATISTICS_WIFI */
1321 int (*cfg_11k)(const struct device *dev, struct wifi_11k_params *params);
1329 int (*send_11k_neighbor_request)(const struct device *dev, struct wifi_11k_params *params);
1337 int (*set_power_save)(const struct device *dev, struct wifi_ps_params *params);
1345 int (*set_twt)(const struct device *dev, struct wifi_twt_params *params);
1353 int (*get_power_save_config)(const struct device *dev, struct wifi_ps_config *config);
1361 int (*reg_domain)(const struct device *dev, struct wifi_reg_domain *reg_domain);
1369 int (*filter)(const struct device *dev, struct wifi_filter_info *filter);
1377 int (*mode)(const struct device *dev, struct wifi_mode_info *mode);
1385 int (*channel)(const struct device *dev, struct wifi_channel_info *channel);
1386#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_WNM
1394 int (*btm_query)(const struct device *dev, uint8_t reason);
1395#endif
1408 int (*get_version)(const struct device *dev, struct wifi_version *params);
1416 int (*get_conn_params)(const struct device *dev, struct wifi_connect_req_params *params);
1424 int (*set_rts_threshold)(const struct device *dev, unsigned int rts_threshold);
1432 int (*ap_config_params)(const struct device *dev, struct wifi_ap_config_params *params);
1433
1434#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_DPP
1442 int (*dpp_dispatch)(const struct device *dev, struct wifi_dpp_params *params);
1443#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_DPP */
1450 int (*pmksa_flush)(const struct device *dev);
1458#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE
1459 int (*enterprise_creds)(const struct device *dev,
1460 struct wifi_enterprise_creds_params *creds);
1461#endif
1469 int (*get_rts_threshold)(const struct device *dev, unsigned int *rts_threshold);
1477 int (*wps_config)(const struct device *dev, struct wifi_wps_config_params *params);
1485 int (*candidate_scan)(const struct device *dev, struct wifi_scan_params *params);
1492 int (*start_11r_roaming)(const struct device *dev);
1493};
1494
1503#if defined(CONFIG_WIFI_USE_NATIVE_NETWORKING) || defined(__DOXYGEN__)
1506#else
1509#endif
1511 const struct wifi_mgmt_ops *const wifi_mgmt_api;
1512
1513#if defined(CONFIG_WIFI_NM_WPA_SUPPLICANT) || defined(__DOXYGEN__)
1515 const void *wifi_drv_ops;
1516#endif
1517};
1518
1519#if defined(CONFIG_WIFI_NM_WPA_SUPPLICANT)
1520/* Make sure wifi_drv_ops is after wifi_mgmt_api */
1521BUILD_ASSERT(offsetof(struct net_wifi_mgmt_offload, wifi_mgmt_api) <
1522 offsetof(struct net_wifi_mgmt_offload, wifi_drv_ops));
1523#endif
1524
1525/* Make sure that the network interface API is properly setup inside
1526 * Wifi mgmt offload API struct (it is the first one).
1527 */
1528BUILD_ASSERT(offsetof(struct net_wifi_mgmt_offload, wifi_iface) == 0);
1529
1535void wifi_mgmt_raise_connect_result_event(struct net_if *iface, int status);
1536
1542void wifi_mgmt_raise_disconnect_result_event(struct net_if *iface, int status);
1543
1551
1558 struct wifi_twt_params *twt_params);
1559
1565void wifi_mgmt_raise_twt_sleep_state(struct net_if *iface, int twt_sleep_state);
1566
1567#if defined(CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS) || defined(__DOXYGEN__)
1574 struct wifi_raw_scan_result *raw_scan_info);
1575#endif /* CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS */
1576
1583
1584#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_ROAMING
1591void wifi_mgmt_raise_neighbor_rep_recv_event(struct net_if *iface,
1592 char *inbuf, size_t buf_len);
1593#endif
1594
1601
1608
1615 struct wifi_ap_sta_info *sta_info);
1616
1622 struct wifi_ap_sta_info *sta_info);
1623
1627#ifdef __cplusplus
1628}
1629#endif
1630
1631#endif /* ZEPHYR_INCLUDE_NET_WIFI_MGMT_H_ */
Ethernet.
static int listen(int sock, int backlog)
POSIX wrapper for zsock_listen.
Definition socket.h:855
#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.
wifi_ps
Wi-Fi power save states.
Definition wifi.h:367
#define NET_REQUEST_WIFI_PS_CONFIG
Request a Wi-Fi power save configuration.
Definition wifi_mgmt.h:198
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:140
wifi_frequency_bands
IEEE 802.11 operational frequency bands (not exhaustive).
Definition wifi.h:207
wifi_mfp_options
IEEE 802.11w - Management frame protection.
Definition wifi.h:186
#define NET_REQUEST_WIFI_RTS_THRESHOLD
Request a Wi-Fi RTS threshold.
Definition wifi_mgmt.h:246
#define WIFI_WPS_PIN_MAX_LEN
Definition wifi_mgmt.h:1179
#define NET_REQUEST_WIFI_RTS_THRESHOLD_CONFIG
Request a Wi-Fi RTS threshold configuration.
Definition wifi_mgmt.h:285
#define WIFI_MAC_ADDR_LEN
MAC address length.
Definition wifi.h:235
#define NET_REQUEST_WIFI_REG_DOMAIN
Request a Wi-Fi regulatory domain.
Definition wifi_mgmt.h:204
wifi_ps_exit_strategy
Wi-Fi power save exit strategy.
Definition wifi.h:576
#define NET_REQUEST_WIFI_PACKET_FILTER
Request Wi-Fi packet filter.
Definition wifi_mgmt.h:216
wifi_twt_setup_cmd
Wi-Fi Target Wake Time (TWT) setup commands.
Definition wifi.h:449
#define NET_REQUEST_WIFI_NEIGHBOR_REP_COMPLETE
Definition wifi_mgmt.h:304
wifi_twt_sleep_state
Wi-Fi TWT sleep states.
Definition wifi_mgmt.h:888
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:170
#define NET_REQUEST_WIFI_VERSION
Request a Wi-Fi version.
Definition wifi_mgmt.h:234
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.
#define NET_REQUEST_WIFI_11K_NEIGHBOR_REQUEST
Definition wifi_mgmt.h:180
wifi_wps_op
Operation for WPS.
Definition wifi_mgmt.h:1182
wifi_twt_setup_resp_status
Wi-Fi Target Wake Time (TWT) negotiation status.
Definition wifi.h:472
wifi_iface_mode
Wi-Fi interface modes.
Definition wifi.h:300
#define NET_REQUEST_WIFI_AP_ENABLE
Request a Wi-Fi access point enable.
Definition wifi_mgmt.h:158
#define NET_REQUEST_WIFI_WPS_CONFIG
Definition wifi_mgmt.h:290
#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:186
wifi_twt_negotiation_type
Wi-Fi Target Wake Time (TWT) negotiation types.
Definition wifi.h:436
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:653
wifi_conn_status
Wi-Fi connect result codes.
Definition wifi_mgmt.h:568
#define NET_REQUEST_WIFI_START_ROAMING
Definition wifi_mgmt.h:299
#define NET_REQUEST_WIFI_PMKSA_FLUSH
Request a Wi-Fi PMKSA cache entries flush.
Definition wifi_mgmt.h:273
#define NET_REQUEST_WIFI_DISCONNECT
Request a Wi-Fi disconnect.
Definition wifi_mgmt.h:152
wifi_twt_fail_reason
Target Wake Time (TWT) error codes.
Definition wifi.h:480
net_request_wifi_cmd
Wi-Fi management commands.
Definition wifi_mgmt.h:67
#define NET_REQUEST_WIFI_MODE
Request current Wi-Fi mode.
Definition wifi_mgmt.h:210
#define NET_REQUEST_WIFI_AP_STA_DISCONNECT
Request a Wi-Fi access point to disconnect a station.
Definition wifi_mgmt.h:228
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:146
wifi_ap_status
Wi-Fi AP mode result codes.
Definition wifi_mgmt.h:611
#define NET_REQUEST_WIFI_TWT
Request a Wi-Fi TWT.
Definition wifi_mgmt.h:192
wifi_link_mode
Wi-Fi link operating modes.
Definition wifi.h:328
wifi_ps_param_type
Wi-Fi power save parameters.
Definition wifi.h:547
net_event_wifi_cmd
Wi-Fi management events.
Definition wifi_mgmt.h:310
#define NET_REQUEST_WIFI_CONN_PARAMS
Request a Wi-Fi connection parameters.
Definition wifi_mgmt.h:240
wifi_disconn_reason
Wi-Fi disconnect reason codes.
Definition wifi_mgmt.h:595
wifi_ps_wakeup_mode
Wi-Fi power save modes.
Definition wifi.h:563
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:425
wifi_scan_type
Wi-Fi scanning types.
Definition wifi.h:359
void(* scan_result_cb_t)(struct net_if *iface, int status, struct wifi_scan_result *entry)
Scan result callback.
Definition wifi_mgmt.h:1219
wifi_twt_teardown_status
Wi-Fi Target Wake Time (TWT) teradown status.
Definition wifi.h:506
#define WIFI_SSID_MAX_LEN
Max SSID length.
Definition wifi.h:227
#define NET_REQUEST_WIFI_CHANNEL
Request a Wi-Fi channel.
Definition wifi_mgmt.h:222
wifi_config_ps_param_fail_reason
Wi-Fi power save error codes.
Definition wifi.h:592
#define NET_REQUEST_WIFI_11K_CONFIG
Definition wifi_mgmt.h:175
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:839
#define NET_REQUEST_WIFI_ENTERPRISE_CREDS
Set Wi-Fi enterprise mode CA/client Cert and key.
Definition wifi_mgmt.h:279
#define NET_REQUEST_WIFI_AP_CONFIG_PARAM
Request a Wi-Fi AP parameters configuration.
Definition wifi_mgmt.h:252
#define NET_REQUEST_WIFI_AP_DISABLE
Request a Wi-Fi access point disable.
Definition wifi_mgmt.h:164
wifi_hostapd_iface_state
Wi-Fi AP status.
Definition wifi_mgmt.h:1201
wifi_ps_mode
Wi-Fi power save modes.
Definition wifi.h:378
@ WIFI_TWT_STATE_SLEEP
TWT sleep state: sleeping.
Definition wifi_mgmt.h:890
@ WIFI_TWT_STATE_AWAKE
TWT sleep state: awake.
Definition wifi_mgmt.h:892
@ WIFI_WPS_PBC
WPS pbc.
Definition wifi_mgmt.h:1184
@ WIFI_WPS_PIN_SET
Set WPS pin number.
Definition wifi_mgmt.h:1188
@ WIFI_WPS_PIN_GET
Get WPS pin number.
Definition wifi_mgmt.h:1186
@ WIFI_STATUS_CONN_AP_NOT_FOUND
Connection failed - AP not found.
Definition wifi_mgmt.h:585
@ WIFI_STATUS_CONN_SUCCESS
Connection successful.
Definition wifi_mgmt.h:570
@ 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:581
@ WIFI_STATUS_CONN_FAIL
Connection failed - generic failure.
Definition wifi_mgmt.h:572
@ WIFI_STATUS_CONN_TIMEOUT
Connection timed out.
Definition wifi_mgmt.h:583
@ WIFI_STATUS_DISCONN_FIRST_STATUS
Connection disconnected status.
Definition wifi_mgmt.h:589
@ WIFI_STATUS_CONN_LAST_STATUS
Last connection status.
Definition wifi_mgmt.h:587
@ NET_REQUEST_WIFI_CMD_AP_CONFIG_PARAM
Configure AP parameter.
Definition wifi_mgmt.h:107
@ NET_REQUEST_WIFI_CMD_TWT
Setup or teardown TWT flow.
Definition wifi_mgmt.h:87
@ NET_REQUEST_WIFI_CMD_PMKSA_FLUSH
Flush PMKSA cache entries.
Definition wifi_mgmt.h:115
@ NET_REQUEST_WIFI_CMD_PACKET_FILTER
Set or get packet filter setting for current mode.
Definition wifi_mgmt.h:95
@ NET_REQUEST_WIFI_CMD_AP_ENABLE
Enable AP mode.
Definition wifi_mgmt.h:75
@ NET_REQUEST_WIFI_CMD_START_ROAMING
Start roaming.
Definition wifi_mgmt.h:127
@ NET_REQUEST_WIFI_CMD_REG_DOMAIN
Set or get regulatory domain.
Definition wifi_mgmt.h:91
@ NET_REQUEST_WIFI_CMD_11K_NEIGHBOR_REQUEST
Send 11k neighbor request.
Definition wifi_mgmt.h:83
@ NET_REQUEST_WIFI_CMD_SCAN
Scan for Wi-Fi networks.
Definition wifi_mgmt.h:69
@ NET_REQUEST_WIFI_CMD_IFACE_STATUS
Get interface status.
Definition wifi_mgmt.h:79
@ NET_REQUEST_WIFI_CMD_AP_STA_DISCONNECT
Disconnect a STA from AP.
Definition wifi_mgmt.h:99
@ NET_REQUEST_WIFI_CMD_DPP
DPP actions.
Definition wifi_mgmt.h:109
@ NET_REQUEST_WIFI_CMD_AP_DISABLE
Disable AP mode.
Definition wifi_mgmt.h:77
@ NET_REQUEST_WIFI_CMD_RTS_THRESHOLD
Set RTS threshold.
Definition wifi_mgmt.h:105
@ NET_REQUEST_WIFI_CMD_CONNECT
Connect to a Wi-Fi network.
Definition wifi_mgmt.h:71
@ NET_REQUEST_WIFI_CMD_VERSION
Get Wi-Fi driver and Firmware versions.
Definition wifi_mgmt.h:101
@ NET_REQUEST_WIFI_CMD_ENTERPRISE_CREDS
Set enterprise mode credential.
Definition wifi_mgmt.h:117
@ NET_REQUEST_WIFI_CMD_CONN_PARAMS
Get Wi-Fi latest connection parameters.
Definition wifi_mgmt.h:103
@ NET_REQUEST_WIFI_CMD_11K_CONFIG
Set or get 11k status.
Definition wifi_mgmt.h:81
@ NET_REQUEST_WIFI_CMD_CHANNEL
Set or get Wi-Fi channel for Monitor or TX-Injection mode.
Definition wifi_mgmt.h:97
@ NET_REQUEST_WIFI_CMD_MODE
Set or get Mode of operation.
Definition wifi_mgmt.h:93
@ NET_REQUEST_WIFI_CMD_RTS_THRESHOLD_CONFIG
Get RTS threshold.
Definition wifi_mgmt.h:119
@ NET_REQUEST_WIFI_CMD_CANDIDATE_SCAN
Specific scan.
Definition wifi_mgmt.h:131
@ NET_REQUEST_WIFI_CMD_PS
Set power save status.
Definition wifi_mgmt.h:85
@ NET_REQUEST_WIFI_CMD_DISCONNECT
Disconnect from a Wi-Fi network.
Definition wifi_mgmt.h:73
@ NET_REQUEST_WIFI_CMD_NEIGHBOR_REP_COMPLETE
Neighbor report complete.
Definition wifi_mgmt.h:129
@ NET_REQUEST_WIFI_CMD_AP_WPS_CONFIG
AP WPS config.
Definition wifi_mgmt.h:133
@ NET_REQUEST_WIFI_CMD_PS_CONFIG
Get power save config.
Definition wifi_mgmt.h:89
@ NET_REQUEST_WIFI_CMD_WPS_CONFIG
WPS config.
Definition wifi_mgmt.h:121
@ WIFI_STATUS_AP_CHANNEL_NOT_ALLOWED
AP mode enable failed - channel not allowed.
Definition wifi_mgmt.h:619
@ WIFI_STATUS_AP_SUCCESS
AP mode enable or disable successful.
Definition wifi_mgmt.h:613
@ WIFI_STATUS_AP_OP_NOT_SUPPORTED
AP mode enable failed - operation not supported.
Definition wifi_mgmt.h:625
@ WIFI_STATUS_AP_OP_NOT_PERMITTED
AP mode enable failed - operation not permitted.
Definition wifi_mgmt.h:627
@ WIFI_STATUS_AP_CHANNEL_NOT_SUPPORTED
AP mode enable failed - channel not supported.
Definition wifi_mgmt.h:617
@ WIFI_STATUS_AP_FAIL
AP mode enable or disable failed - generic failure.
Definition wifi_mgmt.h:615
@ WIFI_STATUS_AP_AUTH_TYPE_NOT_SUPPORTED
AP mode enable failed - authentication type not supported.
Definition wifi_mgmt.h:623
@ WIFI_STATUS_AP_SSID_NOT_ALLOWED
AP mode enable failed - SSID not allowed.
Definition wifi_mgmt.h:621
@ NET_EVENT_WIFI_CMD_AP_STA_DISCONNECTED
STA disconnected from AP.
Definition wifi_mgmt.h:344
@ NET_EVENT_WIFI_CMD_SCAN_RESULT
Scan results available.
Definition wifi_mgmt.h:312
@ NET_EVENT_WIFI_CMD_DISCONNECT_RESULT
Disconnect result.
Definition wifi_mgmt.h:318
@ NET_EVENT_WIFI_CMD_SUPPLICANT
Supplicant specific event.
Definition wifi_mgmt.h:346
@ NET_EVENT_WIFI_CMD_NEIGHBOR_REP_RECEIVED
Neighbor Report.
Definition wifi_mgmt.h:334
@ 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:326
@ NET_EVENT_WIFI_CMD_NEIGHBOR_REP_COMPLETE
Neighbor Report complete.
Definition wifi_mgmt.h:336
@ NET_EVENT_WIFI_CMD_AP_ENABLE_RESULT
AP mode enable result.
Definition wifi_mgmt.h:338
@ NET_EVENT_WIFI_CMD_AP_STA_CONNECTED
STA connected to AP.
Definition wifi_mgmt.h:342
@ NET_EVENT_WIFI_CMD_SIGNAL_CHANGE
Signal change event.
Definition wifi_mgmt.h:332
@ NET_EVENT_WIFI_CMD_SCAN_DONE
Scan done.
Definition wifi_mgmt.h:314
@ NET_EVENT_WIFI_CMD_TWT
TWT events.
Definition wifi_mgmt.h:322
@ NET_EVENT_WIFI_CMD_RAW_SCAN_RESULT
Raw scan results available.
Definition wifi_mgmt.h:328
@ NET_EVENT_WIFI_CMD_AP_DISABLE_RESULT
AP mode disable result.
Definition wifi_mgmt.h:340
@ NET_EVENT_WIFI_CMD_DISCONNECT_COMPLETE
Disconnect complete.
Definition wifi_mgmt.h:330
@ NET_EVENT_WIFI_CMD_IFACE_STATUS
Interface status.
Definition wifi_mgmt.h:320
@ NET_EVENT_WIFI_CMD_CONNECT_RESULT
Connect result.
Definition wifi_mgmt.h:316
@ WIFI_REASON_DISCONN_INACTIVITY
Disconnected due to inactivity.
Definition wifi_mgmt.h:605
@ WIFI_REASON_DISCONN_AP_LEAVING
Disconnected due to AP leaving.
Definition wifi_mgmt.h:603
@ WIFI_REASON_DISCONN_SUCCESS
Success, overload status as reason.
Definition wifi_mgmt.h:597
@ WIFI_REASON_DISCONN_UNSPECIFIED
Unspecified reason.
Definition wifi_mgmt.h:599
@ WIFI_REASON_DISCONN_USER_REQUEST
Disconnected due to user request.
Definition wifi_mgmt.h:601
@ WIFI_MGMT_GET
Get operation.
Definition wifi_mgmt.h:841
@ WIFI_MGMT_SET
Set operation.
Definition wifi_mgmt.h:843
@ WIFI_HAPD_IFACE_DISABLED
Definition wifi_mgmt.h:1203
@ WIFI_HAPD_IFACE_DFS
Definition wifi_mgmt.h:1207
@ WIFI_HAPD_IFACE_HT_SCAN
Definition wifi_mgmt.h:1206
@ WIFI_HAPD_IFACE_ACS
Definition wifi_mgmt.h:1205
@ WIFI_HAPD_IFACE_UNINITIALIZED
Definition wifi_mgmt.h:1202
@ WIFI_HAPD_IFACE_ENABLED
Definition wifi_mgmt.h:1208
@ WIFI_HAPD_IFACE_COUNTRY_UPDATE
Definition wifi_mgmt.h:1204
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:534
Network Interface structure.
Definition net_if.h:692
All Wi-Fi specific statistics.
Definition net_stats.h:669
Wi-Fi management offload API.
Definition wifi_mgmt.h:1496
struct ethernet_api wifi_iface
Mandatory to get in first position.
Definition wifi_mgmt.h:1505
const struct wifi_mgmt_ops *const wifi_mgmt_api
Wi-Fi management API.
Definition wifi_mgmt.h:1511
const void * wifi_drv_ops
Wi-Fi supplicant driver API.
Definition wifi_mgmt.h:1515
Extended net_if_api for offloaded ifaces/network devices, allowing handling of admin up/down state ch...
Definition offloaded_netdev.h:53
Wi-Fi 11k parameters.
Definition wifi_mgmt.h:847
uint8_t ssid[WIFI_SSID_MAX_LEN+1]
SSID.
Definition wifi_mgmt.h:853
bool enable_11k
11k enable/disable
Definition wifi_mgmt.h:851
enum wifi_mgmt_op oper
11k command operation
Definition wifi_mgmt.h:849
Wi-Fi AP configuration parameter.
Definition wifi_mgmt.h:974
uint32_t max_inactivity
Parameter used for setting maximum inactivity duration for stations.
Definition wifi_mgmt.h:978
enum wifi_ap_config_param type
Parameter used to identify the different AP parameters.
Definition wifi_mgmt.h:976
uint32_t max_num_sta
Parameter used for setting maximum number of stations.
Definition wifi_mgmt.h:980
AP mode - connected STA details.
Definition wifi_mgmt.h:910
enum wifi_link_mode link_mode
Link mode, see enum wifi_link_mode.
Definition wifi_mgmt.h:912
uint8_t mac[WIFI_MAC_ADDR_LEN]
MAC address.
Definition wifi_mgmt.h:914
uint8_t mac_length
MAC address length.
Definition wifi_mgmt.h:916
bool twt_capable
is TWT capable ?
Definition wifi_mgmt.h:918
Wi-Fi structure to uniquely identify a band-channel pair.
Definition wifi_mgmt.h:420
uint8_t band
Frequency band.
Definition wifi_mgmt.h:422
uint8_t channel
Channel.
Definition wifi_mgmt.h:424
Wi-Fi channel setting for monitor and TX-injection modes.
Definition wifi_mgmt.h:960
uint8_t if_index
Interface index.
Definition wifi_mgmt.h:964
uint16_t channel
Channel value to set.
Definition wifi_mgmt.h:962
enum wifi_mgmt_op oper
Get or set operation.
Definition wifi_mgmt.h:966
Wi-Fi connect request parameters.
Definition wifi_mgmt.h:504
const uint8_t * key2_passwd
private key2 passwd
Definition wifi_mgmt.h:538
bool ft_used
Fast BSS Transition used.
Definition wifi_mgmt.h:554
enum wifi_security_type security
Security type.
Definition wifi_mgmt.h:522
const uint8_t * passwords[WIFI_ENT_IDENTITY_MAX_USERS]
User Passwords.
Definition wifi_mgmt.h:562
const uint8_t * identities[WIFI_ENT_IDENTITY_MAX_USERS]
User Identities.
Definition wifi_mgmt.h:560
uint8_t aid_length
anon_id length, max 64
Definition wifi_mgmt.h:532
const uint8_t * sae_password
SAE password (same as PSK but with no length restrictions), optional.
Definition wifi_mgmt.h:514
const uint8_t * key_passwd
Private key passwd for enterprise mode.
Definition wifi_mgmt.h:534
uint8_t eap_id_length
eap identity length, max 64
Definition wifi_mgmt.h:548
uint8_t channel
Channel.
Definition wifi_mgmt.h:520
uint8_t ssid_length
SSID length.
Definition wifi_mgmt.h:508
int timeout
Connect timeout in seconds, SYS_FOREVER_MS for no timeout.
Definition wifi_mgmt.h:528
int nusers
Number of EAP users.
Definition wifi_mgmt.h:556
enum wifi_mfp_options mfp
MFP options.
Definition wifi_mgmt.h:524
uint8_t sae_password_length
SAE password length.
Definition wifi_mgmt.h:516
const uint8_t * anon_id
anonymous identity
Definition wifi_mgmt.h:530
int eap_ver
eap version
Definition wifi_mgmt.h:544
uint8_t key_passwd_length
Private key passwd length, max 128.
Definition wifi_mgmt.h:536
uint8_t band
Frequency band.
Definition wifi_mgmt.h:518
const uint8_t * psk
Pre-shared key.
Definition wifi_mgmt.h:510
uint8_t bssid[WIFI_MAC_ADDR_LEN]
BSSID.
Definition wifi_mgmt.h:526
uint8_t passwds
Number of EAP passwds.
Definition wifi_mgmt.h:558
uint8_t psk_length
Pre-shared key length.
Definition wifi_mgmt.h:512
const uint8_t * eap_identity
Identity for EAP.
Definition wifi_mgmt.h:546
const uint8_t * ssid
SSID.
Definition wifi_mgmt.h:506
uint8_t suiteb_type
suiteb or suiteb-192
Definition wifi_mgmt.h:542
uint8_t eap_passwd_length
eap passwd length, max 128
Definition wifi_mgmt.h:552
uint8_t key2_passwd_length
key2 passwd length, max 128
Definition wifi_mgmt.h:540
const uint8_t * eap_password
Password string for EAP.
Definition wifi_mgmt.h:550
Wi-Fi enterprise mode credentials.
Definition wifi_mgmt.h:789
uint32_t client_key_len
Client key length.
Definition wifi_mgmt.h:801
uint8_t * client_cert2
Client certification of phase2.
Definition wifi_mgmt.h:807
uint32_t client_key2_len
Phase2 Client key length.
Definition wifi_mgmt.h:813
uint32_t client_cert_len
Client certification length.
Definition wifi_mgmt.h:797
uint32_t ca_cert_len
CA certification length.
Definition wifi_mgmt.h:793
uint8_t * client_cert
Client certification.
Definition wifi_mgmt.h:795
uint8_t * client_key
Client key.
Definition wifi_mgmt.h:799
uint32_t server_key_len
Server key length.
Definition wifi_mgmt.h:821
uint8_t * dh_param
Diffie–Hellman parameter.
Definition wifi_mgmt.h:823
uint8_t * client_key2
Client key of phase2.
Definition wifi_mgmt.h:811
uint32_t ca_cert2_len
Phase2 CA certification length.
Definition wifi_mgmt.h:805
uint32_t dh_param_len
Diffie–Hellman parameter length.
Definition wifi_mgmt.h:825
uint8_t * server_key
Server key.
Definition wifi_mgmt.h:819
uint32_t server_cert_len
Server certification length.
Definition wifi_mgmt.h:817
uint8_t * server_cert
Server certification.
Definition wifi_mgmt.h:815
uint8_t * ca_cert2
CA certification of phase2.
Definition wifi_mgmt.h:803
uint32_t client_cert2_len
Phase2 Client certification length.
Definition wifi_mgmt.h:809
uint8_t * ca_cert
CA certification.
Definition wifi_mgmt.h:791
Wi-Fi filter setting for monitor, prmoiscuous, TX-injection modes.
Definition wifi_mgmt.h:948
uint16_t buffer_size
Filter buffer size.
Definition wifi_mgmt.h:954
uint8_t filter
Filter setting.
Definition wifi_mgmt.h:950
enum wifi_mgmt_op oper
Get or set operation.
Definition wifi_mgmt.h:956
uint8_t if_index
Interface index.
Definition wifi_mgmt.h:952
Wi-Fi interface status.
Definition wifi_mgmt.h:645
unsigned short beacon_interval
Beacon interval.
Definition wifi_mgmt.h:671
char ssid[WIFI_SSID_MAX_LEN+1]
SSID.
Definition wifi_mgmt.h:651
int rssi
RSSI.
Definition wifi_mgmt.h:667
int current_phy_rate
The current 802.11 PHY data rate.
Definition wifi_mgmt.h:675
char bssid[WIFI_MAC_ADDR_LEN]
BSSID.
Definition wifi_mgmt.h:653
enum wifi_security_type security
Security type, see enum wifi_security_type.
Definition wifi_mgmt.h:663
unsigned int channel
Channel.
Definition wifi_mgmt.h:657
enum wifi_mfp_options mfp
MFP options, see enum wifi_mfp_options.
Definition wifi_mgmt.h:665
unsigned char dtim_period
DTIM period.
Definition wifi_mgmt.h:669
int state
Interface state, see enum wifi_iface_state.
Definition wifi_mgmt.h:647
bool twt_capable
is TWT capable?
Definition wifi_mgmt.h:673
enum wifi_iface_mode iface_mode
Interface mode, see enum wifi_iface_mode.
Definition wifi_mgmt.h:659
unsigned int ssid_len
SSID length.
Definition wifi_mgmt.h:649
enum wifi_frequency_bands band
Frequency band.
Definition wifi_mgmt.h:655
enum wifi_link_mode link_mode
Link mode, see enum wifi_link_mode.
Definition wifi_mgmt.h:661
Wi-Fi management API.
Definition wifi_mgmt.h:1234
int(* reg_domain)(const struct device *dev, struct wifi_reg_domain *reg_domain)
Set or get regulatory domain.
Definition wifi_mgmt.h:1361
int(* send_11k_neighbor_request)(const struct device *dev, struct wifi_11k_params *params)
Send 11k neighbor request.
Definition wifi_mgmt.h:1329
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:1469
int(* ap_config_params)(const struct device *dev, struct wifi_ap_config_params *params)
Configure AP parameter.
Definition wifi_mgmt.h:1432
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:1246
int(* cfg_11k)(const struct device *dev, struct wifi_11k_params *params)
Set or get 11K status.
Definition wifi_mgmt.h:1321
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:1416
int(* start_11r_roaming)(const struct device *dev)
Start 11r roaming.
Definition wifi_mgmt.h:1492
int(* set_rts_threshold)(const struct device *dev, unsigned int rts_threshold)
Set RTS threshold value.
Definition wifi_mgmt.h:1424
int(* get_power_save_config)(const struct device *dev, struct wifi_ps_config *config)
Get power save config.
Definition wifi_mgmt.h:1353
int(* candidate_scan)(const struct device *dev, struct wifi_scan_params *params)
Trigger candidate scan.
Definition wifi_mgmt.h:1485
int(* disconnect)(const struct device *dev)
Disconnect from a Wi-Fi network.
Definition wifi_mgmt.h:1264
int(* ap_disable)(const struct device *dev)
Disable AP mode.
Definition wifi_mgmt.h:1280
int(* get_stats)(const struct device *dev, struct net_stats_wifi *stats)
Get Wi-Fi statistics.
Definition wifi_mgmt.h:1305
int(* get_version)(const struct device *dev, struct wifi_version *params)
Get Version of WiFi driver and Firmware.
Definition wifi_mgmt.h:1408
int(* pmksa_flush)(const struct device *dev)
Flush PMKSA cache entries.
Definition wifi_mgmt.h:1450
int(* wps_config)(const struct device *dev, struct wifi_wps_config_params *params)
Start a WPS PBC/PIN connection.
Definition wifi_mgmt.h:1477
int(* set_twt)(const struct device *dev, struct wifi_twt_params *params)
Setup or teardown TWT flow.
Definition wifi_mgmt.h:1345
int(* set_power_save)(const struct device *dev, struct wifi_ps_params *params)
Set power save status.
Definition wifi_mgmt.h:1337
int(* ap_enable)(const struct device *dev, struct wifi_connect_req_params *params)
Enable AP mode.
Definition wifi_mgmt.h:1272
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:1369
int(* iface_status)(const struct device *dev, struct wifi_iface_status *status)
Get interface status.
Definition wifi_mgmt.h:1296
int(* mode)(const struct device *dev, struct wifi_mode_info *mode)
Set or get mode of operation.
Definition wifi_mgmt.h:1377
int(* connect)(const struct device *dev, struct wifi_connect_req_params *params)
Connect to a Wi-Fi network.
Definition wifi_mgmt.h:1256
int(* reset_stats)(const struct device *dev)
Reset Wi-Fi statistics.
Definition wifi_mgmt.h:1312
int(* ap_sta_disconnect)(const struct device *dev, const uint8_t *mac)
Disconnect a STA from AP.
Definition wifi_mgmt.h:1288
int(* channel)(const struct device *dev, struct wifi_channel_info *channel)
Set or get current channel of operation.
Definition wifi_mgmt.h:1385
Wi-Fi mode setup.
Definition wifi_mgmt.h:938
enum wifi_mgmt_op oper
Get or set operation.
Definition wifi_mgmt.h:944
uint8_t mode
Mode setting for a specific mode of operation.
Definition wifi_mgmt.h:940
uint8_t if_index
Interface index.
Definition wifi_mgmt.h:942
Wi-Fi power save configuration.
Definition wifi_mgmt.h:829
struct wifi_ps_params ps_params
Power save configuration.
Definition wifi_mgmt.h:835
char num_twt_flows
Number of TWT flows.
Definition wifi_mgmt.h:831
struct wifi_twt_flow_info twt_flows[WIFI_MAX_TWT_FLOWS]
TWT flow details.
Definition wifi_mgmt.h:833
Wi-Fi power save parameters.
Definition wifi_mgmt.h:679
enum wifi_ps_mode mode
Wi-Fi power save mode.
Definition wifi_mgmt.h:687
enum wifi_config_ps_param_fail_reason fail_reason
Wi-Fi power save fail reason.
Definition wifi_mgmt.h:700
enum wifi_ps_wakeup_mode wakeup_mode
Wi-Fi power save wakeup mode.
Definition wifi_mgmt.h:685
unsigned short listen_interval
Listen interval.
Definition wifi_mgmt.h:683
enum wifi_ps_exit_strategy exit_strategy
Wi-Fi power save exit strategy.
Definition wifi_mgmt.h:702
enum wifi_ps enabled
Power save state.
Definition wifi_mgmt.h:681
unsigned int timeout_ms
Wi-Fi power save timeout.
Definition wifi_mgmt.h:696
enum wifi_ps_param_type type
Wi-Fi power save type.
Definition wifi_mgmt.h:698
Wi-Fi raw scan result.
Definition wifi_mgmt.h:897
int8_t rssi
RSSI.
Definition wifi_mgmt.h:899
uint8_t data[CONFIG_WIFI_MGMT_RAW_SCAN_RESULT_LENGTH]
Raw scan data.
Definition wifi_mgmt.h:905
int frame_length
Frame length.
Definition wifi_mgmt.h:901
unsigned short frequency
Frequency.
Definition wifi_mgmt.h:903
Per-channel regulatory attributes.
Definition wifi_mgmt.h:860
unsigned short center_frequency
Center frequency in MHz.
Definition wifi_mgmt.h:862
unsigned short dfs
Is a DFS channel.
Definition wifi_mgmt.h:870
unsigned short supported
Is channel supported or not.
Definition wifi_mgmt.h:866
unsigned short passive_only
Passive transmissions only.
Definition wifi_mgmt.h:868
unsigned short max_power
Maximum transmission power (in dBm)
Definition wifi_mgmt.h:864
Regulatory domain information or configuration.
Definition wifi_mgmt.h:874
unsigned int num_channels
Number of channels supported.
Definition wifi_mgmt.h:882
enum wifi_mgmt_op oper
Regulatory domain operation.
Definition wifi_mgmt.h:876
struct wifi_reg_chan_info * chan_info
Channels information.
Definition wifi_mgmt.h:884
bool force
Ignore all other regulatory hints over this one.
Definition wifi_mgmt.h:878
uint8_t country_code[WIFI_COUNTRY_CODE_LEN]
Country code: ISO/IEC 3166-1 alpha-2.
Definition wifi_mgmt.h:880
Wi-Fi scan parameters structure.
Definition wifi_mgmt.h:432
uint16_t max_bss_cnt
Specifies the maximum number of scan results to return.
Definition wifi_mgmt.h:461
uint16_t dwell_time_active
Active scan dwell time (in ms) on a channel.
Definition wifi_mgmt.h:447
enum wifi_scan_type scan_type
Scan type, see enum wifi_scan_type.
Definition wifi_mgmt.h:440
uint8_t bands
Bitmap of bands to be scanned.
Definition wifi_mgmt.h:444
uint16_t dwell_time_passive
Passive scan dwell time (in ms) on a channel.
Definition wifi_mgmt.h:450
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:476
const char * ssids[WIFI_MGMT_SCAN_SSID_FILT_MAX]
Array of SSID strings to scan.
Definition wifi_mgmt.h:453
Wi-Fi scan result, each result is provided to the net_mgmt_event_callback via its info attribute (see...
Definition wifi_mgmt.h:482
uint8_t ssid_length
SSID length.
Definition wifi_mgmt.h:486
uint8_t band
Frequency band.
Definition wifi_mgmt.h:488
uint8_t mac[WIFI_MAC_ADDR_LEN]
BSSID.
Definition wifi_mgmt.h:498
int8_t rssi
RSSI.
Definition wifi_mgmt.h:496
uint8_t mac_length
BSSID length.
Definition wifi_mgmt.h:500
uint8_t ssid[WIFI_SSID_MAX_LEN+1]
SSID.
Definition wifi_mgmt.h:484
enum wifi_mfp_options mfp
MFP options.
Definition wifi_mgmt.h:494
uint8_t channel
Channel.
Definition wifi_mgmt.h:490
enum wifi_security_type security
Security type.
Definition wifi_mgmt.h:492
Generic Wi-Fi status for commands and events.
Definition wifi_mgmt.h:631
enum wifi_ap_status ap_status
Access point status.
Definition wifi_mgmt.h:640
enum wifi_conn_status conn_status
Connection status.
Definition wifi_mgmt.h:636
enum wifi_disconn_reason disconn_reason
Disconnection reason status.
Definition wifi_mgmt.h:638
int status
Status value.
Definition wifi_mgmt.h:634
Wi-Fi TWT flow information.
Definition wifi_mgmt.h:765
uint8_t dialog_token
Dialog token, used to map requests to responses.
Definition wifi_mgmt.h:769
enum wifi_twt_negotiation_type negotiation_type
TWT negotiation type, see enum wifi_twt_negotiation_type.
Definition wifi_mgmt.h:773
uint32_t twt_wake_ahead_duration
Wake ahead duration.
Definition wifi_mgmt.h:785
bool trigger
Trigger enabled or disabled.
Definition wifi_mgmt.h:777
bool responder
Requestor or responder.
Definition wifi_mgmt.h:775
uint8_t flow_id
Flow ID, used to map setup with teardown.
Definition wifi_mgmt.h:771
uint64_t twt_interval
Interval = Wake up time + Sleeping time.
Definition wifi_mgmt.h:767
uint32_t twt_wake_interval
Wake up time.
Definition wifi_mgmt.h:783
bool implicit
Implicit or explicit.
Definition wifi_mgmt.h:779
bool announce
Announced or unannounced.
Definition wifi_mgmt.h:781
Wi-Fi TWT parameters.
Definition wifi_mgmt.h:706
bool announce
Announced or unannounced.
Definition wifi_mgmt.h:733
bool teardown_all
Teardown all flows.
Definition wifi_mgmt.h:746
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:712
bool trigger
Trigger enabled or disabled.
Definition wifi_mgmt.h:729
enum wifi_twt_negotiation_type negotiation_type
TWT negotiation type, see enum wifi_twt_negotiation_type.
Definition wifi_mgmt.h:710
enum wifi_twt_operation operation
TWT operation, see enum wifi_twt_operation.
Definition wifi_mgmt.h:708
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:741
enum wifi_twt_fail_reason fail_reason
TWT fail reason, see enum wifi_twt_fail_reason.
Definition wifi_mgmt.h:750
uint32_t twt_wake_interval
Wake up time.
Definition wifi_mgmt.h:735
enum wifi_twt_setup_resp_status resp_status
TWT setup response status, see enum wifi_twt_setup_resp_status.
Definition wifi_mgmt.h:714
bool implicit
Implicit or explicit.
Definition wifi_mgmt.h:731
uint8_t flow_id
Flow ID, used to map setup with teardown.
Definition wifi_mgmt.h:720
enum wifi_twt_teardown_status teardown_status
TWT teardown cmd status, see enum wifi_twt_teardown_status.
Definition wifi_mgmt.h:716
uint64_t twt_interval
Interval = Wake up time + Sleeping time.
Definition wifi_mgmt.h:725
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:718
bool responder
Requestor or responder.
Definition wifi_mgmt.h:727
Wi-Fi version.
Definition wifi_mgmt.h:410
const char * fw_version
Firmware version.
Definition wifi_mgmt.h:414
const char * drv_version
Driver version.
Definition wifi_mgmt.h:412
Wi-Fi wps setup.
Definition wifi_mgmt.h:1192
char pin[8+1]
pin value
Definition wifi_mgmt.h:1196
enum wifi_wps_op oper
wps operation
Definition wifi_mgmt.h:1194
IEEE 802.11 protocol and general Wi-Fi definitions.