diff options
author | Johannes Berg <johannes.berg@intel.com> | 2023-08-28 13:59:54 +0200 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2023-09-11 11:27:21 +0200 |
commit | beb2df475b7cfcc3e107afb4dd2a031bc34fe416 (patch) | |
tree | c4ccc793c138f7d57b3fd55b88218dabb25a581d /net/wireless/sme.c | |
parent | wifi: cfg80211: reg: hold wiphy mutex for wdev iteration (diff) | |
download | linux-beb2df475b7cfcc3e107afb4dd2a031bc34fe416.tar.xz linux-beb2df475b7cfcc3e107afb4dd2a031bc34fe416.zip |
wifi: cfg80211: sme: hold wiphy lock for wdev iteration
Since we will want to remove the wdev lock in the future,
lock the wiphy here to iterate and for checking the status
of the connections.
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/sme.c')
-rw-r--r-- | net/wireless/sme.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/wireless/sme.c b/net/wireless/sme.c index 53ba46f85ceb..c271f30b58fa 100644 --- a/net/wireless/sme.c +++ b/net/wireless/sme.c @@ -703,6 +703,7 @@ static bool cfg80211_is_all_idle(void) * as chan dfs state, etc. */ for_each_rdev(rdev) { + wiphy_lock(&rdev->wiphy); list_for_each_entry(wdev, &rdev->wiphy.wdev_list, list) { wdev_lock(wdev); if (wdev->conn || wdev->connected || @@ -710,6 +711,7 @@ static bool cfg80211_is_all_idle(void) is_all_idle = false; wdev_unlock(wdev); } + wiphy_unlock(&rdev->wiphy); } return is_all_idle; |