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
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#define WIFI_NAN_RESP_SIZE 64
70#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_NAN */
72
135#ifdef CONFIG_WIFI_CREDENTIALS_CONNECT_STORED
137 NET_REQUEST_WIFI_CMD_CONNECT_STORED,
138#endif
154 NET_REQUEST_WIFI_CMD_MAX
156};
157
159#define NET_REQUEST_WIFI_SCAN \
160 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_SCAN)
161
163
165#define NET_REQUEST_WIFI_CONNECT \
166 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CONNECT)
167
169
171#define NET_REQUEST_WIFI_DISCONNECT \
172 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_DISCONNECT)
173
175
177#define NET_REQUEST_WIFI_AP_ENABLE \
178 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_ENABLE)
179
181
183#define NET_REQUEST_WIFI_AP_DISABLE \
184 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_DISABLE)
185
187
189#define NET_REQUEST_WIFI_AP_RTS_THRESHOLD \
190 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_RTS_THRESHOLD)
191
193
195#define NET_REQUEST_WIFI_IFACE_STATUS \
196 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_IFACE_STATUS)
197
199
201#define NET_REQUEST_WIFI_11K_CONFIG \
202 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_11K_CONFIG)
203
205
207#define NET_REQUEST_WIFI_11K_NEIGHBOR_REQUEST \
208 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_11K_NEIGHBOR_REQUEST)
209
211
213#define NET_REQUEST_WIFI_PS \
214 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PS)
215
217
219#define NET_REQUEST_WIFI_TWT \
220 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_TWT)
221
223
225#define NET_REQUEST_WIFI_BTWT \
226 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_BTWT)
227
229
231#define NET_REQUEST_WIFI_PS_CONFIG \
232 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PS_CONFIG)
233
235
237#define NET_REQUEST_WIFI_REG_DOMAIN \
238 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_REG_DOMAIN)
239
241
243#define NET_REQUEST_WIFI_MODE \
244 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_MODE)
245
247
249#define NET_REQUEST_WIFI_PACKET_FILTER \
250 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PACKET_FILTER)
251
253
255#define NET_REQUEST_WIFI_CHANNEL \
256 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CHANNEL)
257
259
261#define NET_REQUEST_WIFI_AP_STA_DISCONNECT \
262 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_STA_DISCONNECT)
263
265
267#define NET_REQUEST_WIFI_VERSION \
268 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_VERSION)
269
271
273#define NET_REQUEST_WIFI_CONN_PARAMS \
274 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CONN_PARAMS)
275
277
279#define NET_REQUEST_WIFI_RTS_THRESHOLD \
280 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_RTS_THRESHOLD)
281
283
285#define NET_REQUEST_WIFI_AP_CONFIG_PARAM \
286 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_AP_CONFIG_PARAM)
287
289
291#define NET_REQUEST_WIFI_CONFIG_PARAM \
292 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CONFIG_PARAM)
293
295
296#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_DPP
298#define NET_REQUEST_WIFI_DPP \
299 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_DPP)
300
301NET_MGMT_DEFINE_REQUEST_HANDLER(NET_REQUEST_WIFI_DPP);
302#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_DPP */
303
304#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_NAN
306#define NET_REQUEST_WIFI_NAN \
307 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_NAN)
308
309NET_MGMT_DEFINE_REQUEST_HANDLER(NET_REQUEST_WIFI_NAN);
310#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_NAN */
311
313#define NET_REQUEST_WIFI_BTM_QUERY (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_BTM_QUERY)
314
316
318#define NET_REQUEST_WIFI_PMKSA_FLUSH \
319 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_PMKSA_FLUSH)
320
322
324#define NET_REQUEST_WIFI_ENTERPRISE_CREDS \
325 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_ENTERPRISE_CREDS)
326
328
330#define NET_REQUEST_WIFI_RTS_THRESHOLD_CONFIG \
331 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_RTS_THRESHOLD_CONFIG)
332
334
336#define NET_REQUEST_WIFI_WPS_CONFIG (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_WPS_CONFIG)
337
339#ifdef CONFIG_WIFI_CREDENTIALS_CONNECT_STORED
340#define NET_REQUEST_WIFI_CONNECT_STORED (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_CONNECT_STORED)
341
342NET_MGMT_DEFINE_REQUEST_HANDLER(NET_REQUEST_WIFI_CONNECT_STORED);
343#endif
344
346#define NET_REQUEST_WIFI_START_ROAMING \
347 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_START_ROAMING)
348
350
352#define NET_REQUEST_WIFI_NEIGHBOR_REP_COMPLETE \
353 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_NEIGHBOR_REP_COMPLETE)
354
356
358#define NET_REQUEST_WIFI_BSS_MAX_IDLE_PERIOD \
359 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_BSS_MAX_IDLE_PERIOD)
360
362
364#define NET_REQUEST_WIFI_BGSCAN \
365 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_BGSCAN)
366
368
370#define NET_REQUEST_WIFI_P2P_OPER \
371 (NET_WIFI_BASE | NET_REQUEST_WIFI_CMD_P2P_OPER)
372
374
376
377enum {
378 NET_EVENT_WIFI_CMD_SCAN_RESULT_VAL,
379 NET_EVENT_WIFI_CMD_SCAN_DONE_VAL,
380 NET_EVENT_WIFI_CMD_CONNECT_RESULT_VAL,
381 NET_EVENT_WIFI_CMD_DISCONNECT_RESULT_VAL,
382 NET_EVENT_WIFI_CMD_IFACE_STATUS_VAL,
383 NET_EVENT_WIFI_CMD_TWT_VAL,
384 NET_EVENT_WIFI_CMD_TWT_SLEEP_STATE_VAL,
385 NET_EVENT_WIFI_CMD_RAW_SCAN_RESULT_VAL,
386 NET_EVENT_WIFI_CMD_DISCONNECT_COMPLETE_VAL,
387 NET_EVENT_WIFI_CMD_SIGNAL_CHANGE_VAL,
388 NET_EVENT_WIFI_CMD_NEIGHBOR_REP_RECEIVED_VAL,
389 NET_EVENT_WIFI_CMD_NEIGHBOR_REP_COMPLETE_VAL,
390 NET_EVENT_WIFI_CMD_AP_ENABLE_RESULT_VAL,
391 NET_EVENT_WIFI_CMD_AP_DISABLE_RESULT_VAL,
392 NET_EVENT_WIFI_CMD_AP_STA_CONNECTED_VAL,
393 NET_EVENT_WIFI_CMD_AP_STA_DISCONNECTED_VAL,
394 NET_EVENT_WIFI_CMD_SUPPLICANT_VAL,
395 NET_EVENT_WIFI_CMD_P2P_DEVICE_FOUND_VAL,
396 NET_EVENT_WIFI_CMD_NAN_DISCOVERY_RESULT_VAL,
397 NET_EVENT_WIFI_CMD_NAN_REPLIED_VAL,
398 NET_EVENT_WIFI_CMD_NAN_PUBLISH_TERMINATED_VAL,
399 NET_EVENT_WIFI_CMD_NAN_SUBSCRIBE_TERMINATED_VAL,
400 NET_EVENT_WIFI_CMD_NAN_RECEIVE_VAL,
401
402 NET_EVENT_WIFI_CMD_MAX,
403};
404
405BUILD_ASSERT(NET_EVENT_WIFI_CMD_MAX <= NET_MGMT_MAX_COMMANDS,
406 "Number of events in net_event_wifi_cmd exceeds the limit");
407
409
413 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_SCAN_RESULT),
415 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_SCAN_DONE),
417 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_CONNECT_RESULT),
419 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_DISCONNECT_RESULT),
421 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_IFACE_STATUS),
423 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_TWT),
427 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_TWT_SLEEP_STATE),
429 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_RAW_SCAN_RESULT),
431 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_DISCONNECT_COMPLETE),
433 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_SIGNAL_CHANGE),
435 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_NEIGHBOR_REP_RECEIVED),
437 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_NEIGHBOR_REP_COMPLETE),
439 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_AP_ENABLE_RESULT),
441 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_AP_DISABLE_RESULT),
443 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_AP_STA_CONNECTED),
445 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_AP_STA_DISCONNECTED),
447 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_SUPPLICANT),
449 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_P2P_DEVICE_FOUND),
450#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_NAN
452 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_NAN_DISCOVERY_RESULT),
454 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_NAN_REPLIED),
456 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_NAN_PUBLISH_TERMINATED),
458 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_NAN_SUBSCRIBE_TERMINATED),
460 NET_MGMT_CMD(NET_EVENT_WIFI_CMD_NAN_RECEIVE),
461#endif
462};
463
465#define NET_EVENT_WIFI_SCAN_RESULT \
466 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_SCAN_RESULT)
467
469#define NET_EVENT_WIFI_SCAN_DONE \
470 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_SCAN_DONE)
471
473#define NET_EVENT_WIFI_CONNECT_RESULT \
474 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_CONNECT_RESULT)
475
477#define NET_EVENT_WIFI_DISCONNECT_RESULT \
478 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_DISCONNECT_RESULT)
479
481#define NET_EVENT_WIFI_IFACE_STATUS \
482 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_IFACE_STATUS)
483
485#define NET_EVENT_WIFI_TWT \
486 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_TWT)
487
489#define NET_EVENT_WIFI_TWT_SLEEP_STATE \
490 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_TWT_SLEEP_STATE)
491
493#define NET_EVENT_WIFI_RAW_SCAN_RESULT \
494 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_RAW_SCAN_RESULT)
495
497#define NET_EVENT_WIFI_DISCONNECT_COMPLETE \
498 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_DISCONNECT_COMPLETE)
499
501#define NET_EVENT_WIFI_SIGNAL_CHANGE \
502 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_SIGNAL_CHANGE)
503
505#define NET_EVENT_WIFI_NEIGHBOR_REP_COMP \
506 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_NEIGHBOR_REP_COMPLETE)
507
509#define NET_EVENT_WIFI_AP_ENABLE_RESULT \
510 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_ENABLE_RESULT)
511
513#define NET_EVENT_WIFI_AP_DISABLE_RESULT \
514 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_DISABLE_RESULT)
515
517#define NET_EVENT_WIFI_AP_STA_CONNECTED \
518 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_STA_CONNECTED)
519
521#define NET_EVENT_WIFI_AP_STA_DISCONNECTED \
522 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_AP_STA_DISCONNECTED)
523
525#define NET_EVENT_WIFI_P2P_DEVICE_FOUND \
526 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_P2P_DEVICE_FOUND)
527
528#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_P2P
530#define WIFI_P2P_DEVICE_NAME_MAX_LEN 32
532#define WIFI_P2P_PRI_DEV_TYPE_SIZE 8
534#define WIFI_P2P_PRI_DEV_TYPE_STR_MAX_LEN 32
536#define WIFI_P2P_CONFIG_METHODS_STR_MAX_LEN 16
538#define WIFI_P2P_MANUFACTURER_MAX_LEN 64
540#define WIFI_P2P_MODEL_NAME_MAX_LEN 32
541
543struct wifi_p2p_device_info {
547 char device_name[WIFI_P2P_DEVICE_NAME_MAX_LEN + 1];
549 uint8_t pri_dev_type[WIFI_P2P_PRI_DEV_TYPE_SIZE];
551 char pri_dev_type_str[WIFI_P2P_PRI_DEV_TYPE_STR_MAX_LEN];
553 int8_t rssi;
555 uint16_t config_methods;
557 char config_methods_str[WIFI_P2P_CONFIG_METHODS_STR_MAX_LEN];
559 uint8_t dev_capab;
561 uint8_t group_capab;
563 char manufacturer[WIFI_P2P_MANUFACTURER_MAX_LEN + 1];
565 char model_name[WIFI_P2P_MODEL_NAME_MAX_LEN + 1];
566};
567#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_P2P */
568
569#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_NAN
571#define NET_EVENT_WIFI_NAN_DISCOVERY_RESULT \
572 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_NAN_DISCOVERY_RESULT)
573
575#define NET_EVENT_WIFI_NAN_REPLIED \
576 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_NAN_REPLIED)
577
579#define NET_EVENT_WIFI_NAN_PUBLISH_TERMINATED \
580 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_NAN_PUBLISH_TERMINATED)
581
583#define NET_EVENT_WIFI_NAN_SUBSCRIBE_TERMINATED \
584 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_NAN_SUBSCRIBE_TERMINATED)
585
587#define NET_EVENT_WIFI_NAN_RECEIVE \
588 (NET_WIFI_EVENT | NET_EVENT_WIFI_CMD_NAN_RECEIVE)
589#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_NAN */
590
594 const char *drv_version;
596 const char *fw_version;
597};
598
608
660
686
878
894
897
919
942
980
1007
1009#define WIFI_BTWT_AGREEMENT_MAX 5
1010
1022
1090
1092
1093/* Flow ID is only 3 bits */
1094#define WIFI_MAX_TWT_FLOWS 8
1095/* The TWT interval is encoded per IEEE 802.11 as mantissa * 2^exponent
1096 * micro-seconds, with a 16-bit mantissa and a 5-bit exponent. The maximum
1097 * representable interval is therefore UINT16_MAX * 2^WIFI_MAX_TWT_EXPONENT us.
1098 */
1099#define WIFI_MAX_TWT_EXPONENT 31
1100#define WIFI_MAX_TWT_INTERVAL_US ((uint64_t)UINT16_MAX << WIFI_MAX_TWT_EXPONENT)
1101/* 256 (u8) * 1TU */
1102#define WIFI_MAX_TWT_WAKE_INTERVAL_US 262144
1103#define WIFI_MAX_TWT_WAKE_AHEAD_DURATION_US (LONG_MAX - 1)
1104
1106
1130
1170
1180
1188
1198
1200#define MAX_REG_CHAN_NUM 42
1201
1205 unsigned short center_frequency;
1207 unsigned short max_power:8;
1209 unsigned short supported:1;
1211 unsigned short passive_only:1;
1213 unsigned short dfs:1;
1214} __packed;
1215
1231
1239
1240#if defined(CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS) || defined(__DOXYGEN__)
1248 unsigned short frequency;
1250 uint8_t data[CONFIG_WIFI_MGMT_RAW_SCAN_RESULT_LENGTH];
1251};
1252#endif /* CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS */
1253
1265
1266#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_NAN
1268struct wifi_nan_discovery_result_event {
1270 uint8_t subscribe_id;
1272 uint8_t publish_id;
1274 uint8_t peer_addr[WIFI_MAC_ADDR_LEN];
1276 bool fsd;
1278 bool fsd_gas;
1280 uint8_t srv_proto_type;
1282 size_t ssi_len;
1284 uint8_t ssi[WIFI_NAN_MAX_SSI_LEN];
1285};
1286
1288struct wifi_nan_replied_event {
1290 uint8_t publish_id;
1292 uint8_t peer_addr[WIFI_MAC_ADDR_LEN];
1294 uint8_t subscribe_id;
1296 uint8_t srv_proto_type;
1298 size_t ssi_len;
1300 uint8_t ssi[WIFI_NAN_MAX_SSI_LEN];
1301};
1302
1304struct wifi_nan_terminated_event {
1306 uint8_t id;
1308 char reason[32];
1309};
1310
1312struct wifi_nan_receive_event {
1314 uint8_t id;
1316 uint8_t peer_instance_id;
1318 uint8_t peer_addr[WIFI_MAC_ADDR_LEN];
1320 uint8_t ssi[WIFI_NAN_MAX_SSI_LEN];
1322 size_t ssi_len;
1323};
1324#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_NAN */
1325
1327
1328/* for use in max info size calculations */
1329union wifi_mgmt_events {
1330 struct wifi_scan_result scan_result;
1331 struct wifi_status connect_status;
1332 struct wifi_iface_status iface_status;
1333#ifdef CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS
1334 struct wifi_raw_scan_result raw_scan_result;
1335#endif /* CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS */
1336 struct wifi_twt_params twt_params;
1337 struct wifi_ap_sta_info ap_sta_info;
1338#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_P2P
1339 struct wifi_p2p_device_info p2p_device_info;
1340#endif
1341#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_NAN
1342 struct wifi_nan_discovery_result_event nan_discovery_result;
1343 struct wifi_nan_replied_event nan_replied;
1344 struct wifi_nan_terminated_event nan_publish_terminated;
1345 struct wifi_nan_terminated_event nan_subscribe_terminated;
1346 struct wifi_nan_receive_event nan_receive;
1347#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_NAN */
1348};
1349
1351
1361
1373
1388
1390#define WIFI_AP_STA_MAX_INACTIVITY (LONG_MAX - 1)
1391#define WIFI_AP_IEEE_80211_CAPAB_MAX_LEN 64
1393
1404#if defined(CONFIG_WIFI_NM_HOSTAPD_AP)
1406 char ht_capab[WIFI_AP_IEEE_80211_CAPAB_MAX_LEN + 1];
1408 char vht_capab[WIFI_AP_IEEE_80211_CAPAB_MAX_LEN + 1];
1409#endif
1410};
1411
1419
1420#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_DPP
1423#define WIFI_DPP_QRCODE_MAX_LEN 255
1424
1426enum wifi_dpp_op {
1428 WIFI_DPP_OP_INVALID = 0,
1430 WIFI_DPP_CONFIGURATOR_ADD,
1432 WIFI_DPP_AUTH_INIT,
1434 WIFI_DPP_QR_CODE,
1436 WIFI_DPP_CHIRP,
1438 WIFI_DPP_LISTEN,
1440 WIFI_DPP_BOOTSTRAP_GEN,
1442 WIFI_DPP_BOOTSTRAP_GET_URI,
1444 WIFI_DPP_SET_CONF_PARAM,
1446 WIFI_DPP_SET_WAIT_RESP_TIME,
1448 WIFI_DPP_RECONFIG
1449};
1450
1452enum wifi_dpp_curves {
1454 WIFI_DPP_CURVES_DEFAULT = 0,
1456 WIFI_DPP_CURVES_P_256,
1458 WIFI_DPP_CURVES_P_384,
1460 WIFI_DPP_CURVES_P_512,
1462 WIFI_DPP_CURVES_BP_256,
1464 WIFI_DPP_CURVES_BP_384,
1466 WIFI_DPP_CURVES_BP_512
1467};
1468
1470enum wifi_dpp_role {
1472 WIFI_DPP_ROLE_UNSET = 0,
1474 WIFI_DPP_ROLE_CONFIGURATOR,
1476 WIFI_DPP_ROLE_ENROLLEE,
1478 WIFI_DPP_ROLE_EITHER
1479};
1480
1485enum wifi_dpp_conf {
1487 WIFI_DPP_CONF_UNSET = 0,
1489 WIFI_DPP_CONF_STA,
1491 WIFI_DPP_CONF_AP,
1493 WIFI_DPP_CONF_QUERY
1494};
1495
1500enum wifi_dpp_bootstrap_type {
1502 WIFI_DPP_BOOTSTRAP_TYPE_UNSET = 0,
1504 WIFI_DPP_BOOTSTRAP_TYPE_QRCODE,
1506 WIFI_DPP_BOOTSTRAP_TYPE_PKEX,
1508 WIFI_DPP_BOOTSTRAP_TYPE_NFC_URI
1509};
1510
1512struct wifi_dpp_configurator_add_params {
1514 int curve;
1516 int net_access_key_curve;
1517};
1518
1520struct wifi_dpp_auth_init_params {
1522 int peer;
1524 int configurator;
1526 int role;
1528 int conf;
1530 char ssid[WIFI_SSID_MAX_LEN + 1];
1531};
1532
1534struct wifi_dpp_chirp_params {
1536 int id;
1538 int freq;
1539};
1540
1542struct wifi_dpp_listen_params {
1544 int freq;
1546 int role;
1547};
1548
1550struct wifi_dpp_bootstrap_gen_params {
1552 int type;
1554 int op_class;
1556 int chan;
1558 int curve;
1561};
1562
1564struct wifi_dpp_configurator_set_params {
1566 int peer;
1568 int configurator;
1570 int role;
1572 int conf;
1574 int curve;
1576 int net_access_key_curve;
1578 char ssid[WIFI_SSID_MAX_LEN + 1];
1579};
1580
1583struct wifi_dpp_params {
1585 int action;
1586 union {
1588 struct wifi_dpp_configurator_add_params configurator_add;
1590 struct wifi_dpp_auth_init_params auth_init;
1592 struct wifi_dpp_chirp_params chirp;
1594 struct wifi_dpp_listen_params listen;
1596 struct wifi_dpp_bootstrap_gen_params bootstrap_gen;
1598 struct wifi_dpp_configurator_set_params configurator_set;
1600 int id;
1602 int dpp_resp_wait_time;
1604 int network_id;
1606 uint8_t dpp_qr_code[WIFI_DPP_QRCODE_MAX_LEN + 1];
1611 char resp[WIFI_DPP_QRCODE_MAX_LEN + 1];
1612 };
1613};
1614#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_DPP */
1615
1616#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_NAN
1618enum wifi_nan_operation {
1619 WIFI_NAN_OP_PUBLISH,
1620 WIFI_NAN_OP_CANCEL_PUBLISH,
1621 WIFI_NAN_OP_UPDATE_PUBLISH,
1622 WIFI_NAN_OP_SUBSCRIBE,
1623 WIFI_NAN_OP_CANCEL_SUBSCRIBE,
1624 WIFI_NAN_OP_TRANSMIT,
1625};
1626
1628enum wifi_nan_service_protocol_type {
1630 WIFI_NAN_SRV_PROTO_BONJOUR = 1,
1632 WIFI_NAN_SRV_PROTO_GENERIC = 2,
1634 WIFI_NAN_SRV_PROTO_CSA_MATTER = 3,
1635};
1636
1638struct wifi_nan_publish_params {
1639 /* Service name for NAN */
1640 char service_name[WIFI_NAN_MAX_SERVICE_NAME_LEN];
1641 /* NAN service protocol type */
1642 enum wifi_nan_service_protocol_type srv_proto_type;
1643 /* Time to live (in seconds); 0 = one TX only */
1644 uint32_t ttl;
1645 /* Default frequency in MHz (defaultPublishChannel) */
1646 uint32_t freq;
1647 /* Multi-channel frequencies */
1648 char freq_list[64];
1649 /* Service specific information (binary data) */
1650 uint8_t ssi[WIFI_NAN_MAX_SSI_LEN];
1651 /* Actual length of SSI data */
1652 uint16_t ssi_len;
1653 /* Unsolicited transmission (true by default) */
1654 bool unsolicited;
1655 /* Solicited transmission (true by default) */
1656 bool solicited;
1657 /* Further Service Discovery (true by default) */
1658 bool fsd;
1659};
1660
1661/* This structure is used to configure nan update publish parameters */
1662struct wifi_nan_update_publish_params {
1663 uint8_t publish_id;
1664 /* Service specific information (binary data) */
1665 uint8_t ssi[WIFI_NAN_MAX_SSI_LEN];
1666 /* Actual length of SSI data */
1667 uint16_t ssi_len;
1668};
1669
1671struct wifi_nan_subscribe_params {
1672 /* Service name for NAN */
1673 char service_name[WIFI_NAN_MAX_SERVICE_NAME_LEN];
1674 /* NAN service protocol type */
1675 enum wifi_nan_service_protocol_type srv_proto_type;
1676 /* Subscribe type */
1677 bool active;
1678 /* Time to live (in seconds); 0 = until first result */
1679 unsigned int ttl;
1680 /* Selected frequency in MHz */
1681 unsigned int freq;
1682 /* Service specific information (binary data) */
1683 uint8_t ssi[WIFI_NAN_MAX_SSI_LEN];
1684 /* Actual length of SSI data */
1685 uint16_t ssi_len;
1686};
1687
1689struct wifi_nan_transmit_params {
1690 /* publish_id or subscribe_id */
1691 uint8_t handle;
1692 /* peer publish_id or subscribe_id */
1693 uint8_t req_instance_id;
1694 /* peer MAC address */
1695 uint8_t peer_addr[WIFI_MAC_ADDR_LEN];
1696 /* Service specific information (binary data) */
1697 uint8_t ssi[WIFI_NAN_MAX_SSI_LEN];
1698 /* Actual length of SSI data */
1699 uint16_t ssi_len;
1700};
1701
1703struct wifi_nan_params {
1705 enum wifi_nan_operation op;
1706
1708 union {
1710 struct wifi_nan_publish_params publish;
1712 struct wifi_nan_update_publish_params update_publish;
1714 struct wifi_nan_subscribe_params subscribe;
1716 struct wifi_nan_transmit_params transmit;
1718 uint8_t cancel_id;
1719 };
1720
1721 /* Save the returned ID */
1722 char resp[WIFI_NAN_RESP_SIZE];
1723};
1724
1725#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_NAN */
1726
1727
1729#define WIFI_WPS_PIN_MAX_LEN 8
1730
1740
1748
1749#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_P2P
1751enum wifi_p2p_op {
1753 WIFI_P2P_FIND = 0,
1755 WIFI_P2P_STOP_FIND,
1759 WIFI_P2P_PEER,
1761 WIFI_P2P_CONNECT,
1763 WIFI_P2P_GROUP_ADD,
1765 WIFI_P2P_GROUP_REMOVE,
1767 WIFI_P2P_INVITE,
1769 WIFI_P2P_POWER_SAVE,
1771 WIFI_P2P_LIST_NETWORKS,
1773 WIFI_P2P_PERSISTENT_REMOVE,
1774};
1775
1777enum wifi_p2p_discovery_type {
1779 WIFI_P2P_FIND_START_WITH_FULL = 0,
1781 WIFI_P2P_FIND_ONLY_SOCIAL,
1783 WIFI_P2P_FIND_PROGRESSIVE,
1784};
1785
1787enum wifi_p2p_connection_method {
1789 WIFI_P2P_METHOD_PBC = 0,
1791 WIFI_P2P_METHOD_DISPLAY,
1793 WIFI_P2P_METHOD_KEYPAD,
1794};
1795
1797#define WIFI_P2P_MAX_PEERS CONFIG_WIFI_P2P_MAX_PEERS
1798#define WIFI_P2P_LIST_NETWORKS_BUF_SIZE 2048
1799
1801struct wifi_p2p_params {
1803 enum wifi_p2p_op oper;
1805 enum wifi_p2p_discovery_type discovery_type;
1807 uint16_t timeout;
1809 uint8_t peer_addr[WIFI_MAC_ADDR_LEN];
1811 bool discovered_only;
1813 struct wifi_p2p_device_info *peers;
1815 uint16_t peer_count;
1817 bool power_save;
1819 struct {
1821 enum wifi_p2p_connection_method method;
1826 char pin[WIFI_WPS_PIN_MAX_LEN + 1];
1828 uint8_t go_intent;
1830 unsigned int freq;
1832 bool join;
1834 bool persistent_set;
1835 } connect;
1837 struct {
1839 int freq;
1841 int persistent;
1843 bool persistent_set;
1845 bool ht40;
1847 bool vht;
1849 bool he;
1851 bool edmg;
1853 uint8_t go_bssid[WIFI_MAC_ADDR_LEN];
1855 uint8_t go_bssid_length;
1856 } group_add;
1858 struct {
1860 char ifname[CONFIG_NET_INTERFACE_NAME_LEN + 1];
1861 } group_remove;
1863 struct {
1865 enum {
1866 WIFI_P2P_INVITE_PERSISTENT = 0,
1867 WIFI_P2P_INVITE_GROUP,
1868 } type;
1870 int persistent_id;
1872 char group_ifname[CONFIG_NET_INTERFACE_NAME_LEN + 1];
1874 uint8_t peer_addr[WIFI_MAC_ADDR_LEN];
1876 int freq;
1878 uint8_t go_dev_addr[WIFI_MAC_ADDR_LEN];
1880 uint8_t go_dev_addr_length;
1881 } invite;
1883 struct {
1885 char *buf;
1887 size_t buf_size;
1888 } list_networks;
1890 struct {
1895 int id;
1896 } persistent_remove;
1897};
1898#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_P2P */
1899
1920
1921#if defined(CONFIG_WIFI_NM_WPA_SUPPLICANT_BGSCAN) || defined(__DOXYGEN__)
1931
1945#endif
1946
1960
1961#include <zephyr/net/net_if.h>
1962
1969typedef void (*scan_result_cb_t)(struct net_if *iface, int status,
1970 struct wifi_scan_result *entry);
1971
1972#ifdef CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS
1979typedef void (*raw_scan_result_cb_t)(struct net_if *iface, int status,
1980 struct wifi_raw_scan_result *entry);
1981#endif /* CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS */
1982
1997 int (*scan)(const struct device *dev,
1998 struct net_if *iface,
1999 struct wifi_scan_params *params,
2000 scan_result_cb_t cb);
2009 int (*connect)(const struct device *dev,
2010 struct net_if *iface,
2011 struct wifi_connect_req_params *params);
2019 int (*disconnect)(const struct device *dev,
2020 struct net_if *iface);
2029 int (*ap_enable)(const struct device *dev,
2030 struct net_if *iface,
2031 struct wifi_connect_req_params *params);
2038 int (*ap_disable)(const struct device *dev, struct net_if *iface);
2047 int (*ap_sta_disconnect)(const struct device *dev, struct net_if *iface,
2048 const uint8_t *mac);
2057 int (*iface_status)(const struct device *dev,
2058 struct net_if *iface,
2059 struct wifi_iface_status *status);
2060#if defined(CONFIG_NET_STATISTICS_WIFI) || defined(__DOXYGEN__)
2069 int (*get_stats)(const struct device *dev,
2070 struct net_if *iface,
2071 struct net_stats_wifi *stats);
2079 int (*reset_stats)(const struct device *dev, struct net_if *iface);
2080#endif /* CONFIG_NET_STATISTICS_WIFI */
2089 int (*cfg_11k)(const struct device *dev,
2090 struct net_if *iface,
2091 struct wifi_11k_params *params);
2100 int (*send_11k_neighbor_request)(const struct device *dev,
2101 struct net_if *iface,
2102 struct wifi_11k_params *params);
2111 int (*set_power_save)(const struct device *dev,
2112 struct net_if *iface,
2113 struct wifi_ps_params *params);
2122 int (*set_twt)(const struct device *dev,
2123 struct net_if *iface,
2124 struct wifi_twt_params *params);
2133 int (*set_btwt)(const struct device *dev,
2134 struct net_if *iface,
2135 struct wifi_twt_params *params);
2144 int (*get_power_save_config)(const struct device *dev,
2145 struct net_if *iface,
2146 struct wifi_ps_config *config);
2155 int (*reg_domain)(const struct device *dev,
2156 struct net_if *iface,
2157 struct wifi_reg_domain *reg_domain);
2166 int (*filter)(const struct device *dev,
2167 struct net_if *iface,
2168 struct wifi_filter_info *filter);
2177 int (*mode)(const struct device *dev, struct net_if *iface, struct wifi_mode_info *mode);
2186 int (*channel)(const struct device *dev,
2187 struct net_if *iface,
2188 struct wifi_channel_info *channel);
2189
2198 int (*btm_query)(const struct device *dev, struct net_if *iface, uint8_t reason);
2199
2206 bool (*bss_support_neighbor_rep)(const struct device *dev, struct net_if *iface);
2207
2216 int (*bss_ext_capab)(const struct device *dev, struct net_if *iface, int capab);
2217
2225 int (*legacy_roam)(const struct device *dev, struct net_if *iface);
2226
2240 int (*get_version)(const struct device *dev,
2241 struct net_if *iface,
2242 struct wifi_version *params);
2251 int (*get_conn_params)(const struct device *dev,
2252 struct net_if *iface,
2253 struct wifi_connect_req_params *params);
2262 int (*set_rts_threshold)(const struct device *dev,
2263 struct net_if *iface,
2264 unsigned int rts_threshold);
2273 int (*ap_config_params)(const struct device *dev,
2274 struct net_if *iface,
2275 struct wifi_ap_config_params *params);
2284 int (*config_params)(const struct device *dev,
2285 struct net_if *iface,
2286 struct wifi_config_params *params);
2287#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_DPP
2296 int (*dpp_dispatch)(const struct device *dev,
2297 struct net_if *iface,
2298 struct wifi_dpp_params *params);
2299#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_DPP */
2300#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_NAN
2309 int (*nan_cfg)(const struct device *dev,
2310 struct net_if *iface,
2311 struct wifi_nan_params *params);
2312#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_NAN */
2313
2321 int (*pmksa_flush)(const struct device *dev, struct net_if *iface);
2330#ifdef CONFIG_WIFI_CERTIFICATE_LIB
2331 int (*enterprise_creds)(const struct device *dev,
2332 struct net_if *iface,
2333 struct wifi_enterprise_creds_params *creds);
2334#endif
2343 int (*get_rts_threshold)(const struct device *dev,
2344 struct net_if *iface,
2345 unsigned int *rts_threshold);
2354 int (*wps_config)(const struct device *dev,
2355 struct net_if *iface,
2356 struct wifi_wps_config_params *params);
2365 int (*candidate_scan)(const struct device *dev,
2366 struct net_if *iface,
2367 struct wifi_scan_params *params);
2377 __deprecated int (*start_11r_roaming)(const struct device *dev, struct net_if *iface);
2386 int (*set_bss_max_idle_period)(const struct device *dev,
2387 struct net_if *iface,
2388 unsigned short bss_max_idle_period);
2389#if defined(CONFIG_WIFI_NM_WPA_SUPPLICANT_BGSCAN) || defined(__DOXYGEN__)
2398 int (*set_bgscan)(const struct device *dev,
2399 struct net_if *iface,
2400 struct wifi_bgscan_params *params);
2401#endif
2402#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_P2P
2412 int (*p2p_oper)(const struct device *dev,
2413 struct net_if *iface,
2414 struct wifi_p2p_params *params);
2415#endif
2427 uint32_t (*get_iface_caps)(const struct device *dev, struct net_if *iface);
2428};
2429
2438#if defined(CONFIG_WIFI_USE_NATIVE_NETWORKING) || defined(__DOXYGEN__)
2441#else
2444#endif
2446 const struct wifi_mgmt_ops *const wifi_mgmt_api;
2447
2448#if defined(CONFIG_WIFI_NM_WPA_SUPPLICANT) || defined(__DOXYGEN__)
2450 const void *wifi_drv_ops;
2451#endif
2452};
2453
2454#if defined(CONFIG_WIFI_NM_WPA_SUPPLICANT)
2455/* Make sure wifi_drv_ops is after wifi_mgmt_api */
2456BUILD_ASSERT(offsetof(struct net_wifi_mgmt_offload, wifi_mgmt_api) <
2457 offsetof(struct net_wifi_mgmt_offload, wifi_drv_ops));
2458#endif
2459
2460/* Make sure that the network interface API is properly setup inside
2461 * Wifi mgmt offload API struct (it is the first one).
2462 */
2463BUILD_ASSERT(offsetof(struct net_wifi_mgmt_offload, wifi_iface) == 0);
2464
2470void wifi_mgmt_raise_connect_result_event(struct net_if *iface, int status);
2471
2481 const struct wifi_status *status);
2482
2488void wifi_mgmt_raise_disconnect_result_event(struct net_if *iface, int status);
2489
2499 const struct wifi_status *status);
2500
2508
2515 struct wifi_twt_params *twt_params);
2516
2522void wifi_mgmt_raise_twt_sleep_state(struct net_if *iface, int twt_sleep_state);
2523
2524#if defined(CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS) || defined(__DOXYGEN__)
2531 struct wifi_raw_scan_result *raw_scan_info);
2532#endif /* CONFIG_WIFI_MGMT_RAW_SCAN_RESULTS */
2533
2540
2541#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_ROAMING
2548void wifi_mgmt_raise_neighbor_rep_recv_event(struct net_if *iface,
2549 char *inbuf, size_t buf_len);
2550#endif
2551
2558
2565
2572 struct wifi_ap_sta_info *sta_info);
2573
2579 struct wifi_ap_sta_info *sta_info);
2580
2581#ifdef CONFIG_WIFI_NM_WPA_SUPPLICANT_P2P
2588void wifi_mgmt_raise_p2p_device_found_event(struct net_if *iface,
2589 struct wifi_p2p_device_info *peer_info);
2590#endif /* CONFIG_WIFI_NM_WPA_SUPPLICANT_P2P */
2591
2595#ifdef __cplusplus
2596}
2597#endif
2598
2599#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:130
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:1948
wifi_sap_iface_state
Wi-Fi AP status.
Definition wifi_mgmt.h:1902
wifi_ps
Wi-Fi power save states.
Definition wifi.h:496
#define NET_REQUEST_WIFI_PS_CONFIG
Request a Wi-Fi power save configuration.
Definition wifi_mgmt.h:231
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:159
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:279
#define WIFI_WPS_PIN_MAX_LEN
Maximum length of a WPS PIN.
Definition wifi_mgmt.h:1729
#define NET_REQUEST_WIFI_RTS_THRESHOLD_CONFIG
Request a Wi-Fi RTS threshold configuration.
Definition wifi_mgmt.h:330
#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:237
wifi_ps_exit_strategy
Wi-Fi power save exit strategy.
Definition wifi.h:705
#define NET_REQUEST_WIFI_PACKET_FILTER
Request Wi-Fi packet filter.
Definition wifi_mgmt.h:249
wifi_twt_setup_cmd
Wi-Fi Target Wake Time (TWT) setup commands.
Definition wifi.h:578
#define NET_REQUEST_WIFI_BSS_MAX_IDLE_PERIOD
Request a Wi-Fi BSS maximum idle period configuration.
Definition wifi_mgmt.h:358
#define NET_REQUEST_WIFI_NEIGHBOR_REP_COMPLETE
Notify that processing of a Wi-Fi neighbor report is complete.
Definition wifi_mgmt.h:352
wifi_twt_sleep_state
Wi-Fi TWT sleep states.
Definition wifi_mgmt.h:1233
#define WIFI_BTWT_AGREEMENT_MAX
Maximum number of broadcast TWT agreement sets.
Definition wifi_mgmt.h:1009
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:195
#define NET_REQUEST_WIFI_VERSION
Request a Wi-Fi version.
Definition wifi_mgmt.h:267
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:207
#define NET_REQUEST_WIFI_P2P_OPER
Request a Wi-Fi Direct (P2P) operation.
Definition wifi_mgmt.h:370
wifi_wps_op
Operation for WPS.
Definition wifi_mgmt.h:1732
wifi_twt_setup_resp_status
Wi-Fi Target Wake Time (TWT) negotiation status.
Definition wifi.h:601
#define NET_REQUEST_WIFI_CONFIG_PARAM
Request a Wi-Fi STA parameters configuration.
Definition wifi_mgmt.h:291
#define NET_REQUEST_WIFI_BTM_QUERY
Request a Wi-Fi BTM query.
Definition wifi_mgmt.h:313
wifi_iface_mode
Wi-Fi interface modes.
Definition wifi.h:429
#define NET_REQUEST_WIFI_AP_ENABLE
Request a Wi-Fi access point enable.
Definition wifi_mgmt.h:177
#define NET_REQUEST_WIFI_WPS_CONFIG
Request a Wi-Fi WPS configuration.
Definition wifi_mgmt.h:336
#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:213
wifi_twt_negotiation_type
Wi-Fi Target Wake Time (TWT) negotiation types.
Definition wifi.h:565
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:799
wifi_ap_config_param
Wi-Fi AP mode configuration parameter.
Definition wifi.h:785
wifi_conn_status
Wi-Fi connect result codes.
Definition wifi.h:45
#define NET_REQUEST_WIFI_START_ROAMING
Request a Wi-Fi roaming start.
Definition wifi_mgmt.h:346
#define NET_REQUEST_WIFI_PMKSA_FLUSH
Request a Wi-Fi PMKSA cache entries flush.
Definition wifi_mgmt.h:318
#define NET_REQUEST_WIFI_DISCONNECT
Request a Wi-Fi disconnect.
Definition wifi_mgmt.h:171
wifi_twt_fail_reason
Target Wake Time (TWT) error codes.
Definition wifi.h:609
#define NET_REQUEST_WIFI_AP_RTS_THRESHOLD
Request a Wi-Fi RTS threshold.
Definition wifi_mgmt.h:189
net_request_wifi_cmd
Wi-Fi management commands.
Definition wifi_mgmt.h:74
#define NET_REQUEST_WIFI_MODE
Request current Wi-Fi mode.
Definition wifi_mgmt.h:243
#define NET_REQUEST_WIFI_BGSCAN
Request a Wi-Fi background scan configuration.
Definition wifi_mgmt.h:364
#define NET_REQUEST_WIFI_AP_STA_DISCONNECT
Request a Wi-Fi access point to disconnect a station.
Definition wifi_mgmt.h:261
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:165
wifi_bgscan_type
Wi-Fi background scan implementation.
Definition wifi_mgmt.h:1923
wifi_ap_status
Wi-Fi AP mode result codes.
Definition wifi_mgmt.h:901
#define NET_REQUEST_WIFI_TWT
Request a Wi-Fi TWT.
Definition wifi_mgmt.h:219
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:676
net_event_wifi_cmd
Wi-Fi management events.
Definition wifi_mgmt.h:411
#define NET_REQUEST_WIFI_CONN_PARAMS
Request a Wi-Fi connection parameters.
Definition wifi_mgmt.h:273
wifi_disconn_reason
Wi-Fi disconnect reason codes.
Definition wifi_mgmt.h:882
wifi_ps_wakeup_mode
Wi-Fi power save modes.
Definition wifi.h:692
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:554
wifi_scan_type
Wi-Fi scanning types.
Definition wifi.h:488
void(* scan_result_cb_t)(struct net_if *iface, int status, struct wifi_scan_result *entry)
Scan result callback.
Definition wifi_mgmt.h:1969
wifi_twt_teardown_status
Wi-Fi Target Wake Time (TWT) teradown status.
Definition wifi.h:635
#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:255
wifi_config_ps_param_fail_reason
Wi-Fi power save error codes.
Definition wifi.h:726
#define NET_REQUEST_WIFI_11K_CONFIG
Request a Wi-Fi 11k configuration.
Definition wifi_mgmt.h:201
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:1182
#define NET_REQUEST_WIFI_ENTERPRISE_CREDS
Set Wi-Fi enterprise mode CA/client Cert and key.
Definition wifi_mgmt.h:324
#define NET_REQUEST_WIFI_BTWT
Request a Wi-Fi broadcast TWT flow setup.
Definition wifi_mgmt.h:225
#define NET_REQUEST_WIFI_AP_CONFIG_PARAM
Request a Wi-Fi AP parameters configuration.
Definition wifi_mgmt.h:285
#define NET_REQUEST_WIFI_AP_DISABLE
Request a Wi-Fi access point disable.
Definition wifi_mgmt.h:183
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:507
@ WIFI_EXT_CAPAB_GLK
General link (GLK) support.
Definition wifi_mgmt.h:1952
@ WIFI_EXT_CAPAB_20_40_COEX
20/40 BSS coexistence management support
Definition wifi_mgmt.h:1950
@ WIFI_EXT_CAPAB_BSS_TRANSITION
BSS transition management support.
Definition wifi_mgmt.h:1958
@ WIFI_EXT_CAPAB_EXT_CHAN_SWITCH
Extended channel switching support.
Definition wifi_mgmt.h:1954
@ WIFI_EXT_CAPAB_TIM_BROADCAST
TIM broadcast support.
Definition wifi_mgmt.h:1956
@ WIFI_SAP_IFACE_COUNTRY_UPDATE
Country code update in progress.
Definition wifi_mgmt.h:1908
@ WIFI_SAP_IFACE_DISABLED
Interface is disabled.
Definition wifi_mgmt.h:1906
@ WIFI_SAP_IFACE_HT_SCAN
HT scan in progress.
Definition wifi_mgmt.h:1912
@ WIFI_SAP_IFACE_ENABLED
Interface is enabled.
Definition wifi_mgmt.h:1918
@ WIFI_SAP_IFACE_ACS
Automatic channel selection in progress.
Definition wifi_mgmt.h:1910
@ WIFI_SAP_IFACE_UNINITIALIZED
Interface is uninitialized.
Definition wifi_mgmt.h:1904
@ WIFI_SAP_IFACE_NO_IR
Selected channel does not allow initiating radiation.
Definition wifi_mgmt.h:1916
@ WIFI_SAP_IFACE_DFS
Dynamic frequency selection in progress.
Definition wifi_mgmt.h:1914
@ WIFI_TWT_STATE_SLEEP
TWT sleep state: sleeping.
Definition wifi_mgmt.h:1235
@ WIFI_TWT_STATE_AWAKE
TWT sleep state: awake.
Definition wifi_mgmt.h:1237
@ WIFI_WPS_PBC
WPS pbc.
Definition wifi_mgmt.h:1734
@ WIFI_WPS_PIN_SET
Set WPS pin number.
Definition wifi_mgmt.h:1738
@ WIFI_WPS_PIN_GET
Get WPS pin number.
Definition wifi_mgmt.h:1736
@ NET_REQUEST_WIFI_CMD_AP_CONFIG_PARAM
Configure AP parameter.
Definition wifi_mgmt.h:118
@ NET_REQUEST_WIFI_CMD_TWT
Setup or teardown TWT flow.
Definition wifi_mgmt.h:96
@ NET_REQUEST_WIFI_CMD_PMKSA_FLUSH
Flush PMKSA cache entries.
Definition wifi_mgmt.h:128
@ NET_REQUEST_WIFI_CMD_P2P_OPER
Wi-Fi Direct (P2P) operations.
Definition wifi_mgmt.h:152
@ NET_REQUEST_WIFI_CMD_PACKET_FILTER
Set or get packet filter setting for current mode.
Definition wifi_mgmt.h:106
@ NET_REQUEST_WIFI_CMD_AP_ENABLE
Enable AP mode.
Definition wifi_mgmt.h:82
@ NET_REQUEST_WIFI_CMD_START_ROAMING
Start roaming.
Definition wifi_mgmt.h:140
@ NET_REQUEST_WIFI_CMD_REG_DOMAIN
Set or get regulatory domain.
Definition wifi_mgmt.h:102
@ NET_REQUEST_WIFI_CMD_AP_RTS_THRESHOLD
Set AP RTS threshold.
Definition wifi_mgmt.h:86
@ NET_REQUEST_WIFI_CMD_BSS_MAX_IDLE_PERIOD
Configure BSS maximum idle period.
Definition wifi_mgmt.h:148
@ NET_REQUEST_WIFI_CMD_11K_NEIGHBOR_REQUEST
Send 11k neighbor request.
Definition wifi_mgmt.h:92
@ NET_REQUEST_WIFI_CMD_SCAN
Scan for Wi-Fi networks.
Definition wifi_mgmt.h:76
@ NET_REQUEST_WIFI_CMD_IFACE_STATUS
Get interface status.
Definition wifi_mgmt.h:88
@ NET_REQUEST_WIFI_CMD_AP_STA_DISCONNECT
Disconnect a STA from AP.
Definition wifi_mgmt.h:110
@ NET_REQUEST_WIFI_CMD_DPP
DPP actions.
Definition wifi_mgmt.h:122
@ NET_REQUEST_WIFI_CMD_AP_DISABLE
Disable AP mode.
Definition wifi_mgmt.h:84
@ NET_REQUEST_WIFI_CMD_RTS_THRESHOLD
Set RTS threshold.
Definition wifi_mgmt.h:116
@ NET_REQUEST_WIFI_CMD_CONNECT
Connect to a Wi-Fi network.
Definition wifi_mgmt.h:78
@ NET_REQUEST_WIFI_CMD_VERSION
Get Wi-Fi driver and Firmware versions.
Definition wifi_mgmt.h:112
@ NET_REQUEST_WIFI_CMD_BGSCAN
Configure background scanning.
Definition wifi_mgmt.h:150
@ NET_REQUEST_WIFI_CMD_CONFIG_PARAM
Configure STA parameter.
Definition wifi_mgmt.h:120
@ NET_REQUEST_WIFI_CMD_ENTERPRISE_CREDS
Set enterprise mode credential.
Definition wifi_mgmt.h:130
@ NET_REQUEST_WIFI_CMD_CONN_PARAMS
Get Wi-Fi latest connection parameters.
Definition wifi_mgmt.h:114
@ NET_REQUEST_WIFI_CMD_11K_CONFIG
Set or get 11k status.
Definition wifi_mgmt.h:90
@ NET_REQUEST_WIFI_CMD_CHANNEL
Set or get Wi-Fi channel for Monitor or TX-Injection mode.
Definition wifi_mgmt.h:108
@ NET_REQUEST_WIFI_CMD_NAN
NAN actions.
Definition wifi_mgmt.h:124
@ NET_REQUEST_WIFI_CMD_BTWT
Setup BTWT flow.
Definition wifi_mgmt.h:98
@ NET_REQUEST_WIFI_CMD_MODE
Set or get Mode of operation.
Definition wifi_mgmt.h:104
@ NET_REQUEST_WIFI_CMD_RTS_THRESHOLD_CONFIG
Get RTS threshold.
Definition wifi_mgmt.h:132
@ NET_REQUEST_WIFI_CMD_CANDIDATE_SCAN
Specific scan.
Definition wifi_mgmt.h:144
@ NET_REQUEST_WIFI_CMD_BTM_QUERY
BSS transition management query.
Definition wifi_mgmt.h:126
@ NET_REQUEST_WIFI_CMD_PS
Set power save status.
Definition wifi_mgmt.h:94
@ NET_REQUEST_WIFI_CMD_DISCONNECT
Disconnect from a Wi-Fi network.
Definition wifi_mgmt.h:80
@ NET_REQUEST_WIFI_CMD_NEIGHBOR_REP_COMPLETE
Neighbor report complete.
Definition wifi_mgmt.h:142
@ NET_REQUEST_WIFI_CMD_AP_WPS_CONFIG
AP WPS config.
Definition wifi_mgmt.h:146
@ NET_REQUEST_WIFI_CMD_PS_CONFIG
Get power save config.
Definition wifi_mgmt.h:100
@ NET_REQUEST_WIFI_CMD_WPS_CONFIG
WPS config.
Definition wifi_mgmt.h:134
@ WIFI_BGSCAN_SIMPLE
Simple, periodic scan based on signal strength.
Definition wifi_mgmt.h:1927
@ WIFI_BGSCAN_NONE
None, background scan is disabled.
Definition wifi_mgmt.h:1925
@ WIFI_BGSCAN_LEARN
Learn channels used by the network (experimental).
Definition wifi_mgmt.h:1929
@ WIFI_STATUS_AP_CHANNEL_NOT_ALLOWED
AP mode enable failed - channel not allowed.
Definition wifi_mgmt.h:909
@ WIFI_STATUS_AP_SUCCESS
AP mode enable or disable successful.
Definition wifi_mgmt.h:903
@ WIFI_STATUS_AP_OP_NOT_SUPPORTED
AP mode enable failed - operation not supported.
Definition wifi_mgmt.h:915
@ WIFI_STATUS_AP_OP_NOT_PERMITTED
AP mode enable failed - operation not permitted.
Definition wifi_mgmt.h:917
@ WIFI_STATUS_AP_CHANNEL_NOT_SUPPORTED
AP mode enable failed - channel not supported.
Definition wifi_mgmt.h:907
@ WIFI_STATUS_AP_FAIL
AP mode enable or disable failed - generic failure.
Definition wifi_mgmt.h:905
@ WIFI_STATUS_AP_AUTH_TYPE_NOT_SUPPORTED
AP mode enable failed - authentication type not supported.
Definition wifi_mgmt.h:913
@ WIFI_STATUS_AP_SSID_NOT_ALLOWED
AP mode enable failed - SSID not allowed.
Definition wifi_mgmt.h:911
@ NET_MGMT_CMD
Scan results available.
Definition wifi_mgmt.h:413
@ WIFI_REASON_DISCONN_INACTIVITY
Disconnected due to inactivity.
Definition wifi_mgmt.h:892
@ WIFI_REASON_DISCONN_AP_LEAVING
Disconnected due to AP leaving.
Definition wifi_mgmt.h:890
@ WIFI_REASON_DISCONN_SUCCESS
Success, overload status as reason.
Definition wifi_mgmt.h:884
@ WIFI_REASON_DISCONN_UNSPECIFIED
Unspecified reason.
Definition wifi_mgmt.h:886
@ WIFI_REASON_DISCONN_USER_REQUEST
Disconnected due to user request.
Definition wifi_mgmt.h:888
@ WIFI_MGMT_GET
Get operation.
Definition wifi_mgmt.h:1184
@ WIFI_MGMT_SET
Set operation.
Definition wifi_mgmt.h:1186
#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:543
Ethernet L2 API operations.
Definition ethernet.h:553
Network Interface structure.
Definition net_if.h:777
All Wi-Fi specific statistics.
Definition net_stats.h:727
Wi-Fi management offload API.
Definition wifi_mgmt.h:2431
struct ethernet_api wifi_iface
Mandatory to get in first position.
Definition wifi_mgmt.h:2440
const struct wifi_mgmt_ops *const wifi_mgmt_api
Wi-Fi management API.
Definition wifi_mgmt.h:2446
const void * wifi_drv_ops
Wi-Fi supplicant driver API.
Definition wifi_mgmt.h:2450
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:1190
uint8_t ssid[WIFI_SSID_MAX_LEN+1]
SSID.
Definition wifi_mgmt.h:1196
bool enable_11k
11k enable/disable
Definition wifi_mgmt.h:1194
enum wifi_mgmt_op oper
11k command operation
Definition wifi_mgmt.h:1192
Wi-Fi AP configuration parameter.
Definition wifi_mgmt.h:1395
uint32_t max_inactivity
Parameter used for setting maximum inactivity duration for stations.
Definition wifi_mgmt.h:1399
enum wifi_ap_config_param type
Parameter used to identify the different AP parameters.
Definition wifi_mgmt.h:1397
uint32_t max_num_sta
Parameter used for setting maximum number of stations.
Definition wifi_mgmt.h:1401
enum wifi_frequency_bandwidths bandwidth
Parameter used for frequency band.
Definition wifi_mgmt.h:1403
AP mode - connected STA details.
Definition wifi_mgmt.h:1255
enum wifi_link_mode link_mode
Link mode, see enum wifi_link_mode.
Definition wifi_mgmt.h:1257
uint8_t mac[WIFI_MAC_ADDR_LEN]
MAC address.
Definition wifi_mgmt.h:1259
uint8_t mac_length
MAC address length.
Definition wifi_mgmt.h:1261
bool twt_capable
is TWT capable ?
Definition wifi_mgmt.h:1263
Wi-Fi structure to uniquely identify a band-channel pair.
Definition wifi_mgmt.h:602
uint8_t band
Frequency band.
Definition wifi_mgmt.h:604
uint8_t channel
Channel.
Definition wifi_mgmt.h:606
Wi-Fi background scan parameters.
Definition wifi_mgmt.h:1933
enum wifi_bgscan_type type
The type of background scanning.
Definition wifi_mgmt.h:1935
uint16_t long_interval
Long scan interval in seconds.
Definition wifi_mgmt.h:1939
uint16_t btm_queries
Number of BSS Transition Management (BTM) queries.
Definition wifi_mgmt.h:1943
int8_t rssi_threshold
Signal strength threshold in dBm.
Definition wifi_mgmt.h:1941
uint16_t short_interval
Short scan interval in seconds.
Definition wifi_mgmt.h:1937
Wi-Fi broadcast TWT parameters.
Definition wifi_mgmt.h:1012
uint8_t btwt_nominal_wake
Broadcast TWT range.
Definition wifi_mgmt.h:1020
uint16_t btwt_mantissa
Broadcast TWT mantissa.
Definition wifi_mgmt.h:1016
uint8_t btwt_exponent
Broadcast TWT exponent.
Definition wifi_mgmt.h:1018
uint8_t btwt_id
Broadcast TWT ID.
Definition wifi_mgmt.h:1014
Wi-Fi channel setting for monitor and TX-injection modes.
Definition wifi_mgmt.h:1375
uint8_t if_index
Interface index.
Definition wifi_mgmt.h:1384
uint16_t channel
Channel value to set or get.
Definition wifi_mgmt.h:1377
enum wifi_mgmt_op oper
Get or set operation.
Definition wifi_mgmt.h:1386
enum wifi_frequency_bands band
Frequency band for the channel (2.4 / 5 / 6 GHz).
Definition wifi_mgmt.h:1382
Wi-Fi STA configuration parameter.
Definition wifi_mgmt.h:1413
int okc
Parameter used for opportunistic key caching.
Definition wifi_mgmt.h:1417
enum wifi_config_param type
Parameter used to identify the different STA parameters.
Definition wifi_mgmt.h:1415
Wi-Fi connect request parameters.
Definition wifi_mgmt.h:688
const uint8_t * key2_passwd
Password for a secondary private key, if required by the authentication method.
Definition wifi_mgmt.h:747
uint8_t server_cert_domain_exact_len
Length of the server_cert_domain_exact string, maximum 128 bytes.
Definition wifi_mgmt.h:857
bool ft_used
Indicates if Fast BSS Transition (802.11r) is used.
Definition wifi_mgmt.h:815
enum wifi_frequency_bandwidths bandwidth
Parameter used for frequency band.
Definition wifi_mgmt.h:852
enum wifi_security_type security
Security type.
Definition wifi_mgmt.h:712
const uint8_t * passwords[WIFI_ENT_IDENTITY_MAX_USERS]
Array of pointers to user password strings for EAP authentication.
Definition wifi_mgmt.h:844
const uint8_t * identities[WIFI_ENT_IDENTITY_MAX_USERS]
Array of pointers to user identity strings for EAP authentication.
Definition wifi_mgmt.h:837
uint8_t aid_length
Length of the anonymous identity, maximum 64 bytes.
Definition wifi_mgmt.h:729
const uint8_t * server_cert_domain_exact
Full domain name to verify in the server certificate.
Definition wifi_mgmt.h:855
const uint8_t * sae_password
SAE password (same as PSK but with no length restrictions), optional.
Definition wifi_mgmt.h:704
const uint8_t * key_passwd
Private key password for Wi-Fi Enterprise authentication.
Definition wifi_mgmt.h:737
uint8_t eap_id_length
Length of the EAP identity, maximum 64 bytes.
Definition wifi_mgmt.h:789
uint8_t channel
Channel.
Definition wifi_mgmt.h:710
uint8_t ssid_length
SSID length.
Definition wifi_mgmt.h:692
int timeout
Connect timeout in seconds, SYS_FOREVER_MS for no timeout.
Definition wifi_mgmt.h:718
uint8_t transition_disable
WPA3 Transition Disable bitmap (WPA3 Spec v3.0, Table 5).
Definition wifi_mgmt.h:876
bool psk_is_pbkdf2
Pre-shared key is the pre-computed PBKDF2 output.
Definition wifi_mgmt.h:702
int nusers
Number of EAP user identities provided.
Definition wifi_mgmt.h:823
enum wifi_mfp_options mfp
MFP options.
Definition wifi_mgmt.h:714
uint8_t sae_password_length
SAE password length.
Definition wifi_mgmt.h:706
const uint8_t * anon_id
Anonymous identity used in EAP authentication (Phase 1) for Wi-Fi Enterprise networks.
Definition wifi_mgmt.h:726
int eap_ver
EAP (Extensible Authentication Protocol) version to use.
Definition wifi_mgmt.h:777
uint8_t key_passwd_length
Length of the private key password, maximum 128 bytes.
Definition wifi_mgmt.h:740
uint8_t band
Frequency band.
Definition wifi_mgmt.h:708
uint8_t TLS_cipher
TLS cipher suite to use for EAP-TLS authentication.
Definition wifi_mgmt.h:768
const uint8_t * psk
Pre-shared key.
Definition wifi_mgmt.h:694
uint8_t bssid[WIFI_MAC_ADDR_LEN]
BSSID.
Definition wifi_mgmt.h:716
bool verify_peer_cert
Whether to verify the server's certificate authority (CA) during authentication.
Definition wifi_mgmt.h:808
uint8_t passwds
Number of EAP passwords provided.
Definition wifi_mgmt.h:830
uint8_t psk_length
Pre-shared key length.
Definition wifi_mgmt.h:696
const uint8_t * eap_identity
Identity string for EAP authentication (Phase 2, inner authentication).
Definition wifi_mgmt.h:786
const uint8_t * ssid
SSID.
Definition wifi_mgmt.h:690
uint8_t ssid_protection
SSID protection in 4-way handshake (needs RSNXE support) 0: Disable (default) 1: Enable.
Definition wifi_mgmt.h:867
const uint8_t * server_cert_domain_suffix
Domain name suffix to verify in the server certificate.
Definition wifi_mgmt.h:860
enum wifi_wpa3_enterprise_type wpa3_ent_mode
WPA3 Enterprise mode type.
Definition wifi_mgmt.h:760
uint8_t eap_passwd_length
Length of the EAP password, maximum 128 bytes.
Definition wifi_mgmt.h:800
uint8_t key2_passwd_length
Length of the secondary private key password, maximum 128 bytes.
Definition wifi_mgmt.h:750
uint8_t server_cert_domain_suffix_len
Length of the server_cert_domain_suffix string, maximum 64 bytes.
Definition wifi_mgmt.h:862
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:850
const uint8_t * eap_password
Password string for EAP authentication (Phase 2, inner authentication).
Definition wifi_mgmt.h:797
Wi-Fi enterprise mode credentials.
Definition wifi_mgmt.h:1132
uint32_t client_key_len
Client key length.
Definition wifi_mgmt.h:1144
uint8_t * client_cert2
Client certification of phase2.
Definition wifi_mgmt.h:1150
uint32_t client_key2_len
Phase2 Client key length.
Definition wifi_mgmt.h:1156
uint32_t client_cert_len
Client certification length.
Definition wifi_mgmt.h:1140
uint32_t ca_cert_len
CA certification length.
Definition wifi_mgmt.h:1136
uint8_t * client_cert
Client certification.
Definition wifi_mgmt.h:1138
uint8_t * client_key
Client key.
Definition wifi_mgmt.h:1142
uint32_t server_key_len
Server key length.
Definition wifi_mgmt.h:1164
uint8_t * dh_param
Diffie-Hellman parameter.
Definition wifi_mgmt.h:1166
uint8_t * client_key2
Client key of phase2.
Definition wifi_mgmt.h:1154
uint32_t ca_cert2_len
Phase2 CA certification length.
Definition wifi_mgmt.h:1148
uint32_t dh_param_len
Diffie-Hellman parameter length.
Definition wifi_mgmt.h:1168
uint8_t * server_key
Server key.
Definition wifi_mgmt.h:1162
uint32_t server_cert_len
Server certification length.
Definition wifi_mgmt.h:1160
uint8_t * server_cert
Server certification.
Definition wifi_mgmt.h:1158
uint8_t * ca_cert2
CA certification of phase2.
Definition wifi_mgmt.h:1146
uint32_t client_cert2_len
Phase2 Client certification length.
Definition wifi_mgmt.h:1152
uint8_t * ca_cert
CA certification.
Definition wifi_mgmt.h:1134
Wi-Fi filter setting for monitor, prmoiscuous, TX-injection modes.
Definition wifi_mgmt.h:1363
uint16_t buffer_size
Filter buffer size.
Definition wifi_mgmt.h:1369
uint8_t filter
Filter setting.
Definition wifi_mgmt.h:1365
enum wifi_mgmt_op oper
Get or set operation.
Definition wifi_mgmt.h:1371
uint8_t if_index
Interface index.
Definition wifi_mgmt.h:1367
Wi-Fi interface status.
Definition wifi_mgmt.h:944
unsigned short beacon_interval
Beacon interval.
Definition wifi_mgmt.h:974
enum wifi_wpa3_enterprise_type wpa3_ent_type
WPA3 enterprise type.
Definition wifi_mgmt.h:962
char ssid[WIFI_SSID_MAX_LEN+1]
SSID.
Definition wifi_mgmt.h:950
float current_phy_tx_rate
The current 802.11 PHY TX data rate (in Mbps).
Definition wifi_mgmt.h:978
int rssi
RSSI.
Definition wifi_mgmt.h:970
char bssid[WIFI_MAC_ADDR_LEN]
BSSID.
Definition wifi_mgmt.h:952
enum wifi_security_type security
Security type, see enum wifi_security_type.
Definition wifi_mgmt.h:964
unsigned int channel
Channel.
Definition wifi_mgmt.h:956
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:966
enum wifi_mfp_options mfp
MFP options, see enum wifi_mfp_options.
Definition wifi_mgmt.h:968
unsigned char dtim_period
DTIM period.
Definition wifi_mgmt.h:972
int state
Interface state, see enum wifi_iface_state.
Definition wifi_mgmt.h:946
bool twt_capable
is TWT capable?
Definition wifi_mgmt.h:976
enum wifi_iface_mode iface_mode
Interface mode, see enum wifi_iface_mode.
Definition wifi_mgmt.h:958
unsigned int ssid_len
SSID length.
Definition wifi_mgmt.h:948
enum wifi_frequency_bands band
Frequency band.
Definition wifi_mgmt.h:954
enum wifi_link_mode link_mode
Link mode, see enum wifi_link_mode.
Definition wifi_mgmt.h:960
Wi-Fi management API.
Definition wifi_mgmt.h:1984
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:2273
int(* set_bgscan)(const struct device *dev, struct net_if *iface, struct wifi_bgscan_params *params)
Configure background scanning.
Definition wifi_mgmt.h:2398
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:2177
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:2100
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:2386
int(* ap_disable)(const struct device *dev, struct net_if *iface)
Disable AP mode.
Definition wifi_mgmt.h:2038
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:2186
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:2111
uint32_t(* get_iface_caps)(const struct device *dev, struct net_if *iface)
Get interface supported roles (static driver capability).
Definition wifi_mgmt.h:2427
int(* set_btwt)(const struct device *dev, struct net_if *iface, struct wifi_twt_params *params)
Setup BTWT flow.
Definition wifi_mgmt.h:2133
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:2166
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:2206
int(* config_params)(const struct device *dev, struct net_if *iface, struct wifi_config_params *params)
Configure STA parameter.
Definition wifi_mgmt.h:2284
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:2009
int(* candidate_scan)(const struct device *dev, struct net_if *iface, struct wifi_scan_params *params)
Trigger candidate scan.
Definition wifi_mgmt.h:2365
int(* pmksa_flush)(const struct device *dev, struct net_if *iface)
Flush PMKSA cache entries.
Definition wifi_mgmt.h:2321
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:2240
int(* reset_stats)(const struct device *dev, struct net_if *iface)
Reset Wi-Fi statistics.
Definition wifi_mgmt.h:2079
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:2155
int(* disconnect)(const struct device *dev, struct net_if *iface)
Disconnect from a Wi-Fi network.
Definition wifi_mgmt.h:2019
int(* legacy_roam)(const struct device *dev, struct net_if *iface)
Send legacy scan.
Definition wifi_mgmt.h:2225
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:2144
int(* iface_status)(const struct device *dev, struct net_if *iface, struct wifi_iface_status *status)
Get interface status.
Definition wifi_mgmt.h:2057
int(* ap_enable)(const struct device *dev, struct net_if *iface, struct wifi_connect_req_params *params)
Enable AP mode.
Definition wifi_mgmt.h:2029
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:2089
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:2251
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:2354
int(* get_stats)(const struct device *dev, struct net_if *iface, struct net_stats_wifi *stats)
Get Wi-Fi statistics.
Definition wifi_mgmt.h:2069
int(* start_11r_roaming)(const struct device *dev, struct net_if *iface)
Start 11r roaming.
Definition wifi_mgmt.h:2377
int(* bss_ext_capab)(const struct device *dev, struct net_if *iface, int capab)
Judge ap whether support the capability.
Definition wifi_mgmt.h:2216
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:1997
int(* btm_query)(const struct device *dev, struct net_if *iface, uint8_t reason)
Send BTM query.
Definition wifi_mgmt.h:2198
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:2343
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:2047
int(* set_rts_threshold)(const struct device *dev, struct net_if *iface, unsigned int rts_threshold)
Set RTS threshold value.
Definition wifi_mgmt.h:2262
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:2122
Wi-Fi mode setup.
Definition wifi_mgmt.h:1353
enum wifi_mgmt_op oper
Get or set operation.
Definition wifi_mgmt.h:1359
uint8_t mode
Mode setting for a specific mode of operation.
Definition wifi_mgmt.h:1355
uint8_t if_index
Interface index.
Definition wifi_mgmt.h:1357
Wi-Fi power save configuration.
Definition wifi_mgmt.h:1172
struct wifi_ps_params ps_params
Power save configuration.
Definition wifi_mgmt.h:1178
char num_twt_flows
Number of TWT flows.
Definition wifi_mgmt.h:1174
struct wifi_twt_flow_info twt_flows[WIFI_MAX_TWT_FLOWS]
TWT flow details.
Definition wifi_mgmt.h:1176
Wi-Fi power save parameters.
Definition wifi_mgmt.h:982
enum wifi_ps_mode mode
Wi-Fi power save mode.
Definition wifi_mgmt.h:990
enum wifi_config_ps_param_fail_reason fail_reason
Wi-Fi power save fail reason.
Definition wifi_mgmt.h:1003
enum wifi_ps_wakeup_mode wakeup_mode
Wi-Fi power save wakeup mode.
Definition wifi_mgmt.h:988
unsigned short listen_interval
Listen interval.
Definition wifi_mgmt.h:986
enum wifi_ps_exit_strategy exit_strategy
Wi-Fi power save exit strategy.
Definition wifi_mgmt.h:1005
enum wifi_ps enabled
Power save state.
Definition wifi_mgmt.h:984
unsigned int timeout_ms
Wi-Fi power save timeout.
Definition wifi_mgmt.h:999
enum wifi_ps_param_type type
Wi-Fi power save type.
Definition wifi_mgmt.h:1001
Wi-Fi raw scan result.
Definition wifi_mgmt.h:1242
int8_t rssi
RSSI.
Definition wifi_mgmt.h:1244
uint8_t data[CONFIG_WIFI_MGMT_RAW_SCAN_RESULT_LENGTH]
Raw scan data.
Definition wifi_mgmt.h:1250
int frame_length
Frame length.
Definition wifi_mgmt.h:1246
unsigned short frequency
Frequency.
Definition wifi_mgmt.h:1248
Per-channel regulatory attributes.
Definition wifi_mgmt.h:1203
unsigned short center_frequency
Center frequency in MHz.
Definition wifi_mgmt.h:1205
unsigned short dfs
Is a DFS channel.
Definition wifi_mgmt.h:1213
unsigned short supported
Is channel supported or not.
Definition wifi_mgmt.h:1209
unsigned short passive_only
Passive transmissions only.
Definition wifi_mgmt.h:1211
unsigned short max_power
Maximum transmission power (in dBm).
Definition wifi_mgmt.h:1207
Regulatory domain information or configuration.
Definition wifi_mgmt.h:1217
unsigned int num_channels
Number of channels supported.
Definition wifi_mgmt.h:1227
enum wifi_mgmt_op oper
Regulatory domain operation.
Definition wifi_mgmt.h:1219
struct wifi_reg_chan_info * chan_info
Channels information.
Definition wifi_mgmt.h:1229
bool force
Ignore all other regulatory hints over this one, the behavior is implementation specific.
Definition wifi_mgmt.h:1223
uint8_t country_code[WIFI_COUNTRY_CODE_LEN]
Country code: ISO/IEC 3166-1 alpha-2.
Definition wifi_mgmt.h:1225
Wi-Fi scan parameters structure.
Definition wifi_mgmt.h:614
uint16_t max_bss_cnt
Specifies the maximum number of scan results to return.
Definition wifi_mgmt.h:643
uint16_t dwell_time_active
Active scan dwell time (in ms) on a channel.
Definition wifi_mgmt.h:629
enum wifi_scan_type scan_type
Scan type, see enum wifi_scan_type.
Definition wifi_mgmt.h:622
uint8_t bands
Bitmap of bands to be scanned.
Definition wifi_mgmt.h:626
uint16_t dwell_time_passive
Passive scan dwell time (in ms) on a channel.
Definition wifi_mgmt.h:632
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:658
const char * ssids[WIFI_MGMT_SCAN_SSID_FILT_MAX]
Array of SSID strings to scan.
Definition wifi_mgmt.h:635
Wi-Fi scan result, each result is provided to the net_mgmt_event_callback via its info attribute (see...
Definition wifi_mgmt.h:664
uint8_t ssid_length
SSID length.
Definition wifi_mgmt.h:668
uint8_t band
Frequency band.
Definition wifi_mgmt.h:670
uint8_t mac[WIFI_MAC_ADDR_LEN]
BSSID.
Definition wifi_mgmt.h:682
int8_t rssi
RSSI.
Definition wifi_mgmt.h:680
uint8_t mac_length
BSSID length.
Definition wifi_mgmt.h:684
uint8_t ssid[WIFI_SSID_MAX_LEN+1]
SSID.
Definition wifi_mgmt.h:666
enum wifi_wpa3_enterprise_type wpa3_ent_type
WPA3 enterprise type.
Definition wifi_mgmt.h:676
enum wifi_mfp_options mfp
MFP options.
Definition wifi_mgmt.h:678
uint8_t channel
Channel.
Definition wifi_mgmt.h:672
enum wifi_security_type security
Security type.
Definition wifi_mgmt.h:674
Generic Wi-Fi status for commands and events.
Definition wifi_mgmt.h:921
enum wifi_ap_status ap_status
Access point status.
Definition wifi_mgmt.h:931
uint16_t reason_code
IEEE 802.11 reason code from the last Deauthentication or Disassociation frame, 0 if not available.
Definition wifi_mgmt.h:940
enum wifi_conn_status conn_status
Connection status.
Definition wifi_mgmt.h:927
enum wifi_disconn_reason disconn_reason
Disconnection reason status.
Definition wifi_mgmt.h:929
int status
Status value.
Definition wifi_mgmt.h:925
uint16_t status_code
IEEE 802.11 status code from the last Authentication or (Re)Association Response frame,...
Definition wifi_mgmt.h:936
Wi-Fi TWT flow information.
Definition wifi_mgmt.h:1108
uint8_t dialog_token
Dialog token, used to map requests to responses.
Definition wifi_mgmt.h:1112
enum wifi_twt_negotiation_type negotiation_type
TWT negotiation type, see enum wifi_twt_negotiation_type.
Definition wifi_mgmt.h:1116
uint32_t twt_wake_ahead_duration
Wake ahead duration.
Definition wifi_mgmt.h:1128
bool trigger
Trigger enabled or disabled.
Definition wifi_mgmt.h:1120
bool responder
Requestor or responder.
Definition wifi_mgmt.h:1118
uint8_t flow_id
Flow ID, used to map setup with teardown.
Definition wifi_mgmt.h:1114
uint64_t twt_interval
Interval = Wake up time + Sleeping time.
Definition wifi_mgmt.h:1110
uint32_t twt_wake_interval
Wake up time.
Definition wifi_mgmt.h:1126
bool implicit
Implicit or explicit.
Definition wifi_mgmt.h:1122
bool announce
Announced or unannounced.
Definition wifi_mgmt.h:1124
Wi-Fi TWT parameters.
Definition wifi_mgmt.h:1024
bool announce
Announced or unannounced.
Definition wifi_mgmt.h:1052
bool teardown_all
Teardown all flows.
Definition wifi_mgmt.h:1084
enum wifi_twt_setup_cmd setup_cmd
TWT setup command, see enum wifi_twt_setup_cmd.
Definition wifi_mgmt.h:1030
uint16_t btwt_offset
Broadcast TWT offset.
Definition wifi_mgmt.h:1073
bool trigger
Trigger enabled or disabled.
Definition wifi_mgmt.h:1048
enum wifi_twt_negotiation_type negotiation_type
TWT negotiation type, see enum wifi_twt_negotiation_type.
Definition wifi_mgmt.h:1028
enum wifi_twt_operation operation
TWT operation, see enum wifi_twt_operation.
Definition wifi_mgmt.h:1026
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:1060
enum wifi_twt_fail_reason fail_reason
TWT fail reason, see enum wifi_twt_fail_reason.
Definition wifi_mgmt.h:1088
uint32_t twt_wake_interval
Wake up time.
Definition wifi_mgmt.h:1054
uint8_t btwt_li
In multiple of 4 beacon interval.
Definition wifi_mgmt.h:1075
enum wifi_twt_setup_resp_status resp_status
TWT setup response status, see enum wifi_twt_setup_resp_status.
Definition wifi_mgmt.h:1032
bool implicit
Implicit or explicit.
Definition wifi_mgmt.h:1050
uint8_t flow_id
Flow ID, used to map setup with teardown.
Definition wifi_mgmt.h:1038
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:1034
uint8_t btwt_sta_wait
Broadcast TWT station wait time.
Definition wifi_mgmt.h:1071
struct wifi_btwt_params btwt_set_cfg[5]
Broadcast TWT agreement sets.
Definition wifi_mgmt.h:1079
struct wifi_twt_params::@142010065304112155221017375176376104176123122145::@354056177023017106017062105137255212157035234147 btwt
Setup specific parameters.
uint8_t twt_exponent
TWT exponent.
Definition wifi_mgmt.h:1064
uint16_t twt_mantissa
TWT Mantissa Range: [0-sizeof(UINT16)].
Definition wifi_mgmt.h:1066
uint64_t twt_interval
Interval = Wake up time + Sleeping time.
Definition wifi_mgmt.h:1044
struct wifi_twt_params::@142010065304112155221017375176376104176123122145::@373031221051136207356324125344151215231253205055 teardown
Teardown specific parameters.
bool twt_info_disable
TWT info enabled or disable.
Definition wifi_mgmt.h:1062
uint8_t dialog_token
Dialog token, used to map requests to responses.
Definition wifi_mgmt.h:1036
bool responder
Requestor or responder.
Definition wifi_mgmt.h:1046
uint8_t btwt_count
Broadcast TWT agreement count.
Definition wifi_mgmt.h:1077
Wi-Fi version.
Definition wifi_mgmt.h:592
const char * fw_version
Firmware version.
Definition wifi_mgmt.h:596
const char * drv_version
Driver version.
Definition wifi_mgmt.h:594
Wi-Fi wps setup.
Definition wifi_mgmt.h:1742
char pin[8+1]
pin value
Definition wifi_mgmt.h:1746
enum wifi_wps_op oper
wps operation
Definition wifi_mgmt.h:1744
IEEE 802.11 protocol and general Wi-Fi definitions.