Skip to contentSkip to conversation

ath9k_htc: Adjust beacon timers for power save

RFC PATCH New Doru 1 participant 1 message Feb 17, 2017 Qualcomm Atheros ATH9K wireless driver

lore
Share & tools
lore

Doru

author
#0 lore raw

RFC PATCH v2 2/2 ath9k_htc: Adjust beacon timers for power save

From: Doru Gucea <[email protected]>

Each time we receive a beacon we need to adjust the hardware timers for next DTIM and next TBTT.

Before this commit, the Power Save behaviour was incorrect. The scenario was:
- STA receives a beacon from AP with TIM unset;
- mac80211 layers puts the chip to sleep;
- chip is woken up by mac80211's software timer reponsible for beacon miss after 7 * beacon_interval period.

Normally the chip should sleep at most DTIM period. This commit configures hardware timers for waking up the chip correctly.

More details on the wiki:
https://github.com/doru91/linux-stable/wiki/Single-Interface-Power-Save

Changelog

v1:
* moved beacon configuration call in the ath9k_htc driver

---
 drivers/net/wireless/ath/ath9k/htc_drv_main.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/wireless/ath/ath9k/htc_drv_main.c +4 -0
index a553c91..5403399 100644
@@ -1518,6 +1518,10 @@ static void ath9k_htc_bss_info_changed(struct ieee80211_hw *hw,
 	mutex_lock(&priv->mutex);
 	ath9k_htc_ps_wakeup(priv);
 
+	/* adjust beacon timers */
+	if (changed && BSS_CHANGED_BEACON_INFO)
+		ath9k_htc_beacon_config(priv, vif);
+
 	if (changed & BSS_CHANGED_ASSOC) {
 		ath_dbg(common, CONFIG, "BSS Changed ASSOC %d\n",
 			bss_conf->assoc);
Signature · 1 line
1.9.1