summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mediatek/mt76/mt7996
diff options
context:
space:
mode:
authorShayne Chen <shayne.chen@mediatek.com>2023-03-03 09:35:52 +0100
committerFelix Fietkau <nbd@nbd.name>2023-04-17 16:08:47 +0200
commit021af945997ffaeaa37c9673d71afad7cde6bdef (patch)
treefa3fd3729d09e0dbf5e6192d5b390753ce8de56f /drivers/net/wireless/mediatek/mt76/mt7996
parentwifi: mt76: mt7996: remove mt7996_mcu_beacon_check_caps() (diff)
downloadlinux-021af945997ffaeaa37c9673d71afad7cde6bdef.tar.xz
linux-021af945997ffaeaa37c9673d71afad7cde6bdef.zip
wifi: mt76: mt7996: add eht rx rate support
Add support to report eht rx rate. Note that extended fields for eht in mt76_rx_status will make the struct size exceed the cb size, so make nss and band share the same u8. Signed-off-by: Shayne Chen <shayne.chen@mediatek.com> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/mt7996')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt7996/mac.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
index 3c3506c7c87a..d811b4e01800 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7996/mac.c
@@ -572,11 +572,12 @@ mt7996_mac_fill_rx_rate(struct mt7996_dev *dev,
case MT_PHY_TYPE_EHT_SU:
case MT_PHY_TYPE_EHT_TRIG:
case MT_PHY_TYPE_EHT_MU:
- /* TODO: currently report rx rate with HE rate */
status->nss = nss;
- status->encoding = RX_ENC_HE;
- bw = min_t(int, bw, IEEE80211_STA_RX_BW_160);
- i = min_t(int, i & 0xf, 11);
+ status->encoding = RX_ENC_EHT;
+ i &= GENMASK(3, 0);
+
+ if (gi <= NL80211_RATE_INFO_EHT_GI_3_2)
+ status->eht.gi = gi;
break;
default:
return -EINVAL;