Skip to contentSkip to conversation

mac80211: fix time-is-after bug in mlme.

PATCH In review [email protected] 2 participants 2 messages Mar 30, 2021 – Apr 1, 2021 mac80211

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mac80211: fix time-is-after bug in mlme.

From: Ben Greear <[email protected]>

This fixes commit: mac80211: optimize station connection monitor which came in in the 5.10 kernel.

This 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.

---
 net/mac80211/mlme.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
net/mac80211/mlme.c +4 -1
index c137a8b5d8e1..b06c76116d86 100644
@@ -4729,7 +4729,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;
 	}
Signature · 1 line
2.20.1
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · On 2021-03-31 01:07, [email protected] wrote:

From: Ben Greear <[email protected]>

This fixes commit: mac80211: optimize station connection monitor which came in in the 5.10 kernel.

Quoted 7 lines

This 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.

- Felix