diff options
Diffstat (limited to 'drivers/net/wireless/mac80211_hwsim.c')
| -rw-r--r-- | drivers/net/wireless/mac80211_hwsim.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index a111bda392e..7916ca3f84c 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c | |||
| @@ -709,7 +709,7 @@ static const struct ieee80211_ops mac80211_hwsim_ops = | |||
| 709 | static void mac80211_hwsim_free(void) | 709 | static void mac80211_hwsim_free(void) |
| 710 | { | 710 | { |
| 711 | struct list_head tmplist, *i, *tmp; | 711 | struct list_head tmplist, *i, *tmp; |
| 712 | struct mac80211_hwsim_data *data; | 712 | struct mac80211_hwsim_data *data, *tmpdata; |
| 713 | 713 | ||
| 714 | INIT_LIST_HEAD(&tmplist); | 714 | INIT_LIST_HEAD(&tmplist); |
| 715 | 715 | ||
| @@ -718,7 +718,7 @@ static void mac80211_hwsim_free(void) | |||
| 718 | list_move(i, &tmplist); | 718 | list_move(i, &tmplist); |
| 719 | spin_unlock_bh(&hwsim_radio_lock); | 719 | spin_unlock_bh(&hwsim_radio_lock); |
| 720 | 720 | ||
| 721 | list_for_each_entry(data, &tmplist, list) { | 721 | list_for_each_entry_safe(data, tmpdata, &tmplist, list) { |
| 722 | debugfs_remove(data->debugfs_group); | 722 | debugfs_remove(data->debugfs_group); |
| 723 | debugfs_remove(data->debugfs_ps); | 723 | debugfs_remove(data->debugfs_ps); |
| 724 | debugfs_remove(data->debugfs); | 724 | debugfs_remove(data->debugfs); |
| @@ -1167,8 +1167,8 @@ static void __exit exit_mac80211_hwsim(void) | |||
| 1167 | { | 1167 | { |
| 1168 | printk(KERN_DEBUG "mac80211_hwsim: unregister radios\n"); | 1168 | printk(KERN_DEBUG "mac80211_hwsim: unregister radios\n"); |
| 1169 | 1169 | ||
| 1170 | unregister_netdev(hwsim_mon); | ||
| 1171 | mac80211_hwsim_free(); | 1170 | mac80211_hwsim_free(); |
| 1171 | unregister_netdev(hwsim_mon); | ||
| 1172 | } | 1172 | } |
| 1173 | 1173 | ||
| 1174 | 1174 | ||
