Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH ath-next] wifi: ath6kl: set the permanent MAC address of the wiphy
@ 2026-11-30 12:16 Josef Schlehofer
  0 siblings, 0 replies; only message in thread
From: Josef Schlehofer @ 2026-11-30 12:16 UTC (permalink / raw)
  To: Jeff Johnson; +Cc: linux-wireless, stable

ath6kl never sets wiphy->perm_addr. /sys/class/ieee80211/phyN/macaddress
then reads 00:00:00:00:00:00, while the netdev has the address the
firmware reported. User space that takes interface addresses from the
phy gets the zero address. OpenWrt does this for its access points,
and ath6kl cannot change the address of its netdev afterwards.

Copy the address from the ready event into wiphy->perm_addr before the
wiphy is registered. ath6kl_init_hw_start() waits for that event, so
the address is known by then.

Fixes: bdcd81707973 ("Add ath6kl cleaned up driver")
Cc: stable@vger.kernel.org
Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
---
On a Xiaomi AIoT AC2350 (AR6006 hw1.1 on USB, with the pending AR6006
series), /sys/class/ieee80211/phyN/macaddress read 00:00:00:00:00:00
before this patch and the address of the netdev after it.

 drivers/net/wireless/ath/ath6kl/cfg80211.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c
index c91560d55..6dea62238 100644
--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
+++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
@@ -3999,6 +3999,8 @@ int ath6kl_cfg80211_init(struct ath6kl *ar)
 		NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS2 |
 		NL80211_PROBE_RESP_OFFLOAD_SUPPORT_P2P;
 
+	memcpy(wiphy->perm_addr, ar->mac_addr, ETH_ALEN);
+
 	ret = wiphy_register(wiphy);
 	if (ret < 0) {
 		ath6kl_err("couldn't register wiphy device\n");
-- 
2.54.0 (Apple Git-157)


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-30 12:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30 12:16 [PATCH ath-next] wifi: ath6kl: set the permanent MAC address of the wiphy Josef Schlehofer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox