WoW - Wake on Wireless
Wake on Wireless is a feature which allows a WLAN-enabled client system to enter a low-power system state (S1-S4) while still maintaining WLAN association with its current AP. WoW allows remote systems to wake up the sleeping client by sending a frame of a specific format which the client anticipates. WoW is very similar to Wake-on-LAN for Ethernet NICs in that no specialized support is required on any intervening devices in the network (e.g., switches, routers, APs, etc.)
How WoW works
Wireless devices have a capability list of events which will allow the wireless device to trigger on the system while in a low power state (S1-S4). The wireless device driver must expose this to the operating system and users can then enable particular events.
- Reception of a user specified pattern
- Reception of a Magic Packet frame
- A change in Link status
Going to suspend
When the operating system is about to go to suspend it will inform the device driver. For Linux this is done through the pci suspend callback. To enable WoW normal operation is discontinued and WoW is enabled:
- Wake up patterns are written to hardware
- Magic Packet detection is enabled
- Keep alive frame (can be a NULL data frame sent to the AP to keep association alive) is constructed and keep alive interval is programmed
- WoW interrupts should be enabled
- Deauthenticate and disassociate patterns should be added
- Beacon miss interval can be expanded to enhance robustness and avoid false triggers of disassociation
Upon suspend the wireless device's power is switched from Vcc to Vaux. The wireless device hardware will wake up for every beacon, the TIM IE will be analyzed for matched patterns for all received frames. In order to keep the association to the access point alive the wireless device will send a keep alive frame (can be a NULL data frame).
The wireless device can try to wake up the system upon a pattern match, Magic Packet, or a beacon miss interrupt. In order to wake up the system the wireless device will trigger a wake up event through the PCI/PCIE signal.
- PCI-Express: The wireless device will send a PCI-Express Power Management Event (PME) and also assert the PCIE_WAKE_L signal.
- PCI: The wireless device will assert the PCI_PME_L signal to the PCI host
This will resume the system to a normal power operation at which point the device driver will take over. The device driver can inform the upper layers of the reason why it was woken up (if it received such trigger). Once the system is up the device driver can try to associate to the access point as it normally would.
Receiving buffered data
When PS mode is enabled the wireless device will wake up for every DTIM beacon and check the TIM IE as it normally would (asking the AP with NULL data frame and power management bit set off). It will then receive the buffered frames and eventually go back to PS mode (NULL data sent with power management bit set).
802.11 Power Save *can* be used while in WoW mode to save more power.
Keep alive frame format can be configurable. Keep alive frames will usually be sent right after a TBTT, it can be configured to be sent in the order of 10 to 60 seconds.