diff options
| author | Brian Norris | 2018-08-28 18:48:17 +0200 |
|---|---|---|
| committer | Kalle Valo | 2018-09-03 18:53:18 +0200 |
| commit | 9d5804662ce1f9bdde0a14c3c40940acbbf09538 (patch) | |
| tree | f71677d974b3a69bbcd508fbb14a479ab69a89d2 /drivers/net/wireless/ath/ath10k/wmi.c | |
| parent | Merge ath-next from git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git (diff) | |
| download | kernel-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/wmi.c')
| -rw-r--r-- | drivers/net/wireless/ath/ath10k/wmi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c index 40ce0e4006bc..212005cd0646 100644 --- a/drivers/net/wireless/ath/ath10k/wmi.c +++ b/drivers/net/wireless/ath/ath10k/wmi.c @@ -5455,7 +5455,8 @@ int ath10k_wmi_event_ready(struct ath10k *ar, struct sk_buff *skb) arg.mac_addr, __le32_to_cpu(arg.status)); - ether_addr_copy(ar->mac_addr, arg.mac_addr); + if (is_zero_ether_addr(ar->mac_addr)) + ether_addr_copy(ar->mac_addr, arg.mac_addr); complete(&ar->wmi.unified_ready); return 0; } |
