Skip to content

Commit ee0e16a

Browse files
pseidererjmberg-intel
authored andcommitted
mac80211: minstrel_ht: fill all requested rates
Fill all requested rates (in case of ath9k 4 rate slots are available, so fill all 4 instead of only 3), improves throughput in noisy environment. Signed-off-by: Peter Seiderer <ps.report@gmx.net> Link: https://lore.kernel.org/r/20220402153014.31332-2-ps.report@gmx.net Signed-off-by: Johannes Berg <johannes.berg@intel.com>
1 parent 195b9a0 commit ee0e16a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

net/mac80211/rc80211_minstrel_ht.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1439,17 +1439,17 @@ minstrel_ht_update_rates(struct minstrel_priv *mp, struct minstrel_ht_sta *mi)
14391439
/* Start with max_tp_rate[0] */
14401440
minstrel_ht_set_rate(mp, mi, rates, i++, mi->max_tp_rate[0]);
14411441

1442-
if (mp->hw->max_rates >= 3) {
1443-
/* At least 3 tx rates supported, use max_tp_rate[1] next */
1444-
minstrel_ht_set_rate(mp, mi, rates, i++, mi->max_tp_rate[1]);
1445-
}
1442+
/* Fill up remaining, keep one entry for max_probe_rate */
1443+
for (; i < (mp->hw->max_rates - 1); i++)
1444+
minstrel_ht_set_rate(mp, mi, rates, i, mi->max_tp_rate[i]);
14461445

1447-
if (mp->hw->max_rates >= 2) {
1446+
if (i < mp->hw->max_rates)
14481447
minstrel_ht_set_rate(mp, mi, rates, i++, mi->max_prob_rate);
1449-
}
1448+
1449+
if (i < IEEE80211_TX_RATE_TABLE_SIZE)
1450+
rates->rate[i].idx = -1;
14501451

14511452
mi->sta->max_rc_amsdu_len = minstrel_ht_get_max_amsdu_len(mi);
1452-
rates->rate[i].idx = -1;
14531453
rate_control_set_rates(mp->hw, mi->sta, rates);
14541454
}
14551455

0 commit comments

Comments
 (0)