mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-28 13:22:57 +00:00
wifi: cfg80211: move wowlan disable under locks
[ Upstream commita993df0f91
] 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> Stable-dep-of:37c20b2eff
("wifi: cfg80211: fix cqm_config access race") Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
fb195ff418
commit
2ae4585f74
1 changed files with 4 additions and 4 deletions
|
@ -1049,6 +1049,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();
|
||||
|
||||
|
@ -1064,10 +1068,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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue