]> git.baikalelectronics.ru Git - kernel.git/commit
wifi: brcmfmac: firmware: Allow platform to override macaddr
authorHector Martin <marcan@marcan.st>
Fri, 16 Sep 2022 16:03:01 +0000 (17:03 +0100)
committerKalle Valo <kvalo@kernel.org>
Mon, 19 Sep 2022 09:59:34 +0000 (12:59 +0300)
commitc3edb0a5ba0210bfe408be16cac7a04b91f56789
treee3f3784aca0ad2014ed09bf0abfc386fc861b3d0
parent5730db4296e39cc7b4b0c7b1713a06fe21265f01
wifi: brcmfmac: firmware: Allow platform to override macaddr

On Device Tree platforms, it is customary to be able to set the MAC
address via the Device Tree, as it is often stored in system firmware.
This is particularly relevant for Apple ARM64 platforms, where this
information comes from system configuration and passed through by the
bootloader into the DT.

Implement support for this by fetching the platform MAC address and
adding or replacing the macaddr= property in nvram. This becomes the
dongle's default MAC address.

On platforms with an SROM MAC address, this overrides it. On platforms
without one, such as Apple ARM64 devices, this is required for the
firmware to boot (it will fail if it does not have a valid MAC at all).

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Hector Martin <marcan@marcan.st>
Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/E1oZDnx-0077ae-VK@rmk-PC.armlinux.org.uk
drivers/net/wireless/broadcom/brcm80211/brcmfmac/firmware.c