diff options
author | Shayne Chen <shayne.chen@mediatek.com> | 2020-11-26 16:59:18 +0800 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-12-04 22:24:48 +0100 |
commit | bacf5047bb44d3660fbf7f9130b4826d2d9f59d2 (patch) | |
tree | d75a043be587e98d2de5bf2b6d07a9de1eeb8c99 /drivers/net/wireless/mediatek | |
parent | 9716ef046b46a6426b2a11301ea5232fc8cdce63 (diff) |
mt76: mt7915: fix ht mcs in mt7915_mcu_get_rx_rate()
The mcs value of HT mode reported by mt7915_mcu_get_rx_rate()
has already been converted to the expected format.
Tested-by: Yiwei Chung <yiwei.chung@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek')
-rw-r--r-- | drivers/net/wireless/mediatek/mt76/mt7915/mcu.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c index 6097653abda4..5fdd1a6d32ee 100644 --- a/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c +++ b/drivers/net/wireless/mediatek/mt76/mt7915/mcu.c @@ -3501,7 +3501,9 @@ int mt7915_mcu_get_rx_rate(struct mt7915_phy *phy, struct ieee80211_vif *vif, break; case MT_PHY_TYPE_HT: case MT_PHY_TYPE_HT_GF: - rate->mcs += (rate->nss - 1) * 8; + if (rate->mcs > 31) + return -EINVAL; + flags |= RATE_INFO_FLAGS_MCS; if (res->gi) |