1 From: Felix Fietkau <nbd@nbd.name>
2 Date: Wed, 11 Nov 2020 19:25:39 +0100
3 Subject: [PATCH] mac80211: minstrel: fix tx status processing corner case
5 Some drivers fill the status rate list without setting the rate index after
6 the final rate to -1. minstrel_ht already deals with this, but minstrel
7 doesn't, which causes it to get stuck at the lowest rate on these drivers.
9 Fix this by checking the count as well.
11 Cc: stable@vger.kernel.org
12 Fixes: cccf129f820e ("mac80211: add the 'minstrel' rate control algorithm")
13 Signed-off-by: Felix Fietkau <nbd@nbd.name>
16 --- a/net/mac80211/rc80211_minstrel.c
17 +++ b/net/mac80211/rc80211_minstrel.c
18 @@ -274,7 +274,7 @@ minstrel_tx_status(void *priv, struct ie
19 success = !!(info->flags & IEEE80211_TX_STAT_ACK);
21 for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) {
23 + if (ar[i].idx < 0 || !ar[i].count)
26 ndx = rix_to_ndx(mi, ar[i].idx);