Skip to content

Commit

Permalink
cfg80211: shut down interfaces on failed resume
Browse files Browse the repository at this point in the history
If resume fails, we should shut down all interfaces as the
hardware is probably dead. This was/is already done now in
mac80211, but we need to change that due to locking issues,
so move it here and do it without the wiphy lock held.

Cc: stable@vger.kernel.org
Fixes: 2fe8ef1 ("cfg80211: change netdev registration/unregistration semantics")
Link: https://lore.kernel.org/r/20210608113226.d564ca69de7c.I2e3c3e5d410b72a4f63bade4fb075df041b3d92f@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
Johannes Berg committed Jun 9, 2021
1 parent 43076c1 commit 65bec83
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions net/wireless/sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@ static int wiphy_resume(struct device *dev)
if (rdev->wiphy.registered && rdev->ops->resume)
ret = rdev_resume(rdev);
wiphy_unlock(&rdev->wiphy);

if (ret)
cfg80211_shutdown_all_interfaces(&rdev->wiphy);

rtnl_unlock();

return ret;
Expand Down

0 comments on commit 65bec83

Please sign in to comment.