summaryrefslogtreecommitdiff
path: root/net/mac80211
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2023-08-28 13:59:49 +0200
committerJohannes Berg <johannes.berg@intel.com>2023-09-11 11:27:20 +0200
commita6add8bee6a166d4f15bbd231ce7b71ad88bb8db (patch)
treedd5936a0de976a929e03b11da5a4295eb1c87a86 /net/mac80211
parentaca40a5fa679708b9cc7d0de5255e6d6f4b9d2c9 (diff)
wifi: mac80211: move filter reconfig to wiphy work
This again is intended for future cleanups that are possible when mac80211 and drivers can assume the wiphy is locked. Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211')
-rw-r--r--net/mac80211/ieee80211_i.h2
-rw-r--r--net/mac80211/iface.c2
-rw-r--r--net/mac80211/main.c7
-rw-r--r--net/mac80211/util.c2
4 files changed, 7 insertions, 6 deletions
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 34f528f7c13e..a5569f9bb83f 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1368,7 +1368,7 @@ struct ieee80211_local {
spinlock_t filter_lock;
/* used for uploading changed mc list */
- struct work_struct reconfig_filter;
+ struct wiphy_work reconfig_filter;
/* aggregated multicast list */
struct netdev_hw_addr_list mc_list;
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index fbfb9037b523..82bb340ef4be 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -778,7 +778,7 @@ static void ieee80211_set_multicast_list(struct net_device *dev)
spin_lock_bh(&local->filter_lock);
__hw_addr_sync(&local->mc_list, &dev->mc, dev->addr_len);
spin_unlock_bh(&local->filter_lock);
- ieee80211_queue_work(&local->hw, &local->reconfig_filter);
+ wiphy_work_queue(local->hw.wiphy, &local->reconfig_filter);
}
/*
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index a66cfdca42ef..37714dcf9f06 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -84,7 +84,8 @@ void ieee80211_configure_filter(struct ieee80211_local *local)
local->filter_flags = new_flags & ~(1<<31);
}
-static void ieee80211_reconfig_filter(struct work_struct *work)
+static void ieee80211_reconfig_filter(struct wiphy *wiphy,
+ struct wiphy_work *work)
{
struct ieee80211_local *local =
container_of(work, struct ieee80211_local, reconfig_filter);
@@ -835,7 +836,7 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len,
wiphy_work_init(&local->radar_detected_work,
ieee80211_dfs_radar_detected_work);
- INIT_WORK(&local->reconfig_filter, ieee80211_reconfig_filter);
+ wiphy_work_init(&local->reconfig_filter, ieee80211_reconfig_filter);
local->smps_mode = IEEE80211_SMPS_OFF;
wiphy_work_init(&local->dynamic_ps_enable_work,
@@ -1503,13 +1504,13 @@ void ieee80211_unregister_hw(struct ieee80211_hw *hw)
wiphy_lock(local->hw.wiphy);
wiphy_delayed_work_cancel(local->hw.wiphy, &local->roc_work);
+ wiphy_work_cancel(local->hw.wiphy, &local->reconfig_filter);
wiphy_work_cancel(local->hw.wiphy, &local->sched_scan_stopped_work);
wiphy_work_cancel(local->hw.wiphy, &local->radar_detected_work);
wiphy_unlock(local->hw.wiphy);
rtnl_unlock();
cancel_work_sync(&local->restart_work);
- cancel_work_sync(&local->reconfig_filter);
ieee80211_clear_tx_pending(local);
rate_control_deinitialize(local);
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 2815f54c5aa1..bb4c7dd03758 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -2316,7 +2316,7 @@ void ieee80211_stop_device(struct ieee80211_local *local)
ieee80211_led_radio(local, false);
ieee80211_mod_tpt_led_trig(local, 0, IEEE80211_TPT_LEDTRIG_FL_RADIO);
- cancel_work_sync(&local->reconfig_filter);
+ wiphy_work_cancel(local->hw.wiphy, &local->reconfig_filter);
flush_workqueue(local->workqueue);
wiphy_work_flush(local->hw.wiphy, NULL);