Commit beb2df47 authored by Johannes Berg's avatar Johannes Berg

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: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 0320d68f
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment