summaryrefslogtreecommitdiff
path: root/net/mac80211
diff options
context:
space:
mode:
authorBassem Dawood <bassem@morsemicro.com>2021-02-27 16:58:15 +1100
committerJohannes Berg <johannes.berg@intel.com>2021-06-23 15:06:24 +0200
commit6e899fa027addf2dd069714184c58a7c8c4b3030 (patch)
tree7b07ca7207c66f888998d1e30f8ead220179d3e5 /net/mac80211
parent65be6aa36ded2d2e3bf5058f4d3385b5a2a7ef2e (diff)
downloadlwn-6e899fa027addf2dd069714184c58a7c8c4b3030.tar.gz
lwn-6e899fa027addf2dd069714184c58a7c8c4b3030.zip
mac80211: Enable power save after receiving NULL packet ACK
Trigger dynamic_ps_timer to re-evaluate power saving once a null function packet (with PM = 1) is ACKed, otherwise dynamic PS is not enabled at that point. Signed-off-by: Bassem Dawood <bassem@morsemicro.com> Link: https://lore.kernel.org/r/20210227055815.14838-1-bassem@morsemicro.com [reformatting] Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/status.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/mac80211/status.c b/net/mac80211/status.c
index 9baf185ee4c7..b6ef96a25eac 100644
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -1006,12 +1006,11 @@ static void __ieee80211_tx_status(struct ieee80211_hw *hw,
ieee80211_hw_check(&local->hw, REPORTS_TX_ACK_STATUS) &&
!(info->flags & IEEE80211_TX_CTL_INJECTED) &&
local->ps_sdata && !(local->scanning)) {
- if (info->flags & IEEE80211_TX_STAT_ACK) {
+ if (info->flags & IEEE80211_TX_STAT_ACK)
local->ps_sdata->u.mgd.flags |=
IEEE80211_STA_NULLFUNC_ACKED;
- } else
- mod_timer(&local->dynamic_ps_timer, jiffies +
- msecs_to_jiffies(10));
+ mod_timer(&local->dynamic_ps_timer,
+ jiffies + msecs_to_jiffies(10));
}
ieee80211_report_used_skb(local, skb, false);