Morse Micro IoT SDK  2.9.7

Detailed Description

Data Structures

struct  mmwlan_version
 Structure for retrieving version information from the mmwlan subsystem. More...
 
struct  mmwlan_bcf_metadata
 Board configuration file (BCF) metadata. More...
 
struct  mmwlan_scan_config
 Scan configuration data structure. More...
 
struct  mmwlan_twt_config_args
 Structure for storing Target Wake Time (TWT) configuration arguments. More...
 
struct  mmwlan_qos_queue_params
 Structure for storing QoS queue parameters
More...
 
struct  mmwlan_boot_args
 Arguments data structure for mmwlan_boot(). More...
 
struct  mmwlan_scan_result
 Result of the scan request. More...
 
struct  mmwlan_sta_event_cb_args
 Argument passed to the STA event callback. More...
 
struct  mmwlan_sta_args
 Arguments data structure for mmwlan_sta_enable(). More...
 
struct  mmwlan_dpp_cb_args
 Structure passed back when a DPP event occurs. More...
 
struct  mmwlan_dpp_args
 Structure to hold the arguments used for the DPP process. More...
 
struct  mmwlan_scan_args
 Structure to hold scan arguments. More...
 
struct  mmwlan_scan_req
 Structure to hold arguments specific to a given instance of a scan. More...
 
struct  mmwlan_softap_sta_status
 Data structure for communicating STA status information for stations connected to a Soft AP. More...
 
struct  mmwlan_softap_args
 Arguments data structure for mmwlan_softap_enable(). More...
 

Macros

#define MMWLAN_MORSELIB_VERSION_MAXLEN   (32)
 Maximum length of the Morselib version string. More...
 
#define MMWLAN_FW_VERSION_MAXLEN   (32)
 Maximum length of the firmware version string. More...
 
#define MMWLAN_CHIP_ID_STRING_MAXLEN   (32)
 Maximum length of the chip id string. More...
 
#define MMWLAN_BCF_BOARD_DESC_MAXLEN   (31)
 Maximum length of a BCF board description string (excluding null terminator). More...
 
#define MMWLAN_BCF_BUILD_VERSION_MAXLEN   (31)
 Maximum length of a BCF build version string (excluding null terminator). More...
 
#define MMWLAN_MINIMUM_FRAGMENT_THRESHOLD   (256)
 Minimum value of fragmentation threshold that can be set with mmwlan_set_fragment_threshold(). More...
 
#define MMWLAN_SCAN_CONFIG_INIT    { MMWLAN_SCAN_DEFAULT_DWELL_TIME_MS, false, MMWLAN_SCAN_DEFAULT_DWELL_ON_HOME_MS }
 Initializer for mmwlan_scan_config. More...
 
#define MMWLAN_TWT_CONFIG_ARGS_INIT
 Initializer for mmwlan_twt_config_args. More...
 
#define MMWLAN_QOS_QUEUE_NUM_ACIS   4
 The total number of mmwlan_qos_queue_params that exist. More...
 
#define MMWLAN_BOOT_ARGS_INIT   { 0 }
 Initializer for mmwlan_boot_args. More...
 
#define MMWLAN_STA_ARGS_INIT
 Initializer for mmwlan_sta_args. More...
 
#define MMWLAN_SCAN_DEFAULT_DWELL_TIME_MS   (30)
 Default value for mmwlan_scan_args.dwell_time_ms. More...
 
#define MMWLAN_SCAN_DEFAULT_DWELL_ON_HOME_MS   (200)
 Default time to dwell on home channel, in between scan channels. More...
 
#define MMWLAN_SCAN_MIN_DWELL_TIME_MS   (15)
 Minimum value for mmwlan_scan_args.dwell_time_ms. More...
 
#define MMWLAN_SCAN_ARGS_INIT    { MMWLAN_SCAN_DEFAULT_DWELL_TIME_MS, NULL, 0, { 0 }, 0, MMWLAN_SCAN_DEFAULT_DWELL_ON_HOME_MS }
 Initializer for mmwlan_scan_args. More...
 
#define MMWLAN_SCAN_REQ_INIT   { NULL, NULL, NULL, MMWLAN_SCAN_ARGS_INIT }
 Initializer for mmwlan_scan_req. More...
 
#define MMWLAN_SOFTAP_ARGS_INIT
 Initializer for mmwlan_softap_args. More...
 

Typedefs

typedef void(* mmwlan_scan_rx_cb_t) (const struct mmwlan_scan_result *result, void *arg)
 mmwlan scan rx callback function prototype. More...
 
typedef void(* mmwlan_sta_status_cb_t) (enum mmwlan_sta_state sta_state)
 STA status callback function prototype. More...
 
typedef void(* mmwlan_sta_event_cb_t) (const struct mmwlan_sta_event_cb_args *sta_event, void *arg)
 STA event callback prototype. More...
 
typedef void(* mmwlan_scan_complete_cb_t) (enum mmwlan_scan_state scan_state, void *arg)
 mmwlan scan complete callback function prototype. More...
 
typedef void(* mmwlan_softap_sta_status_cb_t) (const struct mmwlan_softap_sta_status *sta_status, void *arg)
 Type definition for callback to be invoked on change in status of a connected STA. More...
 

Enumerations

enum  mmwlan_mcs10_mode { MMWLAN_MCS10_MODE_DISABLED = 0x00 , MMWLAN_MCS10_MODE_FORCED = 0x01 , MMWLAN_MCS10_MODE_AUTO = 0x02 }
 Enumeration of configuration states for MCS10 behavior. More...
 
enum  mmwlan_sta_state { MMWLAN_STA_DISABLED , MMWLAN_STA_CONNECTING , MMWLAN_STA_CONNECTED }
 Enumeration of states in STA mode. More...
 
enum  mmwlan_station_type { MMWLAN_STA_TYPE_SENSOR = 0x01 , MMWLAN_STA_TYPE_NON_SENSOR = 0x02 }
 Enumeration of S1G non-AP STA types. More...
 
enum  mmwlan_sta_event {
  MMWLAN_STA_EVT_SCAN_REQUEST , MMWLAN_STA_EVT_SCAN_COMPLETE , MMWLAN_STA_EVT_SCAN_ABORT , MMWLAN_STA_EVT_AUTH_REQUEST ,
  MMWLAN_STA_EVT_ASSOC_REQUEST , MMWLAN_STA_EVT_DEAUTH_TX , MMWLAN_STA_EVT_CTRL_PORT_OPEN , MMWLAN_STA_EVT_CTRL_PORT_CLOSED
}
 Enumeration of STA events. More...
 
enum  mmwlan_dpp_event { MMWLAN_DPP_EVT_PB_RESULT }
 Enumeration of DPP events. More...
 
enum  mmwlan_dpp_pb_result { MMWLAN_DPP_PB_RESULT_SUCCESS , MMWLAN_DPP_PB_RESULT_ERROR , MMWLAN_DPP_PB_RESULT_SESSION_OVERLAP }
 Enumeration of results for MMWLAN_DPP_EVT_PB_RESULT. More...
 
enum  mmwlan_scan_state { MMWLAN_SCAN_SUCCESSFUL , MMWLAN_SCAN_TERMINATED , MMWLAN_SCAN_RUNNING }
 Enumeration of states in Scan mode. More...
 

Functions

enum mmwlan_status mmwlan_get_version (struct mmwlan_version *version)
 Retrieve version information from morselib and the connected Morse transceiver. More...
 
enum mmwlan_status mmwlan_get_bcf_metadata (struct mmwlan_bcf_metadata *metadata)
 Read the metadata from the board configuration file (BCF)r. More...
 
enum mmwlan_status mmwlan_override_max_tx_power (uint16_t tx_power_dbm)
 Override the maximum TX power. More...
 
enum mmwlan_status mmwlan_set_rts_threshold (unsigned rts_threshold)
 Set the RTS threshold. More...
 
enum mmwlan_status mmwlan_set_sgi_enabled (bool sgi_enabled)
 Sets whether or not Short Guard Interval (SGI) support is enabled. More...
 
enum mmwlan_status mmwlan_set_subbands_enabled (bool subbands_enabled)
 Sets whether or not sub-band support is enabled for transmit. More...
 
enum mmwlan_status mmwlan_set_power_save_mode (enum mmwlan_ps_mode mode)
 Sets whether or not the 802.11 power save is enabled. More...
 
enum mmwlan_status mmwlan_set_ampdu_enabled (bool ampdu_enabled)
 Sets whether or not Aggregated MAC Protocol Data Unit (A-MPDU) support is enabled. More...
 
enum mmwlan_status mmwlan_set_fragment_threshold (unsigned fragment_threshold)
 Set the Fragmentation threshold. More...
 
enum mmwlan_status mmwlan_set_scan_config (const struct mmwlan_scan_config *config)
 Update the scan configuration with the given settings. More...
 
enum mmwlan_status mmwlan_twt_add_configuration (const struct mmwlan_twt_config_args *twt_config_args)
 Add configurations for Target Wake Time (TWT). More...
 
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. More...
 
enum mmwlan_status mmwlan_set_mcs10_mode (enum mmwlan_mcs10_mode mcs10_mode)
 Configure the rate adaptation behavior around selecting MCS10. More...
 
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. More...
 
enum mmwlan_status mmwlan_get_duty_cycle_stats (struct mmwlan_duty_cycle_stats *stats)
 Retrieve the transmit duty cycle configuration and statistics. More...
 
enum mmwlan_status mmwlan_boot (const struct mmwlan_boot_args *args)
 Boot the Morse Micro transceiver and leave it in an idle state. More...
 
enum mmwlan_status mmwlan_shutdown (void)
 Perform a clean shutdown of the Morse Micro transceiver, including cleanly disconnecting from a connected AP, if necessary. More...
 
enum mmwlan_status mmwlan_sta_enable (const struct mmwlan_sta_args *args, mmwlan_sta_status_cb_t sta_status_cb)
 Enable station mode. More...
 
enum mmwlan_status mmwlan_sta_disable (void)
 Disable station mode. More...
 
enum mmwlan_status mmwlan_dpp_start (const struct mmwlan_dpp_args *args)
 Function to start the Device Provisioning Protocol (DPP) process. More...
 
enum mmwlan_status mmwlan_dpp_stop (void)
 Function to stop the DPP process. More...
 
enum mmwlan_sta_state mmwlan_get_sta_state (void)
 Gets the current WLAN STA state. More...
 
enum mmwlan_status mmwlan_scan_request (const struct mmwlan_scan_req *scan_req)
 Request a scan. More...
 
enum mmwlan_status mmwlan_scan_abort (void)
 Abort in progress or pending scans. More...
 
enum mmwlan_status mmwlan_softap_enable (const struct mmwlan_softap_args *args)
 Enable Soft AP mode. More...
 
enum mmwlan_status mmwlan_softap_disable (void)
 Disable Soft AP mode. More...
 
enum mmwlan_status mmwlan_get_mac_addr (uint8_t *mac_addr)
 Gets the MAC address of this device. More...
 
uint16_t mmwlan_get_aid (void)
 Gets the station's AID. More...
 
enum mmwlan_status mmwlan_get_bssid (uint8_t *bssid)
 Gets the BSSID of the AP to which the STA is associated. More...
 
int32_t mmwlan_get_rssi (void)
 Gets the RSSI measured from the AP. More...
 
enum mmwlan_status mmwlan_set_listen_interval (uint16_t interval)
 Sets the listen interval to be indicated in the association response frame. More...
 

Macro Definition Documentation

◆ MMWLAN_BCF_BOARD_DESC_MAXLEN

#define MMWLAN_BCF_BOARD_DESC_MAXLEN   (31)

Maximum length of a BCF board description string (excluding null terminator).

Definition at line 386 of file mmwlan.h.

◆ MMWLAN_BCF_BUILD_VERSION_MAXLEN

#define MMWLAN_BCF_BUILD_VERSION_MAXLEN   (31)

Maximum length of a BCF build version string (excluding null terminator).

Definition at line 388 of file mmwlan.h.

◆ MMWLAN_BOOT_ARGS_INIT

#define MMWLAN_BOOT_ARGS_INIT   { 0 }

Initializer for mmwlan_boot_args.

See also
mmwlan_boot_args

Definition at line 760 of file mmwlan.h.

◆ MMWLAN_CHIP_ID_STRING_MAXLEN

#define MMWLAN_CHIP_ID_STRING_MAXLEN   (32)

Maximum length of the chip id string.

Definition at line 358 of file mmwlan.h.

◆ MMWLAN_FW_VERSION_MAXLEN

#define MMWLAN_FW_VERSION_MAXLEN   (32)

Maximum length of the firmware version string.

Definition at line 356 of file mmwlan.h.

◆ MMWLAN_MINIMUM_FRAGMENT_THRESHOLD

#define MMWLAN_MINIMUM_FRAGMENT_THRESHOLD   (256)

Minimum value of fragmentation threshold that can be set with mmwlan_set_fragment_threshold().

Definition at line 522 of file mmwlan.h.

◆ MMWLAN_MORSELIB_VERSION_MAXLEN

#define MMWLAN_MORSELIB_VERSION_MAXLEN   (32)

Maximum length of the Morselib version string.

Definition at line 354 of file mmwlan.h.

◆ MMWLAN_QOS_QUEUE_NUM_ACIS

#define MMWLAN_QOS_QUEUE_NUM_ACIS   4

The total number of mmwlan_qos_queue_params that exist.

Definition at line 654 of file mmwlan.h.

◆ MMWLAN_SCAN_ARGS_INIT

#define MMWLAN_SCAN_ARGS_INIT    { MMWLAN_SCAN_DEFAULT_DWELL_TIME_MS, NULL, 0, { 0 }, 0, MMWLAN_SCAN_DEFAULT_DWELL_ON_HOME_MS }

Initializer for mmwlan_scan_args.

For example:

#define MMWLAN_SCAN_ARGS_INIT
Initializer for mmwlan_scan_args.
Definition: mmwlan.h:1224
Structure to hold scan arguments.
Definition: mmwlan.h:1185

Definition at line 1224 of file mmwlan.h.

◆ MMWLAN_SCAN_CONFIG_INIT

#define MMWLAN_SCAN_CONFIG_INIT    { MMWLAN_SCAN_DEFAULT_DWELL_TIME_MS, false, MMWLAN_SCAN_DEFAULT_DWELL_ON_HOME_MS }

Initializer for mmwlan_scan_config.

Definition at line 589 of file mmwlan.h.

◆ MMWLAN_SCAN_DEFAULT_DWELL_ON_HOME_MS

#define MMWLAN_SCAN_DEFAULT_DWELL_ON_HOME_MS   (200)

Default time to dwell on home channel, in between scan channels.

Definition at line 1158 of file mmwlan.h.

◆ MMWLAN_SCAN_DEFAULT_DWELL_TIME_MS

#define MMWLAN_SCAN_DEFAULT_DWELL_TIME_MS   (30)

Default value for mmwlan_scan_args.dwell_time_ms.

Note that reducing the dwell time below this value may impact scan reliability.

Definition at line 1156 of file mmwlan.h.

◆ MMWLAN_SCAN_MIN_DWELL_TIME_MS

#define MMWLAN_SCAN_MIN_DWELL_TIME_MS   (15)

Minimum value for mmwlan_scan_args.dwell_time_ms.

Definition at line 1161 of file mmwlan.h.

◆ MMWLAN_SCAN_REQ_INIT

#define MMWLAN_SCAN_REQ_INIT   { NULL, NULL, NULL, MMWLAN_SCAN_ARGS_INIT }

Initializer for mmwlan_scan_req.

For example:

#define MMWLAN_SCAN_REQ_INIT
Initializer for mmwlan_scan_req.
Definition: mmwlan.h:1251
Structure to hold arguments specific to a given instance of a scan.
Definition: mmwlan.h:1231

Definition at line 1251 of file mmwlan.h.

◆ MMWLAN_SOFTAP_ARGS_INIT

#define MMWLAN_SOFTAP_ARGS_INIT
Value:
{ { 0 }, 0, { 0 }, MMWLAN_OPEN, { 0 }, 0, MMWLAN_PMF_REQUIRED, \
{ 0 }, 0, 0, 0, 0, 0, 0, NULL, NULL }
@ MMWLAN_PMF_REQUIRED
Protected management frames must be used.
Definition: mmwlan.h:159
@ MMWLAN_OPEN
Open (no security)
Definition: mmwlan.h:139

Initializer for mmwlan_softap_args.

See also
mmwlan_softap_args

Definition at line 1405 of file mmwlan.h.

◆ MMWLAN_STA_ARGS_INIT

#define MMWLAN_STA_ARGS_INIT
Value:
{ { 0 }, 0, { 0 }, MMWLAN_OPEN, { 0 }, 0, MMWLAN_PMF_REQUIRED, -1, MMWLAN_STA_TYPE_NON_SENSOR, \
DEFAULT_BGSCAN_LONG_INTERVAL_S, NULL, NULL, \
MMWLAN_DEFAULT_SCAN_INTERVAL_BASE_S, MMWLAN_DEFAULT_SCAN_INTERVAL_LIMIT_S, \
NULL, 0, NULL, NULL, MMWLAN_4ADDR_MODE_DISABLED }
#define MMWLAN_DEFAULT_SCAN_INTERVAL_LIMIT_S
Default value for the scan_interval_limit_s field of mmwlan_sta_args.
Definition: mmwlan.h:117
#define DEFAULT_BGSCAN_THRESHOLD_DBM
Default Background scan signal threshold in dBm.
Definition: mmwlan.h:101
#define DEFAULT_BGSCAN_SHORT_INTERVAL_S
Default Background scan short interval in seconds.
Definition: mmwlan.h:98
@ MMWLAN_CAC_DISABLED
CAC disabled.
Definition: mmwlan.h:168

Initializer for mmwlan_sta_args.

See also
mmwlan_sta_args

Definition at line 1016 of file mmwlan.h.

◆ MMWLAN_TWT_CONFIG_ARGS_INIT

#define MMWLAN_TWT_CONFIG_ARGS_INIT
Value:
DEFAULT_TWT_MIN_WAKE_DURATION_US, MMWLAN_TWT_SETUP_REQUEST }
#define DEFAULT_TWT_WAKE_INTERVAL_US
Default Target Wake Time (TWT) interval in micro seconds.
Definition: mmwlan.h:108
@ MMWLAN_TWT_SETUP_REQUEST
TWT setup request command.
Definition: mmwlan.h:192
@ MMWLAN_TWT_DISABLED
TWT disabled.
Definition: mmwlan.h:181

Initializer for mmwlan_twt_config_args.

For example:

#define MMWLAN_TWT_CONFIG_ARGS_INIT
Initializer for mmwlan_twt_config_args.
Definition: mmwlan.h:637
Structure for storing Target Wake Time (TWT) configuration arguments.
Definition: mmwlan.h:603

Definition at line 637 of file mmwlan.h.

Typedef Documentation

◆ mmwlan_scan_complete_cb_t

typedef void(* mmwlan_scan_complete_cb_t) (enum mmwlan_scan_state scan_state, void *arg)

mmwlan scan complete callback function prototype.

Definition at line 1178 of file mmwlan.h.

◆ mmwlan_scan_rx_cb_t

typedef void(* mmwlan_scan_rx_cb_t) (const struct mmwlan_scan_result *result, void *arg)

mmwlan scan rx callback function prototype.

Definition at line 836 of file mmwlan.h.

◆ mmwlan_softap_sta_status_cb_t

typedef void(* mmwlan_softap_sta_status_cb_t) (const struct mmwlan_softap_sta_status *sta_status, void *arg)

Type definition for callback to be invoked on change in status of a connected STA.

Parameters
sta_statusThe STA status information.
argOpaque argument that was provided when the callback was registered.
Warning
BETA NOTICE: This is beta API that is under development; breaking changes may be introduced in future releases.

Definition at line 1303 of file mmwlan.h.

◆ mmwlan_sta_event_cb_t

typedef void(* mmwlan_sta_event_cb_t) (const struct mmwlan_sta_event_cb_args *sta_event, void *arg)

STA event callback prototype.

Warning
BETA NOTICE: This is beta API that is under development; breaking changes may be introduced in future releases.

Definition at line 883 of file mmwlan.h.

◆ mmwlan_sta_status_cb_t

typedef void(* mmwlan_sta_status_cb_t) (enum mmwlan_sta_state sta_state)

STA status callback function prototype.

Definition at line 839 of file mmwlan.h.

Enumeration Type Documentation

◆ mmwlan_dpp_event

Enumeration of DPP events.

Enumerator
MMWLAN_DPP_EVT_PB_RESULT 

DPP push button result.

Definition at line 1062 of file mmwlan.h.

◆ mmwlan_dpp_pb_result

Enumeration of results for MMWLAN_DPP_EVT_PB_RESULT.

Enumerator
MMWLAN_DPP_PB_RESULT_SUCCESS 

DPP push button process was successful.

MMWLAN_DPP_PB_RESULT_ERROR 

An error occurred during the DPP push button process.

MMWLAN_DPP_PB_RESULT_SESSION_OVERLAP 

A session overlap occurred during the DPP push button process.

Definition at line 1069 of file mmwlan.h.

◆ mmwlan_mcs10_mode

Enumeration of configuration states for MCS10 behavior.

Enumerator
MMWLAN_MCS10_MODE_DISABLED 

MCS10 is disabled.

MMWLAN_MCS10_MODE_FORCED 

Always use MCS10 instead of MCS 0 if the bandwidth is 1 MHz.

MMWLAN_MCS10_MODE_AUTO 

Use MCS10 on retries instead of MCS 0 if the bandwidth is 1 MHz.

Definition at line 694 of file mmwlan.h.

◆ mmwlan_scan_state

Enumeration of states in Scan mode.

Enumerator
MMWLAN_SCAN_SUCCESSFUL 

Scan was successful and all channels were scanned.

MMWLAN_SCAN_TERMINATED 

Scan was incomplete.

One or more channels may have been scanned and therefore an incomplete set of scan results may still have been received.

MMWLAN_SCAN_RUNNING 

Scanning in progress.

Definition at line 1166 of file mmwlan.h.

◆ mmwlan_sta_event

Enumeration of STA events.

Warning
BETA NOTICE: This is beta API that is under development; breaking changes may be introduced in future releases.
Enumerator
MMWLAN_STA_EVT_SCAN_REQUEST 

The STA is starting a scan.

MMWLAN_STA_EVT_SCAN_COMPLETE 

The STA has finished a scan.

MMWLAN_STA_EVT_SCAN_ABORT 

The STA has aborted a scan early.

MMWLAN_STA_EVT_AUTH_REQUEST 

The STA is sending an authentication request to the AP.

MMWLAN_STA_EVT_ASSOC_REQUEST 

The STA is sending an association request to the AP.

MMWLAN_STA_EVT_DEAUTH_TX 

The STA is sending a de-authorization request to the AP.

MMWLAN_STA_EVT_CTRL_PORT_OPEN 

The Supplicant IEEE 802.1X Controlled Port is now open meaning that the STA is fully authenticated and data transmission can begin.

MMWLAN_STA_EVT_CTRL_PORT_CLOSED 

The Supplicant IEEE 802.1X Controlled Port is now closed.

Definition at line 847 of file mmwlan.h.

◆ mmwlan_sta_state

Enumeration of states in STA mode.

Definition at line 790 of file mmwlan.h.

◆ mmwlan_station_type

Enumeration of S1G non-AP STA types.

Definition at line 800 of file mmwlan.h.

Function Documentation

◆ mmwlan_boot()

enum mmwlan_status mmwlan_boot ( const struct mmwlan_boot_args args)

Boot the Morse Micro transceiver and leave it in an idle state.

Note
In general, it is not necessary to use this function as mmwlan_sta_enable() will automatically boot the chip if required. It may be used, for example, to power on the chip for production test, etc.
Warning
Channel list must be set before booting the transceiver. mmwlan_set_channel_list().
Parameters
argsBoot arguments. May be NULL, in which case default values will be used.
Returns
MMWLAN_SUCCESS on success, else an appropriate error code.

◆ mmwlan_dpp_start()

enum mmwlan_status mmwlan_dpp_start ( const struct mmwlan_dpp_args args)

Function to start the Device Provisioning Protocol (DPP) process.

This will return once DPP has successfully started. Feedback will be provided via the dpp_event_cb.

Warning
If this has been called mmwlan_dpp_stop() MUST be called before mmwlan_shutdown() is called.
Parameters
argsReference to the dpp arguments to use.
Returns
MMWLAN_SUCCESS on success, else an appropriate error code.
Warning
BETA NOTICE: This is beta API that is under development; breaking changes may be introduced in future releases.

◆ mmwlan_dpp_stop()

enum mmwlan_status mmwlan_dpp_stop ( void  )

Function to stop the DPP process.

Returns
MMWLAN_SUCCESS on success, else an appropriate error code.
Warning
BETA NOTICE: This is beta API that is under development; breaking changes may be introduced in future releases.

◆ mmwlan_get_aid()

uint16_t mmwlan_get_aid ( void  )

Gets the station's AID.

Returns
AID of station, or 0 if not associated

◆ mmwlan_get_bcf_metadata()

enum mmwlan_status mmwlan_get_bcf_metadata ( struct mmwlan_bcf_metadata metadata)

Read the metadata from the board configuration file (BCF)r.

Parameters
metadataPointer to a metadata data structure to be filled out on success.
Returns
MMWLAN_SUCCESS on success else an error code.

◆ mmwlan_get_bssid()

enum mmwlan_status mmwlan_get_bssid ( uint8_t *  bssid)

Gets the BSSID of the AP to which the STA is associated.

Parameters
bssidBuffer to receive the BSSID. Length must be MMWLAN_MAC_ADDR_LEN. Will be set to 00:00:00:00:00:00 if the station is not currently associated.
Returns
MMWLAN_SUCCESS on success, else an appropriate error code.

◆ mmwlan_get_duty_cycle_stats()

enum mmwlan_status mmwlan_get_duty_cycle_stats ( struct mmwlan_duty_cycle_stats stats)

Retrieve the transmit duty cycle configuration and statistics.

Parameters
statsPointer to a duty cycle statistics structure.
Returns
MMWLAN_SUCCESS on success, else an appropriate error code.

◆ mmwlan_get_mac_addr()

enum mmwlan_status mmwlan_get_mac_addr ( uint8_t *  mac_addr)

Gets the MAC address of this device.

The MAC address address comes from one of the following sources, in descending priority order:

  1. mmhal_read_mac_addr()
  2. Morse Micro transceiver
  3. Randomly generated in the form 02:01:XX:XX:XX:XX
Note
If a MAC address override is not provided (via mmhal_read_mac_addr()) then the transceiver must have been booted at least once before this function is invoked.
Parameters
mac_addrBuffer to receive the MAC address. Length must be MMWLAN_MAC_ADDR_LEN.
Returns
MMWLAN_SUCCESS on success, MMWLAN_UNAVAILABLE if the MAC address was not able to be read from the transceiver because it was not booted, else an appropriate error code.

◆ mmwlan_get_rssi()

int32_t mmwlan_get_rssi ( void  )

Gets the RSSI measured from the AP.

When power save is enabled, this will only be updated when traffic is received from the AP.

Returns
last known RSSI of the AP or INT32_MIN on error.

◆ mmwlan_get_sta_state()

enum mmwlan_sta_state mmwlan_get_sta_state ( void  )

Gets the current WLAN STA state.

Returns
the current WLAN STA state.

◆ mmwlan_get_version()

enum mmwlan_status mmwlan_get_version ( struct mmwlan_version version)

Retrieve version information from morselib and the connected Morse transceiver.

Parameters
versionThe data structure to fill out with version information.
Note
If the Morse transceiver has not previously been powered on then the fw_version field of version will be set to a zero length string.
Returns
MMWLAN_SUCCESS on success else an error code.

◆ mmwlan_override_max_tx_power()

enum mmwlan_status mmwlan_override_max_tx_power ( uint16_t  tx_power_dbm)

Override the maximum TX power.

If no override is specified then the maximum TX power used will be the maximum TX power allowed for the channel in the current regulatory domain.

Note
Must be invoked after WLAN initialization (see mmwlan_init()). Only takes effect when switching channel (e.g., during scan or AP connection procedure).
This will not increase the TX power over the maximum allowed for the current channel in the configured regulatory domain. Therefore, this override in effect will only reduce the maximum TX power and cannot increase it.
Parameters
tx_power_dbmThe maximum TX power override to set (in dBm). Set to zero to disable the override.
Returns
MMWLAN_SUCCESS if the country code was valid and updated successfully, MMWLAN_UNAVAILABLE if the WLAN subsystem was currently active.

◆ mmwlan_scan_abort()

enum mmwlan_status mmwlan_scan_abort ( void  )

Abort in progress or pending scans.

The scan callback will be called back with result code MMWLAN_SCAN_TERMINATED for all aborted scans.

Returns
MMWLAN_SUCCESS on success, else an appropriate error code.

◆ mmwlan_scan_request()

enum mmwlan_status mmwlan_scan_request ( const struct mmwlan_scan_req scan_req)

Request a scan.

If the transceiver is not already powered on, it will be powered on before the scan is initiated. The power on procedure will block this function. The transceiver will remain powered on after scan completion and must be shutdown by invoking mmwlan_shutdown().

Note
Just because a scan is requested does not mean it will happen immediately. It may take some time for the request to be serviced.
The scan request may be rejected, in which case the complete callback will be invoked immediately with an error status.
Parameters
scan_reqScan request instance. See mmwlan_scan_req.
Returns
MMWLAN_SUCCESS on success, else an appropriate error code.

◆ mmwlan_set_ampdu_enabled()

enum mmwlan_status mmwlan_set_ampdu_enabled ( bool  ampdu_enabled)

Sets whether or not Aggregated MAC Protocol Data Unit (A-MPDU) support is enabled.

This defaults to enabled, if not set otherwise.

Note
This must only be invoked when MMWLAN is inactive (i.e., STA mode not enabled).
Parameters
ampdu_enabledBoolean value indicating whether AMPDU support should be enabled.
Returns
MMWLAN_SUCCESS on success, else an appropriate error code.

◆ mmwlan_set_default_qos_queue_params()

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.

These values will be made active while the station is connecting to an Access Point.

Note
Although the active configuration will be changed to the Access Point's configurations for these values after connecting, these default values will not be overwritten and will be reactivated after the station disconnects.
Parameters
paramsArray of QoS queue parameters. This array does not need to be sorted in Access Category Index (ACI) order, since the ACI is specified as part of the mmwlan_qos_queue_params structure. The same ACI must not be specified more than once in this array. If a parameter for a given ACI is not included in this list then its configuration will be left unchanged.
countThe number of elements in the params array. Must be at least 1 and no more than MMWLAN_QOS_QUEUE_NUM_ACIS.
Returns
MMWLAN_SUCCESS on success, else an appropriate error code.

◆ mmwlan_set_duty_cycle_mode()

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.

Parameters
duty_cycle_modeSets the duty cycle mode. See mmwlan_duty_cycle_mode for what each mode means.
Returns
MMWLAN_SUCCESS on success, else an appropriate error code.

◆ mmwlan_set_fragment_threshold()

enum mmwlan_status mmwlan_set_fragment_threshold ( unsigned  fragment_threshold)

Set the Fragmentation threshold.

Maximum length of the frame, beyond which packets must be fragmented into two or more frames.

Note
Even if the fragmentation threshold is set to 0 (disabled), fragmentation may still occur if a given packet is too large to be transmitted at the selected rate.
Warning
Setting a fragmentation threshold may have unintended side effects due to restrictions at lower bandwidths and MCS rates. In normal operation the fragmentation threshold should be disabled, in which case packets will be fragmented automatically as necessary based on the selected rate.
Parameters
fragment_thresholdThe fragmentation threshold (in octets) to set, or zero to disable the fragmentation threshold. Minimum value (if not zero) is given by MMWLAN_MINIMUM_FRAGMENT_THRESHOLD.
Returns
MMWLAN_SUCCESS on success, else an appropriate error code.

◆ mmwlan_set_listen_interval()

enum mmwlan_status mmwlan_set_listen_interval ( uint16_t  interval)

Sets the listen interval to be indicated in the association response frame.

This informs the AP how often the STA will wake up. The AP uses the listen interval in determining the lifetime of frames that it buffers for a STA.

Parameters
[in]intervalInterval value in beacon or short beacon units. e.g. 5 will set the listen interval to the interval between 5 beacons. 0 will disable this feature.
Returns
MMWLAN_SUCCESS on success, else an appropriate error code.

◆ mmwlan_set_mcs10_mode()

enum mmwlan_status mmwlan_set_mcs10_mode ( enum mmwlan_mcs10_mode  mcs10_mode)

Configure the rate adaptation behavior around selecting MCS10.

Parameters
mcs10_modeSets the MCS10 mode. See mmwlan_mcs10_mode for what each mode means.
Returns
MMWLAN_SUCCESS on success, else an appropriate error code.

◆ mmwlan_set_power_save_mode()

enum mmwlan_status mmwlan_set_power_save_mode ( enum mmwlan_ps_mode  mode)

Sets whether or not the 802.11 power save is enabled.

Defaults to MMWLAN_PS_ENABLED

Note
It is recommended to keep power save enabled if the STA will be duty cycle limited,
See also
mm_app_regdb.c for regulatory duty cycle limits.
Parameters
modeenum indicating which 802.11 power save mode to use.
Returns
MMWLAN_SUCCESS on success, else an appropriate error code.

◆ mmwlan_set_rts_threshold()

enum mmwlan_status mmwlan_set_rts_threshold ( unsigned  rts_threshold)

Set the RTS threshold.

When packets larger than the RTS threshold are transmitted they are protected by an RTS/CTS exchange.

Parameters
rts_thresholdThe RTS threshold (in octets) to set, or 0 to disable.
Returns
MMWLAN_SUCCESS on success, else an appropriate error code.

◆ mmwlan_set_scan_config()

enum mmwlan_status mmwlan_set_scan_config ( const struct mmwlan_scan_config config)

Update the scan configuration with the given settings.

Parameters
configThe new configuration to set.
Returns
MMWLAN_SUCCESS on success, else an appropriate error code.

◆ mmwlan_set_sgi_enabled()

enum mmwlan_status mmwlan_set_sgi_enabled ( bool  sgi_enabled)

Sets whether or not Short Guard Interval (SGI) support is enabled.

Defaults to enabled if not set otherwise.

Note
This will not force use of SGI, only enable support for it. The rate control algorithm will make the decision as to which guard interval to use unless explicitly overridden by mmwlan_ate_override_rate_control().
This must only be invoked when MMWLAN is inactive (i.e., STA mode not enabled).
Parameters
sgi_enabledBoolean value indicating whether SGI support should be enabled.
Returns
MMWLAN_SUCCESS on success, else an appropriate error code.

◆ mmwlan_set_subbands_enabled()

enum mmwlan_status mmwlan_set_subbands_enabled ( bool  subbands_enabled)

Sets whether or not sub-band support is enabled for transmit.

Defaults to enabled if not set otherwise.

Note
This will not force use of sub-bands, only enable support for it. The rate control algorithm will make the decision as to which bandwidth to use unless explicitly overridden by mmwlan_ate_override_rate_control().
This must only be invoked when MMWLAN is inactive (i.e., STA mode not enabled).
Parameters
subbands_enabledBoolean value indicating whether sub-band support should be enabled.
Returns
MMWLAN_SUCCESS on success, else an appropriate error code.

◆ mmwlan_shutdown()

enum mmwlan_status mmwlan_shutdown ( void  )

Perform a clean shutdown of the Morse Micro transceiver, including cleanly disconnecting from a connected AP, if necessary.

Has no effect if the transceiver is already shutdown.

Returns
MMWLAN_SUCCESS on success, else an appropriate error code.

◆ mmwlan_softap_disable()

enum mmwlan_status mmwlan_softap_disable ( void  )

Disable Soft AP mode.

This will disconnect any stations from the AP. It will also shut down the transceiver if nothing else is holding it open. Note that if the transceiver was booted by mmwlan_boot() then this function will not shut down the transceiver.

Returns
MMWLAN_SUCCESS if successful and the transceiver was also shut down, MMWLAN_SHUTDOWN_BLOCKED if successful and the transceiver was not shut down, else an appropriate error code.
Warning
BETA NOTICE: This is beta API that is under development; breaking changes may be introduced in future releases.

◆ mmwlan_softap_enable()

enum mmwlan_status mmwlan_softap_enable ( const struct mmwlan_softap_args args)

Enable Soft AP mode.

This will power on the transceiver then start Access Point mode.

Warning
Channel list must be set before enabling station mode. mmwlan_set_channel_list().
Parameters
argsArguments (e.g., SSID, etc.). See mmwlan_softap_args.
Returns
MMWLAN_SUCCESS on success, else an appropriate error code.
Warning
BETA NOTICE: This is beta API that is under development; breaking changes may be introduced in future releases.

◆ mmwlan_sta_disable()

enum mmwlan_status mmwlan_sta_disable ( void  )

Disable station mode.

This will disconnect from the AP. It will also shut down the transceiver if nothing else is holding it open. Note that if the transceiver was booted by mmwlan_boot() then this function will not shut down the transceiver.

Returns
MMWLAN_SUCCESS if successful, else an appropriate error code.

◆ mmwlan_sta_enable()

enum mmwlan_status mmwlan_sta_enable ( const struct mmwlan_sta_args args,
mmwlan_sta_status_cb_t  sta_status_cb 
)

Enable station mode.

This will power on the transceiver then initiate connection to the given Access Point. If station mode is already enabled when this function is invoked then it will disconnect from (if already connected) and initiate connection to the given AP.

Note
The STA status callback (sta_status_cb) must not block and MMWLAN API functions may not be invoked from the callback.
A copy of args->extra_assoc_ies buffer will be made if args->extra_assoc_ies_len is non-zero. Caller is responsible for freeing the buffer in args after this function is called.
Warning
Channel list must be set before enabling station mode. mmwlan_set_channel_list().
Deprecated:
The sta_status_cb parameter should not be used. Please use mmwlan_sta_args.ext_sta_status_cb as the preferred callback method.
Parameters
argsSTA arguments (e.g., SSID, etc.). See mmwlan_sta_args.
sta_status_cbOptional callback to be invoked on STA state changes. May be NULL. Must be NULL if args->ext_sta_status_cb is not NULL.
Returns
MMWLAN_SUCCESS on success, else an appropriate error code.

◆ mmwlan_twt_add_configuration()

enum mmwlan_status mmwlan_twt_add_configuration ( const struct mmwlan_twt_config_args twt_config_args)

Add configurations for Target Wake Time (TWT).

Note
This is used to add TWT configuration for a new TWT agreement. This function must be invoked before mmwlan_sta_enable.
Parameters
twt_config_argsTWT configuration arguments mmwlan_twt_config_args.
Returns
MMWLAN_SUCCESS on success, else an appropriate error code.