mac80211_hwsim: fix unregistration
Johannes Berg
maintainerPATCH 1/1 mac80211_hwsim: fix unregistration
If you rmmod the module while associated, frames might be transmitted during unregistration -- which will crash if the hwsim%d interface is unregistered first, so only do that after all the virtual wiphys are gone.
Signed-off-by Johannes Berg <[email protected]>
--- drivers/net/wireless/mac80211_hwsim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/mac80211_hwsim.c +1 -1
@@ -1250,8 +1250,8 @@ static void __exit exit_mac80211_hwsim(v {printk (KERN_DEBUG "mac80211_hwsim: unregister radios\n" ); -unregister_netdev (hwsim_mon);mac80211_hwsim_free (); +unregister_netdev (hwsim_mon); }