summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mediatek/mt76/mt7603
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2020-04-22 13:15:06 +0200
committerFelix Fietkau <nbd@nbd.name>2020-05-12 19:52:33 +0200
commit40a61c9b2c725da82bd60a39bc54b8884b0a57b5 (patch)
tree74bd7edad70daaecd8794a1c4753b13ab6383f77 /drivers/net/wireless/mediatek/mt76/mt7603
parent97507b38a4de63e55801bc91a107c2794159ccd6 (diff)
mt76: mt7603: fix tx status rate index calculation
A switch from one rate index to the next only happens when tx count from the current slot is greater than MT7615_RATE_RETRY, which is 1 has to be subtracted from count, instead of added to it. Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7603')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt7603/mac.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
index d34828715e1c..f8c0c957ca01 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c
@@ -1103,7 +1103,7 @@ mt7603_fill_txs(struct mt7603_dev *dev, struct mt7603_sta *sta,
if (ampdu || (info->flags & IEEE80211_TX_CTL_AMPDU))
info->flags |= IEEE80211_TX_STAT_AMPDU | IEEE80211_TX_CTL_AMPDU;
- first_idx = max_t(int, 0, last_idx - (count + 1) / MT7603_RATE_RETRY);
+ first_idx = max_t(int, 0, last_idx - (count - 1) / MT7603_RATE_RETRY);
if (fixed_rate && !probe) {
info->status.rates[0].count = count;