diff options
author | Felix Fietkau <nbd@nbd.name> | 2020-04-22 14:10:00 +0300 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-05-12 20:52:32 +0300 |
commit | 97507b38a4de63e55801bc91a107c2794159ccd6 (patch) | |
tree | 2905d0e5665e07bc2d4092e294215a74b1b403d9 | |
parent | ad333c2ad23ec179b0c907e8553779873f4cc1c8 (diff) | |
download | linux-97507b38a4de63e55801bc91a107c2794159ccd6.tar.xz |
mt76: mt7615: 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>
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7615/mac.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c index 89aed6d67de0..e7a76032caff 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7615/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7615/mac.c @@ -1148,7 +1148,7 @@ static bool mt7615_fill_txs(struct mt7615_dev *dev, struct mt7615_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) / MT7615_RATE_RETRY); + first_idx = max_t(int, 0, last_idx - (count - 1) / MT7615_RATE_RETRY); if (fixed_rate && !probe) { info->status.rates[0].count = count; |