Skip to content

Commit 83f1d48

Browse files
committed
wifi: nl80211: fix assoc link handling
JIRA: https://issues.redhat.com/browse/RHEL-79791 commit 2e85829 Author: Johannes Berg <johannes.berg@intel.com> Date: Thu Mar 6 12:37:57 2025 +0200 wifi: nl80211: fix assoc link handling The refactoring of the assoc link handling in order to support multi-link reconfiguration broke the setting of the assoc link ID, and thus resulted in the wrong BSS "use_for" value being selected. Fix that for both association and ML reconfiguration. Fixes: 720fa44 ("wifi: nl80211: Split the links handling of an association request") Signed-off-by: Johannes Berg <johannes.berg@intel.com> Reviewed-by: Ilan Peer <ilan.peer@intel.com> Signed-off-by: Miri Korenblit <miriam.rachel.korenblit@intel.com> Link: https://patch.msgid.link/20250306123626.7b233d769c32.I62fd04a8667dd55cedb9a1c0414cc92dd098da75@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Jose Ignacio Tornos Martinez <jtornosm@redhat.com>
1 parent 4835f0a commit 83f1d48

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

net/wireless/nl80211.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11132,6 +11132,7 @@ static struct cfg80211_bss *nl80211_assoc_bss(struct cfg80211_registered_device
1113211132

1113311133
static int nl80211_process_links(struct cfg80211_registered_device *rdev,
1113411134
struct cfg80211_assoc_link *links,
11135+
int assoc_link_id,
1113511136
const u8 *ssid, int ssid_len,
1113611137
struct genl_info *info)
1113711138
{
@@ -11162,7 +11163,7 @@ static int nl80211_process_links(struct cfg80211_registered_device *rdev,
1116211163
}
1116311164
links[link_id].bss =
1116411165
nl80211_assoc_bss(rdev, ssid, ssid_len, attrs,
11165-
link_id, link_id);
11166+
assoc_link_id, link_id);
1116611167
if (IS_ERR(links[link_id].bss)) {
1116711168
err = PTR_ERR(links[link_id].bss);
1116811169
links[link_id].bss = NULL;
@@ -11359,8 +11360,8 @@ static int nl80211_associate(struct sk_buff *skb, struct genl_info *info)
1135911360
req.ap_mld_addr = nla_data(info->attrs[NL80211_ATTR_MLD_ADDR]);
1136011361
ap_addr = req.ap_mld_addr;
1136111362

11362-
err = nl80211_process_links(rdev, req.links, ssid, ssid_len,
11363-
info);
11363+
err = nl80211_process_links(rdev, req.links, req.link_id,
11364+
ssid, ssid_len, info);
1136411365
if (err)
1136511366
goto free;
1136611367

@@ -16524,7 +16525,10 @@ static int nl80211_assoc_ml_reconf(struct sk_buff *skb, struct genl_info *info)
1652416525

1652516526
add_links = 0;
1652616527
if (info->attrs[NL80211_ATTR_MLO_LINKS]) {
16527-
err = nl80211_process_links(rdev, links, NULL, 0, info);
16528+
err = nl80211_process_links(rdev, links,
16529+
/* mark as MLO, but not assoc */
16530+
IEEE80211_MLD_MAX_NUM_LINKS,
16531+
NULL, 0, info);
1652816532
if (err)
1652916533
return err;
1653016534

0 commit comments

Comments
 (0)