Zephyr Project API 4.4.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
13
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
30
31/* Management part definitions */
32
34
35#define NET_WIFI_LAYER NET_MGMT_LAYER_L2
36#define NET_WIFI_CODE NET_MGMT_LAYER_CODE_WIFI
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)
65
126#ifdef CONFIG_WIFI_CREDENTIALS_CONNECT_STORED
128 NET_REQUEST_WIFI_CMD_CONNECT_STORED,
129#endif
145 NET_REQUEST_WIFI_CMD_MAX
147};
148
150#define NET_REQUEST_WIFI_SCAN \
151 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_SCAN)
152
154
156#define NET_REQUEST_WIFI_CONNECT \
157 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CONNECT)
158
160
162#define NET_REQUEST_WIFI_DISCONNECT \
163 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_DISCONNECT)
164
166
168#define NET_REQUEST_WIFI_AP_ENABLE \
169 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_ENABLE)
170
172
174#define NET_REQUEST_WIFI_AP_DISABLE \
175 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_DISABLE)
176
178
180#define NET_REQUEST_WIFI_AP_RTS_THRESHOLD \
181 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_RTS_THRESHOLD)
182
184
186#define NET_REQUEST_WIFI_IFACE_STATUS \
187 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_IFACE_STATUS)
188
190
191#define NET_REQUEST_WIFI_11K_CONFIG \
192 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_11K_CONFIG)
193
195
196#define NET_REQUEST_WIFI_11K_NEIGHBOR_REQUEST \
197 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_11K_NEIGHBOR_REQUEST)
198
200
202#define NET_REQUEST_WIFI_PS \
203 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PS)
204
206
208#define NET_REQUEST_WIFI_TWT \
209 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_TWT)
210
212
213#define NET_REQUEST_WIFI_BTWT \
214 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_BTWT)
215
217
219#define NET_REQUEST_WIFI_PS_CONFIG \
220 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PS_CONFIG)
221
223
225#define NET_REQUEST_WIFI_REG_DOMAIN \
226 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_REG_DOMAIN)
227
229
231#define NET_REQUEST_WIFI_MODE \
232 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_MODE)
233
235
237#define NET_REQUEST_WIFI_PACKET_FILTER \
238 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PACKET_FILTER)
239
241
243#define NET_REQUEST_WIFI_CHANNEL \
244 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CHANNEL)
245
247
249#define NET_REQUEST_WIFI_AP_STA_DISCONNECT \
250 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_STA_DISCONNECT)
251
253
255#define NET_REQUEST_WIFI_VERSION \
256 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_VERSION)
257
259
261#define NET_REQUEST_WIFI_CONN_PARAMS \
262 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CONN_PARAMS)
263
265
267#define NET_REQUEST_WIFI_RTS_THRESHOLD \
268 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_RTS_THRESHOLD)
269
271
273#define NET_REQUEST_WIFI_AP_CONFIG_PARAM \
274 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_CONFIG_PARAM)
275
277
279#define NET_REQUEST_WIFI_CONFIG_PARAM \
280 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CONFIG_PARAM)
281
283
284#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_DPP
286#define NET_REQUEST_WIFI_DPP \
287 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_DPP)
288
289NET_MGMT_DEFINE_REQUEST_HANDLER(NET_REQUEST_WIFI_DPP);
290#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_DPP */
291
293#define NET_REQUEST_WIFI_BTM_QUERY (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_BTM_QUERY)
294
296
298#define NET_REQUEST_WIFI_PMKSA_FLUSH \
299 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PMKSA_FLUSH)
300
302
304#define NET_REQUEST_WIFI_ENTERPRISE_CREDS \
305 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_ENTERPRISE_CREDS)
306
308
310#define NET_REQUEST_WIFI_RTS_THRESHOLD_CONFIG \
311 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_RTS_THRESHOLD_CONFIG)
312
314
315#define NET_REQUEST_WIFI_WPS_CONFIG (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_WPS_CONFIG)
316
318#ifdef CONFIG_WIFI_CREDENTIALS_CONNECT_STORED
319#define NET_REQUEST_WIFI_CONNECT_STORED (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CONNECT_STORED)
320
321NET_MGMT_DEFINE_REQUEST_HANDLER(NET_REQUEST_WIFI_CONNECT_STORED);
322#endif
323
324#define NET_REQUEST_WIFI_START_ROAMING \
325 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_START_ROAMING)
326
328
329#define NET_REQUEST_WIFI_NEIGHBOR_REP_COMPLETE \
330 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_NEIGHBOR_REP_COMPLETE)
331
333
334#define NET_REQUEST_WIFI_BSS_MAX_IDLE_PERIOD \
335 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_BSS_MAX_IDLE_PERIOD)
336
338
339#define NET_REQUEST_WIFI_BGSCAN \
340 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_BGSCAN)
341
343
344#define NET_REQUEST_WIFI_P2P_OPER \
345 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_P2P_OPER)
346
348
350
351enum {
352 NET_EVENT_WIFI_CMD_SCAN_RESULT_VAL,
353 NET_EVENT_WIFI_CMD_SCAN_DONE_VAL,
354 NET_EVENT_WIFI_CMD_CONNECT_RESULT_VAL,
355 NET_EVENT_WIFI_CMD_DISCONNECT_RESULT_VAL,
356 NET_EVENT_WIFI_CMD_IFACE_STATUS_VAL,
357 NET_EVENT_WIFI_CMD_TWT_VAL,
358 NET_EVENT_WIFI_CMD_TWT_SLEEP_STATE_VAL,
359 NET_EVENT_WIFI_CMD_RAW_SCAN_RESULT_VAL,
360 NET_EVENT_WIFI_CMD_DISCONNECT_COMPLETE_VAL,
361 NET_EVENT_WIFI_CMD_SIGNAL_CHANGE_VAL,
362 NET_EVENT_WIFI_CMD_NEIGHBOR_REP_RECEIVED_VAL,
363 NET_EVENT_WIFI_CMD_NEIGHBOR_REP_COMPLETE_VAL,
364 NET_EVENT_WIFI_CMD_AP_ENABLE_RESULT_VAL,
365 NET_EVENT_WIFI_CMD_AP_DISABLE_RESULT_VAL,
366 NET_EVENT_WIFI_CMD_AP_STA_CONNECTED_VAL,
367 NET_EVENT_WIFI_CMD_AP_STA_DISCONNECTED_VAL,
368 NET_EVENT_WIFI_CMD_SUPPLICANT_VAL,
369 NET_EVENT_WIFI_CMD_P2P_DEVICE_FOUND_VAL,
370 NET_EVENT_WIFI_CMD_MAX,
371};
372
373BUILD_ASSERT(NET_EVENT_WIFI_CMD_MAX <= NET_MGMT_MAX_COMMANDS,
374 "Number of events in net_event_wifi_cmd exceeds the limit");
375
377
381 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_SCAN_RESULT),
383 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_SCAN_DONE),
385 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_CONNECT_RESULT),
387 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_DISCONNECT_RESULT),
389 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_IFACE_STATUS),
391 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_TWT),
395 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_TWT_SLEEP_STATE),
397 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_RAW_SCAN_RESULT),
399 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_DISCONNECT_COMPLETE),
401 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_SIGNAL_CHANGE),
403 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_NEIGHBOR_REP_RECEIVED),
405 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_NEIGHBOR_REP_COMPLETE),
407 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_AP_ENABLE_RESULT),
409 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_AP_DISABLE_RESULT),
411 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_AP_STA_CONNECTED),
413 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_AP_STA_DISCONNECTED),
415 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_SUPPLICANT),
417 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_P2P_DEVICE_FOUND),
418};
419
421#define NET_EVENT_WIFI_SCAN_RESULT \
422 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_SCAN_RESULT)
423
425#define NET_EVENT_WIFI_SCAN_DONE \
426 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_SCAN_DONE)
427
429#define NET_EVENT_WIFI_CONNECT_RESULT \
430 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_CONNECT_RESULT)
431
433#define NET_EVENT_WIFI_DISCONNECT_RESULT \
434 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_DISCONNECT_RESULT)
435
437#define NET_EVENT_WIFI_IFACE_STATUS \
438 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_IFACE_STATUS)
439
441#define NET_EVENT_WIFI_TWT \
442 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_TWT)
443
445#define NET_EVENT_WIFI_TWT_SLEEP_STATE \
446 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_TWT_SLEEP_STATE)
447
449#define NET_EVENT_WIFI_RAW_SCAN_RESULT \
450 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_RAW_SCAN_RESULT)
451
453#define NET_EVENT_WIFI_DISCONNECT_COMPLETE \
454 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_DISCONNECT_COMPLETE)
455
457#define NET_EVENT_WIFI_SIGNAL_CHANGE \
458 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_SIGNAL_CHANGE)
459
461#define NET_EVENT_WIFI_NEIGHBOR_REP_COMP \
462 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_NEIGHBOR_REP_COMPLETE)
463
465#define NET_EVENT_WIFI_AP_ENABLE_RESULT \
466 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_ENABLE_RESULT)
467
469#define NET_EVENT_WIFI_AP_DISABLE_RESULT \
470 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_DISABLE_RESULT)
471
473#define NET_EVENT_WIFI_AP_STA_CONNECTED \
474 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_STA_CONNECTED)
475
477#define NET_EVENT_WIFI_AP_STA_DISCONNECTED \
478 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_STA_DISCONNECTED)
479
481#define NET_EVENT_WIFI_P2P_DEVICE_FOUND \
482 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_P2P_DEVICE_FOUND)
483
484#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_P2P
486#define WIFI_P2P_DEVICE_NAME_MAX_LEN 32
488#define WIFI_P2P_PRI_DEV_TYPE_SIZE 8
490#define WIFI_P2P_PRI_DEV_TYPE_STR_MAX_LEN 32
492#define WIFI_P2P_CONFIG_METHODS_STR_MAX_LEN 16
494#define WIFI_P2P_MANUFACTURER_MAX_LEN 64
496#define WIFI_P2P_MODEL_NAME_MAX_LEN 32
497
499struct wifi_p2p_device_info {
503 char device_name[WIFI_P2P_DEVICE_NAME_MAX_LEN + 1];
505 uint8_t pri_dev_type[WIFI_P2P_PRI_DEV_TYPE_SIZE];
507 char pri_dev_type_str[WIFI_P2P_PRI_DEV_TYPE_STR_MAX_LEN];
509 int8_t rssi;
511 uint16_t config_methods;
513 char config_methods_str[WIFI_P2P_CONFIG_METHODS_STR_MAX_LEN];
515 uint8_t dev_capab;
517 uint8_t group_capab;
519 char manufacturer[WIFI_P2P_MANUFACTURER_MAX_LEN + 1];
521 char model_name[WIFI_P2P_MODEL_NAME_MAX_LEN + 1];
522};
523#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_P2P */
524
528 const char *drv_version;
530 const char *fw_version;
531};
532
542
594
620
791
807
810
832
846
884
911
912#define WIFI_BTWT_AGREEMENT_MAX 5
913
925
992
994
995/* Flow ID is only 3 bits */
996#define WIFI_MAX_TWT_FLOWS 8
997#define WIFI_MAX_TWT_INTERVAL_US (LONG_MAX - 1)
998/* 256 (u8) * 1TU */
999#define WIFI_MAX_TWT_WAKE_INTERVAL_US 262144
1000#define WIFI_MAX_TWT_WAKE_AHEAD_DURATION_US (LONG_MAX - 1)
1001#define WIFI_MAX_TWT_EXPONENT 31
1002
1004
1028
1068
1078
1086
1096
1098#define MAX_REG_CHAN_NUM 42
1099
1103 unsigned short center_frequency;
1105 unsigned short max_power:8;
1107 unsigned short supported:1;
1109 unsigned short passive_only:1;
1111 unsigned short dfs:1;
1112} __packed;
1113
1129
1137
1138#if defined(CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS) || defined(__DOXYGEN__)
1146 unsigned short frequency;
1148 uint8_t data[CONFIG_WIFI_MGMT_RAW_SCAN_RESULT_LENGTH];
1149};
1150#endif /* CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS */
1151
1163
1165
1166/* for use in max info size calculations */
1167union wifi_mgmt_events {
1168 struct wifi_scan_result scan_result;
1169 struct wifi_status connect_status;
1170 struct wifi_iface_status iface_status;
1171#ifdef CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS
1172 struct wifi_raw_scan_result raw_scan_result;
1173#endif /* CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS */
1174 struct wifi_twt_params twt_params;
1175 struct wifi_ap_sta_info ap_sta_info;
1176#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_P2P
1177 struct wifi_p2p_device_info p2p_device_info;
1178#endif
1179};
1180
1182
1192
1204
1219
1221#define WIFI_AP_STA_MAX_INACTIVITY (LONG_MAX - 1)
1222#define WIFI_AP_IEEE_80211_CAPAB_MAX_LEN 64
1224
1235#if defined(CONFIG_WIFI_NM_HOSTAPD_AP)
1237 char ht_capab[WIFI_AP_IEEE_80211_CAPAB_MAX_LEN + 1];
1239 char vht_capab[WIFI_AP_IEEE_80211_CAPAB_MAX_LEN + 1];
1240#endif
1241};
1242
1250
1251#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_DPP
1254#define WIFI_DPP_QRCODE_MAX_LEN 255
1255
1257enum wifi_dpp_op {
1259 WIFI_DPP_OP_INVALID = 0,
1261 WIFI_DPP_CONFIGURATOR_ADD,
1263 WIFI_DPP_AUTH_INIT,
1265 WIFI_DPP_QR_CODE,
1267 WIFI_DPP_CHIRP,
1269 WIFI_DPP_LISTEN,
1271 WIFI_DPP_BOOTSTRAP_GEN,
1273 WIFI_DPP_BOOTSTRAP_GET_URI,
1275 WIFI_DPP_SET_CONF_PARAM,
1277 WIFI_DPP_SET_WAIT_RESP_TIME,
1279 WIFI_DPP_RECONFIG
1280};
1281
1283enum wifi_dpp_curves {
1285 WIFI_DPP_CURVES_DEFAULT = 0,
1287 WIFI_DPP_CURVES_P_256,
1289 WIFI_DPP_CURVES_P_384,
1291 WIFI_DPP_CURVES_P_512,
1293 WIFI_DPP_CURVES_BP_256,
1295 WIFI_DPP_CURVES_BP_384,
1297 WIFI_DPP_CURVES_BP_512
1298};
1299
1301enum wifi_dpp_role {
1303 WIFI_DPP_ROLE_UNSET = 0,
1305 WIFI_DPP_ROLE_CONFIGURATOR,
1307 WIFI_DPP_ROLE_ENROLLEE,
1309 WIFI_DPP_ROLE_EITHER
1310};
1311
1316enum wifi_dpp_conf {
1318 WIFI_DPP_CONF_UNSET = 0,
1320 WIFI_DPP_CONF_STA,
1322 WIFI_DPP_CONF_AP,
1324 WIFI_DPP_CONF_QUERY
1325};
1326
1331enum wifi_dpp_bootstrap_type {
1333 WIFI_DPP_BOOTSTRAP_TYPE_UNSET = 0,
1335 WIFI_DPP_BOOTSTRAP_TYPE_QRCODE,
1337 WIFI_DPP_BOOTSTRAP_TYPE_PKEX,
1339 WIFI_DPP_BOOTSTRAP_TYPE_NFC_URI
1340};
1341
1343struct wifi_dpp_configurator_add_params {
1345 int curve;
1347 int net_access_key_curve;
1348};
1349
1351struct wifi_dpp_auth_init_params {
1353 int peer;
1355 int configurator;
1357 int role;
1359 int conf;
1361 char ssid[WIFI_SSID_MAX_LEN + 1];
1362};
1363
1365struct wifi_dpp_chirp_params {
1367 int id;
1369 int freq;
1370};
1371
1373struct wifi_dpp_listen_params {
1375 int freq;
1377 int role;
1378};
1379
1381struct wifi_dpp_bootstrap_gen_params {
1383 int type;
1385 int op_class;
1387 int chan;
1389 int curve;
1392};
1393
1395struct wifi_dpp_configurator_set_params {
1397 int peer;
1399 int configurator;
1401 int role;
1403 int conf;
1405 int curve;
1407 int net_access_key_curve;
1409 char ssid[WIFI_SSID_MAX_LEN + 1];
1410};
1411
1414struct wifi_dpp_params {
1416 int action;
1417 union {
1419 struct wifi_dpp_configurator_add_params configurator_add;
1421 struct wifi_dpp_auth_init_params auth_init;
1423 struct wifi_dpp_chirp_params chirp;
1425 struct wifi_dpp_listen_params listen;
1427 struct wifi_dpp_bootstrap_gen_params bootstrap_gen;
1429 struct wifi_dpp_configurator_set_params configurator_set;
1431 int id;
1433 int dpp_resp_wait_time;
1435 int network_id;
1437 uint8_t dpp_qr_code[WIFI_DPP_QRCODE_MAX_LEN + 1];
1442 char resp[WIFI_DPP_QRCODE_MAX_LEN + 1];
1443 };
1444};
1445#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_DPP */
1446
1447#define WIFI_WPS_PIN_MAX_LEN 8
1448
1458
1466
1467#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_P2P
1469enum wifi_p2p_op {
1471 WIFI_P2P_FIND = 0,
1473 WIFI_P2P_STOP_FIND,
1477 WIFI_P2P_PEER,
1479 WIFI_P2P_CONNECT,
1481 WIFI_P2P_GROUP_ADD,
1483 WIFI_P2P_GROUP_REMOVE,
1485 WIFI_P2P_INVITE,
1487 WIFI_P2P_POWER_SAVE,
1488};
1489
1491enum wifi_p2p_discovery_type {
1493 WIFI_P2P_FIND_START_WITH_FULL = 0,
1495 WIFI_P2P_FIND_ONLY_SOCIAL,
1497 WIFI_P2P_FIND_PROGRESSIVE,
1498};
1499
1501enum wifi_p2p_connection_method {
1503 WIFI_P2P_METHOD_PBC = 0,
1505 WIFI_P2P_METHOD_DISPLAY,
1507 WIFI_P2P_METHOD_KEYPAD,
1508};
1509
1511#define WIFI_P2P_MAX_PEERS CONFIG_WIFI_P2P_MAX_PEERS
1512
1514struct wifi_p2p_params {
1516 enum wifi_p2p_op oper;
1518 enum wifi_p2p_discovery_type discovery_type;
1520 uint16_t timeout;
1522 uint8_t peer_addr[WIFI_MAC_ADDR_LEN];
1524 bool discovered_only;
1526 struct wifi_p2p_device_info *peers;
1528 uint16_t peer_count;
1530 bool power_save;
1532 struct {
1534 enum wifi_p2p_connection_method method;
1539 char pin[WIFI_WPS_PIN_MAX_LEN + 1];
1541 uint8_t go_intent;
1543 unsigned int freq;
1545 bool join;
1546 } connect;
1548 struct {
1550 int freq;
1552 int persistent;
1554 bool ht40;
1556 bool vht;
1558 bool he;
1560 bool edmg;
1562 uint8_t go_bssid[WIFI_MAC_ADDR_LEN];
1564 uint8_t go_bssid_length;
1565 } group_add;
1567 struct {
1569 char ifname[CONFIG_NET_INTERFACE_NAME_LEN + 1];
1570 } group_remove;
1572 struct {
1574 enum {
1575 WIFI_P2P_INVITE_PERSISTENT = 0,
1576 WIFI_P2P_INVITE_GROUP,
1577 } type;
1579 int persistent_id;
1581 char group_ifname[CONFIG_NET_INTERFACE_NAME_LEN + 1];
1583 uint8_t peer_addr[WIFI_MAC_ADDR_LEN];
1585 int freq;
1587 uint8_t go_dev_addr[WIFI_MAC_ADDR_LEN];
1589 uint8_t go_dev_addr_length;
1590 } invite;
1591};
1592#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_P2P */
1593
1606
1607#if defined(CONFIG_WIFI_NM_WPA_SUPPLICANT_BGSCAN) || defined(__DOXYGEN__)
1617
1631#endif
1632
1633/* Extended Capabilities */
1641
1642#include <zephyr/net/net_if.h>
1643
1650typedef void (*scan_result_cb_t)(struct net_if *iface, int status,
1651 struct wifi_scan_result *entry);
1652
1653#ifdef CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS
1660typedef void (*raw_scan_result_cb_t)(struct net_if *iface, int status,
1661 struct wifi_raw_scan_result *entry);
1662#endif /* CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS */
1663
1678 int (*scan)(const struct device *dev,
1679 struct net_if *iface,
1680 struct wifi_scan_params *params,
1681 scan_result_cb_t cb);
1690 int (*connect)(const struct device *dev,
1691 struct net_if *iface,
1692 struct wifi_connect_req_params *params);
1700 int (*disconnect)(const struct device *dev,
1701 struct net_if *iface);
1710 int (*ap_enable)(const struct device *dev,
1711 struct net_if *iface,
1712 struct wifi_connect_req_params *params);
1719 int (*ap_disable)(const struct device *dev, struct net_if *iface);
1728 int (*ap_sta_disconnect)(const struct device *dev, struct net_if *iface,
1729 const uint8_t *mac);
1738 int (*iface_status)(const struct device *dev,
1739 struct net_if *iface,
1740 struct wifi_iface_status *status);
1741#if defined(CONFIG_NET_STATISTICS_WIFI) || defined(__DOXYGEN__)
1750 int (*get_stats)(const struct device *dev,
1751 struct net_if *iface,
1752 struct net_stats_wifi *stats);
1760 int (*reset_stats)(const struct device *dev, struct net_if *iface);
1761#endif /* CONFIG_NET_STATISTICS_WIFI */
1770 int (*cfg_11k)(const struct device *dev,
1771 struct net_if *iface,
1772 struct wifi_11k_params *params);
1781 int (*send_11k_neighbor_request)(const struct device *dev,
1782 struct net_if *iface,
1783 struct wifi_11k_params *params);
1792 int (*set_power_save)(const struct device *dev,
1793 struct net_if *iface,
1794 struct wifi_ps_params *params);
1803 int (*set_twt)(const struct device *dev,
1804 struct net_if *iface,
1805 struct wifi_twt_params *params);
1814 int (*set_btwt)(const struct device *dev,
1815 struct net_if *iface,
1816 struct wifi_twt_params *params);
1825 int (*get_power_save_config)(const struct device *dev,
1826 struct net_if *iface,
1827 struct wifi_ps_config *config);
1836 int (*reg_domain)(const struct device *dev,
1837 struct net_if *iface,
1838 struct wifi_reg_domain *reg_domain);
1847 int (*filter)(const struct device *dev,
1848 struct net_if *iface,
1849 struct wifi_filter_info *filter);
1858 int (*mode)(const struct device *dev, struct net_if *iface, struct wifi_mode_info *mode);
1867 int (*channel)(const struct device *dev,
1868 struct net_if *iface,
1869 struct wifi_channel_info *channel);
1870
1879 int (*btm_query)(const struct device *dev, struct net_if *iface, uint8_t reason);
1880
1887 bool (*bss_support_neighbor_rep)(const struct device *dev, struct net_if *iface);
1888
1897 int (*bss_ext_capab)(const struct device *dev, struct net_if *iface, int capab);
1898
1906 int (*legacy_roam)(const struct device *dev, struct net_if *iface);
1907
1921 int (*get_version)(const struct device *dev,
1922 struct net_if *iface,
1923 struct wifi_version *params);
1932 int (*get_conn_params)(const struct device *dev,
1933 struct net_if *iface,
1934 struct wifi_connect_req_params *params);
1943 int (*set_rts_threshold)(const struct device *dev,
1944 struct net_if *iface,
1945 unsigned int rts_threshold);
1954 int (*ap_config_params)(const struct device *dev,
1955 struct net_if *iface,
1956 struct wifi_ap_config_params *params);
1965 int (*config_params)(const struct device *dev,
1966 struct net_if *iface,
1967 struct wifi_config_params *params);
1968#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_DPP
1977 int (*dpp_dispatch)(const struct device *dev,
1978 struct net_if *iface,
1979 struct wifi_dpp_params *params);
1980#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_DPP */
1988 int (*pmksa_flush)(const struct device *dev, struct net_if *iface);
1997#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_CRYPTO_ENTERPRISE
1998 int (*enterprise_creds)(const struct device *dev,
1999 struct net_if *iface,
2000 struct wifi_enterprise_creds_params *creds);
2001#endif
2010 int (*get_rts_threshold)(const struct device *dev,
2011 struct net_if *iface,
2012 unsigned int *rts_threshold);
2021 int (*wps_config)(const struct device *dev,
2022 struct net_if *iface,
2023 struct wifi_wps_config_params *params);
2032 int (*candidate_scan)(const struct device *dev,
2033 struct net_if *iface,
2034 struct wifi_scan_params *params);
2042 int (*start_11r_roaming)(const struct device *dev, struct net_if *iface);
2051 int (*set_bss_max_idle_period)(const struct device *dev,
2052 struct net_if *iface,
2053 unsigned short bss_max_idle_period);
2054#if defined(CONFIG_WIFI_NM_WPA_SUPPLICANT_BGSCAN) || defined(__DOXYGEN__)
2063 int (*set_bgscan)(const struct device *dev,
2064 struct net_if *iface,
2065 struct wifi_bgscan_params *params);
2066#endif
2067#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_P2P
2077 int (*p2p_oper)(const struct device *dev,
2078 struct net_if *iface,
2079 struct wifi_p2p_params *params);
2080#endif
2081};
2082
2091#if defined(CONFIG_WIFI_USE_NATIVE_NETWORKING) || defined(__DOXYGEN__)
2094#else
2097#endif
2099 const struct wifi_mgmt_ops *const wifi_mgmt_api;
2100
2101#if defined(CONFIG_WIFI_NM_WPA_SUPPLICANT) || defined(__DOXYGEN__)
2103 const void *wifi_drv_ops;
2104#endif
2105};
2106
2107#if defined(CONFIG_WIFI_NM_WPA_SUPPLICANT)
2108/* Make sure wifi_drv_ops is after wifi_mgmt_api */
2109BUILD_ASSERT(offsetof(struct net_wifi_mgmt_offload, wifi_mgmt_api) <
2110 offsetof(struct net_wifi_mgmt_offload, wifi_drv_ops));
2111#endif
2112
2113/* Make sure that the network interface API is properly setup inside
2114 * Wifi mgmt offload API struct (it is the first one).
2115 */
2116BUILD_ASSERT(offsetof(struct net_wifi_mgmt_offload, wifi_iface) == 0);
2117
2123void wifi_mgmt_raise_connect_result_event(struct net_if *iface, int status);
2124
2130void wifi_mgmt_raise_disconnect_result_event(struct net_if *iface, int status);
2131
2139
2146 struct wifi_twt_params *twt_params);
2147
2153void wifi_mgmt_raise_twt_sleep_state(struct net_if *iface, int twt_sleep_state);
2154
2155#if defined(CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS) || defined(__DOXYGEN__)
2162 struct wifi_raw_scan_result *raw_scan_info);
2163#endif /* CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS */
2164
2171
2172#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_ROAMING
2179void wifi_mgmt_raise_neighbor_rep_recv_event(struct net_if *iface,
2180 char *inbuf, size_t buf_len);
2181#endif
2182
2189
2196
2203 struct wifi_ap_sta_info *sta_info);
2204
2210 struct wifi_ap_sta_info *sta_info);
2211
2212#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_P2P
2219void wifi_mgmt_raise_p2p_device_found_event(struct net_if *iface,
2220 struct wifi_p2p_device_info *peer_info);
2221#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_P2P */
2222
2226#ifdef __cplusplus
2227}
2228#endif
2229
2230#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:129
void wifi_mgmt_raise_connect_result_event(struct net_if *iface, int status)
Wi-Fi management connect result event.
wifi_ext_capab
Definition wifi_mgmt.h:1634
wifi_sap_iface_state
Wi-Fi AP status.
Definition wifi_mgmt.h:1596
wifi_ps
Wi-Fi power save states.
Definition wifi.h:460
#define NET_REQUEST_WIFI_PS_CONFIG
Request a Wi-Fi power save configuration.
Definition wifi_mgmt.h:219
void wifi_mgmt_raise_twt_sleep_state(struct net_if *iface, int twt_sleep_state)
Wi-Fi management TWT sleep state event.
const char * wifi_disconn_reason_txt(enum wifi_disconn_reason reason)
Helper function to get user-friendly disconnect reason name.
#define NET_REQUEST_WIFI_SCAN
Request a Wi-Fi scan.
Definition wifi_mgmt.h:150
wifi_frequency_bands
IEEE 802.11 operational frequency bands (not exhaustive).
Definition wifi.h:277
wifi_mfp_options
IEEE 802.11w - Management frame protection.
Definition wifi.h:256
#define NET_REQUEST_WIFI_RTS_THRESHOLD
Request a Wi-Fi RTS threshold.
Definition wifi_mgmt.h:267
#define WIFI_WPS_PIN_MAX_LEN
Definition wifi_mgmt.h:1447
#define NET_REQUEST_WIFI_RTS_THRESHOLD_CONFIG
Request a Wi-Fi RTS threshold configuration.
Definition wifi_mgmt.h:310
#define WIFI_MAC_ADDR_LEN
MAC address length.
Definition wifi.h:328
#define NET_REQUEST_WIFI_REG_DOMAIN
Request a Wi-Fi regulatory domain.
Definition wifi_mgmt.h:225
wifi_ps_exit_strategy
Wi-Fi power save exit strategy.
Definition wifi.h:669
#define NET_REQUEST_WIFI_PACKET_FILTER
Request Wi-Fi packet filter.
Definition wifi_mgmt.h:237
wifi_twt_setup_cmd
Wi-Fi Target Wake Time (TWT) setup commands.
Definition wifi.h:542
#define NET_REQUEST_WIFI_BSS_MAX_IDLE_PERIOD
Definition wifi_mgmt.h:334
#define NET_REQUEST_WIFI_NEIGHBOR_REP_COMPLETE
Definition wifi_mgmt.h:329
wifi_twt_sleep_state
Wi-Fi TWT sleep states.
Definition wifi_mgmt.h:1131
#define WIFI_BTWT_AGREEMENT_MAX
Definition wifi_mgmt.h:912
void wifi_mgmt_raise_twt_event(struct net_if *iface, struct wifi_twt_params *twt_params)
Wi-Fi management TWT event.
wifi_frequency_bandwidths
IEEE 802.11 operational frequency bandwidths (not exhaustive).
Definition wifi.h:299
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:186
#define NET_REQUEST_WIFI_VERSION
Request a Wi-Fi version.
Definition wifi_mgmt.h:255
wifi_wpa3_enterprise_type
WPA3 Enterprise security types.
Definition wifi.h:159
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:196
#define NET_REQUEST_WIFI_P2P_OPER
Definition wifi_mgmt.h:344
wifi_wps_op
Operation for WPS.
Definition wifi_mgmt.h:1450
wifi_twt_setup_resp_status
Wi-Fi Target Wake Time (TWT) negotiation status.
Definition wifi.h:565
#define NET_REQUEST_WIFI_CONFIG_PARAM
Request a Wi-Fi STA parameters configuration.
Definition wifi_mgmt.h:279
#define NET_REQUEST_WIFI_BTM_QUERY
Request a Wi-Fi BTM query.
Definition wifi_mgmt.h:293
wifi_iface_mode
Wi-Fi interface modes.
Definition wifi.h:393
#define NET_REQUEST_WIFI_AP_ENABLE
Request a Wi-Fi access point enable.
Definition wifi_mgmt.h:168
#define NET_REQUEST_WIFI_WPS_CONFIG
Definition wifi_mgmt.h:315
#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:202
wifi_twt_negotiation_type
Wi-Fi Target Wake Time (TWT) negotiation types.
Definition wifi.h:529
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_config_param
Wi-Fi STA mode configuration parameter.
Definition wifi.h:758
wifi_ap_config_param
Wi-Fi AP mode configuration parameter.
Definition wifi.h:744
wifi_conn_status
Wi-Fi connect result codes.
Definition wifi.h:44
#define NET_REQUEST_WIFI_START_ROAMING
Definition wifi_mgmt.h:324
#define NET_REQUEST_WIFI_PMKSA_FLUSH
Request a Wi-Fi PMKSA cache entries flush.
Definition wifi_mgmt.h:298
#define NET_REQUEST_WIFI_DISCONNECT
Request a Wi-Fi disconnect.
Definition wifi_mgmt.h:162
wifi_twt_fail_reason
Target Wake Time (TWT) error codes.
Definition wifi.h:573
#define NET_REQUEST_WIFI_AP_RTS_THRESHOLD
Request a Wi-Fi RTS threshold.
Definition wifi_mgmt.h:180
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:231
#define NET_REQUEST_WIFI_BGSCAN
Definition wifi_mgmt.h:339
#define NET_REQUEST_WIFI_AP_STA_DISCONNECT
Request a Wi-Fi access point to disconnect a station.
Definition wifi_mgmt.h:249
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:156
wifi_bgscan_type
Wi-Fi background scan implementation.
Definition wifi_mgmt.h:1609
wifi_ap_status
Wi-Fi AP mode result codes.
Definition wifi_mgmt.h:814
#define NET_REQUEST_WIFI_TWT
Request a Wi-Fi TWT.
Definition wifi_mgmt.h:208
wifi_link_mode
Wi-Fi link operating modes.
Definition wifi.h:421
wifi_ps_param_type
Wi-Fi power save parameters.
Definition wifi.h:640
net_event_wifi_cmd
Wi-Fi management events.
Definition wifi_mgmt.h:379
#define NET_REQUEST_WIFI_CONN_PARAMS
Request a Wi-Fi connection parameters.
Definition wifi_mgmt.h:261
wifi_disconn_reason
Wi-Fi disconnect reason codes.
Definition wifi_mgmt.h:795
wifi_ps_wakeup_mode
Wi-Fi power save modes.
Definition wifi.h:656
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:518
wifi_scan_type
Wi-Fi scanning types.
Definition wifi.h:452
void(* scan_result_cb_t)(struct net_if *iface, int status, struct wifi_scan_result *entry)
Scan result callback.
Definition wifi_mgmt.h:1650
wifi_twt_teardown_status
Wi-Fi Target Wake Time (TWT) teradown status.
Definition wifi.h:599
#define WIFI_SSID_MAX_LEN
Max SSID length.
Definition wifi.h:318
#define NET_REQUEST_WIFI_CHANNEL
Request a Wi-Fi channel.
Definition wifi_mgmt.h:243
wifi_config_ps_param_fail_reason
Wi-Fi power save error codes.
Definition wifi.h:685
#define NET_REQUEST_WIFI_11K_CONFIG
Definition wifi_mgmt.h:191
wifi_security_type
IEEE 802.11 security types.
Definition wifi.h:69
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:1080
#define NET_REQUEST_WIFI_ENTERPRISE_CREDS
Set Wi-Fi enterprise mode CA/client Cert and key.
Definition wifi_mgmt.h:304
#define NET_REQUEST_WIFI_BTWT
Definition wifi_mgmt.h:213
#define NET_REQUEST_WIFI_AP_CONFIG_PARAM
Request a Wi-Fi AP parameters configuration.
Definition wifi_mgmt.h:273
#define NET_REQUEST_WIFI_AP_DISABLE
Request a Wi-Fi access point disable.
Definition wifi_mgmt.h:174
wifi_wep_key_type
WEP key type (based on key length).
Definition wifi.h:129
wifi_ps_mode
Wi-Fi power save modes.
Definition wifi.h:471
@ WIFI_EXT_CAPAB_GLK
Definition wifi_mgmt.h:1636
@ WIFI_EXT_CAPAB_20_40_COEX
Definition wifi_mgmt.h:1635
@ WIFI_EXT_CAPAB_BSS_TRANSITION
Definition wifi_mgmt.h:1639
@ WIFI_EXT_CAPAB_EXT_CHAN_SWITCH
Definition wifi_mgmt.h:1637
@ WIFI_EXT_CAPAB_TIM_BROADCAST
Definition wifi_mgmt.h:1638
@ WIFI_SAP_IFACE_COUNTRY_UPDATE
Definition wifi_mgmt.h:1599
@ WIFI_SAP_IFACE_DISABLED
Definition wifi_mgmt.h:1598
@ WIFI_SAP_IFACE_HT_SCAN
Definition wifi_mgmt.h:1601
@ WIFI_SAP_IFACE_ENABLED
Definition wifi_mgmt.h:1604
@ WIFI_SAP_IFACE_ACS
Definition wifi_mgmt.h:1600
@ WIFI_SAP_IFACE_UNINITIALIZED
Definition wifi_mgmt.h:1597
@ WIFI_SAP_IFACE_NO_IR
Definition wifi_mgmt.h:1603
@ WIFI_SAP_IFACE_DFS
Definition wifi_mgmt.h:1602
@ WIFI_TWT_STATE_SLEEP
TWT sleep state: sleeping.
Definition wifi_mgmt.h:1133
@ WIFI_TWT_STATE_AWAKE
TWT sleep state: awake.
Definition wifi_mgmt.h:1135
@ WIFI_WPS_PBC
WPS pbc.
Definition wifi_mgmt.h:1452
@ WIFI_WPS_PIN_SET
Set WPS pin number.
Definition wifi_mgmt.h:1456
@ WIFI_WPS_PIN_GET
Get WPS pin number.
Definition wifi_mgmt.h:1454
@ NET_REQUEST_WIFI_CMD_AP_CONFIG_PARAM
Configure AP parameter.
Definition wifi_mgmt.h:111
@ NET_REQUEST_WIFI_CMD_TWT
Setup or teardown TWT flow.
Definition wifi_mgmt.h:89
@ NET_REQUEST_WIFI_CMD_PMKSA_FLUSH
Flush PMKSA cache entries.
Definition wifi_mgmt.h:119
@ NET_REQUEST_WIFI_CMD_P2P_OPER
Wi-Fi Direct (P2P) operations.
Definition wifi_mgmt.h:143
@ NET_REQUEST_WIFI_CMD_PACKET_FILTER
Set or get packet filter setting for current mode.
Definition wifi_mgmt.h:99
@ 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:131
@ NET_REQUEST_WIFI_CMD_REG_DOMAIN
Set or get regulatory domain.
Definition wifi_mgmt.h:95
@ NET_REQUEST_WIFI_CMD_AP_RTS_THRESHOLD
Set AP RTS threshold.
Definition wifi_mgmt.h:79
@ NET_REQUEST_WIFI_CMD_BSS_MAX_IDLE_PERIOD
Configure BSS maximum idle period.
Definition wifi_mgmt.h:139
@ NET_REQUEST_WIFI_CMD_11K_NEIGHBOR_REQUEST
Send 11k neighbor request.
Definition wifi_mgmt.h:85
@ 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:81
@ NET_REQUEST_WIFI_CMD_AP_STA_DISCONNECT
Disconnect a STA from AP.
Definition wifi_mgmt.h:103
@ NET_REQUEST_WIFI_CMD_DPP
DPP actions.
Definition wifi_mgmt.h:115
@ 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:109
@ 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:105
@ NET_REQUEST_WIFI_CMD_BGSCAN
Configure background scanning.
Definition wifi_mgmt.h:141
@ NET_REQUEST_WIFI_CMD_CONFIG_PARAM
Configure STA parameter.
Definition wifi_mgmt.h:113
@ NET_REQUEST_WIFI_CMD_ENTERPRISE_CREDS
Set enterprise mode credential.
Definition wifi_mgmt.h:121
@ NET_REQUEST_WIFI_CMD_CONN_PARAMS
Get Wi-Fi latest connection parameters.
Definition wifi_mgmt.h:107
@ NET_REQUEST_WIFI_CMD_11K_CONFIG
Set or get 11k status.
Definition wifi_mgmt.h:83
@ NET_REQUEST_WIFI_CMD_CHANNEL
Set or get Wi-Fi channel for Monitor or TX-Injection mode.
Definition wifi_mgmt.h:101
@ NET_REQUEST_WIFI_CMD_BTWT
Setup BTWT flow.
Definition wifi_mgmt.h:91
@ NET_REQUEST_WIFI_CMD_MODE
Set or get Mode of operation.
Definition wifi_mgmt.h:97
@ NET_REQUEST_WIFI_CMD_RTS_THRESHOLD_CONFIG
Get RTS threshold.
Definition wifi_mgmt.h:123
@ NET_REQUEST_WIFI_CMD_CANDIDATE_SCAN
Specific scan.
Definition wifi_mgmt.h:135
@ NET_REQUEST_WIFI_CMD_BTM_QUERY
BSS transition management query.
Definition wifi_mgmt.h:117
@ NET_REQUEST_WIFI_CMD_PS
Set power save status.
Definition wifi_mgmt.h:87
@ 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:133
@ NET_REQUEST_WIFI_CMD_AP_WPS_CONFIG
AP WPS config.
Definition wifi_mgmt.h:137
@ NET_REQUEST_WIFI_CMD_PS_CONFIG
Get power save config.
Definition wifi_mgmt.h:93
@ NET_REQUEST_WIFI_CMD_WPS_CONFIG
WPS config.
Definition wifi_mgmt.h:125
@ WIFI_BGSCAN_SIMPLE
Simple, periodic scan based on signal strength.
Definition wifi_mgmt.h:1613
@ WIFI_BGSCAN_NONE
None, background scan is disabled.
Definition wifi_mgmt.h:1611
@ WIFI_BGSCAN_LEARN
Learn channels used by the network (experimental).
Definition wifi_mgmt.h:1615
@ WIFI_STATUS_AP_CHANNEL_NOT_ALLOWED
AP mode enable failed - channel not allowed.
Definition wifi_mgmt.h:822
@ WIFI_STATUS_AP_SUCCESS
AP mode enable or disable successful.
Definition wifi_mgmt.h:816
@ WIFI_STATUS_AP_OP_NOT_SUPPORTED
AP mode enable failed - operation not supported.
Definition wifi_mgmt.h:828
@ WIFI_STATUS_AP_OP_NOT_PERMITTED
AP mode enable failed - operation not permitted.
Definition wifi_mgmt.h:830
@ WIFI_STATUS_AP_CHANNEL_NOT_SUPPORTED
AP mode enable failed - channel not supported.
Definition wifi_mgmt.h:820
@ WIFI_STATUS_AP_FAIL
AP mode enable or disable failed - generic failure.
Definition wifi_mgmt.h:818
@ WIFI_STATUS_AP_AUTH_TYPE_NOT_SUPPORTED
AP mode enable failed - authentication type not supported.
Definition wifi_mgmt.h:826
@ WIFI_STATUS_AP_SSID_NOT_ALLOWED
AP mode enable failed - SSID not allowed.
Definition wifi_mgmt.h:824
@ NET_MGMT_CMD
Scan results available.
Definition wifi_mgmt.h:381
@ WIFI_REASON_DISCONN_INACTIVITY
Disconnected due to inactivity.
Definition wifi_mgmt.h:805
@ WIFI_REASON_DISCONN_AP_LEAVING
Disconnected due to AP leaving.
Definition wifi_mgmt.h:803
@ WIFI_REASON_DISCONN_SUCCESS
Success, overload status as reason.
Definition wifi_mgmt.h:797
@ WIFI_REASON_DISCONN_UNSPECIFIED
Unspecified reason.
Definition wifi_mgmt.h:799
@ WIFI_REASON_DISCONN_USER_REQUEST
Disconnected due to user request.
Definition wifi_mgmt.h:801
@ WIFI_MGMT_GET
Get operation.
Definition wifi_mgmt.h:1082
@ WIFI_MGMT_SET
Set operation.
Definition wifi_mgmt.h:1084
#define BUILD_ASSERT(EXPR, MSG...)
Definition llvm.h:51
Public API for network interface.
Network Management API public header.
Offloaded network device iface API.
int listen(int sock, int backlog)
int connect(int sock, const struct sockaddr *addr, socklen_t addrlen)
#define bool
Definition stdbool.h:13
__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:513
Ethernet L2 API operations.
Definition ethernet.h:487
Network Interface structure.
Definition net_if.h:735
All Wi-Fi specific statistics.
Definition net_stats.h:727
Wi-Fi management offload API.
Definition wifi_mgmt.h:2084
struct ethernet_api wifi_iface
Mandatory to get in first position.
Definition wifi_mgmt.h:2093
const struct wifi_mgmt_ops *const wifi_mgmt_api
Wi-Fi management API.
Definition wifi_mgmt.h:2099
const void * wifi_drv_ops
Wi-Fi supplicant driver API.
Definition wifi_mgmt.h:2103
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:1088
uint8_t ssid[WIFI_SSID_MAX_LEN+1]
SSID.
Definition wifi_mgmt.h:1094
bool enable_11k
11k enable/disable
Definition wifi_mgmt.h:1092
enum wifi_mgmt_op oper
11k command operation
Definition wifi_mgmt.h:1090
Wi-Fi AP configuration parameter.
Definition wifi_mgmt.h:1226
uint32_t max_inactivity
Parameter used for setting maximum inactivity duration for stations.
Definition wifi_mgmt.h:1230
enum wifi_ap_config_param type
Parameter used to identify the different AP parameters.
Definition wifi_mgmt.h:1228
uint32_t max_num_sta
Parameter used for setting maximum number of stations.
Definition wifi_mgmt.h:1232
enum wifi_frequency_bandwidths bandwidth
Parameter used for frequency band.
Definition wifi_mgmt.h:1234
AP mode - connected STA details.
Definition wifi_mgmt.h:1153
enum wifi_link_mode link_mode
Link mode, see enum wifi_link_mode.
Definition wifi_mgmt.h:1155
uint8_t mac[WIFI_MAC_ADDR_LEN]
MAC address.
Definition wifi_mgmt.h:1157
uint8_t mac_length
MAC address length.
Definition wifi_mgmt.h:1159
bool twt_capable
is TWT capable ?
Definition wifi_mgmt.h:1161
Wi-Fi structure to uniquely identify a band-channel pair.
Definition wifi_mgmt.h:536
uint8_t band
Frequency band.
Definition wifi_mgmt.h:538
uint8_t channel
Channel.
Definition wifi_mgmt.h:540
Wi-Fi background scan parameters.
Definition wifi_mgmt.h:1619
enum wifi_bgscan_type type
The type of background scanning.
Definition wifi_mgmt.h:1621
uint16_t long_interval
Long scan interval in seconds.
Definition wifi_mgmt.h:1625
uint16_t btm_queries
Number of BSS Transition Management (BTM) queries.
Definition wifi_mgmt.h:1629
int8_t rssi_threshold
Signal strength threshold in dBm.
Definition wifi_mgmt.h:1627
uint16_t short_interval
Short scan interval in seconds.
Definition wifi_mgmt.h:1623
Wi-Fi broadcast TWT parameters.
Definition wifi_mgmt.h:915
uint8_t btwt_nominal_wake
Broadcast TWT range.
Definition wifi_mgmt.h:923
uint16_t btwt_mantissa
Broadcast TWT mantissa.
Definition wifi_mgmt.h:919
uint8_t btwt_exponent
Broadcast TWT exponent.
Definition wifi_mgmt.h:921
uint8_t btwt_id
Broadcast TWT ID.
Definition wifi_mgmt.h:917
Wi-Fi channel setting for monitor and TX-injection modes.
Definition wifi_mgmt.h:1206
uint8_t if_index
Interface index.
Definition wifi_mgmt.h:1215
uint16_t channel
Channel value to set or get.
Definition wifi_mgmt.h:1208
enum wifi_mgmt_op oper
Get or set operation.
Definition wifi_mgmt.h:1217
enum wifi_frequency_bands band
Frequency band for the channel (2.4 / 5 / 6 GHz).
Definition wifi_mgmt.h:1213
Wi-Fi STA configuration parameter.
Definition wifi_mgmt.h:1244
int okc
Parameter used for opportunistic key caching.
Definition wifi_mgmt.h:1248
enum wifi_config_param type
Parameter used to identify the different STA parameters.
Definition wifi_mgmt.h:1246
Wi-Fi connect request parameters.
Definition wifi_mgmt.h:622
const uint8_t * key2_passwd
Password for a secondary private key, if required by the authentication method.
Definition wifi_mgmt.h:675
uint8_t server_cert_domain_exact_len
Length of the server_cert_domain_exact string, maximum 128 bytes.
Definition wifi_mgmt.h:784
bool ft_used
Indicates if Fast BSS Transition (802.11r) is used.
Definition wifi_mgmt.h:742
enum wifi_frequency_bandwidths bandwidth
Parameter used for frequency band.
Definition wifi_mgmt.h:779
enum wifi_security_type security
Security type.
Definition wifi_mgmt.h:640
const uint8_t * passwords[WIFI_ENT_IDENTITY_MAX_USERS]
Array of pointers to user password strings for EAP authentication.
Definition wifi_mgmt.h:771
const uint8_t * identities[WIFI_ENT_IDENTITY_MAX_USERS]
Array of pointers to user identity strings for EAP authentication.
Definition wifi_mgmt.h:764
uint8_t aid_length
Length of the anonymous identity, maximum 64 bytes.
Definition wifi_mgmt.h:657
const uint8_t * server_cert_domain_exact
Full domain name to verify in the server certificate.
Definition wifi_mgmt.h:782
const uint8_t * sae_password
SAE password (same as PSK but with no length restrictions), optional.
Definition wifi_mgmt.h:632
const uint8_t * key_passwd
Private key password for Wi-Fi Enterprise authentication.
Definition wifi_mgmt.h:665
uint8_t eap_id_length
Length of the EAP identity, maximum 64 bytes.
Definition wifi_mgmt.h:716
uint8_t channel
Channel.
Definition wifi_mgmt.h:638
uint8_t ssid_length
SSID length.
Definition wifi_mgmt.h:626
int timeout
Connect timeout in seconds, SYS_FOREVER_MS for no timeout.
Definition wifi_mgmt.h:646
int nusers
Number of EAP user identities provided.
Definition wifi_mgmt.h:750
enum wifi_mfp_options mfp
MFP options.
Definition wifi_mgmt.h:642
uint8_t sae_password_length
SAE password length.
Definition wifi_mgmt.h:634
const uint8_t * anon_id
Anonymous identity used in EAP authentication (Phase 1) for Wi-Fi Enterprise networks.
Definition wifi_mgmt.h:654
int eap_ver
EAP (Extensible Authentication Protocol) version to use.
Definition wifi_mgmt.h:704
uint8_t key_passwd_length
Length of the private key password, maximum 128 bytes.
Definition wifi_mgmt.h:668
uint8_t band
Frequency band.
Definition wifi_mgmt.h:636
uint8_t TLS_cipher
TLS cipher suite to use for EAP-TLS authentication.
Definition wifi_mgmt.h:696
const uint8_t * psk
Pre-shared key.
Definition wifi_mgmt.h:628
uint8_t bssid[WIFI_MAC_ADDR_LEN]
BSSID.
Definition wifi_mgmt.h:644
bool verify_peer_cert
Whether to verify the server's certificate authority (CA) during authentication.
Definition wifi_mgmt.h:735
uint8_t passwds
Number of EAP passwords provided.
Definition wifi_mgmt.h:757
uint8_t psk_length
Pre-shared key length.
Definition wifi_mgmt.h:630
const uint8_t * eap_identity
Identity string for EAP authentication (Phase 2, inner authentication).
Definition wifi_mgmt.h:713
const uint8_t * ssid
SSID.
Definition wifi_mgmt.h:624
const uint8_t * server_cert_domain_suffix
Domain name suffix to verify in the server certificate.
Definition wifi_mgmt.h:787
enum wifi_wpa3_enterprise_type wpa3_ent_mode
WPA3 Enterprise mode type.
Definition wifi_mgmt.h:688
uint8_t eap_passwd_length
Length of the EAP password, maximum 128 bytes.
Definition wifi_mgmt.h:727
uint8_t key2_passwd_length
Length of the secondary private key password, maximum 128 bytes.
Definition wifi_mgmt.h:678
uint8_t server_cert_domain_suffix_len
Length of the server_cert_domain_suffix string, maximum 64 bytes.
Definition wifi_mgmt.h:789
uint8_t ignore_broadcast_ssid
Hidden SSID configure 0: disabled (default) 1: send empty (length=0) SSID in beacon and ignore probe ...
Definition wifi_mgmt.h:777
const uint8_t * eap_password
Password string for EAP authentication (Phase 2, inner authentication).
Definition wifi_mgmt.h:724
Wi-Fi enterprise mode credentials.
Definition wifi_mgmt.h:1030
uint32_t client_key_len
Client key length.
Definition wifi_mgmt.h:1042
uint8_t * client_cert2
Client certification of phase2.
Definition wifi_mgmt.h:1048
uint32_t client_key2_len
Phase2 Client key length.
Definition wifi_mgmt.h:1054
uint32_t client_cert_len
Client certification length.
Definition wifi_mgmt.h:1038
uint32_t ca_cert_len
CA certification length.
Definition wifi_mgmt.h:1034
uint8_t * client_cert
Client certification.
Definition wifi_mgmt.h:1036
uint8_t * client_key
Client key.
Definition wifi_mgmt.h:1040
uint32_t server_key_len
Server key length.
Definition wifi_mgmt.h:1062
uint8_t * dh_param
Diffie–Hellman parameter.
Definition wifi_mgmt.h:1064
uint8_t * client_key2
Client key of phase2.
Definition wifi_mgmt.h:1052
uint32_t ca_cert2_len
Phase2 CA certification length.
Definition wifi_mgmt.h:1046
uint32_t dh_param_len
Diffie–Hellman parameter length.
Definition wifi_mgmt.h:1066
uint8_t * server_key
Server key.
Definition wifi_mgmt.h:1060
uint32_t server_cert_len
Server certification length.
Definition wifi_mgmt.h:1058
uint8_t * server_cert
Server certification.
Definition wifi_mgmt.h:1056
uint8_t * ca_cert2
CA certification of phase2.
Definition wifi_mgmt.h:1044
uint32_t client_cert2_len
Phase2 Client certification length.
Definition wifi_mgmt.h:1050
uint8_t * ca_cert
CA certification.
Definition wifi_mgmt.h:1032
Wi-Fi filter setting for monitor, prmoiscuous, TX-injection modes.
Definition wifi_mgmt.h:1194
uint16_t buffer_size
Filter buffer size.
Definition wifi_mgmt.h:1200
uint8_t filter
Filter setting.
Definition wifi_mgmt.h:1196
enum wifi_mgmt_op oper
Get or set operation.
Definition wifi_mgmt.h:1202
uint8_t if_index
Interface index.
Definition wifi_mgmt.h:1198
Wi-Fi interface status.
Definition wifi_mgmt.h:848
unsigned short beacon_interval
Beacon interval.
Definition wifi_mgmt.h:878
enum wifi_wpa3_enterprise_type wpa3_ent_type
WPA3 enterprise type.
Definition wifi_mgmt.h:866
char ssid[WIFI_SSID_MAX_LEN+1]
SSID.
Definition wifi_mgmt.h:854
float current_phy_tx_rate
The current 802.11 PHY TX data rate (in Mbps).
Definition wifi_mgmt.h:882
int rssi
RSSI.
Definition wifi_mgmt.h:874
char bssid[WIFI_MAC_ADDR_LEN]
BSSID.
Definition wifi_mgmt.h:856
enum wifi_security_type security
Security type, see enum wifi_security_type.
Definition wifi_mgmt.h:868
unsigned int channel
Channel.
Definition wifi_mgmt.h:860
enum wifi_wep_key_type wep_key_type
WEP key type (64-bit or 128-bit), see enum wifi_wep_key_type.
Definition wifi_mgmt.h:870
enum wifi_mfp_options mfp
MFP options, see enum wifi_mfp_options.
Definition wifi_mgmt.h:872
unsigned char dtim_period
DTIM period.
Definition wifi_mgmt.h:876
int state
Interface state, see enum wifi_iface_state.
Definition wifi_mgmt.h:850
bool twt_capable
is TWT capable?
Definition wifi_mgmt.h:880
enum wifi_iface_mode iface_mode
Interface mode, see enum wifi_iface_mode.
Definition wifi_mgmt.h:862
unsigned int ssid_len
SSID length.
Definition wifi_mgmt.h:852
enum wifi_frequency_bands band
Frequency band.
Definition wifi_mgmt.h:858
enum wifi_link_mode link_mode
Link mode, see enum wifi_link_mode.
Definition wifi_mgmt.h:864
Wi-Fi management API.
Definition wifi_mgmt.h:1665
int(* ap_config_params)(const struct device *dev, struct net_if *iface, struct wifi_ap_config_params *params)
Configure AP parameter.
Definition wifi_mgmt.h:1954
int(* set_bgscan)(const struct device *dev, struct net_if *iface, struct wifi_bgscan_params *params)
Configure background scanning.
Definition wifi_mgmt.h:2063
int(* mode)(const struct device *dev, struct net_if *iface, struct wifi_mode_info *mode)
Set or get mode of operation.
Definition wifi_mgmt.h:1858
int(* send_11k_neighbor_request)(const struct device *dev, struct net_if *iface, struct wifi_11k_params *params)
Send 11k neighbor request.
Definition wifi_mgmt.h:1781
int(* set_bss_max_idle_period)(const struct device *dev, struct net_if *iface, unsigned short bss_max_idle_period)
Set BSS max idle period.
Definition wifi_mgmt.h:2051
int(* ap_disable)(const struct device *dev, struct net_if *iface)
Disable AP mode.
Definition wifi_mgmt.h:1719
int(* channel)(const struct device *dev, struct net_if *iface, struct wifi_channel_info *channel)
Set or get current channel of operation.
Definition wifi_mgmt.h:1867
int(* set_power_save)(const struct device *dev, struct net_if *iface, struct wifi_ps_params *params)
Set power save status.
Definition wifi_mgmt.h:1792
int(* set_btwt)(const struct device *dev, struct net_if *iface, struct wifi_twt_params *params)
Setup BTWT flow.
Definition wifi_mgmt.h:1814
int(* filter)(const struct device *dev, struct net_if *iface, struct wifi_filter_info *filter)
Set or get packet filter settings for monitor and promiscuous modes.
Definition wifi_mgmt.h:1847
bool(* bss_support_neighbor_rep)(const struct device *dev, struct net_if *iface)
Check if ap support Neighbor Report or not.
Definition wifi_mgmt.h:1887
int(* config_params)(const struct device *dev, struct net_if *iface, struct wifi_config_params *params)
Configure STA parameter.
Definition wifi_mgmt.h:1965
int(* connect)(const struct device *dev, struct net_if *iface, struct wifi_connect_req_params *params)
Connect to a Wi-Fi network.
Definition wifi_mgmt.h:1690
int(* candidate_scan)(const struct device *dev, struct net_if *iface, struct wifi_scan_params *params)
Trigger candidate scan.
Definition wifi_mgmt.h:2032
int(* pmksa_flush)(const struct device *dev, struct net_if *iface)
Flush PMKSA cache entries.
Definition wifi_mgmt.h:1988
int(* get_version)(const struct device *dev, struct net_if *iface, struct wifi_version *params)
Get Version of WiFi driver and Firmware.
Definition wifi_mgmt.h:1921
int(* reset_stats)(const struct device *dev, struct net_if *iface)
Reset Wi-Fi statistics.
Definition wifi_mgmt.h:1760
int(* reg_domain)(const struct device *dev, struct net_if *iface, struct wifi_reg_domain *reg_domain)
Set or get regulatory domain.
Definition wifi_mgmt.h:1836
int(* disconnect)(const struct device *dev, struct net_if *iface)
Disconnect from a Wi-Fi network.
Definition wifi_mgmt.h:1700
int(* legacy_roam)(const struct device *dev, struct net_if *iface)
Send legacy scan.
Definition wifi_mgmt.h:1906
int(* get_power_save_config)(const struct device *dev, struct net_if *iface, struct wifi_ps_config *config)
Get power save config.
Definition wifi_mgmt.h:1825
int(* iface_status)(const struct device *dev, struct net_if *iface, struct wifi_iface_status *status)
Get interface status.
Definition wifi_mgmt.h:1738
int(* ap_enable)(const struct device *dev, struct net_if *iface, struct wifi_connect_req_params *params)
Enable AP mode.
Definition wifi_mgmt.h:1710
int(* cfg_11k)(const struct device *dev, struct net_if *iface, struct wifi_11k_params *params)
Set or get 11K status.
Definition wifi_mgmt.h:1770
int(* get_conn_params)(const struct device *dev, struct net_if *iface, struct wifi_connect_req_params *params)
Get Wi-Fi connection parameters recently used.
Definition wifi_mgmt.h:1932
int(* wps_config)(const struct device *dev, struct net_if *iface, struct wifi_wps_config_params *params)
Start a WPS PBC/PIN connection.
Definition wifi_mgmt.h:2021
int(* get_stats)(const struct device *dev, struct net_if *iface, struct net_stats_wifi *stats)
Get Wi-Fi statistics.
Definition wifi_mgmt.h:1750
int(* start_11r_roaming)(const struct device *dev, struct net_if *iface)
Start 11r roaming.
Definition wifi_mgmt.h:2042
int(* bss_ext_capab)(const struct device *dev, struct net_if *iface, int capab)
Judge ap whether support the capability.
Definition wifi_mgmt.h:1897
int(* scan)(const struct device *dev, struct net_if *iface, struct wifi_scan_params *params, scan_result_cb_t cb)
Scan for Wi-Fi networks.
Definition wifi_mgmt.h:1678
int(* btm_query)(const struct device *dev, struct net_if *iface, uint8_t reason)
Send BTM query.
Definition wifi_mgmt.h:1879
int(* get_rts_threshold)(const struct device *dev, struct net_if *iface, unsigned int *rts_threshold)
Set Wi-Fi enterprise mode CA/client Cert and key.
Definition wifi_mgmt.h:2010
int(* ap_sta_disconnect)(const struct device *dev, struct net_if *iface, const uint8_t *mac)
Disconnect a STA from AP.
Definition wifi_mgmt.h:1728
int(* set_rts_threshold)(const struct device *dev, struct net_if *iface, unsigned int rts_threshold)
Set RTS threshold value.
Definition wifi_mgmt.h:1943
int(* set_twt)(const struct device *dev, struct net_if *iface, struct wifi_twt_params *params)
Setup or teardown TWT flow.
Definition wifi_mgmt.h:1803
Wi-Fi mode setup.
Definition wifi_mgmt.h:1184
enum wifi_mgmt_op oper
Get or set operation.
Definition wifi_mgmt.h:1190
uint8_t mode
Mode setting for a specific mode of operation.
Definition wifi_mgmt.h:1186
uint8_t if_index
Interface index.
Definition wifi_mgmt.h:1188
Wi-Fi power save configuration.
Definition wifi_mgmt.h:1070
struct wifi_ps_params ps_params
Power save configuration.
Definition wifi_mgmt.h:1076
char num_twt_flows
Number of TWT flows.
Definition wifi_mgmt.h:1072
struct wifi_twt_flow_info twt_flows[WIFI_MAX_TWT_FLOWS]
TWT flow details.
Definition wifi_mgmt.h:1074
Wi-Fi power save parameters.
Definition wifi_mgmt.h:886
enum wifi_ps_mode mode
Wi-Fi power save mode.
Definition wifi_mgmt.h:894
enum wifi_config_ps_param_fail_reason fail_reason
Wi-Fi power save fail reason.
Definition wifi_mgmt.h:907
enum wifi_ps_wakeup_mode wakeup_mode
Wi-Fi power save wakeup mode.
Definition wifi_mgmt.h:892
unsigned short listen_interval
Listen interval.
Definition wifi_mgmt.h:890
enum wifi_ps_exit_strategy exit_strategy
Wi-Fi power save exit strategy.
Definition wifi_mgmt.h:909
enum wifi_ps enabled
Power save state.
Definition wifi_mgmt.h:888
unsigned int timeout_ms
Wi-Fi power save timeout.
Definition wifi_mgmt.h:903
enum wifi_ps_param_type type
Wi-Fi power save type.
Definition wifi_mgmt.h:905
Wi-Fi raw scan result.
Definition wifi_mgmt.h:1140
int8_t rssi
RSSI.
Definition wifi_mgmt.h:1142
uint8_t data[CONFIG_WIFI_MGMT_RAW_SCAN_RESULT_LENGTH]
Raw scan data.
Definition wifi_mgmt.h:1148
int frame_length
Frame length.
Definition wifi_mgmt.h:1144
unsigned short frequency
Frequency.
Definition wifi_mgmt.h:1146
Per-channel regulatory attributes.
Definition wifi_mgmt.h:1101
unsigned short center_frequency
Center frequency in MHz.
Definition wifi_mgmt.h:1103
unsigned short dfs
Is a DFS channel.
Definition wifi_mgmt.h:1111
unsigned short supported
Is channel supported or not.
Definition wifi_mgmt.h:1107
unsigned short passive_only
Passive transmissions only.
Definition wifi_mgmt.h:1109
unsigned short max_power
Maximum transmission power (in dBm).
Definition wifi_mgmt.h:1105
Regulatory domain information or configuration.
Definition wifi_mgmt.h:1115
unsigned int num_channels
Number of channels supported.
Definition wifi_mgmt.h:1125
enum wifi_mgmt_op oper
Regulatory domain operation.
Definition wifi_mgmt.h:1117
struct wifi_reg_chan_info * chan_info
Channels information.
Definition wifi_mgmt.h:1127
bool force
Ignore all other regulatory hints over this one, the behavior is implementation specific.
Definition wifi_mgmt.h:1121
uint8_t country_code[WIFI_COUNTRY_CODE_LEN]
Country code: ISO/IEC 3166-1 alpha-2.
Definition wifi_mgmt.h:1123
Wi-Fi scan parameters structure.
Definition wifi_mgmt.h:548
uint16_t max_bss_cnt
Specifies the maximum number of scan results to return.
Definition wifi_mgmt.h:577
uint16_t dwell_time_active
Active scan dwell time (in ms) on a channel.
Definition wifi_mgmt.h:563
enum wifi_scan_type scan_type
Scan type, see enum wifi_scan_type.
Definition wifi_mgmt.h:556
uint8_t bands
Bitmap of bands to be scanned.
Definition wifi_mgmt.h:560
uint16_t dwell_time_passive
Passive scan dwell time (in ms) on a channel.
Definition wifi_mgmt.h:566
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:592
const char * ssids[WIFI_MGMT_SCAN_SSID_FILT_MAX]
Array of SSID strings to scan.
Definition wifi_mgmt.h:569
Wi-Fi scan result, each result is provided to the net_mgmt_event_callback via its info attribute (see...
Definition wifi_mgmt.h:598
uint8_t ssid_length
SSID length.
Definition wifi_mgmt.h:602
uint8_t band
Frequency band.
Definition wifi_mgmt.h:604
uint8_t mac[WIFI_MAC_ADDR_LEN]
BSSID.
Definition wifi_mgmt.h:616
int8_t rssi
RSSI.
Definition wifi_mgmt.h:614
uint8_t mac_length
BSSID length.
Definition wifi_mgmt.h:618
uint8_t ssid[WIFI_SSID_MAX_LEN+1]
SSID.
Definition wifi_mgmt.h:600
enum wifi_wpa3_enterprise_type wpa3_ent_type
WPA3 enterprise type.
Definition wifi_mgmt.h:610
enum wifi_mfp_options mfp
MFP options.
Definition wifi_mgmt.h:612
uint8_t channel
Channel.
Definition wifi_mgmt.h:606
enum wifi_security_type security
Security type.
Definition wifi_mgmt.h:608
Generic Wi-Fi status for commands and events.
Definition wifi_mgmt.h:834
enum wifi_ap_status ap_status
Access point status.
Definition wifi_mgmt.h:843
enum wifi_conn_status conn_status
Connection status.
Definition wifi_mgmt.h:839
enum wifi_disconn_reason disconn_reason
Disconnection reason status.
Definition wifi_mgmt.h:841
int status
Status value.
Definition wifi_mgmt.h:837
Wi-Fi TWT flow information.
Definition wifi_mgmt.h:1006
uint8_t dialog_token
Dialog token, used to map requests to responses.
Definition wifi_mgmt.h:1010
enum wifi_twt_negotiation_type negotiation_type
TWT negotiation type, see enum wifi_twt_negotiation_type.
Definition wifi_mgmt.h:1014
uint32_t twt_wake_ahead_duration
Wake ahead duration.
Definition wifi_mgmt.h:1026
bool trigger
Trigger enabled or disabled.
Definition wifi_mgmt.h:1018
bool responder
Requestor or responder.
Definition wifi_mgmt.h:1016
uint8_t flow_id
Flow ID, used to map setup with teardown.
Definition wifi_mgmt.h:1012
uint64_t twt_interval
Interval = Wake up time + Sleeping time.
Definition wifi_mgmt.h:1008
uint32_t twt_wake_interval
Wake up time.
Definition wifi_mgmt.h:1024
bool implicit
Implicit or explicit.
Definition wifi_mgmt.h:1020
bool announce
Announced or unannounced.
Definition wifi_mgmt.h:1022
Wi-Fi TWT parameters.
Definition wifi_mgmt.h:927
bool announce
Announced or unannounced.
Definition wifi_mgmt.h:954
bool teardown_all
Teardown all flows.
Definition wifi_mgmt.h:986
enum wifi_twt_setup_cmd setup_cmd
TWT setup command, see enum wifi_twt_setup_cmd.
Definition wifi_mgmt.h:933
uint16_t btwt_offset
Broadcast TWT offset.
Definition wifi_mgmt.h:975
bool trigger
Trigger enabled or disabled.
Definition wifi_mgmt.h:950
enum wifi_twt_negotiation_type negotiation_type
TWT negotiation type, see enum wifi_twt_negotiation_type.
Definition wifi_mgmt.h:931
enum wifi_twt_operation operation
TWT operation, see enum wifi_twt_operation.
Definition wifi_mgmt.h:929
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:962
enum wifi_twt_fail_reason fail_reason
TWT fail reason, see enum wifi_twt_fail_reason.
Definition wifi_mgmt.h:990
uint32_t twt_wake_interval
Wake up time.
Definition wifi_mgmt.h:956
uint8_t btwt_li
In multiple of 4 beacon interval.
Definition wifi_mgmt.h:977
enum wifi_twt_setup_resp_status resp_status
TWT setup response status, see enum wifi_twt_setup_resp_status.
Definition wifi_mgmt.h:935
bool implicit
Implicit or explicit.
Definition wifi_mgmt.h:952
uint8_t flow_id
Flow ID, used to map setup with teardown.
Definition wifi_mgmt.h:941
struct wifi_twt_params::@142010065304112155221017375176376104176123122145::@133136031370272243054104113363023054234327020330 setup
Setup specific parameters.
enum wifi_twt_teardown_status teardown_status
TWT teardown cmd status, see enum wifi_twt_teardown_status.
Definition wifi_mgmt.h:937
uint8_t btwt_sta_wait
Broadcast TWT station wait time.
Definition wifi_mgmt.h:973
struct wifi_btwt_params btwt_set_cfg[5]
Broadcast TWT agreement sets.
Definition wifi_mgmt.h:981
struct wifi_twt_params::@142010065304112155221017375176376104176123122145::@354056177023017106017062105137255212157035234147 btwt
Setup specific parameters.
uint8_t twt_exponent
TWT exponent.
Definition wifi_mgmt.h:966
uint16_t twt_mantissa
TWT Mantissa Range: [0-sizeof(UINT16)].
Definition wifi_mgmt.h:968
uint64_t twt_interval
Interval = Wake up time + Sleeping time.
Definition wifi_mgmt.h:946
struct wifi_twt_params::@142010065304112155221017375176376104176123122145::@373031221051136207356324125344151215231253205055 teardown
Teardown specific parameters.
bool twt_info_disable
TWT info enabled or disable.
Definition wifi_mgmt.h:964
uint8_t dialog_token
Dialog token, used to map requests to responses.
Definition wifi_mgmt.h:939
bool responder
Requestor or responder.
Definition wifi_mgmt.h:948
uint8_t btwt_count
Broadcast TWT agreement count.
Definition wifi_mgmt.h:979
Wi-Fi version.
Definition wifi_mgmt.h:526
const char * fw_version
Firmware version.
Definition wifi_mgmt.h:530
const char * drv_version
Driver version.
Definition wifi_mgmt.h:528
Wi-Fi wps setup.
Definition wifi_mgmt.h:1460
char pin[8+1]
pin value
Definition wifi_mgmt.h:1464
enum wifi_wps_op oper
wps operation
Definition wifi_mgmt.h:1462
IEEE 802.11 protocol and general Wi-Fi definitions.