diff options
author | Johannes Berg <johannes.berg@intel.com> | 2023-08-28 14:59:38 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2023-09-11 12:27:19 +0300 |
commit | 228e4f931b0e630dacca8dd867ddd863aea53913 (patch) | |
tree | 2f22ffc35dded9fcd75b527b0edd5261e869c965 /net/mac80211/util.c | |
parent | 766d2601a6e50b52c5dcc47dce6d64faa2cffb30 (diff) | |
download | linux-228e4f931b0e630dacca8dd867ddd863aea53913.tar.xz |
wifi: mac80211: move radar detect work to wiphy work
Move the radar detect work to wiphy work in order
to lock the wiphy for it without doing it manually.
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/util.c')
-rw-r--r-- | net/mac80211/util.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index ff99aee46656..701f5b4eadae 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c @@ -4358,7 +4358,8 @@ void ieee80211_dfs_cac_cancel(struct ieee80211_local *local) mutex_unlock(&local->mtx); } -void ieee80211_dfs_radar_detected_work(struct work_struct *work) +void ieee80211_dfs_radar_detected_work(struct wiphy *wiphy, + struct wiphy_work *work) { struct ieee80211_local *local = container_of(work, struct ieee80211_local, radar_detected_work); @@ -4376,9 +4377,7 @@ void ieee80211_dfs_radar_detected_work(struct work_struct *work) } mutex_unlock(&local->chanctx_mtx); - wiphy_lock(local->hw.wiphy); ieee80211_dfs_cac_cancel(local); - wiphy_unlock(local->hw.wiphy); if (num_chanctx > 1) /* XXX: multi-channel is not supported yet */ @@ -4393,7 +4392,7 @@ void ieee80211_radar_detected(struct ieee80211_hw *hw) trace_api_radar_detected(local); - schedule_work(&local->radar_detected_work); + wiphy_work_queue(hw->wiphy, &local->radar_detected_work); } EXPORT_SYMBOL(ieee80211_radar_detected); |