[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <58c999ad9fd073183bec5532fe62782b7d4be0d5.1699310162.git.daniel@makrotopia.org>
Date: Mon, 6 Nov 2023 22:38:53 +0000
From: Daniel Golle <daniel@...rotopia.org>
To: Felix Fietkau <nbd@....name>,
Lorenzo Bianconi <lorenzo@...nel.org>,
Ryder Lee <ryder.lee@...iatek.com>,
Shayne Chen <shayne.chen@...iatek.com>,
Sean Wang <sean.wang@...iatek.com>,
Kalle Valo <kvalo@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>,
Daniel Golle <daniel@...rotopia.org>,
StanleyYP Wang <StanleyYP.Wang@...iatek.com>,
Peter Chiu <chui-hao.chiu@...iatek.com>,
Howard Hsu <howard-yh.hsu@...iatek.com>,
Rany Hany <rany_hany@...eup.net>,
Simon Horman <horms@...nel.org>,
Alexander Couzens <lynxis@...0.eu>,
linux-wireless@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org
Subject: [PATCH 1/2] wifi: mt76: mt7915: fix EEPROM offset of TSSI flag on
MT7981
From: StanleyYP Wang <StanleyYP.Wang@...iatek.com>
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@...iatek.com>
Signed-off-by: Daniel Golle <daniel@...rotopia.org>
---
drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h b/drivers/net/wireless/mediatek/mt76/mt7915/eeprom.h
index f3e56817d36e9..adc26a222823b 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;
--
2.42.0
Powered by blists - more mailing lists