Morse Micro IoT SDK  2.10.4
WLAN Regulatory Database API

Detailed Description

API for configuration of the regulatory domain.

Data Structures

struct  mmwlan_s1g_channel
 Regulatory domain information about an S1G channel. More...
 
struct  mmwlan_s1g_channel_list
 A list of S1G channels supported by a given regulatory domain. More...
 
struct  mmwlan_regulatory_db
 Regulatory database data structure. More...
 
struct  mmwlan_duty_cycle_stats
 Duty cycle configuration and statistics. More...
 

Macros

#define MMWLAN_SKIP_OP_CLASS_CHECK   -1
 If either the global or s1g operating class is set to this, the operating class will not be checked when associating to an AP. More...
 
#define MMWLAN_COUNTRY_CODE_LEN   3
 Length of the two character country code string (null-terminated). More...
 

Enumerations

enum  mmwlan_duty_cycle_mode { MMWLAN_DUTY_CYCLE_MODE_SPREAD = 0 , MMWLAN_DUTY_CYCLE_MODE_BURST = 1 }
 Enumeration of Duty Cycle modes. More...
 

Functions

static const struct mmwlan_s1g_channel_listmmwlan_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 found. More...
 
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. 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...
 

Macro Definition Documentation

◆ MMWLAN_COUNTRY_CODE_LEN

#define MMWLAN_COUNTRY_CODE_LEN   3

Length of the two character country code string (null-terminated).

Definition at line 175 of file mmwlan.h.

◆ MMWLAN_SKIP_OP_CLASS_CHECK

#define MMWLAN_SKIP_OP_CLASS_CHECK   -1

If either the global or s1g operating class is set to this, the operating class will not be checked when associating to an AP.

Definition at line 145 of file mmwlan.h.

Enumeration Type Documentation

◆ 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 252 of file mmwlan.h.

Function Documentation

◆ 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_lookup_regulatory_domain()

static const struct mmwlan_s1g_channel_list * mmwlan_lookup_regulatory_domain ( const struct mmwlan_regulatory_db db,
const char *  country_code 
)
inlinestatic

Look up the given country code in the regulatory database and return the matching channel list if found.

Parameters
dbThe regulatory database.
country_codeCountry code to look up.
Returns
the matching channel list if found, else NULL.

Definition at line 210 of file mmwlan.h.

◆ mmwlan_set_channel_list()

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.

Note
Must be invoked after WLAN initialization (see mmwlan_init()) but only when inactive (i.e., STA not enabled).
Warning
This function takes a reference to the given channel list. It expects the channel list to remain valid in memory as long as WLAN is in use, or until a new channel list is configured.
Parameters
channel_listThe channel list to set. The list must remain valid in memory.
Returns
MMWLAN_SUCCESS if the channel list was valid and updated successfully, MMWLAN_UNAVAILABLE if the WLAN subsystem was currently active.

◆ 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.

Note
This only guaranteed to take effect on subsequent invocation of mmwlan_sta_enable() or mmwlan_ap_enable().
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.