summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath10k/core.c
diff options
context:
space:
mode:
authorBrian Norris2018-08-28 18:48:17 +0200
committerKalle Valo2018-09-03 18:53:18 +0200
commit9d5804662ce1f9bdde0a14c3c40940acbbf09538 (patch)
treef71677d974b3a69bbcd508fbb14a479ab69a89d2 /drivers/net/wireless/ath/ath10k/core.c
parentMerge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git (diff)
downloadkernel-qcow2-linux-9d5804662ce1f9bdde0a14c3c40940acbbf09538.tar.gz
kernel-qcow2-linux-9d5804662ce1f9bdde0a14c3c40940acbbf09538.tar.xz
kernel-qcow2-linux-9d5804662ce1f9bdde0a14c3c40940acbbf09538.zip
ath10k: retrieve MAC address from system firmware if provided
Devices may provide their own MAC address via system firmware (e.g., device tree), especially in the case where the device doesn't have a useful EEPROM on which to store its MAC address (e.g., for integrated Wifi). Use the generic device helper to retrieve the MAC address, and (if present) honor it above the MAC address advertised by the card. Signed-off-by: Brian Norris <briannorris@chromium.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/core.c')
-rw-r--r--drivers/net/wireless/ath/ath10k/core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/core.c b/drivers/net/wireless/ath/ath10k/core.c
index ebc213884a9a..f5f71c02fc2b 100644
--- a/drivers/net/wireless/ath/ath10k/core.c
+++ b/drivers/net/wireless/ath/ath10k/core.c
@@ -19,6 +19,7 @@
#include <linux/module.h>
#include <linux/firmware.h>
#include <linux/of.h>
+#include <linux/property.h>
#include <linux/dmi.h>
#include <linux/ctype.h>
#include <asm/byteorder.h>
@@ -2617,6 +2618,8 @@ static int ath10k_core_probe_fw(struct ath10k *ar)
ath10k_debug_print_board_info(ar);
}
+ device_get_mac_address(ar->dev, ar->mac_addr, sizeof(ar->mac_addr));
+
ret = ath10k_core_init_firmware_features(ar);
if (ret) {
ath10k_err(ar, "fatal problem with firmware features: %d\n",