diff options
author | Felix Fietkau <nbd@nbd.name> | 2019-07-12 08:19:35 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2019-09-05 17:42:29 +0200 |
commit | 820e4da1746f999c91fbfcb320ac91c6a17b9777 (patch) | |
tree | b2ea07b236370511401eb4dcf7e1a98ddca69f62 /drivers | |
parent | f4635f66da8d2a1855fa0f9c6b2c1b342fdf527d (diff) |
mt76: mt7603: fix invalid fallback rates
Only decrement the rate index on duplicate rates if it is not already 0
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7603/mac.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c index 40db1cbc832d..81fb4276e742 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7603/mac.c +++ b/drivers/net/wireless/mediatek/mt76/mt7603/mac.c @@ -639,6 +639,9 @@ void mt7603_wtbl_set_rates(struct mt7603_dev *dev, struct mt7603_sta *sta, IEEE80211_TX_RC_40_MHZ_WIDTH) continue; + if (!rates[i].idx) + continue; + rates[i].idx--; } |