Skip to contentSkip to conversation

ath9k: fix powersave wakeup

PATCH In review Felix Fietkau 2 participants 4 messages Jul 11, 2016 Qualcomm Atheros ATH9K wireless driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ath9k: fix powersave wakeup

drv_wake_tx_queue will only call into the driver if there are frames pending in the mac80211 queue. the driver needs to take care of its own queued frames

---
 drivers/net/wireless/ath/ath9k/xmit.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/net/wireless/ath/ath9k/xmit.c +4 -0
index b0a6fd2..b3521c3 100644
@@ -1582,6 +1582,10 @@ void ath_tx_aggr_wakeup(struct ath_softc *sc, struct ath_node *an)
 
 		ath_txq_lock(sc, txq);
 		tid->clear_ps_filter = true;
+		if (ath_tid_has_buffered(tid)) {
+			ath_tx_queue_tid(sc, txq, tid);
+			ath_txq_schedule(sc, txq);
+		}
 		ath_txq_unlock_complete(sc, txq);
 	}
 }
Signature · 1 line
2.8.4
#1 lore raw

PATCH 2/2 ath9k: call ieee80211_sta_set_buffered if frames are pending

mac80211 needs to know about driver queued frames

---
 drivers/net/wireless/ath/ath9k/xmit.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/wireless/ath/ath9k/xmit.c +3 -0
index b3521c3..18c7443 100644
@@ -1561,6 +1561,9 @@ void ath_tx_aggr_sleep(struct ieee80211_sta *sta, struct ath_softc *sc,
 			continue;
 		}
 
+		if (!skb_queue_empty(&tid->retry_q))
+			ieee80211_sta_set_buffered(sta, tid->tidno, true);
+
 		list_del_init(&tid->list);
 
 		ath_txq_unlock(sc, txq);
Signature · 1 line
2.8.4
#2 lore raw
In reply to Felix Fietkau
Quoted 3 lines · Felix Fietkau

drv_wake_tx_queue will only call into the driver if there are frames pending in the mac80211 queue. the driver needs to take care of its own queued frames

Thanks, makes sense. What's the proper etiquette here? Do I roll these up into a v4 (possibly with other changes that show up along the way), or do they go in as separate patches?

-Toke

#3 lore raw
Quoted 9 lines · Toke Høiland-Jørgensen
Quoted 3 lines · Felix Fietkau

drv_wake_tx_queue will only call into the driver if there are frames pending in the mac80211 queue. the driver needs to take care of its own queued frames

Thanks, makes sense. What's the proper etiquette here? Do I roll these up into a v4 (possibly with other changes that show up along the way), or do they go in as separate patches?

You need to roll them in, otherwise your patch is going to cause regressions when it gets merged.

- Felix