diff options
author | Felix Fietkau <nbd@nbd.name> | 2020-11-11 19:33:59 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-11-24 13:27:26 +0100 |
commit | b48b65efcdf698fb3118c44197b664f3e3bfe708 (patch) | |
tree | 33ec8defcbfee0cb8024532c843fa935a6dbc4ed /net | |
parent | 2216a93ce6841cde69fb6e59763ca029f15e4ddf (diff) | |
download | linux-stable-b48b65efcdf698fb3118c44197b664f3e3bfe708.tar.gz linux-stable-b48b65efcdf698fb3118c44197b664f3e3bfe708.tar.bz2 linux-stable-b48b65efcdf698fb3118c44197b664f3e3bfe708.zip |
mac80211: minstrel: fix tx status processing corner case
commit b2911a84396f72149dce310a3b64d8948212c1b3 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: stable@vger.kernel.org
Fixes: cccf129f820e ("mac80211: add the 'minstrel' rate control algorithm")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Link: https://lore.kernel.org/r/20201111183359.43528-3-nbd@nbd.name
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/mac80211/rc80211_minstrel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mac80211/rc80211_minstrel.c b/net/mac80211/rc80211_minstrel.c index 968675166291..1f3c420c01c7 100644 --- a/net/mac80211/rc80211_minstrel.c +++ b/net/mac80211/rc80211_minstrel.c @@ -276,7 +276,7 @@ minstrel_tx_status(void *priv, struct ieee80211_supported_band *sband, success = !!(info->flags & IEEE80211_TX_STAT_ACK); for (i = 0; i < IEEE80211_TX_MAX_RATES; i++) { - if (ar[i].idx < 0) + if (ar[i].idx < 0 || !ar[i].count) break; ndx = rix_to_ndx(mi, ar[i].idx); |