Morse Micro IoT SDK  2.9.7
WLAN Regulatory Database API

Detailed Description

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

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

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

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 270 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 240 of file mmwlan.h.

Function Documentation

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