1: ed8eaa4eca8d ! 1: 9e5dd4a08d57 wifi: ath12k: provide MAC address list for single-radio wiphys @@ Commit message upper nibble of the first octet, which naturally limits the pool to 16 unique addresses.  - Handle only single-radio wiphys. Wiphys with more than one radio behave - exactly as before. + The wiphy->addresses semantics are hardware-specific in ath12k: some + platforms use it as an interface MAC address pool, while others use it + for firmware-provided per-radio addresses. Gate host-generated addresses + behind host_alloc_iface_mac and enable it for WCN7850. + + Handle only single-radio WCN7850 wiphys. Wiphys with more than one radio + and other hardware families behave exactly as before.  Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.1.c7-00108-QCAHMTSWPL_V1.0_V2.0_SILICONZ_UPSTREAM-3  + Assisted-by: LLM Signed-off-by: Vitor Soares   + ## drivers/net/wireless/ath/ath12k/hw.h ## +@@ drivers/net/wireless/ath/ath12k/hw.h: struct ath12k_hw_params { + } client; +  + bool host_alloc_ml_id; ++ bool host_alloc_iface_mac; + }; +  + struct ath12k_hw_ops { + ## drivers/net/wireless/ath/ath12k/mac.c ##  @@ drivers/net/wireless/ath/ath12k/mac.c: static void ath12k_mac_cleanup_unregister(struct ath12k *ar) kfree(ar->mac.sbands[NL80211_BAND_6GHZ].channels); @@ drivers/net/wireless/ath/ath12k/mac.c: static void ath12k_mac_cleanup_unregister  +static void ath12k_mac_setup_mac_address_list(struct ath12k_hw *ah,  + const u8 *mac_addr)  +{ -+ struct ath12k *ar = ath12k_ah_to_ar(ah, 0);  + struct mac_address *addresses; ++ struct ath12k *ar;  + u16 n_addresses;  + int i;  + @@ drivers/net/wireless/ath/ath12k/mac.c: static void ath12k_mac_cleanup_unregister  + if (ah->num_radio != 1)  + return;  + ++ ar = ath12k_ah_to_ar(ah, 0); ++ if (!ar->ab->hw_params->host_alloc_iface_mac) ++ return; ++  + /* Only the upper nibble of the first octet is varied, so at most 16  + * addresses can be derived from one base.  + */ @@ drivers/net/wireless/ath/ath12k/mac.c: static int ath12k_mac_hw_register(struct SET_IEEE80211_DEV(hw, NULL);  return ret; + + ## drivers/net/wireless/ath/ath12k/wifi7/hw.c ## +@@ drivers/net/wireless/ath/ath12k/wifi7/hw.c: static const struct ath12k_hw_params ath12k_wifi7_hw_params[] = { + }, +  + .host_alloc_ml_id = true, ++ .host_alloc_iface_mac = false, + }, + { + .name = "wcn7850 hw2.0", +@@ drivers/net/wireless/ath/ath12k/wifi7/hw.c: static const struct ath12k_hw_params ath12k_wifi7_hw_params[] = { + }, +  + .host_alloc_ml_id = false, ++ .host_alloc_iface_mac = true, + }, + { + .name = "qcn9274 hw2.0", +@@ drivers/net/wireless/ath/ath12k/wifi7/hw.c: static const struct ath12k_hw_params ath12k_wifi7_hw_params[] = { + }, +  + .host_alloc_ml_id = true, ++ .host_alloc_iface_mac = false, + }, + { + .name = "ipq5332 hw1.0", +@@ drivers/net/wireless/ath/ath12k/wifi7/hw.c: static const struct ath12k_hw_params ath12k_wifi7_hw_params[] = { + }, +  + .host_alloc_ml_id = true, ++ .host_alloc_iface_mac = false, + }, + { + .name = "qcc2072 hw1.0", +@@ drivers/net/wireless/ath/ath12k/wifi7/hw.c: static const struct ath12k_hw_params ath12k_wifi7_hw_params[] = { + }, +  + .host_alloc_ml_id = false, ++ .host_alloc_iface_mac = false, + }, + { + .name = "ipq5424 hw1.0", +@@ drivers/net/wireless/ath/ath12k/wifi7/hw.c: static const struct ath12k_hw_params ath12k_wifi7_hw_params[] = { + }, +  + .host_alloc_ml_id = true, ++ .host_alloc_iface_mac = false, + }, + }; +