aboutsummaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2019-03-19 12:02:35 +0100
committerFelix Fietkau <nbd@nbd.name>2019-03-20 10:41:30 +0100
commit38860fe2e4b520e9bfb409bbbe3efba7e9bf45f2 (patch)
treee14e9db8aada2a972186779e9a8816c4572f9ae6 /package
parentca9ad880f29f3ef9eee9bb0342610d6f879e7770 (diff)
downloadupstream-38860fe2e4b520e9bfb409bbbe3efba7e9bf45f2.tar.gz
upstream-38860fe2e4b520e9bfb409bbbe3efba7e9bf45f2.tar.bz2
upstream-38860fe2e4b520e9bfb409bbbe3efba7e9bf45f2.zip
mac80211: fix an issue with the TXQ scheduling API and powersave clients
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package')
-rw-r--r--package/kernel/mac80211/patches/subsys/359-mac80211-un-schedule-TXQs-on-powersave-start.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/subsys/359-mac80211-un-schedule-TXQs-on-powersave-start.patch b/package/kernel/mac80211/patches/subsys/359-mac80211-un-schedule-TXQs-on-powersave-start.patch
new file mode 100644
index 0000000000..1abb2db7c2
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/359-mac80211-un-schedule-TXQs-on-powersave-start.patch
@@ -0,0 +1,31 @@
+From: Felix Fietkau <nbd@nbd.name>
+Date: Tue, 19 Mar 2019 11:36:12 +0100
+Subject: [PATCH] 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>
+---
+
+--- a/net/mac80211/rx.c
++++ b/net/mac80211/rx.c
+@@ -1508,7 +1508,15 @@ static void sta_ps_start(struct sta_info
+ return;
+
+ for (tid = 0; tid < ARRAY_SIZE(sta->sta.txq); tid++) {
+- if (txq_has_queue(sta->sta.txq[tid]))
++ struct ieee80211_txq *txq = sta->sta.txq[tid];
++ struct txq_info *txqi = to_txq_info(txq);
++
++ spin_lock(&local->active_txq_lock[txq->ac]);
++ if (!list_empty(&txqi->schedule_order))
++ list_del_init(&txqi->schedule_order);
++ spin_unlock(&local->active_txq_lock[txq->ac]);
++
++ if (txq_has_queue(txq))
+ set_bit(tid, &sta->txq_buffered_tids);
+ else
+ clear_bit(tid, &sta->txq_buffered_tids);