diff options
author | Johannes Berg <johannes.berg@intel.com> | 2023-08-28 13:59:45 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2023-09-11 11:27:20 +0200 |
commit | eadfb54756aea5610d8d0a467f66305f777c85dd (patch) | |
tree | 136b5096ceba10363e196ffb7eb4a2627fc1137e /net/mac80211/main.c | |
parent | wifi: mac80211: move dynamic PS to wiphy work (diff) | |
download | linux-eadfb54756aea5610d8d0a467f66305f777c85dd.tar.xz linux-eadfb54756aea5610d8d0a467f66305f777c85dd.zip |
wifi: mac80211: move sched-scan stop work to wiphy work
This also has the wiphy locked here then. We need to use
the _locked version of cfg80211_sched_scan_stopped() now,
which also fixes an old deadlock there.
Fixes: a05829a7222e ("cfg80211: avoid holding the RTNL when calling the driver")
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.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 7c165e78115c..ba5382efa950 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c @@ -843,8 +843,8 @@ struct ieee80211_hw *ieee80211_alloc_hw_nm(size_t priv_data_len, ieee80211_dynamic_ps_disable_work); timer_setup(&local->dynamic_ps_timer, ieee80211_dynamic_ps_timer, 0); - INIT_WORK(&local->sched_scan_stopped_work, - ieee80211_sched_scan_stopped_work); + wiphy_work_init(&local->sched_scan_stopped_work, + ieee80211_sched_scan_stopped_work); spin_lock_init(&local->ack_status_lock); idr_init(&local->ack_status_frames); @@ -1502,13 +1502,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->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); - flush_work(&local->sched_scan_stopped_work); ieee80211_clear_tx_pending(local); rate_control_deinitialize(local); |