From: Johannes Berg Date: Mon, 13 Jul 2009 11:04:30 +0000 (+0200) Subject: mac80211_hwsim: fix unregistration X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5d41635195c06fc3116ef3921fe85a9a3ea5ab20;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git 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 Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index a111bda392e2..5bed8241f3cc 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c @@ -1167,8 +1167,8 @@ static void __exit exit_mac80211_hwsim(void) { printk(KERN_DEBUG "mac80211_hwsim: unregister radios\n"); - unregister_netdev(hwsim_mon); mac80211_hwsim_free(); + unregister_netdev(hwsim_mon); }