aboutsummaryrefslogtreecommitdiff
path: root/net/wireless/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/wireless/core.c')
-rw-r--r--net/wireless/core.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c
index 1a78b3c70cf..6891cd0e38d 100644
--- a/net/wireless/core.c
+++ b/net/wireless/core.c
@@ -548,11 +548,6 @@ void wiphy_unregister(struct wiphy *wiphy)
/* unlock again before freeing */
mutex_unlock(&rdev->mtx);
- cancel_work_sync(&rdev->conn_work);
- cancel_work_sync(&rdev->scan_done_wk);
- kfree(rdev->scan_req);
- flush_work(&rdev->event_work);
-
cfg80211_debugfs_rdev_del(rdev);
/* If this device got a regulatory hint tell core its
@@ -564,6 +559,11 @@ void wiphy_unregister(struct wiphy *wiphy)
debugfs_remove(rdev->wiphy.debugfsdir);
mutex_unlock(&cfg80211_mutex);
+
+ cancel_work_sync(&rdev->conn_work);
+ cancel_work_sync(&rdev->scan_done_wk);
+ kfree(rdev->scan_req);
+ flush_work(&rdev->event_work);
}
EXPORT_SYMBOL(wiphy_unregister);
@@ -666,14 +666,10 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb,
wdev_lock(wdev);
switch (wdev->iftype) {
case NL80211_IFTYPE_ADHOC:
- if (wdev->wext.ibss.ssid_len)
- __cfg80211_join_ibss(rdev, dev,
- &wdev->wext.ibss);
+ cfg80211_ibss_wext_join(rdev, wdev);
break;
case NL80211_IFTYPE_STATION:
- if (wdev->wext.connect.ssid_len)
- __cfg80211_connect(rdev, dev,
- &wdev->wext.connect);
+ cfg80211_mgd_wext_connect(rdev, wdev);
break;
default:
break;
@@ -690,6 +686,9 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb,
}
mutex_unlock(&rdev->devlist_mtx);
mutex_destroy(&wdev->mtx);
+#ifdef CONFIG_WIRELESS_EXT
+ kfree(wdev->wext.keys);
+#endif
break;
case NETDEV_PRE_UP:
if (!(wdev->wiphy->interface_modes & BIT(wdev->iftype)))