[PATCH 0/6] wifi: wilc1000: fix default mac address

From: Alexis Lothoré
Date: Wed Apr 17 2024 - 05:34:59 EST


This series aims to fix invalid mac address issue raised by Thiery Heiko
([1]). WILC1000 mac address is currently not set until device is opened, at
which point firmware is loaded and started. This results in default mac
address being 00:00:00:00:00:00.

This series, based on an initial patch from Ajay, reads the MAC address
from chip eFuse whenever we set the first interface (at probe time). To do
so, we need to ensure that any bus communication is properly initialized,
so the first commits slightly rearrange/fix initialization/registration
order to allow to read MAC address properly.
Based on the tests I did during this series adjustments, there are still a
few corner cased not properly handled, especially when dealing with two
interfaces on top of the same wphy, but it fixes at least the user-facing
mac address for those interfaces so user space network managers are not
confused anymore.

[1] https://lore.kernel.org/netdev/CAEyMn7aV-B4OEhHR4Ad0LM3sKCz1-nDqSb9uZNmRWR-hMZ=z+A@xxxxxxxxxxxxxx/

---
Ajay Singh (1):
wifi: wilc1000: read MAC address from fuse at probe

Alexis Lothoré (5):
wifi: wilc1000: set net device registration as last step during interface creation
wifi: wilc1000: register net device only after bus being fully initialized
wifi: wilc1000: set wilc_set_mac_address parameter as const
wifi: wilc1000: add function to read mac address from eFuse
wifi: wilc1000: make sdio deinit function really deinit the sdio card

drivers/net/wireless/microchip/wilc1000/cfg80211.c | 10 ---
drivers/net/wireless/microchip/wilc1000/fw.h | 13 ++++
drivers/net/wireless/microchip/wilc1000/hif.c | 4 +-
drivers/net/wireless/microchip/wilc1000/hif.h | 2 +-
drivers/net/wireless/microchip/wilc1000/netdev.c | 71 ++++++++++++----------
drivers/net/wireless/microchip/wilc1000/netdev.h | 2 +
drivers/net/wireless/microchip/wilc1000/sdio.c | 71 +++++++++++++++++++++-
drivers/net/wireless/microchip/wilc1000/spi.c | 17 +++++-
drivers/net/wireless/microchip/wilc1000/wlan.c | 48 +++++++++++++++
drivers/net/wireless/microchip/wilc1000/wlan.h | 1 +
10 files changed, 191 insertions(+), 48 deletions(-)
---
base-commit: db5037bd459adeba309af1f97fd5c9b6a0788b2a
change-id: 20231221-mac_addr_at_probe-3cb6044b251d

Best regards,
--
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com