wifi: ath6kl: set the permanent MAC address of the wiphy
Subsystems (2)
PATCH 1/1 wifi: ath6kl: set the permanent MAC address of the wiphy
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.
---
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(+)
drivers/net/wireless/ath/ath6kl/cfg80211.c +2 -0
@@ -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" );
Signature · 1 line
2.54.0 (Apple Git-157)