![]() |
Morse Micro IoT SDK
2.9.7
|
WNM sleep is an extended power save mode in which the STA need not listen for every DTIM beacon and need not perform rekey, allowing the STA to remain associated and reduce power consumption when it has no traffic to send or receive from the AP. While a STA is in WNM sleep it will be unable to communicate with the AP, and thus any traffic for the STA may be buffered or dropped at the discretion of the AP while the STA is in WNM sleep.
When entry to WNM sleep is enabled via this API, the STA sends a request to the AP and after successful negotiation, the chip is either put into a lower power mode or powered down completely, depending on arguments given when WNM sleep mode was enabled. The datapath is paused during this time. If the STA does not successfully negotiate with the AP to enter WNM Sleep, it will return an error code and the chip will not enter a low power mode.
When WNM sleep is disabled, the chip returns to normal operation and sends a request to the AP to exit WNM sleep. Note that the chip will exit low power mode regardless of whether or not the exit request was successful. WNM sleep will be exited if mmwlan_shutdown or mmwlan_sta_disable is invoked.
If the AP takes down the link, then the station will be unaware until it sends the WNM Sleep exit request. At that point the AP will send a de-authentication frame with reason code "non-associated station". After validating this is actually the AP the station was connected to, the station will bring down the connection and return MMWLAN_ERROR. The station will attempt to re-associate but will not re-enter WNM sleep. The application needs to enable WNM sleep again via this API if required.
A high level overview of enabling and disabling WNM sleep is shown below.
Data Structures | |
| struct | mmwlan_set_wnm_sleep_enabled_args |
| Structure for storing WNM sleep extended arguments. More... | |
Macros | |
| #define | MMWLAN_SET_WNM_SLEEP_ENABLED_ARGS_INIT { false, false } |
| Initializer for mmwlan_set_wnm_sleep_enabled_args. More... | |
Functions | |
| enum mmwlan_status | mmwlan_set_wnm_sleep_enabled_ext (const struct mmwlan_set_wnm_sleep_enabled_args *args) |
| Sets extended WNM sleep mode. More... | |
| static enum mmwlan_status | mmwlan_set_wnm_sleep_enabled (bool wnm_sleep_enabled) |
| Sets whether WNM sleep mode is enabled. More... | |
| #define MMWLAN_SET_WNM_SLEEP_ENABLED_ARGS_INIT { false, false } |
Initializer for mmwlan_set_wnm_sleep_enabled_args.
For example:
|
inlinestatic |
Sets whether WNM sleep mode is enabled.
If WNM sleep mode is enabled then the transceiver will sleep across multiple DTIM periods until WNM sleep mode is disabled. This allows the transceiver to use less power with the caveat that it will not wake up for group- or individually-addressed traffic. If a group rekey occurs while the device is in WNM sleep it will be applied when the device exits WNM sleep.
| wnm_sleep_enabled | Boolean indicating whether WNM sleep is enabled. |
| enum mmwlan_status mmwlan_set_wnm_sleep_enabled_ext | ( | const struct mmwlan_set_wnm_sleep_enabled_args * | args | ) |
Sets extended WNM sleep mode.
Provides an extended interface for setting WNM sleep. See mmwlan_set_wnm_sleep_enabled_args for parameter details. If WNM sleep mode is enabled then the transceiver will sleep across multiple DTIM periods until WNM sleep mode is disabled. This allows the transceiver to use less power with the caveat that it will not wake up for group- or individually-addressed traffic. If a group rekey occurs while the device is in WNM sleep it will be applied when the device exits WNM sleep.
| args | WNM sleep arguments - see mmwlan_set_wnm_sleep_enabled_args. |