aboutsummaryrefslogtreecommitdiffstats
path: root/package/kernel/mac80211
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2021-06-17 12:40:15 +0200
committerFelix Fietkau <nbd@nbd.name>2021-06-17 12:45:08 +0200
commit3839a4c7e98529362cffea70661a450fb072b360 (patch)
tree1f749c006c1ee8fb81eb539a27b792eae6f54298 /package/kernel/mac80211
parent3921f213e5ed091731f11b2543c206eab672cc17 (diff)
downloadupstream-3839a4c7e98529362cffea70661a450fb072b360.tar.gz
upstream-3839a4c7e98529362cffea70661a450fb072b360.tar.bz2
upstream-3839a4c7e98529362cffea70661a450fb072b360.zip
mac80211: fix minstrel 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 Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/kernel/mac80211')
-rw-r--r--package/kernel/mac80211/patches/subsys/377-mac80211-minstrel_ht-fix-sample-time-check.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/package/kernel/mac80211/patches/subsys/377-mac80211-minstrel_ht-fix-sample-time-check.patch b/package/kernel/mac80211/patches/subsys/377-mac80211-minstrel_ht-fix-sample-time-check.patch
new file mode 100644
index 0000000000..787254b4df
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/377-mac80211-minstrel_ht-fix-sample-time-check.patch
@@ -0,0 +1,23 @@
+From: Felix Fietkau <nbd@nbd.name>
+Date: Thu, 17 Jun 2021 12:05:54 +0200
+Subject: [PATCH] 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")
+Signed-off-by: Felix Fietkau <nbd@nbd.name>
+---
+
+--- a/net/mac80211/rc80211_minstrel_ht.c
++++ b/net/mac80211/rc80211_minstrel_ht.c
+@@ -1498,7 +1498,7 @@ minstrel_ht_get_rate(void *priv, struct
+ (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;