diff options
author | Felix Fietkau <nbd@nbd.name> | 2021-02-14 19:24:05 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2021-02-14 19:41:07 +0100 |
commit | ed1e234d87fc2fc1561b02dcc2f67a464721fc6f (patch) | |
tree | 3d90bbcca262a865333ea4107871a97c5dda8d63 /package/kernel/mac80211/patches/subsys/349-mac80211-minstrel_ht-significantly-redesign-the-rate.patch | |
parent | 072bfe21132b70ff348f094c5cab9b566d56b6e5 (diff) | |
download | upstream-ed1e234d87fc2fc1561b02dcc2f67a464721fc6f.tar.gz upstream-ed1e234d87fc2fc1561b02dcc2f67a464721fc6f.tar.bz2 upstream-ed1e234d87fc2fc1561b02dcc2f67a464721fc6f.zip |
mac80211: refresh patches
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'package/kernel/mac80211/patches/subsys/349-mac80211-minstrel_ht-significantly-redesign-the-rate.patch')
-rw-r--r-- | package/kernel/mac80211/patches/subsys/349-mac80211-minstrel_ht-significantly-redesign-the-rate.patch | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/package/kernel/mac80211/patches/subsys/349-mac80211-minstrel_ht-significantly-redesign-the-rate.patch b/package/kernel/mac80211/patches/subsys/349-mac80211-minstrel_ht-significantly-redesign-the-rate.patch index 09f6fd2214..7af13661a8 100644 --- a/package/kernel/mac80211/patches/subsys/349-mac80211-minstrel_ht-significantly-redesign-the-rate.patch +++ b/package/kernel/mac80211/patches/subsys/349-mac80211-minstrel_ht-significantly-redesign-the-rate.patch @@ -179,14 +179,14 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> + if (!rate) return; - } -- + - i = 0; - if (n_rates > 1) { - random = prandom_u32(); - i = random % n_rates; - } - probe_rate = rates[i]; - +- -out: - mi->sample_rate = probe_rate; + mi->sample_rate = rate; @@ -584,13 +584,13 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> - - if (!(mi->supported[sample_group] & BIT(sample_idx))) - return -1; -+ u8 seq; - +- - mrs = &mg->rates[sample_idx]; - sample_idx += MI_RATE(sample_group, 0); - - tp_rate1 = mi->max_tp_rate[0]; -- ++ u8 seq; + - /* 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])) { @@ -673,7 +673,8 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> - else - sample_idx = minstrel_get_sample_rate(mp, mi); + return; -+ + +- if (sample_idx < 0) + if (mp->hw->max_rates == 1 && mp->sample_switch && + (mi->total_packets_cur >= SAMPLE_SWITCH_THR || + mp->sample_switch == 1)) @@ -681,8 +682,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> + + if (time_is_before_jiffies(mi->sample_time)) + return; - -- if (sample_idx < 0) ++ + mi->sample_time = jiffies + MINSTREL_SAMPLE_INTERVAL; + sample_idx = minstrel_ht_get_sample_rate(mp, mi); + if (!sample_idx) |