summaryrefslogtreecommitdiff
path: root/net/mac80211/iface.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2023-08-28 14:59:43 +0300
committerJohannes Berg <johannes.berg@intel.com>2023-09-11 12:27:20 +0300
commit7206a948715414371a285db8f1aab050f7a3941e (patch)
tree7317aa52e60ac7fdde09b8ec9f9b1fb6c75748fc /net/mac80211/iface.c
parent97c19e42b264e6b71a9ff9deea04c19f621805b9 (diff)
downloadlinux-7206a948715414371a285db8f1aab050f7a3941e.tar.xz
wifi: mac80211: move link activation work to wiphy work
We want to have the wiphy locked for these as well, so move it to be a wiphy work. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r--net/mac80211/iface.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index c0539e78a34e..fa4514642d74 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -749,9 +749,9 @@ static int ieee80211_stop(struct net_device *dev)
ieee80211_stop_mbssid(sdata);
}
- cancel_work_sync(&sdata->activate_links_work);
-
wiphy_lock(sdata->local->hw.wiphy);
+ wiphy_work_cancel(sdata->local->hw.wiphy, &sdata->activate_links_work);
+
ieee80211_do_stop(sdata, true);
wiphy_unlock(sdata->local->hw.wiphy);
@@ -1691,7 +1691,8 @@ static void ieee80211_iface_work(struct wiphy *wiphy, struct wiphy_work *work)
}
}
-static void ieee80211_activate_links_work(struct work_struct *work)
+static void ieee80211_activate_links_work(struct wiphy *wiphy,
+ struct wiphy_work *work)
{
struct ieee80211_sub_if_data *sdata =
container_of(work, struct ieee80211_sub_if_data,
@@ -1736,7 +1737,8 @@ static void ieee80211_setup_sdata(struct ieee80211_sub_if_data *sdata,
skb_queue_head_init(&sdata->skb_queue);
skb_queue_head_init(&sdata->status_queue);
wiphy_work_init(&sdata->work, ieee80211_iface_work);
- INIT_WORK(&sdata->activate_links_work, ieee80211_activate_links_work);
+ wiphy_work_init(&sdata->activate_links_work,
+ ieee80211_activate_links_work);
switch (type) {
case NL80211_IFTYPE_P2P_GO: