Commit ebb632db authored by Felix Fietkau's avatar Felix Fietkau

mt76: mt76x0e: another fix for the external PA current setting

- Use the register number define instead of a magic value
- Fix inverted bit test (override needs to be applied if the bit is not set)

Fixes: 2b2cb40b ("mt76x0: pci: add hw initialization at bootstrap")
Signed-off-by: default avatarFelix Fietkau <nbd@nbd.name>
parent 69585ef9
...@@ -111,17 +111,10 @@ static int mt76x0e_register_device(struct mt76x02_dev *dev) ...@@ -111,17 +111,10 @@ static int mt76x0e_register_device(struct mt76x02_dev *dev)
u16 val; u16 val;
mt76_clear(dev, MT_COEXCFG0, BIT(0)); mt76_clear(dev, MT_COEXCFG0, BIT(0));
val = mt76x02_eeprom_get(dev, MT_EE_NIC_CONF_0); val = mt76x02_eeprom_get(dev, MT_EE_NIC_CONF_0);
if (val & MT_EE_NIC_CONF_0_PA_IO_CURRENT) { if (!(val & MT_EE_NIC_CONF_0_PA_IO_CURRENT))
u32 data; mt76_set(dev, MT_XO_CTRL7, 0xc03);
/* set external PA I/O
* current to 16mA
*/
data = mt76_rr(dev, 0x11c);
data |= 0xc03;
mt76_wr(dev, 0x11c, data);
}
} }
mt76_clear(dev, 0x110, BIT(9)); mt76_clear(dev, 0x110, BIT(9));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment