mt76: mt7915: do not read rf value from efuse in flash mode
authorShayne Chen <shayne.chen@mediatek.com>
Wed, 21 Apr 2021 08:39:45 +0000 (16:39 +0800)
committerFelix Fietkau <nbd@nbd.name>
Wed, 21 Apr 2021 18:55:55 +0000 (20:55 +0200)
Do not read rf value from efuse when driver is configured to
use flash mode.

Tested-by: Bruce Chuang <bruce-ss.chuang@mediatek.com>
Signed-off-by: Shayne Chen <shayne.chen@mediatek.com>
Signed-off-by: Felix Fietkau <nbd@nbd.name>
drivers/net/wireless/mediatek/mt76/mt7915/eeprom.c

index 677c913..8ededf2 100644 (file)
@@ -8,7 +8,7 @@ static u32 mt7915_eeprom_read(struct mt7915_dev *dev, u32 offset)
 {
        u8 *data = dev->mt76.eeprom.data;
 
-       if (data[offset] == 0xff)
+       if (data[offset] == 0xff && !dev->flash_mode)
                mt7915_mcu_get_eeprom(dev, offset);
 
        return data[offset];