diff options
Diffstat (limited to 'net/wireless/core.c')
-rw-r--r-- | net/wireless/core.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c index e6f02e98e5fd..eb0bb24b99c3 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c | |||
@@ -358,6 +358,10 @@ struct wiphy *wiphy_new(const struct cfg80211_ops *ops, int sizeof_priv) | |||
358 | INIT_LIST_HEAD(&rdev->bss_list); | 358 | INIT_LIST_HEAD(&rdev->bss_list); |
359 | INIT_WORK(&rdev->scan_done_wk, __cfg80211_scan_done); | 359 | INIT_WORK(&rdev->scan_done_wk, __cfg80211_scan_done); |
360 | 360 | ||
361 | #ifdef CONFIG_CFG80211_WEXT | ||
362 | rdev->wiphy.wext = &cfg80211_wext_handler; | ||
363 | #endif | ||
364 | |||
361 | device_initialize(&rdev->wiphy.dev); | 365 | device_initialize(&rdev->wiphy.dev); |
362 | rdev->wiphy.dev.class = &ieee80211_class; | 366 | rdev->wiphy.dev.class = &ieee80211_class; |
363 | rdev->wiphy.dev.platform_data = rdev; | 367 | rdev->wiphy.dev.platform_data = rdev; |
@@ -672,9 +676,7 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb, | |||
672 | wdev->netdev = dev; | 676 | wdev->netdev = dev; |
673 | wdev->sme_state = CFG80211_SME_IDLE; | 677 | wdev->sme_state = CFG80211_SME_IDLE; |
674 | mutex_unlock(&rdev->devlist_mtx); | 678 | mutex_unlock(&rdev->devlist_mtx); |
675 | #ifdef CONFIG_WIRELESS_EXT | 679 | #ifdef CONFIG_CFG80211_WEXT |
676 | if (!dev->wireless_handlers) | ||
677 | dev->wireless_handlers = &cfg80211_wext_handler; | ||
678 | wdev->wext.default_key = -1; | 680 | wdev->wext.default_key = -1; |
679 | wdev->wext.default_mgmt_key = -1; | 681 | wdev->wext.default_mgmt_key = -1; |
680 | wdev->wext.connect.auth_type = NL80211_AUTHTYPE_AUTOMATIC; | 682 | wdev->wext.connect.auth_type = NL80211_AUTHTYPE_AUTOMATIC; |
@@ -696,7 +698,7 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb, | |||
696 | break; | 698 | break; |
697 | case NL80211_IFTYPE_STATION: | 699 | case NL80211_IFTYPE_STATION: |
698 | wdev_lock(wdev); | 700 | wdev_lock(wdev); |
699 | #ifdef CONFIG_WIRELESS_EXT | 701 | #ifdef CONFIG_CFG80211_WEXT |
700 | kfree(wdev->wext.ie); | 702 | kfree(wdev->wext.ie); |
701 | wdev->wext.ie = NULL; | 703 | wdev->wext.ie = NULL; |
702 | wdev->wext.ie_len = 0; | 704 | wdev->wext.ie_len = 0; |
@@ -728,7 +730,7 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb, | |||
728 | mutex_unlock(&rdev->devlist_mtx); | 730 | mutex_unlock(&rdev->devlist_mtx); |
729 | dev_put(dev); | 731 | dev_put(dev); |
730 | } | 732 | } |
731 | #ifdef CONFIG_WIRELESS_EXT | 733 | #ifdef CONFIG_CFG80211_WEXT |
732 | cfg80211_lock_rdev(rdev); | 734 | cfg80211_lock_rdev(rdev); |
733 | mutex_lock(&rdev->devlist_mtx); | 735 | mutex_lock(&rdev->devlist_mtx); |
734 | wdev_lock(wdev); | 736 | wdev_lock(wdev); |
@@ -766,7 +768,7 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb, | |||
766 | sysfs_remove_link(&dev->dev.kobj, "phy80211"); | 768 | sysfs_remove_link(&dev->dev.kobj, "phy80211"); |
767 | list_del_init(&wdev->list); | 769 | list_del_init(&wdev->list); |
768 | rdev->devlist_generation++; | 770 | rdev->devlist_generation++; |
769 | #ifdef CONFIG_WIRELESS_EXT | 771 | #ifdef CONFIG_CFG80211_WEXT |
770 | kfree(wdev->wext.keys); | 772 | kfree(wdev->wext.keys); |
771 | #endif | 773 | #endif |
772 | } | 774 | } |