aboutsummaryrefslogtreecommitdiff
path: root/net/wireless/core.c
diff options
context:
space:
mode:
authorJohannes Berg2013-05-25 00:01:30 +0200
committerJohannes Berg2013-05-25 00:01:30 +0200
commitdde7dc759b777f385fc5df2af691c82eb455c7f3 (patch)
tree5e8f1fcd10a6b264d60bc8a0503656c0611de222 /net/wireless/core.c
parentb422c6cd7e93bb613030f14d7d8a0cc73f115629 (diff)
parent4c8a9d4bfaf7dbc7d2168494904d79d22cc01db7 (diff)
Merge remote-tracking branch 'mac80211/master' into mac80211-next
Diffstat (limited to 'net/wireless/core.c')
-rw-r--r--net/wireless/core.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 68f0c96c0565..58e69d691601 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -639,17 +639,21 @@ int wiphy_register(struct wiphy *wiphy)
* cfg80211_mutex lock
*/
res = rfkill_register(rdev->rfkill);
- if (res)
- goto out_rm_dev;
+ if (res) {
+ device_del(&rdev->wiphy.dev);
+
+ mutex_lock(&cfg80211_mutex);
+ debugfs_remove_recursive(rdev->wiphy.debugfsdir);
+ list_del_rcu(&rdev->list);
+ wiphy_regulatory_deregister(wiphy);
+ mutex_unlock(&cfg80211_mutex);
+ return res;
+ }
rtnl_lock();
rdev->wiphy.registered = true;
rtnl_unlock();
return 0;
-
-out_rm_dev:
- device_del(&rdev->wiphy.dev);
- return res;
}
EXPORT_SYMBOL(wiphy_register);
@@ -867,7 +871,6 @@ void cfg80211_leave(struct cfg80211_registered_device *rdev,
#endif
__cfg80211_disconnect(rdev, dev,
WLAN_REASON_DEAUTH_LEAVING, true);
- cfg80211_mlme_down(rdev, dev);
wdev_unlock(wdev);
break;
case NL80211_IFTYPE_MESH_POINT: