diff options
author | Felix Fietkau <nbd@nbd.name> | 2020-09-22 13:16:18 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-09-23 08:39:26 +0200 |
commit | 4bd7689d85d15759c7fce92c1cf9af9b98658d5c (patch) | |
tree | 8d11fd0d0770c1eacbe2bb3946cd2d8e97c50785 /package/kernel | |
parent | 0cfdc7d44602aa07312aac8fd507719c6d9cd119 (diff) | |
download | upstream-4bd7689d85d15759c7fce92c1cf9af9b98658d5c.tar.gz upstream-4bd7689d85d15759c7fce92c1cf9af9b98658d5c.tar.bz2 upstream-4bd7689d85d15759c7fce92c1cf9af9b98658d5c.zip |
mac80211: update sta connection monitor regression fix
Reset the connection monitor on all acked frames
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/kernel')
-rw-r--r-- | package/kernel/mac80211/patches/subsys/332-mac80211-fix-regression-in-sta-connection-monitor.patch | 42 |
1 files changed, 27 insertions, 15 deletions
diff --git a/package/kernel/mac80211/patches/subsys/332-mac80211-fix-regression-in-sta-connection-monitor.patch b/package/kernel/mac80211/patches/subsys/332-mac80211-fix-regression-in-sta-connection-monitor.patch index 787883e217..72b6ed56c4 100644 --- a/package/kernel/mac80211/patches/subsys/332-mac80211-fix-regression-in-sta-connection-monitor.patch +++ b/package/kernel/mac80211/patches/subsys/332-mac80211-fix-regression-in-sta-connection-monitor.patch @@ -2,25 +2,37 @@ From: Felix Fietkau <nbd@nbd.name> Date: Mon, 21 Sep 2020 17:43:06 +0200 Subject: [PATCH] mac80211: fix regression in sta connection monitor -When the nulldata frame was acked, the probe send count needs to be reset, -otherwise it will keep increasing until the connection is considered dead, -even though it fine. +When a frame was acked and probe frames were sent, the connection monitoring +needs to be reset, otherwise it will keep probing until the connection is +considered dead, even though frames have been acked in the mean time. Fixes: 9abf4e49830d ("mac80211: optimize station connection monitor") Reported-by: Georgi Valkov <gvalkov@abv.bg> Signed-off-by: Felix Fietkau <nbd@nbd.name> --- ---- a/net/mac80211/mlme.c -+++ b/net/mac80211/mlme.c -@@ -2508,7 +2508,9 @@ void ieee80211_sta_tx_notify(struct ieee - !sdata->u.mgd.probe_send_count) - return; +--- a/net/mac80211/status.c ++++ b/net/mac80211/status.c +@@ -1129,6 +1129,8 @@ void ieee80211_tx_status_ext(struct ieee + noack_success = !!(info->flags & IEEE80211_TX_STAT_NOACK_TRANSMITTED); -- if (!ack) -+ if (ack) -+ sdata->u.mgd.probe_send_count = 0; -+ else - sdata->u.mgd.nullfunc_failed = true; - ieee80211_queue_work(&sdata->local->hw, &sdata->work); - } + if (pubsta) { ++ struct ieee80211_sub_if_data *sdata = sta->sdata; ++ + if (!acked && !noack_success) + sta->status_stats.retry_failed++; + sta->status_stats.retry_count += retry_count; +@@ -1143,6 +1145,13 @@ void ieee80211_tx_status_ext(struct ieee + /* Track when last packet was ACKed */ + sta->status_stats.last_pkt_time = jiffies; + ++ /* Reset connection monitor */ ++ if (sdata->vif.type == NL80211_IFTYPE_STATION && ++ unlikely(sdata->u.mgd.probe_send_count > 0)) { ++ sdata->u.mgd.probe_send_count = 0; ++ ieee80211_queue_work(&local->hw, &sdata->work); ++ } ++ + if (info->status.is_valid_ack_signal) { + sta->status_stats.last_ack_signal = + (s8)info->status.ack_signal; |