summaryrefslogtreecommitdiff
path: root/net/mac80211/cfg.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2023-06-19 12:03:51 +0200
committerJohannes Berg <johannes.berg@intel.com>2023-06-19 12:04:16 +0200
commitd5a17cfb9875a873474985f630b5061a4f2142b2 (patch)
tree14e6a9c9064c3a190ff25aa3af61316646acc36d /net/mac80211/cfg.c
parent707a13c7e488785170a5e7f2467f2823824651e2 (diff)
parentf1a0898b5d6a77d332d036da03bad6fa9770de5b (diff)
downloadlwn-d5a17cfb9875a873474985f630b5061a4f2142b2.tar.gz
lwn-d5a17cfb9875a873474985f630b5061a4f2142b2.zip
Merge wireless into wireless-next
There are some locking changes that will later otherwise cause conflicts, so merge wireless into wireless-next to avoid those. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/cfg.c')
-rw-r--r--net/mac80211/cfg.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index d31b66723ccc..ca6d53d5751d 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -4862,11 +4862,16 @@ static int ieee80211_add_intf_link(struct wiphy *wiphy,
unsigned int link_id)
{
struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
+ int res;
if (wdev->use_4addr)
return -EOPNOTSUPP;
- return ieee80211_vif_set_links(sdata, wdev->valid_links);
+ mutex_lock(&sdata->local->mtx);
+ res = ieee80211_vif_set_links(sdata, wdev->valid_links);
+ mutex_unlock(&sdata->local->mtx);
+
+ return res;
}
static void ieee80211_del_intf_link(struct wiphy *wiphy,
@@ -4875,7 +4880,9 @@ static void ieee80211_del_intf_link(struct wiphy *wiphy,
{
struct ieee80211_sub_if_data *sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
+ mutex_lock(&sdata->local->mtx);
ieee80211_vif_set_links(sdata, wdev->valid_links);
+ mutex_unlock(&sdata->local->mtx);
}
static int sta_add_link_station(struct ieee80211_local *local,