summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorStanleyYP Wang <StanleyYP.Wang@mediatek.com>2023-11-06 22:38:53 +0000
committerFelix Fietkau <nbd@nbd.name>2023-12-07 18:50:22 +0100
commit3531c72aedb95261f4d78c47efa4b5ba7cdcddd9 (patch)
tree78071df9817cbbb3877ca71a69db0e71f9f49f80 /drivers
parent2c2f50bf6407e1fd43a1a257916aeaa5ffdacd6c (diff)
wifi: mt76: mt7915: fix EEPROM offset of TSSI flag on MT7981
The offset of the TSSI flag on the EEPROM of MT7981 devices was wrong. Set the correct offset instead. Fixes: 6bad146d162e ("wifi: mt76: mt7915: add support for MT7981") Signed-off-by: StanleyYP Wang <StanleyYP.Wang@mediatek.com> Signed-off-by: Daniel Golle <daniel@makrotopia.org> Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h b/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h
index f3e56817d36e..adc26a222823 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h
+++ b/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h
@@ -144,7 +144,8 @@ static inline bool
mt7915_tssi_enabled(struct mt7915_dev *dev, enum nl80211_band band)
{
u8 *eep = dev->mt76.eeprom.data;
- u8 val = eep[MT_EE_WIFI_CONF + 7];
+ u8 offs = is_mt7981(&dev->mt76) ? 8 : 7;
+ u8 val = eep[MT_EE_WIFI_CONF + offs];
if (band == NL80211_BAND_2GHZ)
return val & MT_EE_WIFI_CONF7_TSSI0_2G;