mac80211: minstrel: fix tx status processing corner case
authorFelix Fietkau <nbd@nbd.name>
Wed, 11 Nov 2020 18:33:59 +0000 (19:33 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 12 Nov 2020 10:25:09 +0000 (11:25 +0100)
commitb2911a84396f72149dce310a3b64d8948212c1b3
treebd7f61dc404f5c457c423e8220f1d3575a99e9fc
parent4fe40b8e1566dad04c87fbf299049a1d0d4bd58d
mac80211: minstrel: fix tx status processing corner case

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>
net/mac80211/rc80211_minstrel.c