mt76: fix calling mt76_get_of_eeprom with an offset for pre-cal data

The device tree partition offset needs to be added to the function argument,
instead of overwriting it.
Fixes an issue where wrong EEPROM data was sent to the firmware as
pre-calibration data on MT7915.

Fixes: 495184ac91bb ("mt76: mt7915: add support for applying pre-calibration data")
Signed-off-by: Felix Fietkau <[email protected]>
This commit is contained in:
Felix Fietkau
2021-05-15 08:07:54 +02:00
parent e969ab10a0
commit 28b162366d
+1 -1
View File
@@ -51,7 +51,7 @@ int mt76_get_of_eeprom(struct mt76_dev *dev, void *eep, int offset, int len)
goto out_put_node; goto out_put_node;
} }
offset = be32_to_cpup(list); offset += be32_to_cpup(list);
ret = mtd_read(mtd, offset, len, &retlen, eep); ret = mtd_read(mtd, offset, len, &retlen, eep);
put_mtd_device(mtd); put_mtd_device(mtd);
if (ret) if (ret)