a366a921d4fb4668864c3b21215610acf390b2f1
[openwrt/staging/xback.git] /
1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Tue, 26 Jan 2021 16:40:52 +0100
3 Subject: [PATCH] mac80211: minstrel_ht: fix regression in the max_prob_rate
4 fix
5
6 Since mi->max_prob_rate is overwritten after the loop that calls
7 minstrel_ht_set_best_prob_rate, the new best rate needs to be written to *dest
8
9 Fixes: a7fca4e4037f ("mac80211: minstrel_ht: fix max probability rate selection")
10 Signed-off-by: Felix Fietkau <nbd@nbd.name>
11 ---
12
13 --- a/net/mac80211/rc80211_minstrel_ht.c
14 +++ b/net/mac80211/rc80211_minstrel_ht.c
15 @@ -545,7 +545,7 @@ minstrel_ht_set_best_prob_rate(struct mi
16 cur_tp_avg = minstrel_ht_get_tp_avg(mi, cur_group, cur_idx,
17 mrs->prob_avg);
18 if (cur_tp_avg > tmp_tp_avg)
19 - mi->max_prob_rate = index;
20 + *dest = index;
21
22 max_gpr_tp_avg = minstrel_ht_get_tp_avg(mi, max_gpr_group,
23 max_gpr_idx,