Morse Micro IoT SDK  2.11.2
mmwlan.h
1/*
2 * Copyright 2021-2024 Morse Micro
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
33#pragma once
34
35#include <stdarg.h>
36#include <stdint.h>
37#include <stdlib.h>
38#include <stdbool.h>
39#include <string.h>
40
41#include "mmpkt.h"
42
43#ifdef __cplusplus
44extern "C"
45{
46#endif
47
50{
87};
88
90#define MMWLAN_SSID_MAXLEN (32)
91
93#define MMWLAN_PASSPHRASE_MAXLEN (100)
94
96#define MMWLAN_MAC_ADDR_LEN (6)
97
99#define MMWLAN_MAX_EC_GROUPS (4)
100
102#define MMWLAN_OUI_SIZE (3)
103
108{
115};
116
119{
126};
127
130{
136
149#define MMWLAN_SKIP_OP_CLASS_CHECK -1
150
153{
167 uint8_t bw_mhz;
176};
177
179#define MMWLAN_COUNTRY_CODE_LEN 3
180
183{
187 unsigned num_channels;
190};
191
197{
199 unsigned num_domains;
200
203};
204
215 const struct mmwlan_regulatory_db *db,
216 const char *country_code)
217{
218 unsigned ii;
219
220 if (db == NULL)
221 {
222 return NULL;
223 }
224
225 for (ii = 0; ii < db->num_domains; ii++)
226 {
227 const struct mmwlan_s1g_channel_list *channel_list = db->domains[ii];
228 if (channel_list->country_code[0] == country_code[0] &&
229 channel_list->country_code[1] == country_code[1])
230 {
231 return channel_list;
232 }
233 }
234 return NULL;
235}
236
254
257{
262};
263
276
281{
283 uint32_t duty_cycle;
290};
291
300
312#define MMWLAN_MORSELIB_VERSION_MAXLEN (32)
314#define MMWLAN_FW_VERSION_MAXLEN (32)
316#define MMWLAN_CHIP_ID_STRING_MAXLEN (32)
317
320{
329};
330
342
344#define MMWLAN_BCF_BOARD_DESC_MAXLEN (31)
346#define MMWLAN_BCF_BUILD_VERSION_MAXLEN (31)
347
350{
352 struct
353 {
355 uint16_t major;
357 uint8_t minor;
359 uint8_t patch;
361
369
377};
378
387
405enum mmwlan_status mmwlan_override_max_tx_power(uint16_t tx_power_dbm);
406
417enum mmwlan_status mmwlan_set_rts_threshold(unsigned rts_threshold);
418
434
449enum mmwlan_status mmwlan_set_subbands_enabled(bool subbands_enabled);
450
462
467#define MMWLAN_MINIMUM_FRAGMENT_THRESHOLD (256)
468
488enum mmwlan_status mmwlan_set_fragment_threshold(unsigned fragment_threshold);
489
491#define MMWLAN_QOS_QUEUE_NUM_ACIS 4
492
495{
497 uint8_t aci;
499 uint8_t aifs;
501 uint16_t cw_min;
503 uint16_t cw_max;
505 uint32_t txop_max_us;
506};
507
528 size_t count);
529
532{
540
549
563
567#ifndef MMWLAN_DEFAULT_MIN_HEALTH_CHECK_INTERVAL_MS
568#define MMWLAN_DEFAULT_MIN_HEALTH_CHECK_INTERVAL_MS 60000
569#endif
570
574#ifndef MMWLAN_DEFAULT_MAX_HEALTH_CHECK_INTERVAL_MS
575#define MMWLAN_DEFAULT_MAX_HEALTH_CHECK_INTERVAL_MS 120000
576#endif
577
590 uint32_t max_interval_ms);
591
610{
615 const uint8_t *sta_mac_addr_override;
616};
617
623#define MMWLAN_BOOT_ARGS_INIT { NULL }
624
639
649
672enum mmwlan_status mmwlan_get_vif_mac_addr(enum mmwlan_vif vif, uint8_t *mac_addr);
673
688static inline enum mmwlan_status mmwlan_get_mac_addr(uint8_t *mac_addr)
689{
690 return mmwlan_get_vif_mac_addr(MMWLAN_VIF_STA, mac_addr);
691}
692
705{
707 int16_t rssi;
709 const uint8_t *bssid;
711 const uint8_t *ssid;
713 const uint8_t *ies;
719 uint16_t ies_len;
721 uint8_t ssid_len;
725 uint8_t bw_mhz;
727 uint8_t op_bw_mhz;
732 int8_t noise_dbm;
734 uint64_t tsf;
735};
736
738typedef void (*mmwlan_scan_rx_cb_t)(const struct mmwlan_scan_result *result, void *arg);
739
752{
760
773
781};
782
784#define MMWLAN_SCAN_CONFIG_INIT \
785 { MMWLAN_SCAN_DEFAULT_DWELL_TIME_MS, false, MMWLAN_SCAN_DEFAULT_DWELL_ON_HOME_MS }
786
797#define MMWLAN_SCAN_DEFAULT_DWELL_TIME_MS (30)
799#define MMWLAN_SCAN_DEFAULT_DWELL_ON_HOME_MS (200)
800
802#define MMWLAN_SCAN_MIN_DWELL_TIME_MS (15)
803
808{
816};
817
819typedef void (*mmwlan_scan_complete_cb_t)(enum mmwlan_scan_state scan_state, void *arg);
820
826{
838 uint8_t *extra_ies;
847 uint16_t ssid_len;
854};
855
865#define MMWLAN_SCAN_ARGS_INIT \
866 { \
867 .dwell_time_ms = MMWLAN_SCAN_DEFAULT_DWELL_TIME_MS, \
868 .extra_ies = NULL, \
869 .extra_ies_len = 0, \
870 .ssid = { 0 }, \
871 .ssid_len = 0, \
872 .dwell_on_home_ms = MMWLAN_SCAN_DEFAULT_DWELL_ON_HOME_MS, \
873 }
874
879{
888};
889
899#define MMWLAN_SCAN_REQ_INIT { NULL, NULL, NULL, MMWLAN_SCAN_ARGS_INIT }
900
919
929
942#define DEFAULT_BGSCAN_SHORT_INTERVAL_S (0)
943
945#define DEFAULT_BGSCAN_THRESHOLD_DBM (0)
946
949#define DEFAULT_BGSCAN_LONG_INTERVAL_S (0)
950
952#define DEFAULT_TWT_WAKE_INTERVAL_US (300000000)
953
955#define DEFAULT_TWT_MIN_WAKE_DURATION_US (65280)
956
958#define MMWLAN_DEFAULT_SCAN_INTERVAL_BASE_S (2)
959
961#define MMWLAN_DEFAULT_SCAN_INTERVAL_LIMIT_S (512)
962
964#define MMWLAN_RAW_MAX_PRIORITY (7)
965
968{
974
977{
982};
983
986{
992
997{
998 MMWLAN_STA_TYPE_SENSOR = 0x01,
999 MMWLAN_STA_TYPE_NON_SENSOR = 0x02,
1000};
1001
1006{
1007 MMWLAN_STA_DISABLED,
1008 MMWLAN_STA_CONNECTING,
1009 MMWLAN_STA_CONNECTED,
1010};
1011
1013typedef void (*mmwlan_sta_status_cb_t)(enum mmwlan_sta_state sta_state);
1014
1022{
1042};
1043
1046{
1049};
1050
1057typedef void (*mmwlan_sta_event_cb_t)(const struct mmwlan_sta_event_cb_args *sta_event, void *arg);
1058
1074{
1078 uint16_t ssid_len;
1187};
1188
1194#define MMWLAN_STA_ARGS_INIT \
1195 { \
1196 .ssid = { 0 }, \
1197 .ssid_len = 0, \
1198 .bssid = { 0 }, \
1199 .security_type = MMWLAN_OPEN, \
1200 .passphrase = { 0 }, \
1201 .passphrase_len = 0, \
1202 .pmf_mode = MMWLAN_PMF_REQUIRED, \
1203 .raw_sta_priority = -1, \
1204 .sta_type = MMWLAN_STA_TYPE_NON_SENSOR, \
1205 .sae_owe_ec_groups = { 0 }, \
1206 .cac_mode = MMWLAN_CAC_DISABLED, \
1207 .bgscan_short_interval_s = DEFAULT_BGSCAN_SHORT_INTERVAL_S, \
1208 .bgscan_signal_threshold_dbm = DEFAULT_BGSCAN_THRESHOLD_DBM, \
1209 .bgscan_long_interval_s = DEFAULT_BGSCAN_LONG_INTERVAL_S, \
1210 .scan_rx_cb = NULL, \
1211 .scan_rx_cb_arg = NULL, \
1212 .scan_interval_base_s = MMWLAN_DEFAULT_SCAN_INTERVAL_BASE_S, \
1213 .scan_interval_limit_s = MMWLAN_DEFAULT_SCAN_INTERVAL_LIMIT_S, \
1214 .extra_assoc_ies = NULL, \
1215 .extra_assoc_ies_len = 0, \
1216 .sta_evt_cb = NULL, \
1217 .sta_evt_cb_arg = NULL, \
1218 .use_4addr = MMWLAN_4ADDR_MODE_DISABLED, \
1219 }
1220
1247 mmwlan_sta_status_cb_t sta_status_cb);
1248
1259
1266
1278
1280#define MMWLAN_DEFAULT_DYNAMIC_PS_TIMEOUT_MS 100;
1281
1305
1322enum mmwlan_status mmwlan_set_non_tim_mode_enabled(bool non_tim_mode_enabled);
1323
1330{
1338
1341{
1349
1352{
1375};
1376
1386#define MMWLAN_TWT_CONFIG_ARGS_INIT \
1387 { \
1388 .twt_mode = MMWLAN_TWT_DISABLED, \
1389 .twt_wake_interval_us = DEFAULT_TWT_WAKE_INTERVAL_US, \
1390 .twt_wake_interval_mantissa = 0, \
1391 .twt_wake_interval_exponent = 0, \
1392 .twt_min_wake_duration_us = DEFAULT_TWT_MIN_WAKE_DURATION_US, \
1393 .twt_setup_command = MMWLAN_TWT_SETUP_REQUEST, \
1394 }
1395
1407 const struct mmwlan_twt_config_args *twt_config_args);
1408
1414uint16_t mmwlan_get_aid(void);
1415
1424enum mmwlan_status mmwlan_get_bssid(uint8_t *bssid);
1425
1433int32_t mmwlan_get_rssi(void);
1434
1446
1489{
1494};
1495
1505#define MMWLAN_SET_WNM_SLEEP_ENABLED_ARGS_INIT { false, false }
1506
1534 const struct mmwlan_set_wnm_sleep_enabled_args *args);
1535
1561static inline enum mmwlan_status mmwlan_set_wnm_sleep_enabled(bool wnm_sleep_enabled)
1562{
1563 struct mmwlan_set_wnm_sleep_enabled_args wnm_sleep_args =
1565 wnm_sleep_args.wnm_sleep_enabled = wnm_sleep_enabled;
1566 return mmwlan_set_wnm_sleep_enabled_ext(&wnm_sleep_args);
1567}
1568
1588{
1591};
1592
1599{
1606};
1607
1615{
1618
1620 union
1621 {
1623 struct
1624 {
1628 const uint8_t *ssid;
1630 uint16_t ssid_len;
1632 const char *passphrase;
1635};
1636
1644{
1646 void (*dpp_event_cb)(const struct mmwlan_dpp_cb_args *dpp_event, void *arg);
1649};
1650
1668
1678
1693#define MMWLAN_DEFAULT_AP_BEACON_INTERVAL_TUS (100)
1694
1696#define MMWLAN_DEFAULT_AP_DTIM_PERIOD (1)
1697
1699#define MMWLAN_DEFAULT_AP_MAX_STAS (4)
1700
1702#define MMWLAN_AP_MAX_STAS_LIMIT (20)
1703
1711{
1720};
1721
1729{
1733 uint16_t aid;
1736};
1737
1747typedef void (*mmwlan_ap_sta_status_cb_t)(const struct mmwlan_ap_sta_status *sta_status, void *arg);
1748
1761enum mmwlan_status mmwlan_ap_get_sta_status(const uint8_t *sta_addr,
1762 struct mmwlan_ap_sta_status *sta_status);
1763
1782{
1786 uint16_t ssid_len;
1813 uint16_t op_class;
1833 uint16_t dtim_period;
1841 uint8_t pri_bw_mhz;
1863 uint8_t max_stas;
1871};
1872
1878#define MMWLAN_AP_ARGS_INIT \
1879 { \
1880 .ssid = { 0 }, \
1881 .ssid_len = 0, \
1882 .bssid = { 0 }, \
1883 .security_type = MMWLAN_OPEN, \
1884 .passphrase = { 0 }, \
1885 .passphrase_len = 0, \
1886 .pmf_mode = MMWLAN_PMF_REQUIRED, \
1887 .sae_owe_ec_groups = { 0 }, \
1888 .op_class = 0, \
1889 .s1g_chan_num = 0, \
1890 .beacon_interval_tus = 0, \
1891 .dtim_period = 0, \
1892 .pri_bw_mhz = 0, \
1893 .pri_1mhz_chan_idx = 0, \
1894 .sta_status_cb = NULL, \
1895 .sta_status_cb_arg = NULL, \
1896 .max_stas = 0, \
1897 .async_start = false, \
1898 }
1899
1917
1933
1944static inline enum mmwlan_status mmwlan_ap_get_bssid(uint8_t *bssid)
1945{
1947}
1948
1964#define MMWLAN_RELAY_DEFAULT_FORWARDING_TABLE_SIZE (64)
1965
1984{
1991
1994};
1995
2001#define MMWLAN_RELAY_ARGS_INIT \
2002 { \
2003 .forwarding_table_size = 0, \
2004 .is_root_node = false, \
2005 }
2006
2020
2031
2046#define MMWLAN_BEACON_VENDOR_IE_MAX_OUI_FILTERS (5)
2047
2056typedef void (
2057 *mmwlan_beacon_vendor_ie_filter_cb_t)(const uint8_t *ies, uint32_t ies_len, void *arg);
2058
2061
2064{
2075 void *cb_arg;
2078 uint8_t n_ouis;
2081};
2082
2096
2099/*
2100 * ---------------------------------------------------------------------------------------------
2101 */
2102
2119void mmwlan_init(void);
2120
2128void mmwlan_deinit(void);
2129
2132/*
2133 * ---------------------------------------------------------------------------------------------
2134 */
2135
2146{
2149};
2150
2157typedef void (*mmwlan_link_state_cb_t)(enum mmwlan_link_state link_state, void *arg);
2158
2179
2182{
2187};
2188
2195typedef void (*mmwlan_vif_state_cb_t)(const struct mmwlan_vif_state *state, void *arg);
2196
2214 mmwlan_vif_state_cb_t callback,
2215 void *arg);
2216
2221{
2223 uint16_t op_class;
2227 uint8_t pri_bw_mhz;
2230};
2231
2242 struct mmwlan_vif_channel_info *info);
2243
2253typedef void (*mmwlan_rx_cb_t)(uint8_t *header,
2254 unsigned header_len,
2255 uint8_t *payload,
2256 unsigned payload_len,
2257 void *arg);
2258
2272
2280typedef void (*mmwlan_rx_pkt_cb_t)(struct mmpkt *mmpkt, void *arg);
2281
2295
2298{
2301
2303 uint8_t tid;
2304
2306 const uint8_t *ta;
2307};
2308
2320typedef void (*mmwlan_rx_pkt_ext_cb_t)(struct mmpkt *mmpkt,
2321 const struct mmwlan_rx_metadata *metadata,
2322 void *arg);
2323
2340 mmwlan_rx_pkt_ext_cb_t callback,
2341 void *arg);
2342
2353
2367struct mmpkt *mmwlan_alloc_mmpkt_for_tx(uint32_t payload_len, uint8_t tid);
2368
2370#define MMWLAN_TX_DEFAULT_TIMEOUT_MS (1000)
2371
2373#define MMWLAN_TX_DEFAULT_QOS_TID (0)
2374
2376#define MMWLAN_MAX_QOS_TID (7)
2377
2393{
2398 uint8_t tid;
2399
2409
2412 const uint8_t *ra;
2413};
2414
2418#define MMWLAN_TX_METADATA_INIT { MMWLAN_TX_DEFAULT_QOS_TID, MMWLAN_VIF_UNSPECIFIED, NULL }
2419
2453enum mmwlan_status mmwlan_tx_pkt(struct mmpkt *pkt, const struct mmwlan_tx_metadata *metadata);
2454
2480static inline enum mmwlan_status mmwlan_tx_tid(const uint8_t *data, unsigned len, uint8_t tid)
2481{
2482 enum mmwlan_status status;
2483 struct mmpkt *pkt;
2484 struct mmpktview *pktview;
2486
2488 if (status != MMWLAN_SUCCESS)
2489 {
2490 return status;
2491 }
2492
2493 pkt = mmwlan_alloc_mmpkt_for_tx(len, tid);
2494 if (pkt == NULL)
2495 {
2496 return MMWLAN_NO_MEM;
2497 }
2498
2499 pktview = mmpkt_open(pkt);
2500 mmpkt_append_data(pktview, data, len);
2501 mmpkt_close(&pktview);
2502
2503 metadata.tid = tid;
2504 return mmwlan_tx_pkt(pkt, &metadata);
2505}
2506
2531static inline enum mmwlan_status mmwlan_tx(const uint8_t *data, unsigned len)
2532{
2533 return mmwlan_tx_tid(data, len, MMWLAN_TX_DEFAULT_QOS_TID);
2534}
2535
2541{
2544};
2545
2558typedef void (*mmwlan_tx_flow_control_cb_t)(enum mmwlan_tx_flow_control_state state, void *arg);
2559
2573
2576{
2578 void *arg;
2580 uint32_t fileid;
2582 uint32_t line;
2583};
2584
2591
2605
2608/*
2609 * ---------------------------------------------------------------------------------------------
2610 */
2611
2622{
2624 uint32_t n_entries;
2626 uint32_t *rate_info;
2628 uint32_t *total_sent;
2630 uint32_t *total_success;
2631};
2632
2649{
2650 MMWLAN_RC_STATS_RATE_INFO_BW_OFFSET = 0,
2651 MMWLAN_RC_STATS_RATE_INFO_RATE_OFFSET = 4,
2652 MMWLAN_RC_STATS_RATE_INFO_GUARD_OFFSET = 8,
2653};
2654
2663
2670
2676{
2678 uint8_t *buf;
2680 uint32_t len;
2681};
2682
2695struct mmwlan_morse_stats *mmwlan_get_morse_stats(uint32_t core_num, bool reset);
2696
2703
2713
2723
2730
2735/*
2736 * ---------------------------------------------------------------------------------------------
2737 */
2738
2749{
2763
2766{
2773};
2774
2777{
2782};
2783
2797 enum mmwlan_bw bandwidth_override,
2798 enum mmwlan_gi gi_override);
2799
2818 uint32_t command_len,
2819 uint8_t *response,
2820 uint32_t *response_len);
2821
2824#ifdef __cplusplus
2825}
2826#endif
2827
struct mmwlan_beacon_vendor_ie_filter filter
Filter structure used when calling mmwlan_update_beacon_vendor_ie_filter().
static void mmpkt_append_data(struct mmpktview *view, const uint8_t *data, uint32_t len)
Appends the given data to the data already in the mmpkt.
Definition: mmpkt.h:462
static void mmpkt_close(struct mmpktview **view)
Close the given view.
Definition: mmpkt.h:266
static struct mmpktview * mmpkt_open(struct mmpkt *mmpkt)
Open a view of the given mmpkt.
Definition: mmpkt.h:251
mmwlan_ap_sta_state
Enumeration of STA states.
Definition: mmwlan.h:1711
enum mmwlan_status mmwlan_ap_disable(void)
Disable AP mode.
enum mmwlan_status mmwlan_ap_get_sta_status(const uint8_t *sta_addr, struct mmwlan_ap_sta_status *sta_status)
Gets the STA status of the STA with the given MAC address.
enum mmwlan_status mmwlan_ap_enable(const struct mmwlan_ap_args *args)
Enable AP mode.
void(* mmwlan_ap_sta_status_cb_t)(const struct mmwlan_ap_sta_status *sta_status, void *arg)
Type definition for callback to be invoked on change in status of a connected STA.
Definition: mmwlan.h:1747
static enum mmwlan_status mmwlan_ap_get_bssid(uint8_t *bssid)
Gets the BSSID address of the AP, if it is active.
Definition: mmwlan.h:1944
@ MMWLAN_AP_STA_AUTHORIZED
The STA is fully connected and authorized for data transmission.
Definition: mmwlan.h:1719
@ MMWLAN_AP_STA_ASSOCIATED
The STA is associated but not yet authorized for data transmission.
Definition: mmwlan.h:1717
@ MMWLAN_AP_STA_UNKNOWN
The STA is not known.
Definition: mmwlan.h:1713
@ MMWLAN_AP_STA_AUTHENTICATED
The STA is authenticated but not associated.
Definition: mmwlan.h:1715
enum mmwlan_status mmwlan_update_beacon_vendor_ie_filter(const struct mmwlan_beacon_vendor_ie_filter *filter)
Function to update the filter used to pass beacon back.
#define MMWLAN_BEACON_VENDOR_IE_MAX_OUI_FILTERS
Max number of OUIs supported in vendor IE OUI filter, mmwlan_beacon_vendor_ie_filter.
Definition: mmwlan.h:2046
void(* mmwlan_beacon_vendor_ie_filter_cb_t)(const uint8_t *ies, uint32_t ies_len, void *arg)
Beacon vendor ie filter callback function prototype.
Definition: mmwlan.h:2057
uint8_t mmwlan_oui_t[MMWLAN_OUI_SIZE]
24-bit OUI type.
Definition: mmwlan.h:2060
enum mmwlan_status mmwlan_get_version(struct mmwlan_version *version)
Retrieve version information from morselib and the connected Morse transceiver.
static enum mmwlan_status mmwlan_get_mac_addr(uint8_t *mac_addr)
Gets the MAC address of the STA interface.
Definition: mmwlan.h:688
enum mmwlan_status mmwlan_boot(const struct mmwlan_boot_args *args)
Boot the Morse Micro transceiver and leave it in an idle state.
enum mmwlan_status mmwlan_get_vif_mac_addr(enum mmwlan_vif vif, uint8_t *mac_addr)
Gets the MAC address of the given interface.
enum mmwlan_status mmwlan_set_ampdu_enabled(bool ampdu_enabled)
Sets whether or not Aggregated MAC Protocol Data Unit (A-MPDU) support is enabled.
enum mmwlan_status mmwlan_set_sgi_enabled(bool sgi_enabled)
Sets whether or not Short Guard Interval (SGI) support is enabled.
#define MMWLAN_BCF_BOARD_DESC_MAXLEN
Maximum length of a BCF board description string (excluding null terminator).
Definition: mmwlan.h:344
enum mmwlan_status mmwlan_set_control_response_preamble_1mhz_out_en(bool enabled)
Enables the 1MHz control response override.
enum mmwlan_status mmwlan_shutdown(void)
Perform a clean shutdown of the Morse Micro transceiver, including cleanly disconnecting from a conne...
#define MMWLAN_BCF_BUILD_VERSION_MAXLEN
Maximum length of a BCF build version string (excluding null terminator).
Definition: mmwlan.h:346
enum mmwlan_status mmwlan_get_bcf_metadata(struct mmwlan_bcf_metadata *metadata)
Read the metadata from the board configuration file (BCF).
mmwlan_mcs10_mode
Enumeration of configuration states for MCS10 behavior.
Definition: mmwlan.h:532
enum mmwlan_status mmwlan_set_health_check_interval(uint32_t min_interval_ms, uint32_t max_interval_ms)
Specify the upper and lower bound for the periodic health check interval.
enum mmwlan_status mmwlan_set_subbands_enabled(bool subbands_enabled)
Sets whether or not sub-band support is enabled for transmit.
enum mmwlan_status mmwlan_set_fragment_threshold(unsigned fragment_threshold)
Set the Fragmentation threshold.
enum mmwlan_status mmwlan_override_max_tx_power(uint16_t tx_power_dbm)
Override the maximum TX power.
#define MMWLAN_CHIP_ID_STRING_MAXLEN
Maximum length of the chip id string.
Definition: mmwlan.h:316
enum mmwlan_status mmwlan_set_rts_threshold(unsigned rts_threshold)
Set the RTS threshold.
enum mmwlan_status mmwlan_set_default_qos_queue_params(const struct mmwlan_qos_queue_params *params, size_t count)
Updates the default QoS queue configuration to the given values.
#define MMWLAN_FW_VERSION_MAXLEN
Maximum length of the firmware version string.
Definition: mmwlan.h:314
#define MMWLAN_MORSELIB_VERSION_MAXLEN
Maximum length of the Morselib version string.
Definition: mmwlan.h:312
enum mmwlan_status mmwlan_set_mcs10_mode(enum mmwlan_mcs10_mode mcs10_mode)
Configure the rate adaptation behavior around selecting MCS10.
@ MMWLAN_MCS10_MODE_AUTO
Use MCS10 on retries instead of MCS 0 if the bandwidth is 1 MHz.
Definition: mmwlan.h:538
@ MMWLAN_MCS10_MODE_FORCED
Always use MCS10 instead of MCS 0 if the bandwidth is 1 MHz.
Definition: mmwlan.h:536
@ MMWLAN_MCS10_MODE_DISABLED
MCS10 is disabled.
Definition: mmwlan.h:534
static enum mmwlan_status mmwlan_tx_tid(const uint8_t *data, unsigned len, uint8_t tid)
Transmit the given packet using the given QoS Traffic ID (TID).
Definition: mmwlan.h:2480
enum mmwlan_status mmwlan_register_rx_cb(mmwlan_rx_cb_t callback, void *arg)
Register a receive callback.
enum mmwlan_status mmwlan_register_rx_pkt_ext_cb(enum mmwlan_vif vif, mmwlan_rx_pkt_ext_cb_t callback, void *arg)
Register an extended receive callback which may consume an mmpkt.
enum mmwlan_status mmwlan_get_vif_channel_info(enum mmwlan_vif vif, struct mmwlan_vif_channel_info *info)
Gets the channel information for the specified VIF.
void mmwlan_register_fatal_error_handler(mmwlan_fatal_error_handler_t handler, void *arg)
Register a fatal error handler to be called in the event of an unrecoverable error.
void(* mmwlan_vif_state_cb_t)(const struct mmwlan_vif_state *state, void *arg)
Prototype for VIF state change callbacks.
Definition: mmwlan.h:2195
enum mmwlan_status mmwlan_tx_wait_until_ready(uint32_t timeout_ms)
Blocks until the transmit path is ready for transmit.
enum mmwlan_status mmwlan_register_rx_pkt_cb(mmwlan_rx_pkt_cb_t callback, void *arg)
Register a receive callback which consumes an mmpkt.
void(* mmwlan_link_state_cb_t)(enum mmwlan_link_state link_state, void *arg)
Prototype for link state change callbacks.
Definition: mmwlan.h:2157
void(* mmwlan_fatal_error_handler_t)(struct mmwlan_fatal_error_args *args)
Function type of fatal error handler.
Definition: mmwlan.h:2590
#define MMWLAN_TX_DEFAULT_QOS_TID
Default QoS Traffic ID (TID) to use for transmit (mmwlan_tx()).
Definition: mmwlan.h:2373
enum mmwlan_status mmwlan_register_link_state_cb(mmwlan_link_state_cb_t callback, void *arg)
Register a link status callback for use in STA mode.
enum mmwlan_status mmwlan_register_tx_flow_control_cb(mmwlan_tx_flow_control_cb_t cb, void *arg)
Register a transmit flow control callback.
mmwlan_tx_flow_control_state
Enumeration of states that can be returned by the transmit flow control callback (as registered by mm...
Definition: mmwlan.h:2541
mmwlan_link_state
Enumeration of link states.
Definition: mmwlan.h:2146
enum mmwlan_status mmwlan_register_vif_state_cb(enum mmwlan_vif vif, mmwlan_vif_state_cb_t callback, void *arg)
Register a VIF state callback.
struct mmpkt * mmwlan_alloc_mmpkt_for_tx(uint32_t payload_len, uint8_t tid)
Allocate an mmpkt data structure for transmission with at least enough space for the given payload le...
void(* mmwlan_rx_cb_t)(uint8_t *header, unsigned header_len, uint8_t *payload, unsigned payload_len, void *arg)
Receive data packet callback function.
Definition: mmwlan.h:2253
void(* mmwlan_tx_flow_control_cb_t)(enum mmwlan_tx_flow_control_state state, void *arg)
Transmit flow control callback function type.
Definition: mmwlan.h:2558
static enum mmwlan_status mmwlan_tx(const uint8_t *data, unsigned len)
Transmit the given packet using MMWLAN_TX_DEFAULT_QOS_TID.
Definition: mmwlan.h:2531
enum mmwlan_status mmwlan_tx_pkt(struct mmpkt *pkt, const struct mmwlan_tx_metadata *metadata)
Transmit the given packet.
#define MMWLAN_TX_METADATA_INIT
Initializer for mmwlan_tx_metadata.
Definition: mmwlan.h:2418
void(* mmwlan_rx_pkt_ext_cb_t)(struct mmpkt *mmpkt, const struct mmwlan_rx_metadata *metadata, void *arg)
Extended receive data packet callback function, consuming an mmpkt.
Definition: mmwlan.h:2320
void(* mmwlan_rx_pkt_cb_t)(struct mmpkt *mmpkt, void *arg)
Receive data packet callback function, consuming an mmpkt.
Definition: mmwlan.h:2280
#define MMWLAN_TX_DEFAULT_TIMEOUT_MS
Default transmit timeout.
Definition: mmwlan.h:2370
@ MMWLAN_TX_READY
Transmit data path ready for packets (not paused).
Definition: mmwlan.h:2542
@ MMWLAN_TX_PAUSED
Transmit data path paused (blocked).
Definition: mmwlan.h:2543
@ MMWLAN_LINK_UP
The link is up.
Definition: mmwlan.h:2148
@ MMWLAN_LINK_DOWN
The link is down.
Definition: mmwlan.h:2147
enum mmwlan_status mmwlan_dpp_stop(void)
Function to stop the DPP process.
mmwlan_dpp_pb_result
Enumeration of results for MMWLAN_DPP_EVT_PB_RESULT.
Definition: mmwlan.h:1599
enum mmwlan_status mmwlan_dpp_start(const struct mmwlan_dpp_args *args)
Function to start the Device Provisioning Protocol (DPP) process.
mmwlan_dpp_event
Enumeration of DPP events.
Definition: mmwlan.h:1588
@ MMWLAN_DPP_PB_RESULT_SUCCESS
DPP push button process was successful.
Definition: mmwlan.h:1601
@ MMWLAN_DPP_PB_RESULT_SESSION_OVERLAP
A session overlap occurred during the DPP push button process.
Definition: mmwlan.h:1605
@ MMWLAN_DPP_PB_RESULT_ERROR
An error occurred during the DPP push button process.
Definition: mmwlan.h:1603
@ MMWLAN_DPP_EVT_PB_RESULT
DPP push button result.
Definition: mmwlan.h:1590
void mmwlan_deinit(void)
Deinitialize the MMWLAN subsystem, freeing any allocated memory.
void mmwlan_init(void)
Initialize the MMWLAN subsystem.
enum mmwlan_status mmwlan_get_duty_cycle_stats(struct mmwlan_duty_cycle_stats *stats)
Retrieve the transmit duty cycle configuration and statistics.
static const struct mmwlan_s1g_channel_list * mmwlan_lookup_regulatory_domain(const struct mmwlan_regulatory_db *db, const char *country_code)
Look up the given country code in the regulatory database and return the matching channel list if fou...
Definition: mmwlan.h:214
mmwlan_duty_cycle_mode
Enumeration of Duty Cycle modes.
Definition: mmwlan.h:257
enum mmwlan_status mmwlan_set_channel_list(const struct mmwlan_s1g_channel_list *channel_list)
Set the list of channels that are supported by the regulatory domain in which the device resides.
enum mmwlan_status mmwlan_set_duty_cycle_mode(enum mmwlan_duty_cycle_mode duty_cycle_mode)
Configure the duty cycle behavior for air time distribution.
#define MMWLAN_COUNTRY_CODE_LEN
Length of the two character country code string (null-terminated).
Definition: mmwlan.h:179
@ MMWLAN_DUTY_CYCLE_MODE_SPREAD
Duty cycle air time evenly spread.
Definition: mmwlan.h:259
@ MMWLAN_DUTY_CYCLE_MODE_BURST
Duty cycle air time available in burst.
Definition: mmwlan.h:261
enum mmwlan_status mmwlan_relay_enable(const struct mmwlan_relay_args *args)
Enable S1G Relay mode.
enum mmwlan_status mmwlan_relay_disable(void)
Disable S1G Relay mode.
mmwlan_scan_state
Enumeration of states in Scan mode.
Definition: mmwlan.h:808
void(* mmwlan_scan_rx_cb_t)(const struct mmwlan_scan_result *result, void *arg)
mmwlan scan rx callback function prototype.
Definition: mmwlan.h:738
enum mmwlan_status mmwlan_scan_abort(void)
Abort in progress or pending scans.
enum mmwlan_status mmwlan_set_scan_config(const struct mmwlan_scan_config *config)
Update the scan configuration with the given settings.
void(* mmwlan_scan_complete_cb_t)(enum mmwlan_scan_state scan_state, void *arg)
mmwlan scan complete callback function prototype.
Definition: mmwlan.h:819
enum mmwlan_status mmwlan_scan_request(const struct mmwlan_scan_req *scan_req)
Request a scan.
@ MMWLAN_SCAN_SUCCESSFUL
Scan was successful and all channels were scanned.
Definition: mmwlan.h:810
@ MMWLAN_SCAN_RUNNING
Scanning in progress.
Definition: mmwlan.h:815
@ MMWLAN_SCAN_TERMINATED
Scan was incomplete.
Definition: mmwlan.h:813
void mmwlan_free_rc_stats(struct mmwlan_rc_stats *stats)
Free a mmwlan_rc_stats structure that was allocated with mmwlan_get_rc_stats().
mmwlan_rc_stats_rate_info_offsets
Enumeration defined offsets into the bit field of rate information (rate_info in mmwlan_rc_stats).
Definition: mmwlan.h:2649
struct mmwlan_rc_stats * mmwlan_get_rc_stats(void)
Retrieves WLAN rate control statistics.
struct mmwlan_morse_stats * mmwlan_get_morse_stats(uint32_t core_num, bool reset)
Retrieves statistics from the Morse transceiver.
enum mmwlan_status mmwlan_clear_umac_stats(void)
Clear all current values of the UMAC statistics.
enum mmwlan_status mmwlan_get_umac_stats(struct mmwlan_stats_umac_data *stats_dest)
Gets the current values of the UMAC statistics.
void mmwlan_free_morse_stats(struct mmwlan_morse_stats *stats)
Frees a mmwlan_morse_stats instance that was returned by mmwlan_get_morse_stats().
enum mmwlan_status mmwlan_set_listen_interval(uint16_t interval)
Sets the listen interval to be indicated in the association response frame.
int32_t mmwlan_get_rssi(void)
Gets the RSSI measured from the AP.
void(* mmwlan_sta_event_cb_t)(const struct mmwlan_sta_event_cb_args *sta_event, void *arg)
STA event callback prototype.
Definition: mmwlan.h:1057
mmwlan_sta_event
Enumeration of STA events.
Definition: mmwlan.h:1022
mmwlan_sta_state
Enumeration of states in STA mode.
Definition: mmwlan.h:1006
enum mmwlan_sta_state mmwlan_get_sta_state(void)
Gets the current WLAN STA state.
void(* mmwlan_sta_status_cb_t)(enum mmwlan_sta_state sta_state)
STA status callback function prototype.
Definition: mmwlan.h:1013
enum mmwlan_status mmwlan_get_bssid(uint8_t *bssid)
Gets the BSSID of the AP to which the STA is associated.
mmwlan_station_type
Enumeration of S1G non-AP STA types.
Definition: mmwlan.h:997
enum mmwlan_status mmwlan_set_power_save_mode(enum mmwlan_ps_mode mode)
Sets whether or not the 802.11 power save is enabled.
enum mmwlan_status mmwlan_twt_add_configuration(const struct mmwlan_twt_config_args *twt_config_args)
Add configurations for Target Wake Time (TWT).
enum mmwlan_status mmwlan_sta_enable(const struct mmwlan_sta_args *args, mmwlan_sta_status_cb_t sta_status_cb)
Enable station mode.
enum mmwlan_status mmwlan_set_dynamic_ps_timeout(uint32_t timeout_ms)
Sets the time after network activity before the STA will notify the AP that it will go to sleep using...
mmwlan_twt_setup_command
Enumeration of Target Wake Time (TWT) setup commands.
Definition: mmwlan.h:1341
mmwlan_4addr_mode
Enumeration of Linux 4-address mode settings.
Definition: mmwlan.h:977
mmwlan_ps_mode
Enumeration of supported 802.11 power save modes.
Definition: mmwlan.h:986
uint16_t mmwlan_get_aid(void)
Gets the station's AID.
mmwlan_twt_mode
Enumeration of Target Wake Time (TWT) modes.
Definition: mmwlan.h:1330
enum mmwlan_status mmwlan_set_non_tim_mode_enabled(bool non_tim_mode_enabled)
Sets whether or not non-TIM mode support is enabled.
enum mmwlan_status mmwlan_sta_disable(void)
Disable station mode.
mmwlan_cac_mode
Enumeration of Centralized Authentication Control (CAC) modes.
Definition: mmwlan.h:968
@ MMWLAN_STA_EVT_CTRL_PORT_OPEN
The Supplicant IEEE 802.1X Controlled Port is now open meaning that the STA is fully authenticated an...
Definition: mmwlan.h:1039
@ MMWLAN_STA_EVT_SCAN_ABORT
The STA has aborted a scan early.
Definition: mmwlan.h:1028
@ MMWLAN_STA_EVT_CTRL_PORT_CLOSED
The Supplicant IEEE 802.1X Controlled Port is now closed.
Definition: mmwlan.h:1041
@ MMWLAN_STA_EVT_SCAN_COMPLETE
The STA has finished a scan.
Definition: mmwlan.h:1026
@ MMWLAN_STA_EVT_SCAN_REQUEST
The STA is starting a scan.
Definition: mmwlan.h:1024
@ MMWLAN_STA_EVT_AUTH_REQUEST
The STA is sending an authentication request to the AP.
Definition: mmwlan.h:1030
@ MMWLAN_STA_EVT_ASSOC_REQUEST
The STA is sending an association request to the AP.
Definition: mmwlan.h:1032
@ MMWLAN_STA_EVT_DEAUTH_TX
The STA is sending a de-authorization request to the AP.
Definition: mmwlan.h:1034
@ MMWLAN_TWT_SETUP_SUGGEST
TWT setup suggest command.
Definition: mmwlan.h:1345
@ MMWLAN_TWT_SETUP_REQUEST
TWT setup request command.
Definition: mmwlan.h:1343
@ MMWLAN_TWT_SETUP_DEMAND
TWT setup demand command.
Definition: mmwlan.h:1347
@ MMWLAN_4ADDR_MODE_ENABLED
4 Address Mode enabled
Definition: mmwlan.h:981
@ MMWLAN_4ADDR_MODE_DISABLED
4 Address Mode disabled
Definition: mmwlan.h:979
@ MMWLAN_PS_DISABLED
Power save disabled.
Definition: mmwlan.h:988
@ MMWLAN_PS_ENABLED
Power save enabled.
Definition: mmwlan.h:990
@ MMWLAN_TWT_DISABLED
TWT disabled.
Definition: mmwlan.h:1332
@ MMWLAN_TWT_RESPONDER
TWT enabled as a responder.
Definition: mmwlan.h:1336
@ MMWLAN_TWT_REQUESTER
TWT enabled as a requester.
Definition: mmwlan.h:1334
@ MMWLAN_CAC_DISABLED
CAC disabled.
Definition: mmwlan.h:970
@ MMWLAN_CAC_ENABLED
CAC enabled.
Definition: mmwlan.h:972
enum mmwlan_status mmwlan_ate_override_rate_control(enum mmwlan_mcs tx_rate_override, enum mmwlan_bw bandwidth_override, enum mmwlan_gi gi_override)
Enable/disable override of rate control parameters.
mmwlan_mcs
Enumeration of MCS rates.
Definition: mmwlan.h:2749
enum mmwlan_status mmwlan_ate_execute_command(uint8_t *command, uint32_t command_len, uint8_t *response, uint32_t *response_len)
Execute a test/debug command.
mmwlan_bw
Enumeration of bandwidths.
Definition: mmwlan.h:2766
mmwlan_gi
Enumeration of guard intervals.
Definition: mmwlan.h:2777
@ MMWLAN_MCS_7
MCS7.
Definition: mmwlan.h:2758
@ MMWLAN_MCS_3
MCS3.
Definition: mmwlan.h:2754
@ MMWLAN_MCS_8
MCS8.
Definition: mmwlan.h:2759
@ MMWLAN_MCS_NONE
Use-case specific special value.
Definition: mmwlan.h:2750
@ MMWLAN_MCS_9
MCS9.
Definition: mmwlan.h:2760
@ MMWLAN_MCS_0
MCS0.
Definition: mmwlan.h:2751
@ MMWLAN_MCS_4
MCS4.
Definition: mmwlan.h:2755
@ MMWLAN_MCS_6
MCS6.
Definition: mmwlan.h:2757
@ MMWLAN_MCS_MAX
Maximum supported MCS rate.
Definition: mmwlan.h:2761
@ MMWLAN_MCS_5
MCS5.
Definition: mmwlan.h:2756
@ MMWLAN_MCS_2
MCS2.
Definition: mmwlan.h:2753
@ MMWLAN_MCS_1
MCS1.
Definition: mmwlan.h:2752
@ MMWLAN_BW_NONE
Use-case specific special value.
Definition: mmwlan.h:2767
@ MMWLAN_BW_2MHZ
2 MHz bandwidth
Definition: mmwlan.h:2769
@ MMWLAN_BW_4MHZ
4 MHz bandwidth
Definition: mmwlan.h:2770
@ MMWLAN_BW_MAX
Maximum supported bandwidth.
Definition: mmwlan.h:2772
@ MMWLAN_BW_8MHZ
8 MHz bandwidth
Definition: mmwlan.h:2771
@ MMWLAN_BW_1MHZ
1 MHz bandwidth
Definition: mmwlan.h:2768
@ MMWLAN_GI_MAX
Maximum valid value of this enum.
Definition: mmwlan.h:2781
@ MMWLAN_GI_LONG
Long guard interval.
Definition: mmwlan.h:2780
@ MMWLAN_GI_SHORT
Short guard interval.
Definition: mmwlan.h:2779
@ MMWLAN_GI_NONE
Use-case specific special value.
Definition: mmwlan.h:2778
static enum mmwlan_status mmwlan_set_wnm_sleep_enabled(bool wnm_sleep_enabled)
Sets whether WNM sleep mode is enabled.
Definition: mmwlan.h:1561
#define MMWLAN_SET_WNM_SLEEP_ENABLED_ARGS_INIT
Initializer for mmwlan_set_wnm_sleep_enabled_args.
Definition: mmwlan.h:1505
enum mmwlan_status mmwlan_set_wnm_sleep_enabled_ext(const struct mmwlan_set_wnm_sleep_enabled_args *args)
Sets extended WNM sleep mode.
mmwlan_status
Enumeration of status return codes.
Definition: mmwlan.h:50
#define MMWLAN_PASSPHRASE_MAXLEN
Maximum allowable length of a passphrase when connecting to an AP.
Definition: mmwlan.h:93
mmwlan_pmf_mode
Enumeration of Protected Management Frame (PMF) modes (802.11w).
Definition: mmwlan.h:130
#define MMWLAN_MAX_EC_GROUPS
Maximum allowable number of EC Groups.
Definition: mmwlan.h:99
mmwlan_security_type
Enumeration of supported security types.
Definition: mmwlan.h:119
#define MMWLAN_OUI_SIZE
Size of an 802.11 OUI element in octets.
Definition: mmwlan.h:102
#define MMWLAN_SSID_MAXLEN
Maximum allowable length of an SSID.
Definition: mmwlan.h:90
#define MMWLAN_MAC_ADDR_LEN
Length of a WLAN MAC address.
Definition: mmwlan.h:96
mmwlan_vif
Enumeration of Virtual Interfaces supported by the MMWLAN API.
Definition: mmwlan.h:108
@ MMWLAN_INVALID_ARGUMENT
The operation failed due to an invalid argument.
Definition: mmwlan.h:56
@ MMWLAN_NOT_RUNNING
Indicates that the operation failed because the system was not running (e.g., the device was not boot...
Definition: mmwlan.h:75
@ MMWLAN_TIMED_OUT
Failed due to timeout.
Definition: mmwlan.h:65
@ MMWLAN_SHUTDOWN_BLOCKED
Used to indicate that a call to mmwlan_sta_disable() did not shutdown the transceiver.
Definition: mmwlan.h:68
@ MMWLAN_SUCCESS
The operation was successful.
Definition: mmwlan.h:52
@ MMWLAN_NOT_SUPPORTED
Support for the given functionality is not supported by the build time configuration or has not yet b...
Definition: mmwlan.h:84
@ MMWLAN_COMMAND_ERROR
The MM-chip reported an error when executing a command.
Definition: mmwlan.h:86
@ MMWLAN_VIF_ERROR
Indicates that the specified VIF is not active or that no VIF was specified and a VIF could not be au...
Definition: mmwlan.h:81
@ MMWLAN_CHANNEL_INVALID
Attempted to tune to a channel that was not in the regulatory database or not supported.
Definition: mmwlan.h:70
@ MMWLAN_NO_MEM
Failed due to memory allocation failure.
Definition: mmwlan.h:63
@ MMWLAN_CHANNEL_LIST_NOT_SET
Unable to proceed because channel list has not been set.
Definition: mmwlan.h:61
@ MMWLAN_ERROR
The operation failed with an unspecified error.
Definition: mmwlan.h:54
@ MMWLAN_NOT_INITIALIZED
Indicates that the operation failed because MMWLAN has not been initialized, see mmwlan_init()
Definition: mmwlan.h:78
@ MMWLAN_UNAVAILABLE
Functionality is temporarily unavailable.
Definition: mmwlan.h:58
@ MMWLAN_NOT_FOUND
The request could not be completed because the given resource was not found.
Definition: mmwlan.h:72
@ MMWLAN_PMF_DISABLED
No protected management frames.
Definition: mmwlan.h:134
@ MMWLAN_PMF_REQUIRED
Protected management frames must be used.
Definition: mmwlan.h:132
@ MMWLAN_OPEN
Open (no security)
Definition: mmwlan.h:121
@ MMWLAN_SAE
Simultaneous Authentication of Equals (SAE)
Definition: mmwlan.h:125
@ MMWLAN_OWE
Opportunistic Wireless Encryption (OWE)
Definition: mmwlan.h:123
@ MMWLAN_VIF_AP
AP VIF.
Definition: mmwlan.h:114
@ MMWLAN_VIF_STA
STA VIF.
Definition: mmwlan.h:112
@ MMWLAN_VIF_UNSPECIFIED
VIF is unspecified.
Definition: mmwlan.h:110
Core mmpkt data structure.
Definition: mmpkt.h:88
Arguments data structure for mmwlan_ap_enable().
Definition: mmwlan.h:1782
uint16_t beacon_interval_tus
The Beacon period in units of TUs.
Definition: mmwlan.h:1827
void * sta_status_cb_arg
Optional opaque argument to be passed to sta_status_cb.
Definition: mmwlan.h:1856
int sae_owe_ec_groups[MMWLAN_MAX_EC_GROUPS]
Preference list of enabled elliptic curve groups for SAE and OWE.
Definition: mmwlan.h:1805
uint16_t s1g_chan_num
S1G channel number of the channel to use.
Definition: mmwlan.h:1821
uint8_t pri_1mhz_chan_idx
Index of the primary 1 Mhz channel within the operating channel.
Definition: mmwlan.h:1846
enum mmwlan_pmf_mode pmf_mode
Protected Management Frame mode to use (802.11w)
Definition: mmwlan.h:1800
uint16_t op_class
Operating Class to use (S1G or Global).
Definition: mmwlan.h:1813
uint8_t pri_bw_mhz
Bandwidth to use for the primary channel.
Definition: mmwlan.h:1841
bool async_start
Whether the function should return immediately instead of waiting for the AP interface to be fully st...
Definition: mmwlan.h:1870
uint8_t max_stas
Maximum number of stations that can connect to the AP simultaneously.
Definition: mmwlan.h:1863
uint16_t ssid_len
Length of the SSID.
Definition: mmwlan.h:1786
uint8_t bssid[MMWLAN_MAC_ADDR_LEN]
Optional BSSID of the AP.
Definition: mmwlan.h:1792
uint8_t ssid[MMWLAN_SSID_MAXLEN]
SSID of the AP.
Definition: mmwlan.h:1784
mmwlan_ap_sta_status_cb_t sta_status_cb
Optional callback to be invoked when the status of a connected STA changes.
Definition: mmwlan.h:1851
char passphrase[MMWLAN_PASSPHRASE_MAXLEN+1]
Passphrase (only used if security_type is MMWLAN_SAE, otherwise ignored.
Definition: mmwlan.h:1796
enum mmwlan_security_type security_type
Type of security to use.
Definition: mmwlan.h:1794
uint16_t passphrase_len
Length of passphrase.
Definition: mmwlan.h:1798
uint16_t dtim_period
The Delivery Traffic Indication Map (DTIM) interval in beacons.
Definition: mmwlan.h:1833
Data structure for communicating STA status information for stations connected to an AP.
Definition: mmwlan.h:1729
uint16_t aid
The AID of the STA.
Definition: mmwlan.h:1733
enum mmwlan_ap_sta_state state
The current state of the STA.
Definition: mmwlan.h:1731
uint8_t mac_addr[MMWLAN_MAC_ADDR_LEN]
The MAC address of the STA.
Definition: mmwlan.h:1735
Board configuration file (BCF) metadata.
Definition: mmwlan.h:350
char board_desc[MMWLAN_BCF_BOARD_DESC_MAXLEN+1]
Board description string.
Definition: mmwlan.h:368
uint8_t patch
Patch version field.
Definition: mmwlan.h:359
struct mmwlan_bcf_metadata::@1 version
BCF semantic version.
uint16_t major
Major version field.
Definition: mmwlan.h:355
uint8_t minor
Minor version field.
Definition: mmwlan.h:357
char build_version[MMWLAN_BCF_BUILD_VERSION_MAXLEN+1]
Build version string.
Definition: mmwlan.h:376
Structure for storing beacon vendor ie filter parameter.
Definition: mmwlan.h:2064
void * cb_arg
Opaque argument to be passed to the callbacks.
Definition: mmwlan.h:2075
mmwlan_beacon_vendor_ie_filter_cb_t cb
Callback that will be executed upon reception of a beacon containing a Vendor Specific information el...
Definition: mmwlan.h:2073
mmwlan_oui_t ouis[MMWLAN_BEACON_VENDOR_IE_MAX_OUI_FILTERS]
List of OUIs to filter on.
Definition: mmwlan.h:2080
uint8_t n_ouis
Number of OUIs contained within ouis.
Definition: mmwlan.h:2078
Arguments data structure for mmwlan_boot().
Definition: mmwlan.h:610
const uint8_t * sta_mac_addr_override
Optional override for the MAC address that will be used in STA mode and when scanning.
Definition: mmwlan.h:615
Structure to hold the arguments used for the DPP process.
Definition: mmwlan.h:1644
void(* dpp_event_cb)(const struct mmwlan_dpp_cb_args *dpp_event, void *arg)
DPP event callback prototype.
Definition: mmwlan.h:1646
void * dpp_event_cb_arg
Optional user argument that will be passed back to the DPP event callback.
Definition: mmwlan.h:1648
Structure passed back when a DPP event occurs.
Definition: mmwlan.h:1615
union mmwlan_dpp_cb_args::@2 args
Union of arguments for DPP events.
const uint8_t * ssid
SSID of the AP to connect to.
Definition: mmwlan.h:1628
uint16_t ssid_len
Length of the SSID.
Definition: mmwlan.h:1630
const char * passphrase
Passphrase, NULL terminated.
Definition: mmwlan.h:1632
enum mmwlan_dpp_pb_result result
Result of DPP push button.
Definition: mmwlan.h:1626
struct mmwlan_dpp_cb_args::@2::@3 pb_result
Argument for MMWLAN_DPP_EVT_PB_RESULT event.
enum mmwlan_dpp_event event
The DPP event that has occurred.
Definition: mmwlan.h:1617
Duty cycle configuration and statistics.
Definition: mmwlan.h:281
uint32_t burst_window_duration_us
Burst window duration (us) - applicable in burst mode only.
Definition: mmwlan.h:289
uint32_t burst_airtime_remaining_us
Airtime remaining (us) - applicable in burst mode only.
Definition: mmwlan.h:287
uint32_t duty_cycle
Target duty cycle in 100th of a %, i.e.
Definition: mmwlan.h:283
enum mmwlan_duty_cycle_mode mode
Configured duty cycle mode, see mmwlan_duty_cycle_mode.
Definition: mmwlan.h:285
Arguments for fatal error handler.
Definition: mmwlan.h:2576
void * arg
Context to be passed to fatal error handler.
Definition: mmwlan.h:2578
uint32_t fileid
ID of file in which fatal error was detected.
Definition: mmwlan.h:2580
uint32_t line
Line number at which fatal error was detected.
Definition: mmwlan.h:2582
Data structure used to represent an opaque buffer containing Morse statistics.
Definition: mmwlan.h:2676
uint8_t * buf
Buffer containing the stats.
Definition: mmwlan.h:2678
uint32_t len
Length of stats in buf.
Definition: mmwlan.h:2680
Structure for storing QoS queue parameters
Definition: mmwlan.h:495
uint8_t aci
Access Category Index [0..3].
Definition: mmwlan.h:497
uint32_t txop_max_us
Maximum burst time in microseconds, 0 meaning disabled.
Definition: mmwlan.h:505
uint16_t cw_min
Minimum Contention Window.
Definition: mmwlan.h:501
uint8_t aifs
Arbitration Inter-frame Space [2..255].
Definition: mmwlan.h:499
uint16_t cw_max
Maximum Contention Window.
Definition: mmwlan.h:503
Rate control statistics data structure.
Definition: mmwlan.h:2622
uint32_t * total_success
Total successes for each rate table entry.
Definition: mmwlan.h:2630
uint32_t n_entries
The number of rate table entries.
Definition: mmwlan.h:2624
uint32_t * rate_info
Rate info for each rate table entry.
Definition: mmwlan.h:2626
uint32_t * total_sent
Total number of packets sent for each rate table entry.
Definition: mmwlan.h:2628
Regulatory database data structure.
Definition: mmwlan.h:197
unsigned num_domains
Number of regulatory domains in the database.
Definition: mmwlan.h:199
const struct mmwlan_s1g_channel_list ** domains
The regulatory domain data.
Definition: mmwlan.h:202
Arguments data structure for mmwlan_relay_enable().
Definition: mmwlan.h:1984
bool is_root_node
Indicates whether this is the root node.
Definition: mmwlan.h:1993
unsigned forwarding_table_size
Maximum number of entries in the forward table.
Definition: mmwlan.h:1990
Receive data packet metadata.
Definition: mmwlan.h:2298
uint8_t tid
QoS Traffic ID.
Definition: mmwlan.h:2303
enum mmwlan_vif vif
The virtual interface that the packet was received on.
Definition: mmwlan.h:2300
const uint8_t * ta
Transmitter Address (TA) of the received packet.
Definition: mmwlan.h:2306
A list of S1G channels supported by a given regulatory domain.
Definition: mmwlan.h:183
unsigned num_channels
The number of channels in the list.
Definition: mmwlan.h:187
uint8_t country_code[MMWLAN_COUNTRY_CODE_LEN]
Two character country code (null-terminated) used to identify the regulatory domain.
Definition: mmwlan.h:185
const struct mmwlan_s1g_channel * channels
The channel data.
Definition: mmwlan.h:189
Regulatory domain information about an S1G channel.
Definition: mmwlan.h:153
int8_t max_tx_eirp_dbm
Maximum transmit power (EIRP in dBm).
Definition: mmwlan.h:169
uint32_t airtime_min_us
The minimum packet airtime duration to trigger spacing (in microseconds).
Definition: mmwlan.h:173
int16_t s1g_operating_class
S1G operating class.
Definition: mmwlan.h:163
int16_t global_operating_class
Global operating class.
Definition: mmwlan.h:161
uint32_t airtime_max_us
The maximum allowable packet airtime duration (in microseconds).
Definition: mmwlan.h:175
uint32_t centre_freq_hz
Center frequency of the channel (in Hz).
Definition: mmwlan.h:155
bool duty_cycle_omit_ctrl_resp
Boolean indicating whether to omit control response frames from duty cycle.
Definition: mmwlan.h:159
uint16_t duty_cycle_sta
STA Duty Cycle (in 100th of %).
Definition: mmwlan.h:157
uint8_t s1g_chan_num
S1G channel number.
Definition: mmwlan.h:165
uint32_t pkt_spacing_us
The length of time to close the tx window between packets (in microseconds).
Definition: mmwlan.h:171
uint8_t bw_mhz
Channel operating bandwidth (in MHz).
Definition: mmwlan.h:167
Structure to hold scan arguments.
Definition: mmwlan.h:826
uint8_t * extra_ies
Extra Information Elements to include in Probe Request frames.
Definition: mmwlan.h:838
uint8_t ssid[MMWLAN_SSID_MAXLEN]
SSID used for scan.
Definition: mmwlan.h:845
uint32_t dwell_on_home_ms
Time to dwell on home channel in between channels during a scan, to allow traffic to still pass.
Definition: mmwlan.h:853
size_t extra_ies_len
Length of extra_ies.
Definition: mmwlan.h:840
uint16_t ssid_len
Length of the SSID.
Definition: mmwlan.h:847
uint32_t dwell_time_ms
Minimum time to dwell on a channel waiting for probe responses/beacons.
Definition: mmwlan.h:833
Scan configuration data structure.
Definition: mmwlan.h:752
bool ndp_probe_enabled
Boolean value indicating whether NDP probe support should be enabled.
Definition: mmwlan.h:772
uint32_t home_channel_dwell_time_ms
Set the home channel dwell time to use for scans that are requested internally within the mmwlan driv...
Definition: mmwlan.h:780
uint32_t dwell_time_ms
Set the per-channel dwell time to use for scans that are requested internally within the mmwlan drive...
Definition: mmwlan.h:759
Structure to hold arguments specific to a given instance of a scan.
Definition: mmwlan.h:879
mmwlan_scan_rx_cb_t scan_rx_cb
Scan response receive callback.
Definition: mmwlan.h:881
void * scan_cb_arg
Opaque argument to be passed to the callbacks.
Definition: mmwlan.h:885
mmwlan_scan_complete_cb_t scan_complete_cb
Scan complete callback.
Definition: mmwlan.h:883
struct mmwlan_scan_args args
Scan arguments to be used mmwlan_scan_args.
Definition: mmwlan.h:887
Result of the scan request.
Definition: mmwlan.h:705
uint8_t ssid_len
Length of the SSID (ssid).
Definition: mmwlan.h:721
uint8_t bw_mhz
Bandwidth, in MHz, where the frame was received.
Definition: mmwlan.h:725
const uint8_t * ies
Pointer to the start of the Information Elements within the Probe Response frame.
Definition: mmwlan.h:713
uint16_t capability_info
Value of the Capability Information field.
Definition: mmwlan.h:717
uint16_t ies_len
Length of the Information Elements (ies).
Definition: mmwlan.h:719
const uint8_t * bssid
Pointer to the BSSID field within the Probe Response frame.
Definition: mmwlan.h:709
uint32_t channel_freq_hz
Center frequency in Hz of the channel where the frame was received.
Definition: mmwlan.h:723
uint16_t beacon_interval
Value of the Beacon Interval field.
Definition: mmwlan.h:715
uint64_t tsf
TSF timestamp in the Probe Response frame.
Definition: mmwlan.h:734
uint8_t op_bw_mhz
Operating bandwidth, in MHz, of the access point.
Definition: mmwlan.h:727
int16_t rssi
RSSI of the received frame.
Definition: mmwlan.h:707
int8_t noise_dbm
Background noise measured by the chip on the channel at the time the probe response was received.
Definition: mmwlan.h:732
const uint8_t * ssid
Pointer to the SSID within the SSID IE of the Probe Response frame.
Definition: mmwlan.h:711
Structure for storing WNM sleep extended arguments.
Definition: mmwlan.h:1489
bool wnm_sleep_enabled
Boolean indicating whether WNM sleep is enabled.
Definition: mmwlan.h:1491
bool chip_powerdown_enabled
Boolean indicating whether chip should be powered down during WNM sleep.
Definition: mmwlan.h:1493
Arguments data structure for mmwlan_sta_enable().
Definition: mmwlan.h:1074
mmwlan_scan_rx_cb_t scan_rx_cb
Optional callback for scan results which are received during the connection process.
Definition: mmwlan.h:1137
int bgscan_signal_threshold_dbm
Background scan signal strength threshold that switches between short and long intervals.
Definition: mmwlan.h:1124
int16_t raw_sta_priority
Priority used by the AP to assign a STA to a Restricted Access Window (RAW) group.
Definition: mmwlan.h:1096
int sae_owe_ec_groups[MMWLAN_MAX_EC_GROUPS]
Preference list of enabled elliptic curve groups for SAE and OWE.
Definition: mmwlan.h:1103
uint16_t scan_interval_base_s
The base scan interval (in seconds) to use when (re)connecting.
Definition: mmwlan.h:1149
uint8_t ssid[MMWLAN_SSID_MAXLEN]
SSID of the AP to connect to.
Definition: mmwlan.h:1076
char passphrase[MMWLAN_PASSPHRASE_MAXLEN+1]
Passphrase (only used if security_type is MMWLAN_SAE, otherwise ignored.
Definition: mmwlan.h:1087
enum mmwlan_4addr_mode use_4addr
Whether the station should use Linux 4-address mode.
Definition: mmwlan.h:1186
enum mmwlan_pmf_mode pmf_mode
Protected Management Frame mode to use (802.11w)
Definition: mmwlan.h:1091
mmwlan_sta_event_cb_t sta_evt_cb
STA event callback with a user-defined opaque parameter.
Definition: mmwlan.h:1173
uint8_t * extra_assoc_ies
Extra Information Elements to include in association request frames.
Definition: mmwlan.h:1164
enum mmwlan_security_type security_type
Type of security to use.
Definition: mmwlan.h:1085
uint16_t passphrase_len
Length of passphrase.
Definition: mmwlan.h:1089
uint16_t bgscan_long_interval_s
Background scan long interval, measured in seconds.
Definition: mmwlan.h:1135
uint16_t bgscan_short_interval_s
Background scan short interval, measured in seconds.
Definition: mmwlan.h:1116
enum mmwlan_cac_mode cac_mode
Whether Centralized Authentication Controlled is enabled on the STA.
Definition: mmwlan.h:1105
uint8_t bssid[MMWLAN_MAC_ADDR_LEN]
BSSID of the AP to connect to.
Definition: mmwlan.h:1083
void * scan_rx_cb_arg
Opaque argument to be passed to scan_rx_cb.
Definition: mmwlan.h:1139
size_t extra_assoc_ies_len
Length of extra_assoc_ies.
Definition: mmwlan.h:1166
uint16_t ssid_len
Length of the SSID.
Definition: mmwlan.h:1078
void * sta_evt_cb_arg
STA event callback argument to be passed to sta_evt_cb.
Definition: mmwlan.h:1181
uint16_t scan_interval_limit_s
The maximum interval between scan attempts when (re)connecting.
Definition: mmwlan.h:1157
enum mmwlan_station_type sta_type
S1G non-AP STA type.
Definition: mmwlan.h:1098
Argument passed to the STA event callback.
Definition: mmwlan.h:1046
enum mmwlan_sta_event event
The event that triggered the callback.
Definition: mmwlan.h:1048
Data structure to contain all stats from the UMAC.
Definition: mmwlan_stats.h:50
Structure for storing Target Wake Time (TWT) configuration arguments.
Definition: mmwlan.h:1352
enum mmwlan_twt_setup_command twt_setup_command
TWT setup command, mmwlan_twt_setup_command.
Definition: mmwlan.h:1374
uint64_t twt_wake_interval_us
TWT service period interval in micro seconds.
Definition: mmwlan.h:1360
uint32_t twt_min_wake_duration_us
Minimum TWT wake duration in micro seconds.
Definition: mmwlan.h:1372
uint8_t twt_wake_interval_exponent
TWT Wake interval exponent If non-zero, this parameter will be used to calculate twt_wake_interval_us...
Definition: mmwlan.h:1370
uint16_t twt_wake_interval_mantissa
TWT Wake interval mantissa If non-zero, this parameter will be used to calculate twt_wake_interval_us...
Definition: mmwlan.h:1365
enum mmwlan_twt_mode twt_mode
Target Wake Time (TWT) modes, mmwlan_twt_mode.
Definition: mmwlan.h:1354
Metadata for TX packets.
Definition: mmwlan.h:2393
const uint8_t * ra
Optional Receiver Address (RA).
Definition: mmwlan.h:2412
enum mmwlan_vif vif
VIF to transmit on.
Definition: mmwlan.h:2408
uint8_t tid
Traffic ID (TID) to use.
Definition: mmwlan.h:2398
Structure for retrieving version information from the mmwlan subsystem.
Definition: mmwlan.h:320
char morselib_version[MMWLAN_MORSELIB_VERSION_MAXLEN]
Morselib version string.
Definition: mmwlan.h:322
char morse_chip_id_string[MMWLAN_CHIP_ID_STRING_MAXLEN]
Morse transceiver chip ID user-friendly string.
Definition: mmwlan.h:328
char morse_fw_version[MMWLAN_FW_VERSION_MAXLEN]
Morse transceiver firmware version string.
Definition: mmwlan.h:324
uint32_t morse_chip_id
Morse transceiver chip ID.
Definition: mmwlan.h:326
Channel information for a VIF.
Definition: mmwlan.h:2221
uint8_t pri_bw_mhz
Bandwidth of the primary channel.
Definition: mmwlan.h:2227
uint16_t op_class
Operating class for the BSS.
Definition: mmwlan.h:2223
uint16_t s1g_chan_num
S1G operating channel number.
Definition: mmwlan.h:2225
uint8_t pri_1mhz_chan_idx
Index of the primary 1 MHz channel within the operating channel.
Definition: mmwlan.h:2229
VIF state used by mmwlan_vif_state_cb_t.
Definition: mmwlan.h:2182
enum mmwlan_vif vif
The VIF that this applies to.
Definition: mmwlan.h:2184
enum mmwlan_link_state link_state
The current link state of the VIF.
Definition: mmwlan.h:2186