Skip to contentSkip to conversation

mac80211: minstrel_ht: fix sample time check

PATCH New Felix Fietkau 1 participant 1 message Jun 17, 2021 Stable branch

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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 80d55154b2f8 ("mac80211: minstrel_ht: significantly redesign the rate probing strategy")
---
 net/mac80211/rc80211_minstrel_ht.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/mac80211/rc80211_minstrel_ht.c +1 -1
index 6487b05da6fa..a6f3fb4a9197 100644
@@ -1514,7 +1514,7 @@ minstrel_ht_get_rate(void *priv, struct ieee80211_sta *sta, void *priv_sta,
 	    (info->control.flags & IEEE80211_TX_CTRL_PORT_CTRL_PROTO))
 		return;
 
-	if (time_is_before_jiffies(mi->sample_time))
+	if (time_is_after_jiffies(mi->sample_time))
 		return;
 
 	mi->sample_time = jiffies + MINSTREL_SAMPLE_INTERVAL;
Signature · 1 line
2.30.1