[wireless-drivers] mt76: mt7615: fix max_nss in mt7615_eeprom_parse_hw_cap
diff mbox series

Message ID ca9137b43b2baa1a292922868004369d055a93e4.1581071232.git.lorenzo@kernel.org
State Accepted
Commit d08f3010f4a32eec3c8aa771f03a1b342a1472fa
Delegated to: Kalle Valo
Headers show
Series
  • [wireless-drivers] mt76: mt7615: fix max_nss in mt7615_eeprom_parse_hw_cap
Related show

Commit Message

Lorenzo Bianconi Feb. 7, 2020, 10:29 a.m. UTC
Fix u8 cast reading max_nss from MT_TOP_STRAP_STA register in
mt7615_eeprom_parse_hw_cap routine

Fixes: acf5457fd99db ("mt76: mt7615: read {tx,rx} mask from eeprom")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
---
 drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Kalle Valo Feb. 8, 2020, 10:01 a.m. UTC | #1
Lorenzo Bianconi <lorenzo@kernel.org> wrote:

> Fix u8 cast reading max_nss from MT_TOP_STRAP_STA register in
> mt7615_eeprom_parse_hw_cap routine
> 
> Fixes: acf5457fd99db ("mt76: mt7615: read {tx,rx} mask from eeprom")
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>

Patch applied to wireless-drivers.git, thanks.

d08f3010f4a3 mt76: mt7615: fix max_nss in mt7615_eeprom_parse_hw_cap

Patch
diff mbox series

diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c b/drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c
index eccad4987ac8..17e277bf39e0 100644
--- a/drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c
@@ -92,8 +92,9 @@  static int mt7615_check_eeprom(struct mt76_dev *dev)
 
 static void mt7615_eeprom_parse_hw_cap(struct mt7615_dev *dev)
 {
-	u8 val, *eeprom = dev->mt76.eeprom.data;
+	u8 *eeprom = dev->mt76.eeprom.data;
 	u8 tx_mask, rx_mask, max_nss;
+	u32 val;
 
 	val = FIELD_GET(MT_EE_NIC_WIFI_CONF_BAND_SEL,
 			eeprom[MT_EE_WIFI_CONF]);