projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c70627
)
mt76: clear sta powersave flag after notifying driver
author
Felix Fietkau
<nbd@nbd.name>
Thu, 25 Nov 2021 12:42:32 +0000
(13:42 +0100)
committer
Felix Fietkau
<nbd@nbd.name>
Sun, 19 Dec 2021 14:24:01 +0000
(15:24 +0100)
If the driver has configured the hardware to drop packets for a sta that was
in powersave mode, then clearing the flag too early opens up a small race
window during which packets could be dropped on wakeup
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mac80211.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/wireless/mediatek/mt76/mac80211.c
b/drivers/net/wireless/mediatek/mt76/mac80211.c
index acf400fa84698f74e1a89151cd1d539e3af4f31a..f11a2c6c33644bd550e12ccca55475d9dc6a664f 100644
(file)
--- a/
drivers/net/wireless/mediatek/mt76/mac80211.c
+++ b/
drivers/net/wireless/mediatek/mt76/mac80211.c
@@
-1163,10
+1163,12
@@
mt76_check_sta(struct mt76_dev *dev, struct sk_buff *skb)
if (ps)
set_bit(MT_WCID_FLAG_PS, &wcid->flags);
- else
- clear_bit(MT_WCID_FLAG_PS, &wcid->flags);
dev->drv->sta_ps(dev, sta, ps);
+
+ if (!ps)
+ clear_bit(MT_WCID_FLAG_PS, &wcid->flags);
+
ieee80211_sta_ps_transition(sta, ps);
}