aboutsummaryrefslogtreecommitdiffstats
path: root/net/wireless/reg.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2015-07-08 15:41:50 +0300
committerJohannes Berg <johannes.berg@intel.com>2015-07-17 11:16:26 +0200
commitd8d9008cfb919db48d95f96b05e81f84b3774318 (patch)
tree70a36b93a979d0660e679a3726eb223c7d03a2ef /net/wireless/reg.c
parentmac80211: wowlan: enable powersave if suspend while ps-polling (diff)
downloadlinux-dev-d8d9008cfb919db48d95f96b05e81f84b3774318.tar.xz
linux-dev-d8d9008cfb919db48d95f96b05e81f84b3774318.zip
mac80211: shut down interfaces before destroying interface list
If the hardware is unregistered while interfaces are up, mac80211 will unregister all interfaces, which in turns causes mac80211 to be called again to remove them all from the driver and eventually shut down the hardware. During this shutdown, however, it's currently already unsafe to iterate the list of interfaces atomically, as the list is manipulated in an unsafe manner. This puts an undue burden on the driver - it must stop all its activities before calling ieee80211_unregister_hw(), while in the normal stop path it can do all cleanup in the stop method. If, for example, it's using the iteration during RX for some reason, it would have to stop RX before unregistering to avoid crashes. Fix this problem by closing all interfaces before unregistering them. This will cause the driver stop to have completed before we manipulate the interface list, and after the driver is stopped *and* has called ieee80211_unregister_hw() it really musn't be iterating any more as the memory will be freed as well. Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/wireless/reg.c')
0 files changed, 0 insertions, 0 deletions