> Calibration data are often available on a specific mtd partition on > embedded devices. Take into account eeprom calibration data if > available. Calibration free data parsing is currently missing > > Signed-off-by: Lorenzo Bianconi <lorenzo@xxxxxxxxxx> > --- > .../wireless/mediatek/mt76/mt7615/eeprom.c | 32 +++++++++++++++---- > 1 file changed, 26 insertions(+), 6 deletions(-) > > diff --git a/drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c b/drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c > index dd5ab46a4f66..0313c604ea61 100644 > --- a/drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c > +++ b/drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c [...] > int mt7615_eeprom_init(struct mt7615_dev *dev) > { > int ret; > @@ -84,7 +98,13 @@ int mt7615_eeprom_init(struct mt7615_dev *dev) > if (ret < 0) > return ret; > > - memcpy(dev->mt76.eeprom.data, dev->mt76.otp.data, MT7615_EEPROM_SIZE); > + if (dev->mt76.otp.data) { > + ret = mt7615_check_eeprom(&dev->mt76); > + if (ret < 0) > + memcpy(dev->mt76.eeprom.data, dev->mt76.otp.data, > + MT7615_EEPROM_SIZE); > + /* TODO: take into account cal free data */ reviewing sdk code it seems we do not have cal free data here, I will post a v2 removing the comment Regards, Lorenzo > + } > > dev->mt76.cap.has_2ghz = true; > dev->mt76.cap.has_5ghz = true; > -- > 2.20.1 >
Attachment:
signature.asc
Description: PGP signature