]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
wifi: cfg80211: Update the link address when a link is added
authorIlan Peer <ilan.peer@intel.com>
Sat, 8 Mar 2025 21:03:37 +0000 (23:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 May 2025 09:12:48 +0000 (11:12 +0200)
[ Upstream commit e16caea70610ed4226034dfcdaa5c43b36ff9e0a ]

When links are added, update the wireless device link addresses based
on the information provided by the driver.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com>
Link: https://patch.msgid.link/20250308225541.d694a9125aba.I79b010ea9aab47893e4f22c266362fde30b7f9ac@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
include/net/cfg80211.h
net/wireless/mlme.c

index 363d7dd2255aaeb9fb645dcb1d4bd5215f19a6be..c168b0e89b79dd1a186797290c4709fdf0a1b2f3 100644 (file)
@@ -9750,6 +9750,7 @@ struct cfg80211_mlo_reconf_done_data {
        u16 added_links;
        struct {
                struct cfg80211_bss *bss;
+               u8 *addr;
        } links[IEEE80211_MLD_MAX_NUM_LINKS];
 };
 
index e10f2b3b4b7f64d3512dea76c9a3e6917352d5f1..c1b71179601dbb9eba88c069602feb3efd5e1401 100644 (file)
@@ -1361,6 +1361,10 @@ void cfg80211_mlo_reconf_add_done(struct net_device *dev,
                if (data->added_links & BIT(link_id)) {
                        wdev->links[link_id].client.current_bss =
                                bss_from_pub(bss);
+
+                       memcpy(wdev->links[link_id].addr,
+                              data->links[link_id].addr,
+                              ETH_ALEN);
                } else {
                        cfg80211_unhold_bss(bss_from_pub(bss));
                        cfg80211_put_bss(wiphy, bss);