Skip to content

Commit bfb0593

Browse files
nbd168ksacilotto
authored andcommitted
mac80211: minstrel: fix tx status processing corner case
BugLink: https://bugs.launchpad.net/bugs/1908561 commit b2911a8 upstream. Some drivers fill the status rate list without setting the rate index after the final rate to -1. minstrel_ht already deals with this, but minstrel doesn't, which causes it to get stuck at the lowest rate on these drivers. Fix this by checking the count as well. Cc: [email protected] Fixes: cccf129 ("mac80211: add the 'minstrel' rate control algorithm") Signed-off-by: Felix Fietkau <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Johannes Berg <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Kamal Mostafa <[email protected]> Signed-off-by: Ian May <[email protected]>
1 parent 59e0f70 commit bfb0593

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/mac80211/rc80211_minstrel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ minstrel_tx_status(void *priv, struct ieee80211_supported_band *sband,
270270
success = !!(info->flags & IEEE80211_TX_STAT_ACK);
271271

272272
for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) {
273-
if (ar[i].idx < 0)
273+
if (ar[i].idx < 0 || !ar[i].count)
274274
break;
275275

276276
ndx = rix_to_ndx(mi, ar[i].idx);

0 commit comments

Comments
 (0)