summaryrefslogtreecommitdiff
path: root/net/mac80211/main.c
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/main.c
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/main.c')
-rw-r--r--net/mac80211/main.c7
1 files changed, 4 insertions, 3 deletions
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);