Skip to content

Two Interfaces Power Save

doru91 edited this page Feb 11, 2017 · 19 revisions

Power Save support for two virtual interfaces

ath9k_htc does not have PS support for multiple interfaces. Once the second virtual interface is created, PS is automatically disabled and the card is always in the 'AWAKE' state:

The MultiWiFi PS algorithm that I implement is split in two sections:

  • a mac80211 generic section which is responsible for sending the NULL frames
  • a ath9k_htc specific section that is responsible for waking up the WiFi card for RX traffic

mac80211 algorithm

mac80211: Add PS support for multiple interfaces With this commit, PS support is limited to a maximum of 2 interfaces.

Behaviour:

  • when the STA receives a directed TIM for one of the interfaces it will send 2 NULL functions (PS = 1), one on each interface (see ieee80211_rx_mgmt_beacon)
  • we keep a single timer (dynamic_ps_timer) that schedules the tasklet for enabling PS. Timeout for this timer expires when no data is sent on both interfaces
  • when the tasklet for enabling PS mode is scheduled (dynamic_ps_enable_work) it will first send 2 NULL functions (PS = 0), one on each interfaces. Afer both NULL functions are ACK'ed, mac80211 requests the driver to put the wifi card in sleep mode.

This is the first version, we need a lot of improvements regarding the locking scheme.

Clone this wiki locally