Skip to content

Commit 1236af3

Browse files
nbd168jmberg-intel
authored andcommitted
mac80211: minstrel_ht: fix sample time check
We need to skip sampling if the next sample time is after jiffies, not before. This patch fixes an issue where in some cases only very little sampling (or none at all) is performed, leading to really bad data rates Fixes: 80d5515 ("mac80211: minstrel_ht: significantly redesign the rate probing strategy") Cc: stable@vger.kernel.org Signed-off-by: Felix Fietkau <nbd@nbd.name> Link: https://lore.kernel.org/r/20210617103854.61875-1-nbd@nbd.name Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent 1c200f8 commit 1236af3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

net/mac80211/rc80211_minstrel_ht.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1514,7 +1514,7 @@ minstrel_ht_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta,
15141514
(info->control.flags & IEEE80211_TX_CTRL_PORT_CTRL_PROTO))
15151515
return;
15161516

1517-
if (time_is_before_jiffies(mi->sample_time))
1517+
if (time_is_after_jiffies(mi->sample_time))
15181518
return;
15191519

15201520
mi->sample_time = jiffies + MINSTREL_SAMPLE_INTERVAL;

0 commit comments

Comments
 (0)