mirror of
https://github.com/outbackdingo/mt76.git
synced 2026-10-24 13:26:48 +00:00
mt7603: fix reading target tx power from eeprom
For the external PA (TSSI OFF) case, the target power needs to be read from a different location in EEPROM Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
@@ -465,9 +465,13 @@ mt7603_init_txpower(struct mt7603_dev *dev,
|
||||
u8 *eeprom = (u8 *)dev->mt76.eeprom.data;
|
||||
int target_power = eeprom[MT_EE_TX_POWER_0_START_2G + 2] & ~BIT(7);
|
||||
u8 *rate_power = &eeprom[MT_EE_TX_POWER_CCK];
|
||||
bool ext_pa = eeprom[MT_EE_NIC_CONF_0 + 1] & BIT(1);
|
||||
int max_offset, cur_offset;
|
||||
int i;
|
||||
|
||||
if (ext_pa)
|
||||
target_power = eeprom[MT_EE_TX_POWER_TSSI_OFF] & ~BIT(7);
|
||||
|
||||
if (target_power & BIT(6))
|
||||
target_power = -(target_power & GENMASK(5, 0));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user