ath9k: add a bunch of powersave handling fixes
[openwrt/openwrt.git] / package / kernel / mac80211 / patches / 329-mac80211-fix-check-for-buffered-powersave-frames-wit.patch
1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Mon, 11 Jul 2016 15:07:06 +0200
3 Subject: [PATCH] mac80211: fix check for buffered powersave frames with txq
4
5 The logic was inverted here, set the bit if frames are pending.
6
7 Fixes: ba8c3d6f16a1 ("mac80211: add an intermediate software queue implementation")
8 Signed-off-by: Felix Fietkau <nbd@nbd.name>
9 ---
10
11 --- a/net/mac80211/rx.c
12 +++ b/net/mac80211/rx.c
13 @@ -1268,7 +1268,7 @@ static void sta_ps_start(struct sta_info
14 for (tid = 0; tid < ARRAY_SIZE(sta->sta.txq); tid++) {
15 struct txq_info *txqi = to_txq_info(sta->sta.txq[tid]);
16
17 - if (!txqi->tin.backlog_packets)
18 + if (txqi->tin.backlog_packets)
19 set_bit(tid, &sta->txq_buffered_tids);
20 else
21 clear_bit(tid, &sta->txq_buffered_tids);