diff options
Diffstat (limited to 'net/wireless/core.c')
-rw-r--r-- | net/wireless/core.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c index 1a78b3c70cf2..6891cd0e38d5 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c | |||
@@ -548,11 +548,6 @@ void wiphy_unregister(struct wiphy *wiphy) | |||
548 | /* unlock again before freeing */ | 548 | /* unlock again before freeing */ |
549 | mutex_unlock(&rdev->mtx); | 549 | mutex_unlock(&rdev->mtx); |
550 | 550 | ||
551 | cancel_work_sync(&rdev->conn_work); | ||
552 | cancel_work_sync(&rdev->scan_done_wk); | ||
553 | kfree(rdev->scan_req); | ||
554 | flush_work(&rdev->event_work); | ||
555 | |||
556 | cfg80211_debugfs_rdev_del(rdev); | 551 | cfg80211_debugfs_rdev_del(rdev); |
557 | 552 | ||
558 | /* If this device got a regulatory hint tell core its | 553 | /* If this device got a regulatory hint tell core its |
@@ -564,6 +559,11 @@ void wiphy_unregister(struct wiphy *wiphy) | |||
564 | debugfs_remove(rdev->wiphy.debugfsdir); | 559 | debugfs_remove(rdev->wiphy.debugfsdir); |
565 | 560 | ||
566 | mutex_unlock(&cfg80211_mutex); | 561 | mutex_unlock(&cfg80211_mutex); |
562 | |||
563 | cancel_work_sync(&rdev->conn_work); | ||
564 | cancel_work_sync(&rdev->scan_done_wk); | ||
565 | kfree(rdev->scan_req); | ||
566 | flush_work(&rdev->event_work); | ||
567 | } | 567 | } |
568 | EXPORT_SYMBOL(wiphy_unregister); | 568 | EXPORT_SYMBOL(wiphy_unregister); |
569 | 569 | ||
@@ -666,14 +666,10 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb, | |||
666 | wdev_lock(wdev); | 666 | wdev_lock(wdev); |
667 | switch (wdev->iftype) { | 667 | switch (wdev->iftype) { |
668 | case NL80211_IFTYPE_ADHOC: | 668 | case NL80211_IFTYPE_ADHOC: |
669 | if (wdev->wext.ibss.ssid_len) | 669 | cfg80211_ibss_wext_join(rdev, wdev); |
670 | __cfg80211_join_ibss(rdev, dev, | ||
671 | &wdev->wext.ibss); | ||
672 | break; | 670 | break; |
673 | case NL80211_IFTYPE_STATION: | 671 | case NL80211_IFTYPE_STATION: |
674 | if (wdev->wext.connect.ssid_len) | 672 | cfg80211_mgd_wext_connect(rdev, wdev); |
675 | __cfg80211_connect(rdev, dev, | ||
676 | &wdev->wext.connect); | ||
677 | break; | 673 | break; |
678 | default: | 674 | default: |
679 | break; | 675 | break; |
@@ -690,6 +686,9 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb, | |||
690 | } | 686 | } |
691 | mutex_unlock(&rdev->devlist_mtx); | 687 | mutex_unlock(&rdev->devlist_mtx); |
692 | mutex_destroy(&wdev->mtx); | 688 | mutex_destroy(&wdev->mtx); |
689 | #ifdef CONFIG_WIRELESS_EXT | ||
690 | kfree(wdev->wext.keys); | ||
691 | #endif | ||
693 | break; | 692 | break; |
694 | case NETDEV_PRE_UP: | 693 | case NETDEV_PRE_UP: |
695 | if (!(wdev->wiphy->interface_modes & BIT(wdev->iftype))) | 694 | if (!(wdev->wiphy->interface_modes & BIT(wdev->iftype))) |