mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 03:24:19 +02:00
mt76: mt7615: add calibration free support for MT7622
MT7622 uses fewer efuse overrides than MT7615 Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
5dff21eef6
commit
8acb7afc69
|
|
@ -211,6 +211,26 @@ static void mt7615_apply_cal_free_data(struct mt7615_dev *dev)
|
|||
eeprom[ical_nocheck[i]] = otp[ical_nocheck[i]];
|
||||
}
|
||||
|
||||
static void mt7622_apply_cal_free_data(struct mt7615_dev *dev)
|
||||
{
|
||||
static const u16 ical[] = {
|
||||
0x53, 0x54, 0x55, 0x56, 0xf4, 0xf7, 0x144, 0x156, 0x15b
|
||||
};
|
||||
u8 *eeprom = dev->mt76.eeprom.data;
|
||||
u8 *otp = dev->mt76.otp.data;
|
||||
int i;
|
||||
|
||||
if (!otp)
|
||||
return;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(ical); i++) {
|
||||
if (!otp[ical[i]])
|
||||
continue;
|
||||
|
||||
eeprom[ical[i]] = otp[ical[i]];
|
||||
}
|
||||
}
|
||||
|
||||
int mt7615_eeprom_init(struct mt7615_dev *dev)
|
||||
{
|
||||
int ret;
|
||||
|
|
@ -223,6 +243,8 @@ int mt7615_eeprom_init(struct mt7615_dev *dev)
|
|||
if (ret && dev->mt76.otp.data)
|
||||
memcpy(dev->mt76.eeprom.data, dev->mt76.otp.data,
|
||||
MT7615_EEPROM_SIZE);
|
||||
else if (is_mt7622(&dev->mt76))
|
||||
mt7622_apply_cal_free_data(dev);
|
||||
else
|
||||
mt7615_apply_cal_free_data(dev);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user