diff options
author | Johannes Berg <johannes.berg@intel.com> | 2023-06-06 14:49:22 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2023-06-07 19:53:09 +0200 |
commit | a993df0f9143e63eca38c96a30daf08db99a98a3 (patch) | |
tree | d499f9bda6869b3b4f9a3269ff785969bf886a7c /net/wireless | |
parent | 0dcb84ede5b0a99fc125df2f82ca1f539d41446d (diff) | |
download | linux-stable-a993df0f9143e63eca38c96a30daf08db99a98a3.tar.gz linux-stable-a993df0f9143e63eca38c96a30daf08db99a98a3.tar.bz2 linux-stable-a993df0f9143e63eca38c96a30daf08db99a98a3.zip |
wifi: cfg80211: move wowlan disable under locks
This is a driver callback, and the driver should be able
to assume that it's called with the wiphy lock held. Move
the call up so that's true, it has no other effect since
the device is already unregistering and we cannot reach
this function through other paths.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/core.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c index 2e12b166c6fc..a04b6eeb55f8 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c @@ -1065,6 +1065,10 @@ void wiphy_unregister(struct wiphy *wiphy) cfg80211_rdev_list_generation++; device_del(&rdev->wiphy.dev); +#ifdef CONFIG_PM + if (rdev->wiphy.wowlan_config && rdev->ops->set_wakeup) + rdev_set_wakeup(rdev, false); +#endif wiphy_unlock(&rdev->wiphy); rtnl_unlock(); @@ -1080,10 +1084,6 @@ void wiphy_unregister(struct wiphy *wiphy) flush_work(&rdev->mgmt_registrations_update_wk); flush_work(&rdev->background_cac_abort_wk); -#ifdef CONFIG_PM - if (rdev->wiphy.wowlan_config && rdev->ops->set_wakeup) - rdev_set_wakeup(rdev, false); -#endif cfg80211_rdev_free_wowlan(rdev); cfg80211_rdev_free_coalesce(rdev); } |