]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
mt76: mt7615: fix EEPROM buffer size
authorFelix Fietkau <nbd@nbd.name>
Mon, 22 Jun 2020 15:07:16 +0000 (17:07 +0200)
committerKalle Valo <kvalo@codeaurora.org>
Tue, 23 Jun 2020 08:43:41 +0000 (11:43 +0300)
Avoid adding MT7615_EEPROM_SIZE twice.
Rename MT7615_EEPROM_EXTRA_DATA to MT7615_EEPROM_FULL_SIZE, since it already
includes MT7615_EEPROM_SIZE

Fixes: ad380ad1ebbe ("mt76: mt7615: add support for applying DC offset calibration from EEPROM")
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Link: https://lore.kernel.org/r/20200622150716.49622-1-nbd@nbd.name
drivers/net/wireless/mediatek/mt76/mt7615/eeprom.c
drivers/net/wireless/mediatek/mt76/mt7615/eeprom.h

index edac37e7847bad3a325ab6545386366e34b669eb..22e4eabe6578d6363de9de9e3195815bb7cefae7 100644 (file)
@@ -72,8 +72,7 @@ static int mt7615_eeprom_load(struct mt7615_dev *dev, u32 addr)
 {
        int ret;
 
-       ret = mt76_eeprom_init(&dev->mt76, MT7615_EEPROM_SIZE +
-                                          MT7615_EEPROM_EXTRA_DATA);
+       ret = mt76_eeprom_init(&dev->mt76, MT7615_EEPROM_FULL_SIZE);
        if (ret < 0)
                return ret;
 
index 40fed7adc58a929b510467482d8fccce41064b98..a024dee103620d9f886fab4a1be17381376b05d7 100644 (file)
@@ -17,7 +17,7 @@
 #define MT7615_EEPROM_TXDPD_SIZE               216
 #define MT7615_EEPROM_TXDPD_COUNT              (44 + 3)
 
-#define MT7615_EEPROM_EXTRA_DATA               (MT7615_EEPROM_TXDPD_OFFSET + \
+#define MT7615_EEPROM_FULL_SIZE                        (MT7615_EEPROM_TXDPD_OFFSET + \
                                                 MT7615_EEPROM_TXDPD_COUNT * \
                                                 MT7615_EEPROM_TXDPD_SIZE)