aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mediatek/mt76/eeprom.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/mediatek/mt76/eeprom.c')
-rw-r--r--drivers/net/wireless/mediatek/mt76/eeprom.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/wireless/mediatek/mt76/eeprom.c b/drivers/net/wireless/mediatek/mt76/eeprom.c
index 443517d06c9f..a987c5e4eff6 100644
--- a/drivers/net/wireless/mediatek/mt76/eeprom.c
+++ b/drivers/net/wireless/mediatek/mt76/eeprom.c
@@ -163,13 +163,16 @@ static int mt76_get_of_eeprom(struct mt76_dev *dev, void *eep, int len)
return mt76_get_of_data_from_nvmem(dev, eep, "eeprom", len);
}
-void
+int
mt76_eeprom_override(struct mt76_phy *phy)
{
struct mt76_dev *dev = phy->dev;
struct device_node *np = dev->dev->of_node;
+ int err;
- of_get_mac_address(np, phy->macaddr);
+ err = of_get_mac_address(np, phy->macaddr);
+ if (err == -EPROBE_DEFER)
+ return err;
if (!is_valid_ether_addr(phy->macaddr)) {
eth_random_addr(phy->macaddr);
@@ -177,6 +180,8 @@ mt76_eeprom_override(struct mt76_phy *phy)
"Invalid MAC address, using random address %pM\n",
phy->macaddr);
}
+
+ return 0;
}
EXPORT_SYMBOL_GPL(mt76_eeprom_override);
kbuild: check uniqueness of module namesMasahiro Yamada2-0/+17 2019-05-18kconfig: Terminate menu blocks with a comment in the generated configAlexander Popov1-1/+12 2019-05-18kbuild: add LICENSES to KBUILD_ALLDIRSMasahiro Yamada1-1/+1 2019-05-18kbuild: remove 'addtree' and 'flags' magic for header search pathsMasahiro Yamada3-33/+13 2019-05-18treewide: prefix header search paths with $(srctree)/Masahiro Yamada17-26/+25 2019-05-18media: prefix header search paths with $(srctree)/Masahiro Yamada30-49/+47 2019-05-18media: remove unneeded header search pathsMasahiro Yamada7-11/+0 2019-05-18alpha: move arch/alpha/defconfig to arch/alpha/configs/defconfigMasahiro Yamada2-0/+2 2019-05-18kbuild: terminate Kconfig when $(CC) or $(LD) is missingMasahiro Yamada2-1/+9 2019-05-18kbuild: turn auto.conf.cmd into a mandatory include fileMasahiro Yamada1-1/+1 2019-05-18.gitignore: exclude .get_maintainer.ignore and .gitattributesMasahiro Yamada1-3/+5 2019-05-18kbuild: add all Clang-specific flags unconditionallyMasahiro Yamada2-11/+11 2019-05-18kbuild: Don't try to add '-fcatch-undefined-behavior' flagNathan Chancellor1-1/+0 2019-05-18kbuild: add some extra warning flags unconditionallyMasahiro Yamada1-6/+7 2019-05-18kbuild: add -Wvla flag unconditionallyMasahiro Yamada1-1/+1 2019-05-18arch: remove dangling asm-generic wrappersMasahiro Yamada5-13/+0 2019-05-18samples: guard sub-directories with CONFIG optionsMasahiro Yamada3-6/+22 2019-05-18kbuild: re-enable int-in-bool-context warningMasahiro Yamada1-1/+0 2019-05-18MAINTAINERS: kbuild: Add pattern for scripts/*vmlinux*Krzysztof Kozlowski1-0/+1 2019-05-18sh: exclude vmlinux.scr from .gitignore patternMasahiro Yamada1-0/+1 2019-05-18sh: vsyscall: drop unnecessary cc-ldoptionNick Desaulniers1-2/+1 2019-05-18ia64: require -Wl,--hash-style=sysvNick Desaulniers1-1/+1 2019-05-18csky: remove deprecated arch/csky/boot/dts/include/dt-bindingsMasahiro Yamada1-1/+0 2019-05-17ext4: avoid panic during forced reboot due to aborted journalJan Kara1-1/+1 2019-05-17i2c: core: add device-managed version of i2c_new_dummyHeiner Kallweit3-0/+50 2019-05-17i2c: core: improve return value handling of i2c_new_device and i2c_new_dummyHeiner Kallweit1-13/+61 2019-05-17powerpc/cacheinfo: Remove double freeTobin C. Harding1-1/+0 2019-05-17powerpc/mm/hash: Fix get_region_id() for invalid addressesAneesh Kumar K.V1-0/+4 2019-05-17kvm: fix compilation on aarch64Paolo Bonzini1-1/+1 2019-05-17objtool: Allow AR to be overridden with HOSTARNathan Chancellor1-1/+2 2019-05-17fbdev/efifb: Ignore framebuffer memmap entries that lack any memory typesArd Biesheuvel1-2/+6 2019-05-16riscv: fix locking violation in page fault handlerAndreas Schwab1-1/+2 2019-05-16RISC-V: sifive_l2_cache: Add L2 cache controller driver for SiFive SoCsYash Shah3-0/+192