diff options
author | Lorenzo Bianconi <lorenzo@kernel.org> | 2021-10-27 12:03:42 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2021-11-19 11:38:50 +0300 |
commit | 1507b153198137dfa9cb4bec7c5dee07089ec3af (patch) | |
tree | 9df318f5c4fc51862693d50d4137762422f39443 /net/wireless/core.c | |
parent | f5d32a7b10713427655a14d4777af7f598d3c1fa (diff) | |
download | linux-1507b153198137dfa9cb4bec7c5dee07089ec3af.tar.xz |
cfg80211: move offchan_cac_event to a dedicated work
In order to make cfg80211_offchan_cac_abort() (renamed from
cfg80211_offchan_cac_event) callable in other contexts and
without so much locking restrictions, make it trigger a new
work instead of operating directly.
Do some other renames while at it to clarify.
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://lore.kernel.org/r/6145c3d0f30400a568023f67981981d24c7c6133.1635325205.git.lorenzo@kernel.org
[rewrite commit log]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/core.c')
-rw-r--r-- | net/wireless/core.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c index 39b2d4ae581d..c4ea903f8184 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c @@ -545,7 +545,9 @@ use_default_name: INIT_WORK(&rdev->rfkill_block, cfg80211_rfkill_block_work); INIT_WORK(&rdev->conn_work, cfg80211_conn_work); INIT_WORK(&rdev->event_work, cfg80211_event_work); - INIT_DELAYED_WORK(&rdev->offchan_cac_work, cfg80211_offchan_cac_work); + INIT_WORK(&rdev->offchan_cac_abort_wk, cfg80211_offchan_cac_abort_wk); + INIT_DELAYED_WORK(&rdev->offchan_cac_done_wk, + cfg80211_offchan_cac_done_wk); init_waitqueue_head(&rdev->dev_wait); @@ -1055,11 +1057,13 @@ void wiphy_unregister(struct wiphy *wiphy) cancel_work_sync(&rdev->conn_work); flush_work(&rdev->event_work); cancel_delayed_work_sync(&rdev->dfs_update_channels_wk); + cancel_delayed_work_sync(&rdev->offchan_cac_done_wk); flush_work(&rdev->destroy_work); flush_work(&rdev->sched_scan_stop_wk); flush_work(&rdev->propagate_radar_detect_wk); flush_work(&rdev->propagate_cac_done_wk); flush_work(&rdev->mgmt_registrations_update_wk); + flush_work(&rdev->offchan_cac_abort_wk); #ifdef CONFIG_PM if (rdev->wiphy.wowlan_config && rdev->ops->set_wakeup) |