summaryrefslogtreecommitdiffstats
path: root/net/mac80211
diff options
context:
space:
mode:
authorBen Greear <greearb@candelatech.com>2021-03-30 16:07:49 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-04-14 08:42:02 +0200
commitcc357c29358df1c6a82ccc19c461dfc424e2e689 (patch)
treef4fbd1d36ed4d6b9f5e1cb536e601098238817a6 /net/mac80211
parentcc1a702e6ec03b4f950fe6b62fd3dd2ef0fad749 (diff)
downloadlinux-stable-cc357c29358df1c6a82ccc19c461dfc424e2e689.tar.gz
linux-stable-cc357c29358df1c6a82ccc19c461dfc424e2e689.tar.bz2
linux-stable-cc357c29358df1c6a82ccc19c461dfc424e2e689.zip
mac80211: fix time-is-after bug in mlme
commit 7d73cd946d4bc7d44cdc5121b1c61d5d71425dea upstream. The incorrect timeout check caused probing to happen when it did not need to happen. This in turn caused tx performance drop for around 5 seconds in ath10k-ct driver. Possibly that tx drop is due to a secondary issue, but fixing the probe to not happen when traffic is running fixes the symptom. Signed-off-by: Ben Greear <greearb@candelatech.com> Fixes: 9abf4e49830d ("mac80211: optimize station connection monitor") Acked-by: Felix Fietkau <nbd@nbd.name> Link: https://lore.kernel.org/r/20210330230749.14097-1-greearb@candelatech.com Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/mlme.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 3f483e84d5df..ef19c3399b89 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -4660,7 +4660,10 @@ static void ieee80211_sta_conn_mon_timer(struct timer_list *t)
timeout = sta->rx_stats.last_rx;
timeout += IEEE80211_CONNECTION_IDLE_TIME;
- if (time_is_before_jiffies(timeout)) {
+ /* If timeout is after now, then update timer to fire at
+ * the later date, but do not actually probe at this time.
+ */
+ if (time_is_after_jiffies(timeout)) {
mod_timer(&ifmgd->conn_mon_timer, round_jiffies_up(timeout));
return;
}