Skip to content

Commit

Permalink
wifi: mac80211: Create resources for disabled links
Browse files Browse the repository at this point in the history
[ Upstream commit aaba3cd ]

When associating to an MLD AP, links may be disabled. Create all
resources associated with a disabled link so that we can later enable it
without having to create these resources on the fly.

Fixes: 6d543b3 ("wifi: mac80211: Support disabled links during association")
Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Link: https://lore.kernel.org/r/20230925173028.f9afdb26f6c7.I4e6e199aaefc1bf017362d64f3869645fa6830b5@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Benjamin Berg authored and Greg Kroah-Hartman committed Oct 10, 2023
1 parent cda3dc6 commit 9a7786e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions net/mac80211/mlme.c
Original file line number Diff line number Diff line change
Expand Up @@ -5107,9 +5107,10 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata,
continue;

valid_links |= BIT(link_id);
if (assoc_data->link[link_id].disabled) {
if (assoc_data->link[link_id].disabled)
dormant_links |= BIT(link_id);
} else if (link_id != assoc_data->assoc_link_id) {

if (link_id != assoc_data->assoc_link_id) {
err = ieee80211_sta_allocate_link(sta, link_id);
if (err)
goto out_err;
Expand All @@ -5124,7 +5125,7 @@ static bool ieee80211_assoc_success(struct ieee80211_sub_if_data *sdata,
struct ieee80211_link_data *link;
struct link_sta_info *link_sta;

if (!cbss || assoc_data->link[link_id].disabled)
if (!cbss)
continue;

link = sdata_dereference(sdata->link[link_id], sdata);
Expand Down

0 comments on commit 9a7786e

Please sign in to comment.