From: Felix Fietkau <nbd@nbd.name>
To: linux-wireless@vger.kernel.org
Cc: johannes@sipsolutions.net
Subject: [PATCH 6/8] mac80211: minstrel_ht: improve sample rate selection
Date: Tue, 29 Dec 2020 17:01:23 +0100 [thread overview]
Message-ID: <20201229160125.92794-6-nbd@nbd.name> (raw)
In-Reply-To: <20201229160125.92794-1-nbd@nbd.name>
Always allow sampling of rates faster than the primary max throughput rate.
When the second max_tp_rate is higher than the first one, sample attempts were
previously skipped, potentially causing rate control to get stuck at a slightly
lower rate
Signed-off-by: Felix Fietkau <nbd@nbd.name>
---
net/mac80211/rc80211_minstrel_ht.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
index 950e6d2b4525..dcc4394a872a 100644
--- a/net/mac80211/rc80211_minstrel_ht.c
+++ b/net/mac80211/rc80211_minstrel_ht.c
@@ -1379,13 +1379,13 @@ minstrel_get_sample_rate(struct minstrel_priv *mp, struct minstrel_ht_sta *mi)
mrs = &mg->rates[sample_idx];
sample_idx += sample_group * MCS_GROUP_RATES;
- /* Set tp_rate1, tp_rate2 to the highest / second highest max_tp_rate */
+ tp_rate1 = mi->max_tp_rate[0];
+
+ /* Set tp_rate2 to the second highest max_tp_rate */
if (minstrel_get_duration(mi->max_tp_rate[0]) >
minstrel_get_duration(mi->max_tp_rate[1])) {
- tp_rate1 = mi->max_tp_rate[1];
tp_rate2 = mi->max_tp_rate[0];
} else {
- tp_rate1 = mi->max_tp_rate[0];
tp_rate2 = mi->max_tp_rate[1];
}
--
2.28.0
next prev parent reply other threads:[~2020-12-29 16:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-29 16:01 [PATCH 1/8] mac80211: minstrel_ht: clean up CCK code Felix Fietkau
2020-12-29 16:01 ` [PATCH 2/8] mac80211: minstrel_ht: add support for OFDM rates on non-HT clients Felix Fietkau
2020-12-29 16:01 ` [PATCH 3/8] mac80211: remove legacy minstrel rate control Felix Fietkau
2020-12-29 16:01 ` [PATCH 4/8] mac80211: minstrel_ht: remove old ewma based rate average code Felix Fietkau
2020-12-29 16:01 ` [PATCH 5/8] mac80211: minstrel_ht: improve ampdu length estimation Felix Fietkau
2020-12-29 16:01 ` Felix Fietkau [this message]
2020-12-29 16:01 ` [PATCH 7/8] mac80211: minstrel_ht: fix max probability rate selection Felix Fietkau
2020-12-29 16:01 ` [PATCH 8/8] mac80211: minstrel_ht: increase stats update interval Felix Fietkau
2020-12-30 4:24 ` [PATCH 1/8] mac80211: minstrel_ht: clean up CCK code kernel test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201229160125.92794-6-nbd@nbd.name \
--to=nbd@nbd.name \
--cc=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox