Zephyr API Documentation 4.5.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
15#ifndef ZEPHYR_INCLUDE_NET_WIFI_MGMT_H_
16#define ZEPHYR_INCLUDE_NET_WIFI_MGMT_H_
17
18#include <zephyr/net/net_mgmt.h>
19#include <zephyr/net/wifi.h>
20#include <zephyr/net/ethernet.h>
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
31
32/* Management part definitions */
33
35
36#define NET_WIFI_LAYER NET_MGMT_LAYER_L2
37#define NET_WIFI_CODE NET_MGMT_LAYER_CODE_WIFI
38#define NET_WIFI_BASE (NET_MGMT_IFACE_BIT | \
39 NET_MGMT_LAYER(NET_WIFI_LAYER) | \
40 NET_MGMT_LAYER_CODE(NET_WIFI_CODE))
41#define NET_WIFI_EVENT (NET_WIFI_BASE | NET_MGMT_EVENT_BIT)
42
43#ifdef CONFIG_WIFI_MGMT_SCAN_SSID_FILT_MAX
44#define WIFI_MGMT_SCAN_SSID_FILT_MAX CONFIG_WIFI_MGMT_SCAN_SSID_FILT_MAX
45#else
46#define WIFI_MGMT_SCAN_SSID_FILT_MAX 1
47#endif /* CONFIG_WIFI_MGMT_SCAN_SSID_FILT_MAX */
48
49#ifdef CONFIG_WIFI_MGMT_SCAN_CHAN_MAX_MANUAL
50#define WIFI_MGMT_SCAN_CHAN_MAX_MANUAL CONFIG_WIFI_MGMT_SCAN_CHAN_MAX_MANUAL
51#else
52#define WIFI_MGMT_SCAN_CHAN_MAX_MANUAL 1
53#endif /* CONFIG_WIFI_MGMT_SCAN_CHAN_MAX_MANUAL */
54
55#ifdef CONFIG_WIFI_ENT_IDENTITY_MAX_USERS
56#define WIFI_ENT_IDENTITY_MAX_USERS CONFIG_WIFI_ENT_IDENTITY_MAX_USERS
57#else
58#define WIFI_ENT_IDENTITY_MAX_USERS 1
59#endif /* CONFIG_WIFI_ENT_IDENTITY_MAX_USERS */
60
61#define WIFI_MGMT_BAND_STR_SIZE_MAX 8
62#define WIFI_MGMT_SCAN_MAX_BSS_CNT 65535
63
64#define WIFI_MGMT_SKIP_INACTIVITY_POLL IS_ENABLED(CONFIG_WIFI_MGMT_AP_STA_SKIP_INACTIVITY_POLL)
65
66#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_NAN
67#define WIFI_NAN_MAX_SSI_LEN CONFIG_WIFI_NAN_MAX_SSI_LEN
68#define WIFI_NAN_MAX_SERVICE_NAME_LEN 64
69/* Holds multi-line NAN_STATUS output from hostap. */
70#define WIFI_NAN_RESP_SIZE 512
71#define WIFI_NAN_MAX_SET_PARAM_LEN 32
72#define WIFI_NAN_MAX_SET_VALUE_LEN 256
73#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_NAN */
75
138#ifdef CONFIG_WIFI_CREDENTIALS_CONNECT_STORED
140 NET_REQUEST_WIFI_CMD_CONNECT_STORED,
141#endif
161 NET_REQUEST_WIFI_CMD_MAX
163};
164
166#define NET_REQUEST_WIFI_SCAN \
167 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_SCAN)
168
170
172#define NET_REQUEST_WIFI_CONNECT \
173 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CONNECT)
174
176
178#define NET_REQUEST_WIFI_DISCONNECT \
179 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_DISCONNECT)
180
182
184#define NET_REQUEST_WIFI_AP_ENABLE \
185 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_ENABLE)
186
188
190#define NET_REQUEST_WIFI_AP_DISABLE \
191 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_DISABLE)
192
194
196#define NET_REQUEST_WIFI_AP_RTS_THRESHOLD \
197 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_RTS_THRESHOLD)
198
200
202#define NET_REQUEST_WIFI_IFACE_STATUS \
203 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_IFACE_STATUS)
204
206
208#define NET_REQUEST_WIFI_11K_CONFIG \
209 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_11K_CONFIG)
210
212
214#define NET_REQUEST_WIFI_11K_NEIGHBOR_REQUEST \
215 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_11K_NEIGHBOR_REQUEST)
216
218
220#define NET_REQUEST_WIFI_PS \
221 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PS)
222
224
226#define NET_REQUEST_WIFI_TWT \
227 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_TWT)
228
230
232#define NET_REQUEST_WIFI_BTWT \
233 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_BTWT)
234
236
238#define NET_REQUEST_WIFI_PS_CONFIG \
239 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PS_CONFIG)
240
242
244#define NET_REQUEST_WIFI_REG_DOMAIN \
245 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_REG_DOMAIN)
246
248
250#define NET_REQUEST_WIFI_MODE \
251 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_MODE)
252
254
256#define NET_REQUEST_WIFI_PACKET_FILTER \
257 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PACKET_FILTER)
258
260
262#define NET_REQUEST_WIFI_CHANNEL \
263 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CHANNEL)
264
266
268#define NET_REQUEST_WIFI_AP_STA_DISCONNECT \
269 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_STA_DISCONNECT)
270
272
274#define NET_REQUEST_WIFI_VERSION \
275 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_VERSION)
276
278
280#define NET_REQUEST_WIFI_CONN_PARAMS \
281 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CONN_PARAMS)
282
284
286#define NET_REQUEST_WIFI_RTS_THRESHOLD \
287 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_RTS_THRESHOLD)
288
290
292#define NET_REQUEST_WIFI_AP_CONFIG_PARAM \
293 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_CONFIG_PARAM)
294
296
298#define NET_REQUEST_WIFI_CONFIG_PARAM \
299 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CONFIG_PARAM)
300
302
303#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_DPP
305#define NET_REQUEST_WIFI_DPP \
306 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_DPP)
307
308NET_MGMT_DEFINE_REQUEST_HANDLER(NET_REQUEST_WIFI_DPP);
309#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_DPP */
310
311#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_NAN
313#define NET_REQUEST_WIFI_NAN \
314 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_NAN)
315
316NET_MGMT_DEFINE_REQUEST_HANDLER(NET_REQUEST_WIFI_NAN);
317#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_NAN */
318
320#define NET_REQUEST_WIFI_BTM_QUERY (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_BTM_QUERY)
321
323
325#define NET_REQUEST_WIFI_PMKSA_FLUSH \
326 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PMKSA_FLUSH)
327
329
335#define NET_REQUEST_WIFI_PMKSA_GET (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PMKSA_GET)
336
338
340#define NET_REQUEST_WIFI_PMKSA_FLUSH_EXTERNAL \
341 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PMKSA_FLUSH_EXTERNAL)
342
344
346#define NET_REQUEST_WIFI_ENTERPRISE_CREDS \
347 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_ENTERPRISE_CREDS)
348
350
352#define NET_REQUEST_WIFI_RTS_THRESHOLD_CONFIG \
353 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_RTS_THRESHOLD_CONFIG)
354
356
358#define NET_REQUEST_WIFI_WPS_CONFIG (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_WPS_CONFIG)
359
361#ifdef CONFIG_WIFI_CREDENTIALS_CONNECT_STORED
379#define NET_REQUEST_WIFI_CONNECT_STORED (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CONNECT_STORED)
380
381NET_MGMT_DEFINE_REQUEST_HANDLER(NET_REQUEST_WIFI_CONNECT_STORED);
382#endif
383
385#define NET_REQUEST_WIFI_START_ROAMING \
386 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_START_ROAMING)
387
389
391#define NET_REQUEST_WIFI_NEIGHBOR_REP_COMPLETE \
392 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_NEIGHBOR_REP_COMPLETE)
393
395
397#define NET_REQUEST_WIFI_BSS_MAX_IDLE_PERIOD \
398 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_BSS_MAX_IDLE_PERIOD)
399
401
403#define NET_REQUEST_WIFI_BGSCAN \
404 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_BGSCAN)
405
407
409#define NET_REQUEST_WIFI_P2P_OPER \
410 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_P2P_OPER)
411
413
415
416enum {
417 NET_EVENT_WIFI_CMD_SCAN_RESULT_VAL,
418 NET_EVENT_WIFI_CMD_SCAN_DONE_VAL,
419 NET_EVENT_WIFI_CMD_CONNECT_RESULT_VAL,
420 NET_EVENT_WIFI_CMD_DISCONNECT_RESULT_VAL,
421 NET_EVENT_WIFI_CMD_IFACE_STATUS_VAL,
422 NET_EVENT_WIFI_CMD_TWT_VAL,
423 NET_EVENT_WIFI_CMD_TWT_SLEEP_STATE_VAL,
424 NET_EVENT_WIFI_CMD_RAW_SCAN_RESULT_VAL,
425 NET_EVENT_WIFI_CMD_DISCONNECT_COMPLETE_VAL,
426 NET_EVENT_WIFI_CMD_SIGNAL_CHANGE_VAL,
427 NET_EVENT_WIFI_CMD_NEIGHBOR_REP_RECEIVED_VAL,
428 NET_EVENT_WIFI_CMD_NEIGHBOR_REP_COMPLETE_VAL,
429 NET_EVENT_WIFI_CMD_AP_ENABLE_RESULT_VAL,
430 NET_EVENT_WIFI_CMD_AP_DISABLE_RESULT_VAL,
431 NET_EVENT_WIFI_CMD_AP_STA_CONNECTED_VAL,
432 NET_EVENT_WIFI_CMD_AP_STA_DISCONNECTED_VAL,
433 NET_EVENT_WIFI_CMD_SUPPLICANT_VAL,
434 NET_EVENT_WIFI_CMD_P2P_DEVICE_FOUND_VAL,
435 NET_EVENT_WIFI_CMD_NAN_DISCOVERY_RESULT_VAL,
436 NET_EVENT_WIFI_CMD_NAN_REPLIED_VAL,
437 NET_EVENT_WIFI_CMD_NAN_PUBLISH_TERMINATED_VAL,
438 NET_EVENT_WIFI_CMD_NAN_SUBSCRIBE_TERMINATED_VAL,
439 NET_EVENT_WIFI_CMD_NAN_RECEIVE_VAL,
440 NET_EVENT_WIFI_CMD_PMKSA_CACHE_ADDED_VAL,
441 NET_EVENT_WIFI_CMD_PMKSA_CACHE_REMOVED_VAL,
442
443 NET_EVENT_WIFI_CMD_MAX,
444};
445
446BUILD_ASSERT(NET_EVENT_WIFI_CMD_MAX <= NET_MGMT_MAX_COMMANDS,
447 "Number of events in net_event_wifi_cmd exceeds the limit");
448
450
454 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_SCAN_RESULT),
456 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_SCAN_DONE),
458 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_CONNECT_RESULT),
460 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_DISCONNECT_RESULT),
462 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_IFACE_STATUS),
464 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_TWT),
468 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_TWT_SLEEP_STATE),
470 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_RAW_SCAN_RESULT),
472 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_DISCONNECT_COMPLETE),
474 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_SIGNAL_CHANGE),
476 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_NEIGHBOR_REP_RECEIVED),
478 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_NEIGHBOR_REP_COMPLETE),
480 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_AP_ENABLE_RESULT),
482 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_AP_DISABLE_RESULT),
484 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_AP_STA_CONNECTED),
486 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_AP_STA_DISCONNECTED),
488 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_SUPPLICANT),
490 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_P2P_DEVICE_FOUND),
492 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_PMKSA_CACHE_ADDED),
494 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_PMKSA_CACHE_REMOVED),
495#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_NAN
497 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_NAN_DISCOVERY_RESULT),
499 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_NAN_REPLIED),
501 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_NAN_PUBLISH_TERMINATED),
503 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_NAN_SUBSCRIBE_TERMINATED),
505 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_NAN_RECEIVE),
506#endif
507};
508
510#define NET_EVENT_WIFI_SCAN_RESULT \
511 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_SCAN_RESULT)
512
514#define NET_EVENT_WIFI_SCAN_DONE \
515 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_SCAN_DONE)
516
518#define NET_EVENT_WIFI_CONNECT_RESULT \
519 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_CONNECT_RESULT)
520
522#define NET_EVENT_WIFI_DISCONNECT_RESULT \
523 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_DISCONNECT_RESULT)
524
526#define NET_EVENT_WIFI_IFACE_STATUS \
527 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_IFACE_STATUS)
528
530#define NET_EVENT_WIFI_TWT \
531 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_TWT)
532
534#define NET_EVENT_WIFI_TWT_SLEEP_STATE \
535 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_TWT_SLEEP_STATE)
536
538#define NET_EVENT_WIFI_RAW_SCAN_RESULT \
539 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_RAW_SCAN_RESULT)
540
542#define NET_EVENT_WIFI_DISCONNECT_COMPLETE \
543 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_DISCONNECT_COMPLETE)
544
546#define NET_EVENT_WIFI_SIGNAL_CHANGE \
547 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_SIGNAL_CHANGE)
548
550#define NET_EVENT_WIFI_NEIGHBOR_REP_COMP \
551 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_NEIGHBOR_REP_COMPLETE)
552
554#define NET_EVENT_WIFI_AP_ENABLE_RESULT \
555 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_ENABLE_RESULT)
556
558#define NET_EVENT_WIFI_AP_DISABLE_RESULT \
559 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_DISABLE_RESULT)
560
562#define NET_EVENT_WIFI_AP_STA_CONNECTED \
563 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_STA_CONNECTED)
564
566#define NET_EVENT_WIFI_AP_STA_DISCONNECTED \
567 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_STA_DISCONNECTED)
568
570#define NET_EVENT_WIFI_P2P_DEVICE_FOUND \
571 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_P2P_DEVICE_FOUND)
572
574#define NET_EVENT_WIFI_PMKSA_CACHE_ADDED (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_PMKSA_CACHE_ADDED)
575
577#define NET_EVENT_WIFI_PMKSA_CACHE_REMOVED (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_PMKSA_CACHE_REMOVED)
578
579#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_P2P
581#define WIFI_P2P_DEVICE_NAME_MAX_LEN 32
583#define WIFI_P2P_PRI_DEV_TYPE_SIZE 8
585#define WIFI_P2P_PRI_DEV_TYPE_STR_MAX_LEN 32
587#define WIFI_P2P_CONFIG_METHODS_STR_MAX_LEN 16
589#define WIFI_P2P_MANUFACTURER_MAX_LEN 64
591#define WIFI_P2P_MODEL_NAME_MAX_LEN 32
592
594struct wifi_p2p_device_info {
598 char device_name[WIFI_P2P_DEVICE_NAME_MAX_LEN + 1];
600 uint8_t pri_dev_type[WIFI_P2P_PRI_DEV_TYPE_SIZE];
602 char pri_dev_type_str[WIFI_P2P_PRI_DEV_TYPE_STR_MAX_LEN];
604 int8_t rssi;
606 uint16_t config_methods;
608 char config_methods_str[WIFI_P2P_CONFIG_METHODS_STR_MAX_LEN];
610 uint8_t dev_capab;
612 uint8_t group_capab;
614 char manufacturer[WIFI_P2P_MANUFACTURER_MAX_LEN + 1];
616 char model_name[WIFI_P2P_MODEL_NAME_MAX_LEN + 1];
617};
618#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_P2P */
619
620#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_NAN
622#define NET_EVENT_WIFI_NAN_DISCOVERY_RESULT \
623 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_NAN_DISCOVERY_RESULT)
624
626#define NET_EVENT_WIFI_NAN_REPLIED \
627 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_NAN_REPLIED)
628
630#define NET_EVENT_WIFI_NAN_PUBLISH_TERMINATED \
631 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_NAN_PUBLISH_TERMINATED)
632
634#define NET_EVENT_WIFI_NAN_SUBSCRIBE_TERMINATED \
635 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_NAN_SUBSCRIBE_TERMINATED)
636
638#define NET_EVENT_WIFI_NAN_RECEIVE \
639 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_NAN_RECEIVE)
640#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_NAN */
641
645 const char *drv_version;
647 const char *fw_version;
648};
649
659
711
737
739
751
755 const uint8_t *ssid;
757 uint8_t ssid_length; /* Max 32 */
759 const uint8_t *psk;
761 uint8_t psk_length; /* Min 8 - Max 64 */
771 uint8_t sae_password_length; /* No length restrictions */
792
795
803
806
813
816
826
834
843
852
855
863
866
874
881
889
896
902 const uint8_t *identities[WIFI_ENT_IDENTITY_MAX_USERS];
903
909 const uint8_t *passwords[WIFI_ENT_IDENTITY_MAX_USERS];
918
923
954};
955
971
974
996
1019
1059
1086
1088#define WIFI_BTWT_AGREEMENT_MAX 5
1089
1101
1169
1171
1172/* Flow ID is only 3 bits */
1173#define WIFI_MAX_TWT_FLOWS 8
1174/* The TWT interval is encoded per IEEE 802.11 as mantissa * 2^exponent
1175 * micro-seconds, with a 16-bit mantissa and a 5-bit exponent. The maximum
1176 * representable interval is therefore UINT16_MAX * 2^WIFI_MAX_TWT_EXPONENT us.
1177 */
1178#define WIFI_MAX_TWT_EXPONENT 31
1179#define WIFI_MAX_TWT_INTERVAL_US ((uint64_t)UINT16_MAX << WIFI_MAX_TWT_EXPONENT)
1180/* 256 (u8) * 1TU */
1181#define WIFI_MAX_TWT_WAKE_INTERVAL_US 262144
1182#define WIFI_MAX_TWT_WAKE_AHEAD_DURATION_US (LONG_MAX - 1)
1183
1185
1209
1254
1264
1266#define WIFI_PMKSA_PMKID_LEN 16U
1268#define WIFI_PMKSA_PMK_MIN_LEN 32U
1270#define WIFI_PMKSA_PMK_MAX_LEN 64U
1271
1323
1353
1363
1373
1379void wifi_pmksa_cache_entries_clear(struct wifi_pmksa_cache_entry *entries, size_t entry_count);
1380
1388
1398
1400#define MAX_REG_CHAN_NUM 42
1401
1405 unsigned short center_frequency;
1407 unsigned short max_power:8;
1409 unsigned short supported:1;
1411 unsigned short passive_only:1;
1413 unsigned short dfs:1;
1414} __packed;
1415
1431
1439
1440#if defined(CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS) || defined(__DOXYGEN__)
1448 unsigned short frequency;
1450 uint8_t data[CONFIG_WIFI_MGMT_RAW_SCAN_RESULT_LENGTH];
1451};
1452#endif /* CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS */
1453
1465
1466#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_NAN
1468struct wifi_nan_discovery_result_event {
1470 uint8_t subscribe_id;
1472 uint8_t publish_id;
1474 uint8_t peer_addr[WIFI_MAC_ADDR_LEN];
1476 bool fsd;
1478 bool fsd_gas;
1480 uint8_t srv_proto_type;
1482 size_t ssi_len;
1484 uint8_t ssi[WIFI_NAN_MAX_SSI_LEN];
1485};
1486
1488struct wifi_nan_replied_event {
1490 uint8_t publish_id;
1492 uint8_t peer_addr[WIFI_MAC_ADDR_LEN];
1494 uint8_t subscribe_id;
1496 uint8_t srv_proto_type;
1498 size_t ssi_len;
1500 uint8_t ssi[WIFI_NAN_MAX_SSI_LEN];
1501};
1502
1504struct wifi_nan_terminated_event {
1506 uint8_t id;
1508 char reason[32];
1509};
1510
1512struct wifi_nan_receive_event {
1514 uint8_t id;
1516 uint8_t peer_instance_id;
1518 uint8_t peer_addr[WIFI_MAC_ADDR_LEN];
1520 uint8_t ssi[WIFI_NAN_MAX_SSI_LEN];
1522 size_t ssi_len;
1523};
1524#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_NAN */
1525
1527
1528/* for use in max info size calculations */
1529union wifi_mgmt_events {
1530 struct wifi_scan_result scan_result;
1531 struct wifi_status connect_status;
1532 struct wifi_iface_status iface_status;
1533 struct wifi_pmksa_cache_event pmksa_cache_event;
1534#ifdef CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS
1535 struct wifi_raw_scan_result raw_scan_result;
1536#endif /* CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS */
1537 struct wifi_twt_params twt_params;
1538 struct wifi_ap_sta_info ap_sta_info;
1539#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_P2P
1540 struct wifi_p2p_device_info p2p_device_info;
1541#endif
1542#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_NAN
1543 struct wifi_nan_discovery_result_event nan_discovery_result;
1544 struct wifi_nan_replied_event nan_replied;
1545 struct wifi_nan_terminated_event nan_publish_terminated;
1546 struct wifi_nan_terminated_event nan_subscribe_terminated;
1547 struct wifi_nan_receive_event nan_receive;
1548#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_NAN */
1549};
1550
1552
1562
1574
1589
1591#define WIFI_AP_STA_MAX_INACTIVITY (LONG_MAX - 1)
1592#define WIFI_AP_IEEE_80211_CAPAB_MAX_LEN 64
1594
1605#if defined(CONFIG_WIFI_NM_HOSTAPD_AP)
1607 char ht_capab[WIFI_AP_IEEE_80211_CAPAB_MAX_LEN + 1];
1609 char vht_capab[WIFI_AP_IEEE_80211_CAPAB_MAX_LEN + 1];
1610#endif
1611};
1612
1620
1621#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_DPP
1624#define WIFI_DPP_QRCODE_MAX_LEN 255
1625
1627enum wifi_dpp_op {
1629 WIFI_DPP_OP_INVALID = 0,
1631 WIFI_DPP_CONFIGURATOR_ADD,
1633 WIFI_DPP_AUTH_INIT,
1635 WIFI_DPP_QR_CODE,
1637 WIFI_DPP_CHIRP,
1639 WIFI_DPP_LISTEN,
1641 WIFI_DPP_BOOTSTRAP_GEN,
1643 WIFI_DPP_BOOTSTRAP_GET_URI,
1645 WIFI_DPP_SET_CONF_PARAM,
1647 WIFI_DPP_SET_WAIT_RESP_TIME,
1649 WIFI_DPP_RECONFIG
1650};
1651
1653enum wifi_dpp_curves {
1655 WIFI_DPP_CURVES_DEFAULT = 0,
1657 WIFI_DPP_CURVES_P_256,
1659 WIFI_DPP_CURVES_P_384,
1661 WIFI_DPP_CURVES_P_512,
1663 WIFI_DPP_CURVES_BP_256,
1665 WIFI_DPP_CURVES_BP_384,
1667 WIFI_DPP_CURVES_BP_512
1668};
1669
1671enum wifi_dpp_role {
1673 WIFI_DPP_ROLE_UNSET = 0,
1675 WIFI_DPP_ROLE_CONFIGURATOR,
1677 WIFI_DPP_ROLE_ENROLLEE,
1679 WIFI_DPP_ROLE_EITHER
1680};
1681
1686enum wifi_dpp_conf {
1688 WIFI_DPP_CONF_UNSET = 0,
1690 WIFI_DPP_CONF_STA,
1692 WIFI_DPP_CONF_AP,
1694 WIFI_DPP_CONF_QUERY
1695};
1696
1701enum wifi_dpp_bootstrap_type {
1703 WIFI_DPP_BOOTSTRAP_TYPE_UNSET = 0,
1705 WIFI_DPP_BOOTSTRAP_TYPE_QRCODE,
1707 WIFI_DPP_BOOTSTRAP_TYPE_PKEX,
1709 WIFI_DPP_BOOTSTRAP_TYPE_NFC_URI
1710};
1711
1713struct wifi_dpp_configurator_add_params {
1715 int curve;
1717 int net_access_key_curve;
1718};
1719
1721struct wifi_dpp_auth_init_params {
1723 int peer;
1725 int configurator;
1727 int role;
1729 int conf;
1731 char ssid[WIFI_SSID_MAX_LEN + 1];
1732};
1733
1735struct wifi_dpp_chirp_params {
1737 int id;
1739 int freq;
1740};
1741
1743struct wifi_dpp_listen_params {
1745 int freq;
1747 int role;
1748};
1749
1751struct wifi_dpp_bootstrap_gen_params {
1753 int type;
1755 int op_class;
1757 int chan;
1759 int curve;
1762};
1763
1765struct wifi_dpp_configurator_set_params {
1767 int peer;
1769 int configurator;
1771 int role;
1773 int conf;
1775 int curve;
1777 int net_access_key_curve;
1779 char ssid[WIFI_SSID_MAX_LEN + 1];
1780};
1781
1784struct wifi_dpp_params {
1786 int action;
1787 union {
1789 struct wifi_dpp_configurator_add_params configurator_add;
1791 struct wifi_dpp_auth_init_params auth_init;
1793 struct wifi_dpp_chirp_params chirp;
1795 struct wifi_dpp_listen_params listen;
1797 struct wifi_dpp_bootstrap_gen_params bootstrap_gen;
1799 struct wifi_dpp_configurator_set_params configurator_set;
1801 int id;
1803 int dpp_resp_wait_time;
1805 int network_id;
1807 uint8_t dpp_qr_code[WIFI_DPP_QRCODE_MAX_LEN + 1];
1812 char resp[WIFI_DPP_QRCODE_MAX_LEN + 1];
1813 };
1814};
1815#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_DPP */
1816
1817#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_NAN
1819enum wifi_nan_operation {
1820 WIFI_NAN_OP_START,
1821 WIFI_NAN_OP_STOP,
1822 WIFI_NAN_OP_SET,
1823 WIFI_NAN_OP_UPDATE_CONF,
1824 WIFI_NAN_OP_STATUS,
1825 WIFI_NAN_OP_PUBLISH,
1826 WIFI_NAN_OP_CANCEL_PUBLISH,
1827 WIFI_NAN_OP_UPDATE_PUBLISH,
1828 WIFI_NAN_OP_SUBSCRIBE,
1829 WIFI_NAN_OP_CANCEL_SUBSCRIBE,
1830 WIFI_NAN_OP_TRANSMIT,
1831};
1832
1834enum wifi_nan_service_protocol_type {
1836 WIFI_NAN_SRV_PROTO_BONJOUR = 1,
1838 WIFI_NAN_SRV_PROTO_GENERIC = 2,
1840 WIFI_NAN_SRV_PROTO_CSA_MATTER = 3,
1841};
1842
1844struct wifi_nan_publish_params {
1845 /* Service name for NAN */
1846 char service_name[WIFI_NAN_MAX_SERVICE_NAME_LEN];
1847 /* NAN service protocol type */
1848 enum wifi_nan_service_protocol_type srv_proto_type;
1849 /* Time to live (in seconds); 0 = one TX only */
1850 uint32_t ttl;
1851 /* Default frequency in MHz (defaultPublishChannel) */
1852 uint32_t freq;
1853 /* Multi-channel frequencies */
1854 char freq_list[64];
1855 /* Service specific information (binary data) */
1856 uint8_t ssi[WIFI_NAN_MAX_SSI_LEN];
1857 /* Actual length of SSI data */
1858 uint16_t ssi_len;
1859 /* Unsolicited transmission (true by default) */
1860 bool unsolicited;
1861 /* Solicited transmission (true by default) */
1862 bool solicited;
1863 /* Further Service Discovery (true by default) */
1864 bool fsd;
1865};
1866
1867/* This structure is used to configure nan update publish parameters */
1868struct wifi_nan_update_publish_params {
1869 uint8_t publish_id;
1870 /* Service specific information (binary data) */
1871 uint8_t ssi[WIFI_NAN_MAX_SSI_LEN];
1872 /* Actual length of SSI data */
1873 uint16_t ssi_len;
1874};
1875
1877struct wifi_nan_subscribe_params {
1878 /* Service name for NAN */
1879 char service_name[WIFI_NAN_MAX_SERVICE_NAME_LEN];
1880 /* NAN service protocol type */
1881 enum wifi_nan_service_protocol_type srv_proto_type;
1882 /* Subscribe type */
1883 bool active;
1884 /* Time to live (in seconds); 0 = until first result */
1885 unsigned int ttl;
1886 /* Selected frequency in MHz */
1887 unsigned int freq;
1888 /* Service specific information (binary data) */
1889 uint8_t ssi[WIFI_NAN_MAX_SSI_LEN];
1890 /* Actual length of SSI data */
1891 uint16_t ssi_len;
1892};
1893
1895struct wifi_nan_transmit_params {
1896 /* publish_id or subscribe_id */
1897 uint8_t handle;
1898 /* peer publish_id or subscribe_id */
1899 uint8_t req_instance_id;
1900 /* peer MAC address */
1901 uint8_t peer_addr[WIFI_MAC_ADDR_LEN];
1902 /* Service specific information (binary data) */
1903 uint8_t ssi[WIFI_NAN_MAX_SSI_LEN];
1904 /* Actual length of SSI data */
1905 uint16_t ssi_len;
1906};
1907
1909struct wifi_nan_set_params {
1911 char param[WIFI_NAN_MAX_SET_PARAM_LEN];
1913 char value[WIFI_NAN_MAX_SET_VALUE_LEN];
1914};
1915
1917struct wifi_nan_params {
1919 enum wifi_nan_operation op;
1920
1922 union {
1924 struct wifi_nan_publish_params publish;
1926 struct wifi_nan_update_publish_params update_publish;
1928 struct wifi_nan_subscribe_params subscribe;
1930 struct wifi_nan_transmit_params transmit;
1932 struct wifi_nan_set_params set;
1934 uint8_t cancel_id;
1935 };
1936
1937 /* Operation response */
1938 char resp[WIFI_NAN_RESP_SIZE];
1939};
1940
1941#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_NAN */
1942
1943
1945#define WIFI_WPS_PIN_MAX_LEN 8
1946
1956
1964
1965#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_P2P
1967enum wifi_p2p_op {
1969 WIFI_P2P_FIND = 0,
1971 WIFI_P2P_STOP_FIND,
1975 WIFI_P2P_PEER,
1977 WIFI_P2P_CONNECT,
1979 WIFI_P2P_GROUP_ADD,
1981 WIFI_P2P_GROUP_REMOVE,
1983 WIFI_P2P_INVITE,
1985 WIFI_P2P_POWER_SAVE,
1987 WIFI_P2P_LIST_NETWORKS,
1989 WIFI_P2P_PERSISTENT_REMOVE,
1991 WIFI_P2P_SET_DEV_NAME,
1993 WIFI_P2P_STATUS,
1994};
1995
1997enum wifi_p2p_discovery_type {
1999 WIFI_P2P_FIND_START_WITH_FULL = 0,
2001 WIFI_P2P_FIND_ONLY_SOCIAL,
2003 WIFI_P2P_FIND_PROGRESSIVE,
2004};
2005
2007enum wifi_p2p_connection_method {
2009 WIFI_P2P_METHOD_PBC = 0,
2011 WIFI_P2P_METHOD_DISPLAY,
2013 WIFI_P2P_METHOD_KEYPAD,
2014};
2015
2017#define WIFI_P2P_MAX_PEERS CONFIG_WIFI_P2P_MAX_PEERS
2018#define WIFI_P2P_LIST_NETWORKS_BUF_SIZE 2048
2019#define WIFI_P2P_STATUS_BUF_SIZE 512
2020
2022struct wifi_p2p_params {
2024 enum wifi_p2p_op oper;
2026 char device_name[WIFI_P2P_DEVICE_NAME_MAX_LEN + 1];
2028 enum wifi_p2p_discovery_type discovery_type;
2030 uint16_t timeout;
2032 uint8_t peer_addr[WIFI_MAC_ADDR_LEN];
2034 bool discovered_only;
2036 struct wifi_p2p_device_info *peers;
2038 uint16_t peer_count;
2040 bool power_save;
2042 struct {
2044 enum wifi_p2p_connection_method method;
2049 char pin[WIFI_WPS_PIN_MAX_LEN + 1];
2051 uint8_t go_intent;
2053 unsigned int freq;
2055 bool join;
2057 bool persistent_set;
2058 } connect;
2060 struct {
2062 int freq;
2064 int persistent;
2066 bool persistent_set;
2068 bool ht40;
2070 bool vht;
2072 bool he;
2074 bool edmg;
2076 uint8_t go_bssid[WIFI_MAC_ADDR_LEN];
2078 uint8_t go_bssid_length;
2079 } group_add;
2081 struct {
2083 char ifname[CONFIG_NET_INTERFACE_NAME_LEN + 1];
2084 } group_remove;
2086 struct {
2088 enum {
2089 WIFI_P2P_INVITE_PERSISTENT = 0,
2090 WIFI_P2P_INVITE_GROUP,
2091 } type;
2093 int persistent_id;
2095 char group_ifname[CONFIG_NET_INTERFACE_NAME_LEN + 1];
2097 uint8_t peer_addr[WIFI_MAC_ADDR_LEN];
2099 int freq;
2101 uint8_t go_dev_addr[WIFI_MAC_ADDR_LEN];
2103 uint8_t go_dev_addr_length;
2104 } invite;
2106 struct {
2108 char *buf;
2110 size_t buf_size;
2111 } list_networks;
2113 struct {
2118 int id;
2119 } persistent_remove;
2121 struct {
2123 char *buf;
2125 size_t buf_size;
2126 } status;
2127};
2128#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_P2P */
2129
2150
2151#if defined(CONFIG_WIFI_NM_WPA_SUPPLICANT_BGSCAN) || defined(__DOXYGEN__)
2161
2175#endif
2176
2190
2191#include <zephyr/net/net_if.h>
2192
2199typedef void (*scan_result_cb_t)(struct net_if *iface, int status,
2200 struct wifi_scan_result *entry);
2201
2202#ifdef CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS
2209typedef void (*raw_scan_result_cb_t)(struct net_if *iface, int status,
2210 struct wifi_raw_scan_result *entry);
2211#endif /* CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS */
2212
2227 int (*scan)(const struct device *dev,
2228 struct net_if *iface,
2229 struct wifi_scan_params *params,
2230 scan_result_cb_t cb);
2246 int (*connect)(const struct device *dev,
2247 struct net_if *iface,
2248 struct wifi_connect_req_params *params);
2256 int (*disconnect)(const struct device *dev,
2257 struct net_if *iface);
2266 int (*ap_enable)(const struct device *dev,
2267 struct net_if *iface,
2268 struct wifi_connect_req_params *params);
2275 int (*ap_disable)(const struct device *dev, struct net_if *iface);
2284 int (*ap_sta_disconnect)(const struct device *dev, struct net_if *iface,
2285 const uint8_t *mac);
2294 int (*iface_status)(const struct device *dev,
2295 struct net_if *iface,
2296 struct wifi_iface_status *status);
2297#if defined(CONFIG_NET_STATISTICS_WIFI) || defined(__DOXYGEN__)
2306 int (*get_stats)(const struct device *dev,
2307 struct net_if *iface,
2308 struct net_stats_wifi *stats);
2316 int (*reset_stats)(const struct device *dev, struct net_if *iface);
2317#endif /* CONFIG_NET_STATISTICS_WIFI */
2326 int (*cfg_11k)(const struct device *dev,
2327 struct net_if *iface,
2328 struct wifi_11k_params *params);
2337 int (*send_11k_neighbor_request)(const struct device *dev,
2338 struct net_if *iface,
2339 struct wifi_11k_params *params);
2348 int (*set_power_save)(const struct device *dev,
2349 struct net_if *iface,
2350 struct wifi_ps_params *params);
2359 int (*set_twt)(const struct device *dev,
2360 struct net_if *iface,
2361 struct wifi_twt_params *params);
2370 int (*set_btwt)(const struct device *dev,
2371 struct net_if *iface,
2372 struct wifi_twt_params *params);
2381 int (*get_power_save_config)(const struct device *dev,
2382 struct net_if *iface,
2383 struct wifi_ps_config *config);
2392 int (*reg_domain)(const struct device *dev,
2393 struct net_if *iface,
2394 struct wifi_reg_domain *reg_domain);
2403 int (*filter)(const struct device *dev,
2404 struct net_if *iface,
2405 struct wifi_filter_info *filter);
2414 int (*mode)(const struct device *dev, struct net_if *iface, struct wifi_mode_info *mode);
2423 int (*channel)(const struct device *dev,
2424 struct net_if *iface,
2425 struct wifi_channel_info *channel);
2426
2435 int (*btm_query)(const struct device *dev, struct net_if *iface, uint8_t reason);
2436
2443 bool (*bss_support_neighbor_rep)(const struct device *dev, struct net_if *iface);
2444
2453 int (*bss_ext_capab)(const struct device *dev, struct net_if *iface, int capab);
2454
2462 int (*legacy_roam)(const struct device *dev, struct net_if *iface);
2463
2477 int (*get_version)(const struct device *dev,
2478 struct net_if *iface,
2479 struct wifi_version *params);
2493 int (*get_conn_params)(const struct device *dev,
2494 struct net_if *iface,
2495 struct wifi_connect_req_params *params);
2504 int (*set_rts_threshold)(const struct device *dev,
2505 struct net_if *iface,
2506 unsigned int rts_threshold);
2515 int (*ap_config_params)(const struct device *dev,
2516 struct net_if *iface,
2517 struct wifi_ap_config_params *params);
2526 int (*config_params)(const struct device *dev,
2527 struct net_if *iface,
2528 struct wifi_config_params *params);
2529#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_DPP
2538 int (*dpp_dispatch)(const struct device *dev,
2539 struct net_if *iface,
2540 struct wifi_dpp_params *params);
2541#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_DPP */
2542#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_NAN
2551 int (*nan_cfg)(const struct device *dev,
2552 struct net_if *iface,
2553 struct wifi_nan_params *params);
2554#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_NAN */
2555
2568 int (*pmksa_get)(const struct device *dev, struct net_if *iface,
2569 struct wifi_pmksa_cache_query *query);
2570
2579 int (*pmksa_flush_external)(const struct device *dev, struct net_if *iface);
2580
2588 int (*pmksa_flush)(const struct device *dev, struct net_if *iface);
2603#ifdef CONFIG_WIFI_CERTIFICATE_LIB
2604 int (*enterprise_creds)(const struct device *dev,
2605 struct net_if *iface,
2606 struct wifi_enterprise_creds_params *creds);
2607#endif
2616 int (*get_rts_threshold)(const struct device *dev,
2617 struct net_if *iface,
2618 unsigned int *rts_threshold);
2627 int (*wps_config)(const struct device *dev,
2628 struct net_if *iface,
2629 struct wifi_wps_config_params *params);
2638 int (*candidate_scan)(const struct device *dev,
2639 struct net_if *iface,
2640 struct wifi_scan_params *params);
2650 __deprecated int (*start_11r_roaming)(const struct device *dev, struct net_if *iface);
2659 int (*set_bss_max_idle_period)(const struct device *dev,
2660 struct net_if *iface,
2661 unsigned short bss_max_idle_period);
2662#if defined(CONFIG_WIFI_NM_WPA_SUPPLICANT_BGSCAN) || defined(__DOXYGEN__)
2671 int (*set_bgscan)(const struct device *dev,
2672 struct net_if *iface,
2673 struct wifi_bgscan_params *params);
2674#endif
2675#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_P2P
2685 int (*p2p_oper)(const struct device *dev,
2686 struct net_if *iface,
2687 struct wifi_p2p_params *params);
2688#endif
2700 uint32_t (*get_iface_caps)(const struct device *dev, struct net_if *iface);
2701};
2702
2704__subsystem struct wifi_native_driver_api {
2708 const struct wifi_mgmt_ops *const wifi_mgmt_api;
2709
2710#if defined(CONFIG_WIFI_NM_WPA_SUPPLICANT) || defined(__DOXYGEN__)
2712 const void *wifi_drv_ops;
2713#endif
2714};
2715
2717DEVICE_API_EXTENDS(wifi_native, ethernet, wifi_iface);
2719
2721__subsystem struct wifi_offload_driver_api {
2725 const struct wifi_mgmt_ops *const wifi_mgmt_api;
2726
2727#if defined(CONFIG_WIFI_NM_WPA_SUPPLICANT) || defined(__DOXYGEN__)
2729 const void *wifi_drv_ops;
2730#endif
2731};
2732
2734DEVICE_API_EXTENDS(wifi_offload, offloaded_if, wifi_iface);
2736
2737#if defined(CONFIG_WIFI_NM_WPA_SUPPLICANT)
2738/* Make sure wifi_drv_ops is after wifi_mgmt_api */
2739BUILD_ASSERT(offsetof(struct wifi_native_driver_api, wifi_mgmt_api) <
2740 offsetof(struct wifi_native_driver_api, wifi_drv_ops));
2741BUILD_ASSERT(offsetof(struct wifi_offload_driver_api, wifi_mgmt_api) <
2742 offsetof(struct wifi_offload_driver_api, wifi_drv_ops));
2743#endif
2744
2745/* Common Wi-Fi code accesses the API of the class selected by Kconfig. Drivers must define their
2746 * API with that class.
2747 */
2749BUILD_ASSERT(!(IS_ENABLED(CONFIG_WIFI_USE_NATIVE_NETWORKING) && IS_ENABLED(CONFIG_WIFI_OFFLOAD)),
2750 "CONFIG_WIFI_USE_NATIVE_NETWORKING and CONFIG_WIFI_OFFLOAD are mutually exclusive");
2752
2753#if defined(CONFIG_WIFI_USE_NATIVE_NETWORKING) || defined(__DOXYGEN__)
2755#define net_wifi_mgmt_offload wifi_native_driver_api
2756#else
2757#define net_wifi_mgmt_offload wifi_offload_driver_api
2758#endif
2759
2765void wifi_mgmt_raise_connect_result_event(struct net_if *iface, int status);
2766
2776 const struct wifi_status *status);
2777
2783void wifi_mgmt_raise_disconnect_result_event(struct net_if *iface, int status);
2784
2794 const struct wifi_status *status);
2795
2803
2810 struct wifi_twt_params *twt_params);
2811
2817void wifi_mgmt_raise_twt_sleep_state(struct net_if *iface, int twt_sleep_state);
2818
2826 const struct wifi_pmksa_cache_event *info);
2827
2828#if defined(CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS) || defined(__DOXYGEN__)
2835 struct wifi_raw_scan_result *raw_scan_info);
2836#endif /* CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS */
2837
2844
2845#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_ROAMING
2852void wifi_mgmt_raise_neighbor_rep_recv_event(struct net_if *iface,
2853 char *inbuf, size_t buf_len);
2854#endif
2855
2862
2869
2876 struct wifi_ap_sta_info *sta_info);
2877
2883 struct wifi_ap_sta_info *sta_info);
2884
2885#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_P2P
2892void wifi_mgmt_raise_p2p_device_found_event(struct net_if *iface,
2893 struct wifi_p2p_device_info *peer_info);
2894#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_P2P */
2895
2899#ifdef __cplusplus
2900}
2901#endif
2902
2903#endif /* ZEPHYR_INCLUDE_NET_WIFI_MGMT_H_ */
#define DEVICE_API_EXTENDS(_child, _parent, _member)
Declare that API class _child is an extension of device API class _parent.
Definition device.h:1470
Ethernet.
#define NET_MGMT_DEFINE_REQUEST_HANDLER(_mgmt_request)
Declare a request handler function for the given network event.
Definition net_mgmt.h:130
#define IS_ENABLED(config_macro)
Check for macro definition in compiler-visible expressions.
Definition util_macro.h:166
void wifi_mgmt_raise_connect_result_event(struct net_if *iface, int status)
Wi-Fi management connect result event.
wifi_ext_capab
IEEE 802.11 Extended Capabilities bit positions.
Definition wifi_mgmt.h:2178
wifi_sap_iface_state
Wi-Fi AP status.
Definition wifi_mgmt.h:2132
wifi_ps
Wi-Fi power save states.
Definition wifi.h:498
#define NET_REQUEST_WIFI_PS_CONFIG
Request a Wi-Fi power save configuration.
Definition wifi_mgmt.h:238
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:166
wifi_frequency_bands
IEEE 802.11 operational frequency bands (not exhaustive).
Definition wifi.h:298
wifi_mfp_options
IEEE 802.11w - Management frame protection.
Definition wifi.h:277
#define NET_REQUEST_WIFI_RTS_THRESHOLD
Request a Wi-Fi RTS threshold.
Definition wifi_mgmt.h:286
#define WIFI_WPS_PIN_MAX_LEN
Maximum length of a WPS PIN.
Definition wifi_mgmt.h:1945
#define NET_REQUEST_WIFI_RTS_THRESHOLD_CONFIG
Request a Wi-Fi RTS threshold configuration.
Definition wifi_mgmt.h:352
#define WIFI_MAC_ADDR_LEN
MAC address length.
Definition wifi.h:364
#define NET_REQUEST_WIFI_REG_DOMAIN
Request a Wi-Fi regulatory domain.
Definition wifi_mgmt.h:244
wifi_ps_exit_strategy
Wi-Fi power save exit strategy.
Definition wifi.h:707
#define NET_REQUEST_WIFI_PACKET_FILTER
Request Wi-Fi packet filter.
Definition wifi_mgmt.h:256
wifi_twt_setup_cmd
Wi-Fi Target Wake Time (TWT) setup commands.
Definition wifi.h:580
#define NET_REQUEST_WIFI_BSS_MAX_IDLE_PERIOD
Request a Wi-Fi BSS maximum idle period configuration.
Definition wifi_mgmt.h:397
#define NET_REQUEST_WIFI_NEIGHBOR_REP_COMPLETE
Notify that processing of a Wi-Fi neighbor report is complete.
Definition wifi_mgmt.h:391
wifi_twt_sleep_state
Wi-Fi TWT sleep states.
Definition wifi_mgmt.h:1433
#define WIFI_BTWT_AGREEMENT_MAX
Maximum number of broadcast TWT agreement sets.
Definition wifi_mgmt.h:1088
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:323
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:202
#define NET_REQUEST_WIFI_VERSION
Request a Wi-Fi version.
Definition wifi_mgmt.h:274
void wifi_mgmt_raise_disconnect_result_status_event(struct net_if *iface, const struct wifi_status *status)
Wi-Fi management disconnect result event with the IEEE 802.11 codes.
wifi_wpa3_enterprise_type
WPA3 Enterprise security types.
Definition wifi.h:176
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
Request a Wi-Fi 11k neighbor request.
Definition wifi_mgmt.h:214
#define NET_REQUEST_WIFI_P2P_OPER
Request a Wi-Fi Direct (P2P) operation.
Definition wifi_mgmt.h:409
wifi_wps_op
Operation for WPS.
Definition wifi_mgmt.h:1948
wifi_twt_setup_resp_status
Wi-Fi Target Wake Time (TWT) negotiation status.
Definition wifi.h:603
#define NET_REQUEST_WIFI_CONFIG_PARAM
Request a Wi-Fi STA parameters configuration.
Definition wifi_mgmt.h:298
#define NET_REQUEST_WIFI_BTM_QUERY
Request a Wi-Fi BTM query.
Definition wifi_mgmt.h:320
wifi_iface_mode
Wi-Fi interface modes.
Definition wifi.h:429
wifi_akm_suite
Canonical IEEE 802.11 AKM suite selector values.
Definition wifi_mgmt.h:1273
#define NET_REQUEST_WIFI_AP_ENABLE
Request a Wi-Fi access point enable.
Definition wifi_mgmt.h:184
#define NET_REQUEST_WIFI_WPS_CONFIG
Request a Wi-Fi WPS configuration.
Definition wifi_mgmt.h:358
#define WIFI_COUNTRY_CODE_LEN
Length of the country code string.
Definition wifi.h:29
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:220
wifi_twt_negotiation_type
Wi-Fi Target Wake Time (TWT) negotiation types.
Definition wifi.h:567
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.
#define NET_REQUEST_WIFI_PMKSA_FLUSH_EXTERNAL
Flush only backend PMKSA cache state managed outside the application.
Definition wifi_mgmt.h:340
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:801
#define WIFI_PMKSA_PMKID_LEN
PMKID length in bytes.
Definition wifi_mgmt.h:1266
wifi_ap_config_param
Wi-Fi AP mode configuration parameter.
Definition wifi.h:787
wifi_conn_status
Wi-Fi connect result codes.
Definition wifi.h:45
#define NET_REQUEST_WIFI_PMKSA_GET
Request one Wi-Fi PMKSA cache entry by index.
Definition wifi_mgmt.h:335
#define NET_REQUEST_WIFI_START_ROAMING
Request a Wi-Fi roaming start.
Definition wifi_mgmt.h:385
#define NET_REQUEST_WIFI_PMKSA_FLUSH
Request a Wi-Fi PMKSA cache entries flush.
Definition wifi_mgmt.h:325
#define NET_REQUEST_WIFI_DISCONNECT
Request a Wi-Fi disconnect.
Definition wifi_mgmt.h:178
wifi_twt_fail_reason
Target Wake Time (TWT) error codes.
Definition wifi.h:611
#define NET_REQUEST_WIFI_AP_RTS_THRESHOLD
Request a Wi-Fi RTS threshold.
Definition wifi_mgmt.h:196
net_request_wifi_cmd
Wi-Fi management commands.
Definition wifi_mgmt.h:77
#define NET_REQUEST_WIFI_MODE
Request current Wi-Fi mode.
Definition wifi_mgmt.h:250
#define NET_REQUEST_WIFI_BGSCAN
Request a Wi-Fi background scan configuration.
Definition wifi_mgmt.h:403
#define NET_REQUEST_WIFI_AP_STA_DISCONNECT
Request a Wi-Fi access point to disconnect a station.
Definition wifi_mgmt.h:268
void wifi_pmksa_cache_entries_clear(struct wifi_pmksa_cache_entry *entries, size_t entry_count)
Clear PMKSA cache entries using a compiler-resistant byte wipe.
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:172
wifi_bgscan_type
Wi-Fi background scan implementation.
Definition wifi_mgmt.h:2153
wifi_ap_status
Wi-Fi AP mode result codes.
Definition wifi_mgmt.h:978
#define NET_REQUEST_WIFI_TWT
Request a Wi-Fi TWT.
Definition wifi_mgmt.h:226
wifi_link_mode
Wi-Fi link operating modes.
Definition wifi.h:457
void wifi_mgmt_raise_connect_result_status_event(struct net_if *iface, const struct wifi_status *status)
Wi-Fi management connect result event with the IEEE 802.11 codes.
wifi_ps_param_type
Wi-Fi power save parameters.
Definition wifi.h:678
net_event_wifi_cmd
Wi-Fi management events.
Definition wifi_mgmt.h:452
wifi_pmksa_cache_usage
Result of using the PMKSA cache for the current connection.
Definition wifi_mgmt.h:741
#define NET_REQUEST_WIFI_CONN_PARAMS
Request a Wi-Fi connection parameters.
Definition wifi_mgmt.h:280
wifi_disconn_reason
Wi-Fi disconnect reason codes.
Definition wifi_mgmt.h:959
wifi_ps_wakeup_mode
Wi-Fi power save modes.
Definition wifi.h:694
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.
void wifi_mgmt_raise_pmksa_cache_event(struct net_if *iface, uint64_t event, const struct wifi_pmksa_cache_event *info)
Raise a PMKSA cache change event.
wifi_twt_operation
Wi-Fi Target Wake Time (TWT) operations.
Definition wifi.h:556
wifi_scan_type
Wi-Fi scanning types.
Definition wifi.h:490
void(* scan_result_cb_t)(struct net_if *iface, int status, struct wifi_scan_result *entry)
Scan result callback.
Definition wifi_mgmt.h:2199
wifi_twt_teardown_status
Wi-Fi Target Wake Time (TWT) teradown status.
Definition wifi.h:637
#define WIFI_SSID_MAX_LEN
Max SSID length.
Definition wifi.h:352
#define NET_REQUEST_WIFI_CHANNEL
Request a Wi-Fi channel.
Definition wifi_mgmt.h:262
wifi_config_ps_param_fail_reason
Wi-Fi power save error codes.
Definition wifi.h:728
#define NET_REQUEST_WIFI_11K_CONFIG
Request a Wi-Fi 11k configuration.
Definition wifi_mgmt.h:208
wifi_security_type
IEEE 802.11 security types.
Definition wifi.h:80
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:1382
#define NET_REQUEST_WIFI_ENTERPRISE_CREDS
Set Wi-Fi enterprise mode CA/client Cert and key.
Definition wifi_mgmt.h:346
#define NET_REQUEST_WIFI_BTWT
Request a Wi-Fi broadcast TWT flow setup.
Definition wifi_mgmt.h:232
#define WIFI_PMKSA_PMK_MAX_LEN
Maximum PMK length in bytes.
Definition wifi_mgmt.h:1270
#define NET_REQUEST_WIFI_AP_CONFIG_PARAM
Request a Wi-Fi AP parameters configuration.
Definition wifi_mgmt.h:292
#define NET_REQUEST_WIFI_AP_DISABLE
Request a Wi-Fi access point disable.
Definition wifi_mgmt.h:190
wifi_wep_key_type
WEP key type (based on key length).
Definition wifi.h:146
wifi_ps_mode
Wi-Fi power save modes.
Definition wifi.h:509
@ WIFI_EXT_CAPAB_GLK
General link (GLK) support.
Definition wifi_mgmt.h:2182
@ WIFI_EXT_CAPAB_20_40_COEX
20/40 BSS coexistence management support
Definition wifi_mgmt.h:2180
@ WIFI_EXT_CAPAB_BSS_TRANSITION
BSS transition management support.
Definition wifi_mgmt.h:2188
@ WIFI_EXT_CAPAB_EXT_CHAN_SWITCH
Extended channel switching support.
Definition wifi_mgmt.h:2184
@ WIFI_EXT_CAPAB_TIM_BROADCAST
TIM broadcast support.
Definition wifi_mgmt.h:2186
@ WIFI_SAP_IFACE_COUNTRY_UPDATE
Country code update in progress.
Definition wifi_mgmt.h:2138
@ WIFI_SAP_IFACE_DISABLED
Interface is disabled.
Definition wifi_mgmt.h:2136
@ WIFI_SAP_IFACE_HT_SCAN
HT scan in progress.
Definition wifi_mgmt.h:2142
@ WIFI_SAP_IFACE_ENABLED
Interface is enabled.
Definition wifi_mgmt.h:2148
@ WIFI_SAP_IFACE_ACS
Automatic channel selection in progress.
Definition wifi_mgmt.h:2140
@ WIFI_SAP_IFACE_UNINITIALIZED
Interface is uninitialized.
Definition wifi_mgmt.h:2134
@ WIFI_SAP_IFACE_NO_IR
Selected channel does not allow initiating radiation.
Definition wifi_mgmt.h:2146
@ WIFI_SAP_IFACE_DFS
Dynamic frequency selection in progress.
Definition wifi_mgmt.h:2144
@ WIFI_TWT_STATE_SLEEP
TWT sleep state: sleeping.
Definition wifi_mgmt.h:1435
@ WIFI_TWT_STATE_AWAKE
TWT sleep state: awake.
Definition wifi_mgmt.h:1437
@ WIFI_WPS_PBC
WPS pbc.
Definition wifi_mgmt.h:1950
@ WIFI_WPS_PIN_SET
Set WPS pin number.
Definition wifi_mgmt.h:1954
@ WIFI_WPS_PIN_GET
Get WPS pin number.
Definition wifi_mgmt.h:1952
@ WIFI_AKM_SUITE_802_1X
802.1X.
Definition wifi_mgmt.h:1277
@ WIFI_AKM_SUITE_UNKNOWN
No recognized AKM suite.
Definition wifi_mgmt.h:1275
@ WIFI_AKM_SUITE_802_1X_SUITE_B
802.1X Suite B.
Definition wifi_mgmt.h:1293
@ WIFI_AKM_SUITE_SAE
SAE.
Definition wifi_mgmt.h:1289
@ WIFI_AKM_SUITE_SAE_EXT_KEY
SAE extended key.
Definition wifi_mgmt.h:1317
@ WIFI_AKM_SUITE_FT_802_1X
Fast transition 802.1X.
Definition wifi_mgmt.h:1281
@ WIFI_AKM_SUITE_FILS_SHA384
FILS with SHA-384.
Definition wifi_mgmt.h:1301
@ WIFI_AKM_SUITE_802_1X_SHA384
802.1X with SHA-384.
Definition wifi_mgmt.h:1315
@ WIFI_AKM_SUITE_FILS_SHA256
FILS with SHA-256.
Definition wifi_mgmt.h:1299
@ WIFI_AKM_SUITE_FT_802_1X_SHA384_UNRESTRICTED
Fast transition 802.1X with SHA-384 without PMF.
Definition wifi_mgmt.h:1313
@ WIFI_AKM_SUITE_FT_FILS_SHA256
Fast transition FILS with SHA-256.
Definition wifi_mgmt.h:1303
@ WIFI_AKM_SUITE_DPP
Device Provisioning Protocol.
Definition wifi_mgmt.h:1321
@ WIFI_AKM_SUITE_PSK
PSK.
Definition wifi_mgmt.h:1279
@ WIFI_AKM_SUITE_FT_802_1X_SHA384
Fast transition 802.1X with SHA-384.
Definition wifi_mgmt.h:1297
@ WIFI_AKM_SUITE_FT_PSK
Fast transition PSK.
Definition wifi_mgmt.h:1283
@ WIFI_AKM_SUITE_PSK_SHA384
PSK with SHA-384.
Definition wifi_mgmt.h:1311
@ WIFI_AKM_SUITE_FT_PSK_SHA384
Fast transition PSK with SHA-384.
Definition wifi_mgmt.h:1309
@ WIFI_AKM_SUITE_802_1X_SHA256
802.1X with SHA-256.
Definition wifi_mgmt.h:1285
@ WIFI_AKM_SUITE_FT_FILS_SHA384
Fast transition FILS with SHA-384.
Definition wifi_mgmt.h:1305
@ WIFI_AKM_SUITE_OWE
OWE.
Definition wifi_mgmt.h:1307
@ WIFI_AKM_SUITE_FT_SAE_EXT_KEY
Fast transition SAE extended key.
Definition wifi_mgmt.h:1319
@ WIFI_AKM_SUITE_802_1X_SUITE_B_192
802.1X Suite B 192-bit.
Definition wifi_mgmt.h:1295
@ WIFI_AKM_SUITE_PSK_SHA256
PSK with SHA-256.
Definition wifi_mgmt.h:1287
@ WIFI_AKM_SUITE_FT_SAE
Fast transition SAE.
Definition wifi_mgmt.h:1291
@ NET_REQUEST_WIFI_CMD_AP_CONFIG_PARAM
Configure AP parameter.
Definition wifi_mgmt.h:121
@ NET_REQUEST_WIFI_CMD_TWT
Setup or teardown TWT flow.
Definition wifi_mgmt.h:99
@ NET_REQUEST_WIFI_CMD_PMKSA_FLUSH
Flush PMKSA cache entries.
Definition wifi_mgmt.h:131
@ NET_REQUEST_WIFI_CMD_P2P_OPER
Wi-Fi Direct (P2P) operations.
Definition wifi_mgmt.h:155
@ NET_REQUEST_WIFI_CMD_PACKET_FILTER
Set or get packet filter setting for current mode.
Definition wifi_mgmt.h:109
@ NET_REQUEST_WIFI_CMD_AP_ENABLE
Enable AP mode.
Definition wifi_mgmt.h:85
@ NET_REQUEST_WIFI_CMD_START_ROAMING
Start roaming.
Definition wifi_mgmt.h:143
@ NET_REQUEST_WIFI_CMD_REG_DOMAIN
Set or get regulatory domain.
Definition wifi_mgmt.h:105
@ NET_REQUEST_WIFI_CMD_AP_RTS_THRESHOLD
Set AP RTS threshold.
Definition wifi_mgmt.h:89
@ NET_REQUEST_WIFI_CMD_BSS_MAX_IDLE_PERIOD
Configure BSS maximum idle period.
Definition wifi_mgmt.h:151
@ NET_REQUEST_WIFI_CMD_11K_NEIGHBOR_REQUEST
Send 11k neighbor request.
Definition wifi_mgmt.h:95
@ NET_REQUEST_WIFI_CMD_SCAN
Scan for Wi-Fi networks.
Definition wifi_mgmt.h:79
@ NET_REQUEST_WIFI_CMD_IFACE_STATUS
Get interface status.
Definition wifi_mgmt.h:91
@ NET_REQUEST_WIFI_CMD_AP_STA_DISCONNECT
Disconnect a STA from AP.
Definition wifi_mgmt.h:113
@ NET_REQUEST_WIFI_CMD_DPP
DPP actions.
Definition wifi_mgmt.h:125
@ NET_REQUEST_WIFI_CMD_AP_DISABLE
Disable AP mode.
Definition wifi_mgmt.h:87
@ NET_REQUEST_WIFI_CMD_RTS_THRESHOLD
Set RTS threshold.
Definition wifi_mgmt.h:119
@ NET_REQUEST_WIFI_CMD_CONNECT
Connect to a Wi-Fi network.
Definition wifi_mgmt.h:81
@ NET_REQUEST_WIFI_CMD_VERSION
Get Wi-Fi driver and Firmware versions.
Definition wifi_mgmt.h:115
@ NET_REQUEST_WIFI_CMD_BGSCAN
Configure background scanning.
Definition wifi_mgmt.h:153
@ NET_REQUEST_WIFI_CMD_CONFIG_PARAM
Configure STA parameter.
Definition wifi_mgmt.h:123
@ NET_REQUEST_WIFI_CMD_ENTERPRISE_CREDS
Set enterprise mode credential.
Definition wifi_mgmt.h:133
@ NET_REQUEST_WIFI_CMD_CONN_PARAMS
Get Wi-Fi latest connection parameters.
Definition wifi_mgmt.h:117
@ NET_REQUEST_WIFI_CMD_PMKSA_GET
Get one entry from the PMKSA cache by index.
Definition wifi_mgmt.h:157
@ NET_REQUEST_WIFI_CMD_11K_CONFIG
Set or get 11k status.
Definition wifi_mgmt.h:93
@ NET_REQUEST_WIFI_CMD_CHANNEL
Set or get Wi-Fi channel for Monitor or TX-Injection mode.
Definition wifi_mgmt.h:111
@ NET_REQUEST_WIFI_CMD_NAN
NAN actions.
Definition wifi_mgmt.h:127
@ NET_REQUEST_WIFI_CMD_BTWT
Setup BTWT flow.
Definition wifi_mgmt.h:101
@ NET_REQUEST_WIFI_CMD_MODE
Set or get Mode of operation.
Definition wifi_mgmt.h:107
@ NET_REQUEST_WIFI_CMD_RTS_THRESHOLD_CONFIG
Get RTS threshold.
Definition wifi_mgmt.h:135
@ NET_REQUEST_WIFI_CMD_CANDIDATE_SCAN
Specific scan.
Definition wifi_mgmt.h:147
@ NET_REQUEST_WIFI_CMD_BTM_QUERY
BSS transition management query.
Definition wifi_mgmt.h:129
@ NET_REQUEST_WIFI_CMD_PMKSA_FLUSH_EXTERNAL
Flush externally managed PMKSA cache state.
Definition wifi_mgmt.h:159
@ NET_REQUEST_WIFI_CMD_PS
Set power save status.
Definition wifi_mgmt.h:97
@ NET_REQUEST_WIFI_CMD_DISCONNECT
Disconnect from a Wi-Fi network.
Definition wifi_mgmt.h:83
@ NET_REQUEST_WIFI_CMD_NEIGHBOR_REP_COMPLETE
Neighbor report complete.
Definition wifi_mgmt.h:145
@ NET_REQUEST_WIFI_CMD_AP_WPS_CONFIG
AP WPS config.
Definition wifi_mgmt.h:149
@ NET_REQUEST_WIFI_CMD_PS_CONFIG
Get power save config.
Definition wifi_mgmt.h:103
@ NET_REQUEST_WIFI_CMD_WPS_CONFIG
WPS config.
Definition wifi_mgmt.h:137
@ WIFI_BGSCAN_SIMPLE
Simple, periodic scan based on signal strength.
Definition wifi_mgmt.h:2157
@ WIFI_BGSCAN_NONE
None, background scan is disabled.
Definition wifi_mgmt.h:2155
@ WIFI_BGSCAN_LEARN
Learn channels used by the network (experimental).
Definition wifi_mgmt.h:2159
@ WIFI_STATUS_AP_CHANNEL_NOT_ALLOWED
AP mode enable failed - channel not allowed.
Definition wifi_mgmt.h:986
@ WIFI_STATUS_AP_SUCCESS
AP mode enable or disable successful.
Definition wifi_mgmt.h:980
@ WIFI_STATUS_AP_OP_NOT_SUPPORTED
AP mode enable failed - operation not supported.
Definition wifi_mgmt.h:992
@ WIFI_STATUS_AP_OP_NOT_PERMITTED
AP mode enable failed - operation not permitted.
Definition wifi_mgmt.h:994
@ WIFI_STATUS_AP_CHANNEL_NOT_SUPPORTED
AP mode enable failed - channel not supported.
Definition wifi_mgmt.h:984
@ WIFI_STATUS_AP_FAIL
AP mode enable or disable failed - generic failure.
Definition wifi_mgmt.h:982
@ WIFI_STATUS_AP_AUTH_TYPE_NOT_SUPPORTED
AP mode enable failed - authentication type not supported.
Definition wifi_mgmt.h:990
@ WIFI_STATUS_AP_SSID_NOT_ALLOWED
AP mode enable failed - SSID not allowed.
Definition wifi_mgmt.h:988
@ NET_MGMT_CMD
Scan results available.
Definition wifi_mgmt.h:454
@ WIFI_PMKSA_CACHE_USAGE_MISS
A cache lookup was attempted but missed.
Definition wifi_mgmt.h:749
@ WIFI_PMKSA_CACHE_USAGE_HIT
A cached key was used.
Definition wifi_mgmt.h:747
@ WIFI_PMKSA_CACHE_USAGE_UNKNOWN
The backend cannot determine cache usage.
Definition wifi_mgmt.h:743
@ WIFI_PMKSA_CACHE_USAGE_NOT_ATTEMPTED
No cache lookup was attempted.
Definition wifi_mgmt.h:745
@ WIFI_REASON_DISCONN_INACTIVITY
Disconnected due to inactivity.
Definition wifi_mgmt.h:969
@ WIFI_REASON_DISCONN_AP_LEAVING
Disconnected due to AP leaving.
Definition wifi_mgmt.h:967
@ WIFI_REASON_DISCONN_SUCCESS
Success, overload status as reason.
Definition wifi_mgmt.h:961
@ WIFI_REASON_DISCONN_UNSPECIFIED
Unspecified reason.
Definition wifi_mgmt.h:963
@ WIFI_REASON_DISCONN_USER_REQUEST
Disconnected due to user request.
Definition wifi_mgmt.h:965
@ WIFI_MGMT_GET
Get operation.
Definition wifi_mgmt.h:1384
@ WIFI_MGMT_SET
Set operation.
Definition wifi_mgmt.h:1386
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:543
Ethernet L2 API operations.
Definition ethernet.h:584
Network Interface structure.
Definition net_if.h:875
All Wi-Fi specific statistics.
Definition net_stats.h:730
Extended net_if_driver_api for offloaded ifaces/network devices, allowing handling of admin up/down s...
Definition offloaded_netdev.h:53
Wi-Fi 11k parameters.
Definition wifi_mgmt.h:1390
uint8_t ssid[WIFI_SSID_MAX_LEN+1]
SSID.
Definition wifi_mgmt.h:1396
bool enable_11k
11k enable/disable
Definition wifi_mgmt.h:1394
enum wifi_mgmt_op oper
11k command operation
Definition wifi_mgmt.h:1392
Wi-Fi AP configuration parameter.
Definition wifi_mgmt.h:1596
uint32_t max_inactivity
Parameter used for setting maximum inactivity duration for stations.
Definition wifi_mgmt.h:1600
enum wifi_ap_config_param type
Parameter used to identify the different AP parameters.
Definition wifi_mgmt.h:1598
uint32_t max_num_sta
Parameter used for setting maximum number of stations.
Definition wifi_mgmt.h:1602
enum wifi_frequency_bandwidths bandwidth
Parameter used for frequency band.
Definition wifi_mgmt.h:1604
AP mode - connected STA details.
Definition wifi_mgmt.h:1455
enum wifi_link_mode link_mode
Link mode, see enum wifi_link_mode.
Definition wifi_mgmt.h:1457
uint8_t mac[WIFI_MAC_ADDR_LEN]
MAC address.
Definition wifi_mgmt.h:1459
uint8_t mac_length
MAC address length.
Definition wifi_mgmt.h:1461
bool twt_capable
is TWT capable ?
Definition wifi_mgmt.h:1463
Wi-Fi structure to uniquely identify a band-channel pair.
Definition wifi_mgmt.h:653
uint8_t band
Frequency band.
Definition wifi_mgmt.h:655
uint8_t channel
Channel.
Definition wifi_mgmt.h:657
Wi-Fi background scan parameters.
Definition wifi_mgmt.h:2163
enum wifi_bgscan_type type
The type of background scanning.
Definition wifi_mgmt.h:2165
uint16_t long_interval
Long scan interval in seconds.
Definition wifi_mgmt.h:2169
uint16_t btm_queries
Number of BSS Transition Management (BTM) queries.
Definition wifi_mgmt.h:2173
int8_t rssi_threshold
Signal strength threshold in dBm.
Definition wifi_mgmt.h:2171
uint16_t short_interval
Short scan interval in seconds.
Definition wifi_mgmt.h:2167
Wi-Fi broadcast TWT parameters.
Definition wifi_mgmt.h:1091
uint8_t btwt_nominal_wake
Broadcast TWT range.
Definition wifi_mgmt.h:1099
uint16_t btwt_mantissa
Broadcast TWT mantissa.
Definition wifi_mgmt.h:1095
uint8_t btwt_exponent
Broadcast TWT exponent.
Definition wifi_mgmt.h:1097
uint8_t btwt_id
Broadcast TWT ID.
Definition wifi_mgmt.h:1093
Wi-Fi channel setting for monitor and TX-injection modes.
Definition wifi_mgmt.h:1576
uint8_t if_index
Interface index.
Definition wifi_mgmt.h:1585
uint16_t channel
Channel value to set or get.
Definition wifi_mgmt.h:1578
enum wifi_mgmt_op oper
Get or set operation.
Definition wifi_mgmt.h:1587
enum wifi_frequency_bands band
Frequency band for the channel (2.4 / 5 / 6 GHz).
Definition wifi_mgmt.h:1583
Wi-Fi STA configuration parameter.
Definition wifi_mgmt.h:1614
int okc
Parameter used for opportunistic key caching.
Definition wifi_mgmt.h:1618
enum wifi_config_param type
Parameter used to identify the different STA parameters.
Definition wifi_mgmt.h:1616
Wi-Fi connect request parameters.
Definition wifi_mgmt.h:753
const uint8_t * key2_passwd
Password for a secondary private key, if required by the authentication method.
Definition wifi_mgmt.h:812
uint8_t server_cert_domain_exact_len
Length of the server_cert_domain_exact string, maximum 128 bytes.
Definition wifi_mgmt.h:922
bool ft_used
Indicates if Fast BSS Transition (802.11r) is used.
Definition wifi_mgmt.h:880
enum wifi_frequency_bandwidths bandwidth
Parameter used for frequency band.
Definition wifi_mgmt.h:917
enum wifi_security_type security
Security type.
Definition wifi_mgmt.h:777
const uint8_t * passwords[WIFI_ENT_IDENTITY_MAX_USERS]
Array of pointers to user password strings for EAP authentication.
Definition wifi_mgmt.h:909
const uint8_t * identities[WIFI_ENT_IDENTITY_MAX_USERS]
Array of pointers to user identity strings for EAP authentication.
Definition wifi_mgmt.h:902
uint8_t aid_length
Length of the anonymous identity, maximum 64 bytes.
Definition wifi_mgmt.h:794
const uint8_t * server_cert_domain_exact
Full domain name to verify in the server certificate.
Definition wifi_mgmt.h:920
const uint8_t * sae_password
SAE password (same as PSK but with no length restrictions), optional.
Definition wifi_mgmt.h:769
const uint8_t * key_passwd
Private key password for Wi-Fi Enterprise authentication.
Definition wifi_mgmt.h:802
uint8_t eap_id_length
Length of the EAP identity, maximum 64 bytes.
Definition wifi_mgmt.h:854
uint8_t channel
Channel.
Definition wifi_mgmt.h:775
uint8_t ssid_length
SSID length.
Definition wifi_mgmt.h:757
int timeout
Connect timeout in seconds, SYS_FOREVER_MS for no timeout.
Definition wifi_mgmt.h:783
uint8_t transition_disable
WPA3 Transition Disable bitmap (WPA3 Spec v3.0, Table 5).
Definition wifi_mgmt.h:941
bool psk_is_pbkdf2
Pre-shared key is the pre-computed PBKDF2 output.
Definition wifi_mgmt.h:767
int nusers
Number of EAP user identities provided.
Definition wifi_mgmt.h:888
enum wifi_mfp_options mfp
MFP options.
Definition wifi_mgmt.h:779
uint8_t sae_password_length
SAE password length.
Definition wifi_mgmt.h:771
const uint8_t * anon_id
Anonymous identity used in EAP authentication (Phase 1) for Wi-Fi Enterprise networks.
Definition wifi_mgmt.h:791
size_t pmksa_entry_count
Number of PMKSA entries supplied for this connection.
Definition wifi_mgmt.h:953
int eap_ver
EAP (Extensible Authentication Protocol) version to use.
Definition wifi_mgmt.h:842
uint8_t key_passwd_length
Length of the private key password, maximum 128 bytes.
Definition wifi_mgmt.h:805
uint8_t band
Frequency band.
Definition wifi_mgmt.h:773
const struct wifi_pmksa_cache_entry * pmksa_entries
Optional PMKSA cache hints bound to this connection's profile.
Definition wifi_mgmt.h:951
uint8_t TLS_cipher
TLS cipher suite to use for EAP-TLS authentication.
Definition wifi_mgmt.h:833
const uint8_t * psk
Pre-shared key.
Definition wifi_mgmt.h:759
uint8_t bssid[WIFI_MAC_ADDR_LEN]
BSSID.
Definition wifi_mgmt.h:781
bool verify_peer_cert
Whether to verify the server's certificate authority (CA) during authentication.
Definition wifi_mgmt.h:873
uint8_t passwds
Number of EAP passwords provided.
Definition wifi_mgmt.h:895
uint8_t psk_length
Pre-shared key length.
Definition wifi_mgmt.h:761
const uint8_t * eap_identity
Identity string for EAP authentication (Phase 2, inner authentication).
Definition wifi_mgmt.h:851
const uint8_t * ssid
SSID.
Definition wifi_mgmt.h:755
uint8_t ssid_protection
SSID protection in 4-way handshake (needs RSNXE support) 0: Disable (default) 1: Enable.
Definition wifi_mgmt.h:932
const uint8_t * server_cert_domain_suffix
Domain name suffix to verify in the server certificate.
Definition wifi_mgmt.h:925
enum wifi_wpa3_enterprise_type wpa3_ent_mode
WPA3 Enterprise mode type.
Definition wifi_mgmt.h:825
uint8_t eap_passwd_length
Length of the EAP password, maximum 128 bytes.
Definition wifi_mgmt.h:865
uint8_t key2_passwd_length
Length of the secondary private key password, maximum 128 bytes.
Definition wifi_mgmt.h:815
uint8_t server_cert_domain_suffix_len
Length of the server_cert_domain_suffix string, maximum 64 bytes.
Definition wifi_mgmt.h:927
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:915
const uint8_t * eap_password
Password string for EAP authentication (Phase 2, inner authentication).
Definition wifi_mgmt.h:862
Wi-Fi enterprise mode credentials.
Definition wifi_mgmt.h:1216
uint32_t client_key_len
Client key length.
Definition wifi_mgmt.h:1228
uint8_t * client_cert2
Client certification of phase2.
Definition wifi_mgmt.h:1234
uint32_t client_key2_len
Phase2 Client key length.
Definition wifi_mgmt.h:1240
uint32_t client_cert_len
Client certification length.
Definition wifi_mgmt.h:1224
uint32_t ca_cert_len
CA certification length.
Definition wifi_mgmt.h:1220
uint8_t * client_cert
Client certification.
Definition wifi_mgmt.h:1222
uint8_t * client_key
Client key.
Definition wifi_mgmt.h:1226
uint32_t server_key_len
Server key length.
Definition wifi_mgmt.h:1248
uint8_t * dh_param
Diffie-Hellman parameter.
Definition wifi_mgmt.h:1250
uint8_t * client_key2
Client key of phase2.
Definition wifi_mgmt.h:1238
uint32_t ca_cert2_len
Phase2 CA certification length.
Definition wifi_mgmt.h:1232
uint32_t dh_param_len
Diffie-Hellman parameter length.
Definition wifi_mgmt.h:1252
uint8_t * server_key
Server key.
Definition wifi_mgmt.h:1246
uint32_t server_cert_len
Server certification length.
Definition wifi_mgmt.h:1244
uint8_t * server_cert
Server certification.
Definition wifi_mgmt.h:1242
uint8_t * ca_cert2
CA certification of phase2.
Definition wifi_mgmt.h:1230
uint32_t client_cert2_len
Phase2 Client certification length.
Definition wifi_mgmt.h:1236
uint8_t * ca_cert
CA certification.
Definition wifi_mgmt.h:1218
Wi-Fi filter setting for monitor, prmoiscuous, TX-injection modes.
Definition wifi_mgmt.h:1564
uint16_t buffer_size
Filter buffer size.
Definition wifi_mgmt.h:1570
uint8_t filter
Filter setting.
Definition wifi_mgmt.h:1566
enum wifi_mgmt_op oper
Get or set operation.
Definition wifi_mgmt.h:1572
uint8_t if_index
Interface index.
Definition wifi_mgmt.h:1568
Wi-Fi interface status.
Definition wifi_mgmt.h:1021
enum wifi_pmksa_cache_usage pmksa_cache_usage
How the current connection used the PMKSA cache.
Definition wifi_mgmt.h:1057
unsigned short beacon_interval
Beacon interval.
Definition wifi_mgmt.h:1051
enum wifi_wpa3_enterprise_type wpa3_ent_type
WPA3 enterprise type.
Definition wifi_mgmt.h:1039
char ssid[WIFI_SSID_MAX_LEN+1]
SSID.
Definition wifi_mgmt.h:1027
float current_phy_tx_rate
The current 802.11 PHY TX data rate (in Mbps).
Definition wifi_mgmt.h:1055
int rssi
RSSI.
Definition wifi_mgmt.h:1047
char bssid[WIFI_MAC_ADDR_LEN]
BSSID.
Definition wifi_mgmt.h:1029
enum wifi_security_type security
Security type, see enum wifi_security_type.
Definition wifi_mgmt.h:1041
unsigned int channel
Channel.
Definition wifi_mgmt.h:1033
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:1043
enum wifi_mfp_options mfp
MFP options, see enum wifi_mfp_options.
Definition wifi_mgmt.h:1045
unsigned char dtim_period
DTIM period.
Definition wifi_mgmt.h:1049
int state
Interface state, see enum wifi_iface_state.
Definition wifi_mgmt.h:1023
bool twt_capable
is TWT capable?
Definition wifi_mgmt.h:1053
enum wifi_iface_mode iface_mode
Interface mode, see enum wifi_iface_mode.
Definition wifi_mgmt.h:1035
unsigned int ssid_len
SSID length.
Definition wifi_mgmt.h:1025
enum wifi_frequency_bands band
Frequency band.
Definition wifi_mgmt.h:1031
enum wifi_link_mode link_mode
Link mode, see enum wifi_link_mode.
Definition wifi_mgmt.h:1037
Wi-Fi management API.
Definition wifi_mgmt.h:2214
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:2515
int(* pmksa_flush_external)(const struct device *dev, struct net_if *iface)
Flush externally managed PMKSA cache state.
Definition wifi_mgmt.h:2579
int(* set_bgscan)(const struct device *dev, struct net_if *iface, struct wifi_bgscan_params *params)
Configure background scanning.
Definition wifi_mgmt.h:2671
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:2414
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:2337
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:2659
int(* ap_disable)(const struct device *dev, struct net_if *iface)
Disable AP mode.
Definition wifi_mgmt.h:2275
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:2423
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:2348
uint32_t(* get_iface_caps)(const struct device *dev, struct net_if *iface)
Get interface supported roles (static driver capability).
Definition wifi_mgmt.h:2700
int(* set_btwt)(const struct device *dev, struct net_if *iface, struct wifi_twt_params *params)
Setup BTWT flow.
Definition wifi_mgmt.h:2370
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:2403
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:2443
int(* config_params)(const struct device *dev, struct net_if *iface, struct wifi_config_params *params)
Configure STA parameter.
Definition wifi_mgmt.h:2526
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:2246
int(* pmksa_get)(const struct device *dev, struct net_if *iface, struct wifi_pmksa_cache_query *query)
Get one indexed PMKSA cache entry while associated.
Definition wifi_mgmt.h:2568
int(* candidate_scan)(const struct device *dev, struct net_if *iface, struct wifi_scan_params *params)
Trigger candidate scan.
Definition wifi_mgmt.h:2638
int(* pmksa_flush)(const struct device *dev, struct net_if *iface)
Flush PMKSA cache entries.
Definition wifi_mgmt.h:2588
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:2477
int(* reset_stats)(const struct device *dev, struct net_if *iface)
Reset Wi-Fi statistics.
Definition wifi_mgmt.h:2316
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:2392
int(* disconnect)(const struct device *dev, struct net_if *iface)
Disconnect from a Wi-Fi network.
Definition wifi_mgmt.h:2256
int(* legacy_roam)(const struct device *dev, struct net_if *iface)
Send legacy scan.
Definition wifi_mgmt.h:2462
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:2381
int(* iface_status)(const struct device *dev, struct net_if *iface, struct wifi_iface_status *status)
Get interface status.
Definition wifi_mgmt.h:2294
int(* ap_enable)(const struct device *dev, struct net_if *iface, struct wifi_connect_req_params *params)
Enable AP mode.
Definition wifi_mgmt.h:2266
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:2326
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:2493
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:2627
int(* get_stats)(const struct device *dev, struct net_if *iface, struct net_stats_wifi *stats)
Get Wi-Fi statistics.
Definition wifi_mgmt.h:2306
int(* start_11r_roaming)(const struct device *dev, struct net_if *iface)
Start 11r roaming.
Definition wifi_mgmt.h:2650
int(* bss_ext_capab)(const struct device *dev, struct net_if *iface, int capab)
Judge ap whether support the capability.
Definition wifi_mgmt.h:2453
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:2227
int(* btm_query)(const struct device *dev, struct net_if *iface, uint8_t reason)
Send BTM query.
Definition wifi_mgmt.h:2435
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:2616
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:2284
int(* set_rts_threshold)(const struct device *dev, struct net_if *iface, unsigned int rts_threshold)
Set RTS threshold value.
Definition wifi_mgmt.h:2504
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:2359
Wi-Fi mode setup.
Definition wifi_mgmt.h:1554
enum wifi_mgmt_op oper
Get or set operation.
Definition wifi_mgmt.h:1560
uint8_t mode
Mode setting for a specific mode of operation.
Definition wifi_mgmt.h:1556
uint8_t if_index
Interface index.
Definition wifi_mgmt.h:1558
Wi-Fi driver API for devices using the native network stack.
Definition wifi_mgmt.h:2704
const void * wifi_drv_ops
Wi-Fi supplicant driver API.
Definition wifi_mgmt.h:2712
struct ethernet_driver_api wifi_iface
Ethernet API, must be the first member.
Definition wifi_mgmt.h:2706
const struct wifi_mgmt_ops *const wifi_mgmt_api
Wi-Fi management API.
Definition wifi_mgmt.h:2708
Wi-Fi driver API for devices offloading the network stack.
Definition wifi_mgmt.h:2721
const void * wifi_drv_ops
Wi-Fi supplicant driver API.
Definition wifi_mgmt.h:2729
const struct wifi_mgmt_ops *const wifi_mgmt_api
Wi-Fi management API.
Definition wifi_mgmt.h:2725
struct offloaded_if_driver_api wifi_iface
Offloaded network device API, must be the first member.
Definition wifi_mgmt.h:2723
Wi-Fi PMKSA cache entry transfer object.
Definition wifi_mgmt.h:1329
uint8_t pmk_len
Length of the pairwise master key.
Definition wifi_mgmt.h:1347
uint8_t pmkid[16U]
PMK identifier.
Definition wifi_mgmt.h:1339
uint32_t expiration_remaining_s
Remaining lifetime before the cache entry expires, in seconds.
Definition wifi_mgmt.h:1331
uint8_t spa[WIFI_MAC_ADDR_LEN]
Supplicant address associated with this cache entry.
Definition wifi_mgmt.h:1343
uint8_t fils_cache_id[2]
FILS cache identifier.
Definition wifi_mgmt.h:1345
bool opportunistic
Whether the entry was obtained opportunistically.
Definition wifi_mgmt.h:1351
uint8_t bssid[WIFI_MAC_ADDR_LEN]
BSSID associated with this cache entry.
Definition wifi_mgmt.h:1341
bool fils_cache_id_set
Whether fils_cache_id is present.
Definition wifi_mgmt.h:1349
uint8_t pmk[64U]
Pairwise master key; raw credential-equivalent secret material.
Definition wifi_mgmt.h:1337
uint32_t reauth_remaining_s
Remaining lifetime before reauthentication, in seconds.
Definition wifi_mgmt.h:1333
enum wifi_akm_suite akm
Canonical OUI-plus-suite-type AKM selector.
Definition wifi_mgmt.h:1335
PMKSA cache change event payload.
Definition wifi_mgmt.h:1365
uint8_t bssid[WIFI_MAC_ADDR_LEN]
BSSID whose cache entry changed.
Definition wifi_mgmt.h:1369
uint8_t ssid_length
Length of the SSID, or zero if the profile could not be resolved.
Definition wifi_mgmt.h:1371
uint8_t ssid[WIFI_SSID_MAX_LEN]
SSID of the profile whose cache changed, if available.
Definition wifi_mgmt.h:1367
Indexed PMKSA cache export query.
Definition wifi_mgmt.h:1355
uint32_t entry_count
Total cache entry count returned on success or -ENOENT.
Definition wifi_mgmt.h:1361
uint32_t index
Requested cache entry index, preserved by the management layer.
Definition wifi_mgmt.h:1359
struct wifi_pmksa_cache_entry entry
Selected PMKSA cache entry, cleared before every return on error.
Definition wifi_mgmt.h:1357
Wi-Fi power save configuration.
Definition wifi_mgmt.h:1256
struct wifi_ps_params ps_params
Power save configuration.
Definition wifi_mgmt.h:1262
char num_twt_flows
Number of TWT flows.
Definition wifi_mgmt.h:1258
struct wifi_twt_flow_info twt_flows[WIFI_MAX_TWT_FLOWS]
TWT flow details.
Definition wifi_mgmt.h:1260
Wi-Fi power save parameters.
Definition wifi_mgmt.h:1061
enum wifi_ps_mode mode
Wi-Fi power save mode.
Definition wifi_mgmt.h:1069
enum wifi_config_ps_param_fail_reason fail_reason
Wi-Fi power save fail reason.
Definition wifi_mgmt.h:1082
enum wifi_ps_wakeup_mode wakeup_mode
Wi-Fi power save wakeup mode.
Definition wifi_mgmt.h:1067
unsigned short listen_interval
Listen interval.
Definition wifi_mgmt.h:1065
enum wifi_ps_exit_strategy exit_strategy
Wi-Fi power save exit strategy.
Definition wifi_mgmt.h:1084
enum wifi_ps enabled
Power save state.
Definition wifi_mgmt.h:1063
unsigned int timeout_ms
Wi-Fi power save timeout.
Definition wifi_mgmt.h:1078
enum wifi_ps_param_type type
Wi-Fi power save type.
Definition wifi_mgmt.h:1080
Wi-Fi raw scan result.
Definition wifi_mgmt.h:1442
int8_t rssi
RSSI.
Definition wifi_mgmt.h:1444
uint8_t data[CONFIG_WIFI_MGMT_RAW_SCAN_RESULT_LENGTH]
Raw scan data.
Definition wifi_mgmt.h:1450
int frame_length
Frame length.
Definition wifi_mgmt.h:1446
unsigned short frequency
Frequency.
Definition wifi_mgmt.h:1448
Per-channel regulatory attributes.
Definition wifi_mgmt.h:1403
unsigned short center_frequency
Center frequency in MHz.
Definition wifi_mgmt.h:1405
unsigned short dfs
Is a DFS channel.
Definition wifi_mgmt.h:1413
unsigned short supported
Is channel supported or not.
Definition wifi_mgmt.h:1409
unsigned short passive_only
Passive transmissions only.
Definition wifi_mgmt.h:1411
unsigned short max_power
Maximum transmission power (in dBm).
Definition wifi_mgmt.h:1407
Regulatory domain information or configuration.
Definition wifi_mgmt.h:1417
unsigned int num_channels
Number of channels supported.
Definition wifi_mgmt.h:1427
enum wifi_mgmt_op oper
Regulatory domain operation.
Definition wifi_mgmt.h:1419
struct wifi_reg_chan_info * chan_info
Channels information.
Definition wifi_mgmt.h:1429
bool force
Ignore all other regulatory hints over this one, the behavior is implementation specific.
Definition wifi_mgmt.h:1423
uint8_t country_code[WIFI_COUNTRY_CODE_LEN]
Country code: ISO/IEC 3166-1 alpha-2.
Definition wifi_mgmt.h:1425
Wi-Fi scan parameters structure.
Definition wifi_mgmt.h:665
uint16_t max_bss_cnt
Specifies the maximum number of scan results to return.
Definition wifi_mgmt.h:694
uint16_t dwell_time_active
Active scan dwell time (in ms) on a channel.
Definition wifi_mgmt.h:680
enum wifi_scan_type scan_type
Scan type, see enum wifi_scan_type.
Definition wifi_mgmt.h:673
uint8_t bands
Bitmap of bands to be scanned.
Definition wifi_mgmt.h:677
uint16_t dwell_time_passive
Passive scan dwell time (in ms) on a channel.
Definition wifi_mgmt.h:683
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:709
const char * ssids[WIFI_MGMT_SCAN_SSID_FILT_MAX]
Array of SSID strings to scan.
Definition wifi_mgmt.h:686
Wi-Fi scan result, each result is provided to the net_mgmt_event_callback via its info attribute (see...
Definition wifi_mgmt.h:715
uint8_t ssid_length
SSID length.
Definition wifi_mgmt.h:719
uint8_t band
Frequency band.
Definition wifi_mgmt.h:721
uint8_t mac[WIFI_MAC_ADDR_LEN]
BSSID.
Definition wifi_mgmt.h:733
int8_t rssi
RSSI.
Definition wifi_mgmt.h:731
uint8_t mac_length
BSSID length.
Definition wifi_mgmt.h:735
uint8_t ssid[WIFI_SSID_MAX_LEN+1]
SSID.
Definition wifi_mgmt.h:717
enum wifi_wpa3_enterprise_type wpa3_ent_type
WPA3 enterprise type.
Definition wifi_mgmt.h:727
enum wifi_mfp_options mfp
MFP options.
Definition wifi_mgmt.h:729
uint8_t channel
Channel.
Definition wifi_mgmt.h:723
enum wifi_security_type security
Security type.
Definition wifi_mgmt.h:725
Generic Wi-Fi status for commands and events.
Definition wifi_mgmt.h:998
enum wifi_ap_status ap_status
Access point status.
Definition wifi_mgmt.h:1008
uint16_t reason_code
IEEE 802.11 reason code from the last Deauthentication or Disassociation frame, 0 if not available.
Definition wifi_mgmt.h:1017
enum wifi_conn_status conn_status
Connection status.
Definition wifi_mgmt.h:1004
enum wifi_disconn_reason disconn_reason
Disconnection reason status.
Definition wifi_mgmt.h:1006
int status
Status value.
Definition wifi_mgmt.h:1002
uint16_t status_code
IEEE 802.11 status code from the last Authentication or (Re)Association Response frame,...
Definition wifi_mgmt.h:1013
Wi-Fi TWT flow information.
Definition wifi_mgmt.h:1187
uint8_t dialog_token
Dialog token, used to map requests to responses.
Definition wifi_mgmt.h:1191
enum wifi_twt_negotiation_type negotiation_type
TWT negotiation type, see enum wifi_twt_negotiation_type.
Definition wifi_mgmt.h:1195
uint32_t twt_wake_ahead_duration
Wake ahead duration.
Definition wifi_mgmt.h:1207
bool trigger
Trigger enabled or disabled.
Definition wifi_mgmt.h:1199
bool responder
Requestor or responder.
Definition wifi_mgmt.h:1197
uint8_t flow_id
Flow ID, used to map setup with teardown.
Definition wifi_mgmt.h:1193
uint64_t twt_interval
Interval = Wake up time + Sleeping time.
Definition wifi_mgmt.h:1189
uint32_t twt_wake_interval
Wake up time.
Definition wifi_mgmt.h:1205
bool implicit
Implicit or explicit.
Definition wifi_mgmt.h:1201
bool announce
Announced or unannounced.
Definition wifi_mgmt.h:1203
Wi-Fi TWT parameters.
Definition wifi_mgmt.h:1103
bool announce
Announced or unannounced.
Definition wifi_mgmt.h:1131
bool teardown_all
Teardown all flows.
Definition wifi_mgmt.h:1163
enum wifi_twt_setup_cmd setup_cmd
TWT setup command, see enum wifi_twt_setup_cmd.
Definition wifi_mgmt.h:1109
uint16_t btwt_offset
Broadcast TWT offset.
Definition wifi_mgmt.h:1152
bool trigger
Trigger enabled or disabled.
Definition wifi_mgmt.h:1127
enum wifi_twt_negotiation_type negotiation_type
TWT negotiation type, see enum wifi_twt_negotiation_type.
Definition wifi_mgmt.h:1107
enum wifi_twt_operation operation
TWT operation, see enum wifi_twt_operation.
Definition wifi_mgmt.h:1105
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:1139
enum wifi_twt_fail_reason fail_reason
TWT fail reason, see enum wifi_twt_fail_reason.
Definition wifi_mgmt.h:1167
struct wifi_twt_params::@302311362167322044106272253111230157111235232263::@053165077055023247316045052326043107125356150312 btwt
Setup specific parameters.
uint32_t twt_wake_interval
Wake up time.
Definition wifi_mgmt.h:1133
uint8_t btwt_li
In multiple of 4 beacon interval.
Definition wifi_mgmt.h:1154
enum wifi_twt_setup_resp_status resp_status
TWT setup response status, see enum wifi_twt_setup_resp_status.
Definition wifi_mgmt.h:1111
bool implicit
Implicit or explicit.
Definition wifi_mgmt.h:1129
uint8_t flow_id
Flow ID, used to map setup with teardown.
Definition wifi_mgmt.h:1117
enum wifi_twt_teardown_status teardown_status
TWT teardown cmd status, see enum wifi_twt_teardown_status.
Definition wifi_mgmt.h:1113
uint8_t btwt_sta_wait
Broadcast TWT station wait time.
Definition wifi_mgmt.h:1150
struct wifi_btwt_params btwt_set_cfg[5]
Broadcast TWT agreement sets.
Definition wifi_mgmt.h:1158
uint8_t twt_exponent
TWT exponent.
Definition wifi_mgmt.h:1143
uint16_t twt_mantissa
TWT Mantissa Range: [0-sizeof(UINT16)].
Definition wifi_mgmt.h:1145
struct wifi_twt_params::@302311362167322044106272253111230157111235232263::@352270327013076240220216032274341232230206256214 teardown
Teardown specific parameters.
uint64_t twt_interval
Interval = Wake up time + Sleeping time.
Definition wifi_mgmt.h:1123
bool twt_info_disable
TWT info enabled or disable.
Definition wifi_mgmt.h:1141
uint8_t dialog_token
Dialog token, used to map requests to responses.
Definition wifi_mgmt.h:1115
bool responder
Requestor or responder.
Definition wifi_mgmt.h:1125
struct wifi_twt_params::@302311362167322044106272253111230157111235232263::@007355023165260313375314073015252271352275036053 setup
Setup specific parameters.
uint8_t btwt_count
Broadcast TWT agreement count.
Definition wifi_mgmt.h:1156
Wi-Fi version.
Definition wifi_mgmt.h:643
const char * fw_version
Firmware version.
Definition wifi_mgmt.h:647
const char * drv_version
Driver version.
Definition wifi_mgmt.h:645
Wi-Fi wps setup.
Definition wifi_mgmt.h:1958
char pin[8+1]
pin value
Definition wifi_mgmt.h:1962
enum wifi_wps_op oper
wps operation
Definition wifi_mgmt.h:1960
IEEE 802.11 protocol and general Wi-Fi definitions.