Morse Micro IoT SDK  2.9.7
Morse Micro Wireless LAN (mmwlan) API

Detailed Description

Wireless LAN control and datapath.

Warning
Aside from specific exceptions, the functions in this API must not be called concurrently (e.g., from different thread contexts). The exception to this is the TX API (mmwlan_tx() and mmwlan_tx_tid()).

Thread priorities

The following table documents the threads created by the Morse WLAN driver and Upper MAC included in morselib.

Thread Thread Name Priority
SPI driver spi_irq MMOSAL_TASK_PRI_HIGH
Morse driver drv MMOSAL_TASK_PRI_HIGH
WLAN event loop evtloop MMOSAL_TASK_PRI_HIGH
Morse health check health MMOSAL_TASK_PRI_LOW

Note that to get the best performance, the WLAN driver/UMAC threads run at a high priority while it is expected that application threads run at a lower priority.

Modules

 WLAN Regulatory Database API
 
 WLAN Control API
 
 WLAN offload features
 WLAN offload features enable offloading some high level networking features to the WLAN chip.
 
 WLAN Standby features
 The standby mode allows the system to power off or put the host processor in a deep sleep mode while the Morse chip takes over certain functionality to keep the connection alive with the provision to wake up the host processor when certain conditions are met.
 
 WNM Sleep management
 
 Beacon Vendor Specific IE Filter API
 This API enables access to Vendor Specific information elements (IEs) in beacons.
 
 WLAN Initialization/Deinitialization API
 
 WLAN Health check API
 
 WLAN Datapath API
 
 Statistics API
 API for retrieving statistics information from the WLAN subsystem.
 
 Test (ATE) API
 Extended API particularly intended for test use cases.
 

Data Structures

struct  mmwlan_duty_cycle_stats
 Duty cycle configuration and statistics. More...
 

Macros

#define MMWLAN_SSID_MAXLEN   (32)
 Maximum allowable length of an SSID. More...
 
#define MMWLAN_PASSPHRASE_MAXLEN   (100)
 Maximum allowable length of a passphrase when connecting to an AP. More...
 
#define MMWLAN_RAW_MAX_PRIORITY   (7)
 Maximum allowable Restricted Access Window (RAW) priority for STA. More...
 
#define MMWLAN_MAC_ADDR_LEN   (6)
 Length of a WLAN MAC address. More...
 
#define MMWLAN_MAX_EC_GROUPS   (4)
 Maximum allowable number of EC Groups. More...
 
#define MMWLAN_OUI_SIZE   (3)
 Size of an 802.11 OUI element in octets. More...
 
#define DEFAULT_BGSCAN_SHORT_INTERVAL_S   (0)
 Default Background scan short interval in seconds. More...
 
#define DEFAULT_BGSCAN_THRESHOLD_DBM   (0)
 Default Background scan signal threshold in dBm. More...
 
#define DEFAULT_BGSCAN_LONG_INTERVAL_S   (0)
 Default Background scan long interval in seconds. More...
 
#define DEFAULT_TWT_WAKE_INTERVAL_US   (300000000)
 Default Target Wake Time (TWT) interval in micro seconds. More...
 
#define DEFAULT_TWT_MIN_WAKE_DURATION_US   (65280)
 Default min Target Wake Time (TWT) duration in micro seconds. More...
 
#define MMWLAN_DEFAULT_SCAN_INTERVAL_BASE_S   (2)
 Default value for the scan_interval_base_s field of mmwlan_sta_args. More...
 
#define MMWLAN_DEFAULT_SCAN_INTERVAL_LIMIT_S   (512)
 Default value for the scan_interval_limit_s field of mmwlan_sta_args. More...
 
#define MMWLAN_DEFAULT_SOFTAP_BEACON_INTERVAL_TUS   (100)
 Default Beacon Interval in Soft AP mode (in TUs). More...
 
#define MMWLAN_DEFAULT_SOFTAP_DTIM_PERIOD   (1)
 Default DTIM period in Soft AP mode. More...
 
#define MMWLAN_STANDBY_STATUS_FRAME_USER_PAYLOAD_MAXLEN   (64)
 The maximum length of a user-specified payload (bytes) for Standby status frames. More...
 
#define MMWLAN_STANDBY_WAKE_FRAME_USER_FILTER_MAXLEN   (64)
 The maximum allowed length of a user filter to apply to wake frames. More...
 

Enumerations

enum  mmwlan_status {
  MMWLAN_SUCCESS , MMWLAN_ERROR , MMWLAN_INVALID_ARGUMENT , MMWLAN_UNAVAILABLE ,
  MMWLAN_CHANNEL_LIST_NOT_SET , MMWLAN_NO_MEM , MMWLAN_TIMED_OUT , MMWLAN_SHUTDOWN_BLOCKED ,
  MMWLAN_CHANNEL_INVALID , MMWLAN_NOT_FOUND , MMWLAN_NOT_RUNNING
}
 Enumeration of status return codes. More...
 
enum  mmwlan_security_type { MMWLAN_OPEN , MMWLAN_OWE , MMWLAN_SAE }
 Enumeration of supported security types. More...
 
enum  mmwlan_ps_mode { MMWLAN_PS_DISABLED , MMWLAN_PS_ENABLED }
 Enumeration of supported 802.11 power save modes. More...
 
enum  mmwlan_pmf_mode { MMWLAN_PMF_REQUIRED , MMWLAN_PMF_DISABLED }
 Enumeration of Protected Management Frame (PMF) modes (802.11w). More...
 
enum  mmwlan_cac_mode { MMWLAN_CAC_DISABLED , MMWLAN_CAC_ENABLED }
 Enumeration of Centralized Authentication Control (CAC) modes. More...
 
enum  mmwlan_twt_mode { MMWLAN_TWT_DISABLED , MMWLAN_TWT_REQUESTER , MMWLAN_TWT_RESPONDER }
 Enumeration of Target Wake Time (TWT) modes. More...
 
enum  mmwlan_twt_setup_command { MMWLAN_TWT_SETUP_REQUEST , MMWLAN_TWT_SETUP_SUGGEST , MMWLAN_TWT_SETUP_DEMAND }
 Enumeration of Target Wake Time (TWT) setup commands. More...
 
enum  mmwlan_duty_cycle_mode { MMWLAN_DUTY_CYCLE_MODE_SPREAD = 0 , MMWLAN_DUTY_CYCLE_MODE_BURST = 1 }
 Enumeration of Duty Cycle modes. More...
 
enum  mmwlan_4addr_mode { MMWLAN_4ADDR_MODE_DISABLED , MMWLAN_4ADDR_MODE_ENABLED }
 Enumeration of Linux 4-address mode settings. More...
 

Macro Definition Documentation

◆ DEFAULT_BGSCAN_LONG_INTERVAL_S

#define DEFAULT_BGSCAN_LONG_INTERVAL_S   (0)

Default Background scan long interval in seconds.

Setting to 0 will disable background scanning.

Definition at line 105 of file mmwlan.h.

◆ DEFAULT_BGSCAN_SHORT_INTERVAL_S

#define DEFAULT_BGSCAN_SHORT_INTERVAL_S   (0)

Default Background scan short interval in seconds.

Setting to 0 will disable background scanning.

Definition at line 98 of file mmwlan.h.

◆ DEFAULT_BGSCAN_THRESHOLD_DBM

#define DEFAULT_BGSCAN_THRESHOLD_DBM   (0)

Default Background scan signal threshold in dBm.

Definition at line 101 of file mmwlan.h.

◆ DEFAULT_TWT_MIN_WAKE_DURATION_US

#define DEFAULT_TWT_MIN_WAKE_DURATION_US   (65280)

Default min Target Wake Time (TWT) duration in micro seconds.

Definition at line 111 of file mmwlan.h.

◆ DEFAULT_TWT_WAKE_INTERVAL_US

#define DEFAULT_TWT_WAKE_INTERVAL_US   (300000000)

Default Target Wake Time (TWT) interval in micro seconds.

Definition at line 108 of file mmwlan.h.

◆ MMWLAN_DEFAULT_SCAN_INTERVAL_BASE_S

#define MMWLAN_DEFAULT_SCAN_INTERVAL_BASE_S   (2)

Default value for the scan_interval_base_s field of mmwlan_sta_args.

Definition at line 114 of file mmwlan.h.

◆ MMWLAN_DEFAULT_SCAN_INTERVAL_LIMIT_S

#define MMWLAN_DEFAULT_SCAN_INTERVAL_LIMIT_S   (512)

Default value for the scan_interval_limit_s field of mmwlan_sta_args.

Definition at line 117 of file mmwlan.h.

◆ MMWLAN_DEFAULT_SOFTAP_BEACON_INTERVAL_TUS

#define MMWLAN_DEFAULT_SOFTAP_BEACON_INTERVAL_TUS   (100)

Default Beacon Interval in Soft AP mode (in TUs).

Definition at line 120 of file mmwlan.h.

◆ MMWLAN_DEFAULT_SOFTAP_DTIM_PERIOD

#define MMWLAN_DEFAULT_SOFTAP_DTIM_PERIOD   (1)

Default DTIM period in Soft AP mode.

Definition at line 123 of file mmwlan.h.

◆ MMWLAN_MAC_ADDR_LEN

#define MMWLAN_MAC_ADDR_LEN   (6)

Length of a WLAN MAC address.

Definition at line 88 of file mmwlan.h.

◆ MMWLAN_MAX_EC_GROUPS

#define MMWLAN_MAX_EC_GROUPS   (4)

Maximum allowable number of EC Groups.

Definition at line 91 of file mmwlan.h.

◆ MMWLAN_OUI_SIZE

#define MMWLAN_OUI_SIZE   (3)

Size of an 802.11 OUI element in octets.

Definition at line 94 of file mmwlan.h.

◆ MMWLAN_PASSPHRASE_MAXLEN

#define MMWLAN_PASSPHRASE_MAXLEN   (100)

Maximum allowable length of a passphrase when connecting to an AP.

Definition at line 82 of file mmwlan.h.

◆ MMWLAN_RAW_MAX_PRIORITY

#define MMWLAN_RAW_MAX_PRIORITY   (7)

Maximum allowable Restricted Access Window (RAW) priority for STA.

Definition at line 85 of file mmwlan.h.

◆ MMWLAN_SSID_MAXLEN

#define MMWLAN_SSID_MAXLEN   (32)

Maximum allowable length of an SSID.

Definition at line 79 of file mmwlan.h.

◆ MMWLAN_STANDBY_STATUS_FRAME_USER_PAYLOAD_MAXLEN

#define MMWLAN_STANDBY_STATUS_FRAME_USER_PAYLOAD_MAXLEN   (64)

The maximum length of a user-specified payload (bytes) for Standby status frames.

Definition at line 130 of file mmwlan.h.

◆ MMWLAN_STANDBY_WAKE_FRAME_USER_FILTER_MAXLEN

#define MMWLAN_STANDBY_WAKE_FRAME_USER_FILTER_MAXLEN   (64)

The maximum allowed length of a user filter to apply to wake frames.

Definition at line 133 of file mmwlan.h.

Enumeration Type Documentation

◆ mmwlan_4addr_mode

Enumeration of Linux 4-address mode settings.

Definition at line 209 of file mmwlan.h.

◆ mmwlan_cac_mode

Enumeration of Centralized Authentication Control (CAC) modes.

Enumerator
MMWLAN_CAC_DISABLED 

CAC disabled.

MMWLAN_CAC_ENABLED 

CAC enabled.

Definition at line 165 of file mmwlan.h.

◆ mmwlan_duty_cycle_mode

Enumeration of Duty Cycle modes.

Enumerator
MMWLAN_DUTY_CYCLE_MODE_SPREAD 

Duty cycle air time evenly spread.

MMWLAN_DUTY_CYCLE_MODE_BURST 

Duty cycle air time available in burst.

Definition at line 200 of file mmwlan.h.

◆ mmwlan_pmf_mode

Enumeration of Protected Management Frame (PMF) modes (802.11w).

Enumerator
MMWLAN_PMF_REQUIRED 

Protected management frames must be used.

MMWLAN_PMF_DISABLED 

No protected management frames.

Definition at line 156 of file mmwlan.h.

◆ mmwlan_ps_mode

Enumeration of supported 802.11 power save modes.

Enumerator
MMWLAN_PS_DISABLED 

Power save disabled.

MMWLAN_PS_ENABLED 

Power save enabled.

Definition at line 147 of file mmwlan.h.

◆ mmwlan_security_type

Enumeration of supported security types.

Enumerator
MMWLAN_OPEN 

Open (no security)

MMWLAN_OWE 

Opportunistic Wireless Encryption (OWE)

MMWLAN_SAE 

Simultaneous Authentication of Equals (SAE)

Definition at line 136 of file mmwlan.h.

◆ mmwlan_status

Enumeration of status return codes.

Enumerator
MMWLAN_SUCCESS 

The operation was successful.

MMWLAN_ERROR 

The operation failed with an unspecified error.

MMWLAN_INVALID_ARGUMENT 

The operation failed due to an invalid argument.

MMWLAN_UNAVAILABLE 

Functionality is temporarily unavailable.

MMWLAN_CHANNEL_LIST_NOT_SET 

Unable to proceed because channel list has not been set.

See also
mmwlan_set_channel_list().
MMWLAN_NO_MEM 

Failed due to memory allocation failure.

MMWLAN_TIMED_OUT 

Failed due to timeout.

MMWLAN_SHUTDOWN_BLOCKED 

Used to indicate that a call to mmwlan_sta_disable() did not shutdown the transceiver.

MMWLAN_CHANNEL_INVALID 

Attempted to tune to a channel that was not in the regulatory database or not supported.

MMWLAN_NOT_FOUND 

The request could not be completed because the given resource was not found.

MMWLAN_NOT_RUNNING 

Indicates that the operation failed because the UMAC was not running (e.g., the device was not booted).


Definition at line 49 of file mmwlan.h.

◆ mmwlan_twt_mode

Enumeration of Target Wake Time (TWT) modes.

Note
TWT is only supported as a requester.
Enumerator
MMWLAN_TWT_DISABLED 

TWT disabled.

MMWLAN_TWT_REQUESTER 

TWT enabled as a requester.

MMWLAN_TWT_RESPONDER 

TWT enabled as a responder.

Definition at line 178 of file mmwlan.h.

◆ mmwlan_twt_setup_command

Enumeration of Target Wake Time (TWT) setup commands.

Enumerator
MMWLAN_TWT_SETUP_REQUEST 

TWT setup request command.

MMWLAN_TWT_SETUP_SUGGEST 

TWT setup suggest command.

MMWLAN_TWT_SETUP_DEMAND 

TWT setup demand command.

Definition at line 189 of file mmwlan.h.