From: "Alexis Lothoré" <alexis.lothore@bootlin.com>
To: Ajay Singh <ajay.kathat@microchip.com>,
Claudiu Beznea <claudiu.beznea@tuxon.dev>,
Kalle Valo <kvalo@kernel.org>
Cc: "Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
linux-wireless@vger.kernel.org, linux-kernel@vger.kernel.org,
"Alexis Lothoré" <alexis.lothore@bootlin.com>,
"Heiko Thiery" <heiko.thiery@gmail.com>
Subject: [PATCH 0/6] wifi: wilc1000: fix default mac address
Date: Wed, 17 Apr 2024 11:34:07 +0200 [thread overview]
Message-ID: <20240417-mac_addr_at_probe-v1-0-67d6c9b3bc2b@bootlin.com> (raw)
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@mail.gmail.com/
---
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
next reply other threads:[~2024-04-17 9:34 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-17 9:34 Alexis Lothoré [this message]
2024-04-17 9:34 ` [PATCH 1/6] wifi: wilc1000: set net device registration as last step during interface creation Alexis Lothoré
2024-05-14 12:45 ` Kalle Valo
2024-05-14 13:09 ` Alexis Lothoré
2024-05-14 13:21 ` Kalle Valo
2024-04-17 9:34 ` [PATCH 2/6] wifi: wilc1000: register net device only after bus being fully initialized Alexis Lothoré
2024-04-17 9:34 ` [PATCH 3/6] wifi: wilc1000: set wilc_set_mac_address parameter as const Alexis Lothoré
2024-04-17 9:34 ` [PATCH 4/6] wifi: wilc1000: add function to read mac address from eFuse Alexis Lothoré
2024-04-17 9:34 ` [PATCH 5/6] wifi: wilc1000: make sdio deinit function really deinit the sdio card Alexis Lothoré
2024-04-17 9:34 ` [PATCH 6/6] wifi: wilc1000: read MAC address from fuse at probe Alexis Lothoré
2024-04-23 8:00 ` Heiko Thiery
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240417-mac_addr_at_probe-v1-0-67d6c9b3bc2b@bootlin.com \
--to=alexis.lothore@bootlin.com \
--cc=ajay.kathat@microchip.com \
--cc=claudiu.beznea@tuxon.dev \
--cc=heiko.thiery@gmail.com \
--cc=kvalo@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).