Skip to content

Commit

Permalink
mac80211_hwsim: fix unregistration
Browse files Browse the repository at this point in the history
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 <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Johannes Berg authored and John W. Linville committed Jul 21, 2009
1 parent 48ab357 commit 5d41635
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/mac80211_hwsim.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}


Expand Down

0 comments on commit 5d41635

Please sign in to comment.