summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2019-03-19 07:00:13 -0400
committerJohannes Berg <johannes.berg@intel.com>2019-03-29 06:14:11 -0400
commitb49c15e1211cc962cb73bbaaa5175ae068144893 (patch)
tree002e6978ac7dc9b8e6d322838c704a78d76f5b5e
parent9a5a90d167b0e5fe3d47af16b68fd09ce64085cd (diff)
mac80211: un-schedule TXQs on powersave start
Once a station enters powersave, its queues should not be returned by ieee80211_next_txq() anymore. They will be re-scheduled again after the station has woken up again Fixes: 1866760096bf4 ("mac80211: Add TXQ scheduling API") Signed-off-by: Felix Fietkau <nbd@nbd.name> Acked-by: Toke Høiland-Jørgensen <toke@redhat.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--net/mac80211/rx.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 7f8d93401ce0..bf0b187f994e 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1568,7 +1568,15 @@ static void sta_ps_start(struct sta_info *sta)
1568 return; 1568 return;
1569 1569
1570 for (tid = 0; tid < IEEE80211_NUM_TIDS; tid++) { 1570 for (tid = 0; tid < IEEE80211_NUM_TIDS; tid++) {
1571 if (txq_has_queue(sta->sta.txq[tid])) 1571 struct ieee80211_txq *txq = sta->sta.txq[tid];
1572 struct txq_info *txqi = to_txq_info(txq);
1573
1574 spin_lock(&local->active_txq_lock[txq->ac]);
1575 if (!list_empty(&txqi->schedule_order))
1576 list_del_init(&txqi->schedule_order);
1577 spin_unlock(&local->active_txq_lock[txq->ac]);
1578
1579 if (txq_has_queue(txq))
1572 set_bit(tid, &sta->txq_buffered_tids); 1580 set_bit(tid, &sta->txq_buffered_tids);
1573 else 1581 else
1574 clear_bit(tid, &sta->txq_buffered_tids); 1582 clear_bit(tid, &sta->txq_buffered_tids);