Search Linux Wireless

[PATCH] wifi: mt76: mt76x02: correct external LNA gain

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Referring to the MT761{0,2} EEPROM content, setting the corresponding
EEPROM control bit means enabling external LNA. In this case, we
should use the EEMROM LNA gain instead of 0.

Signed-off-by: Shiji Yang <yangshiji66@xxxxxxxxxxx>
---
 drivers/net/wireless/mediatek/mt76/mt76x02_eeprom.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/mediatek/mt76/mt76x02_eeprom.c b/drivers/net/wireless/mediatek/mt76/mt76x02_eeprom.c
index 0acabba2d..a0b95509a 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x02_eeprom.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x02_eeprom.c
@@ -135,9 +135,9 @@ u8 mt76x02_get_lna_gain(struct mt76x02_dev *dev,
 	u8 lna;
 
 	val = mt76x02_eeprom_get(dev, MT_EE_NIC_CONF_1);
-	if (val & MT_EE_NIC_CONF_1_LNA_EXT_2G)
+	if (!(val & MT_EE_NIC_CONF_1_LNA_EXT_2G))
 		*lna_2g = 0;
-	if (val & MT_EE_NIC_CONF_1_LNA_EXT_5G)
+	if (!(val & MT_EE_NIC_CONF_1_LNA_EXT_5G))
 		memset(lna_5g, 0, sizeof(s8) * 3);
 
 	if (chan->band == NL80211_BAND_2GHZ)
-- 
2.39.2




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Wireless Regulations]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux