Skip to content

Commit cc357c2

Browse files
greearbgregkh
authored andcommitted
mac80211: fix time-is-after bug in mlme
commit 7d73cd9 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: 9abf4e4 ("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>
1 parent cc1a702 commit cc357c2

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎net/mac80211/mlme.c‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4660,7 +4660,10 @@ static void ieee80211_sta_conn_mon_timer(struct timer_list *t)
46604660
timeout = sta->rx_stats.last_rx;
46614661
timeout += IEEE80211_CONNECTION_IDLE_TIME;
46624662

4663-
if (time_is_before_jiffies(timeout)) {
4663+
/* If timeout is after now, then update timer to fire at
4664+
* the later date, but do not actually probe at this time.
4665+
*/
4666+
if (time_is_after_jiffies(timeout)) {
46644667
mod_timer(&ifmgd->conn_mon_timer, round_jiffies_up(timeout));
46654668
return;
46664669
}

0 commit comments

Comments
 (0)