diff options
Diffstat (limited to 'net/wireless/core.c')
-rw-r--r-- | net/wireless/core.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c index 71b6b3a9cf1f..7fdb9409ad2a 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c | |||
@@ -677,6 +677,9 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb, | |||
677 | INIT_WORK(&wdev->cleanup_work, wdev_cleanup_work); | 677 | INIT_WORK(&wdev->cleanup_work, wdev_cleanup_work); |
678 | INIT_LIST_HEAD(&wdev->event_list); | 678 | INIT_LIST_HEAD(&wdev->event_list); |
679 | spin_lock_init(&wdev->event_lock); | 679 | spin_lock_init(&wdev->event_lock); |
680 | INIT_LIST_HEAD(&wdev->action_registrations); | ||
681 | spin_lock_init(&wdev->action_registrations_lock); | ||
682 | |||
680 | mutex_lock(&rdev->devlist_mtx); | 683 | mutex_lock(&rdev->devlist_mtx); |
681 | list_add_rcu(&wdev->list, &rdev->netdev_list); | 684 | list_add_rcu(&wdev->list, &rdev->netdev_list); |
682 | rdev->devlist_generation++; | 685 | rdev->devlist_generation++; |
@@ -695,19 +698,21 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb, | |||
695 | wdev->wext.default_key = -1; | 698 | wdev->wext.default_key = -1; |
696 | wdev->wext.default_mgmt_key = -1; | 699 | wdev->wext.default_mgmt_key = -1; |
697 | wdev->wext.connect.auth_type = NL80211_AUTHTYPE_AUTOMATIC; | 700 | wdev->wext.connect.auth_type = NL80211_AUTHTYPE_AUTOMATIC; |
701 | #endif | ||
702 | |||
698 | if (wdev->wiphy->flags & WIPHY_FLAG_PS_ON_BY_DEFAULT) | 703 | if (wdev->wiphy->flags & WIPHY_FLAG_PS_ON_BY_DEFAULT) |
699 | wdev->wext.ps = true; | 704 | wdev->ps = true; |
700 | else | 705 | else |
701 | wdev->wext.ps = false; | 706 | wdev->ps = false; |
702 | wdev->wext.ps_timeout = 100; | 707 | wdev->ps_timeout = 100; |
703 | if (rdev->ops->set_power_mgmt) | 708 | if (rdev->ops->set_power_mgmt) |
704 | if (rdev->ops->set_power_mgmt(wdev->wiphy, dev, | 709 | if (rdev->ops->set_power_mgmt(wdev->wiphy, dev, |
705 | wdev->wext.ps, | 710 | wdev->ps, |
706 | wdev->wext.ps_timeout)) { | 711 | wdev->ps_timeout)) { |
707 | /* assume this means it's off */ | 712 | /* assume this means it's off */ |
708 | wdev->wext.ps = false; | 713 | wdev->ps = false; |
709 | } | 714 | } |
710 | #endif | 715 | |
711 | if (!dev->ethtool_ops) | 716 | if (!dev->ethtool_ops) |
712 | dev->ethtool_ops = &cfg80211_ethtool_ops; | 717 | dev->ethtool_ops = &cfg80211_ethtool_ops; |
713 | 718 | ||
@@ -792,6 +797,7 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb, | |||
792 | sysfs_remove_link(&dev->dev.kobj, "phy80211"); | 797 | sysfs_remove_link(&dev->dev.kobj, "phy80211"); |
793 | list_del_rcu(&wdev->list); | 798 | list_del_rcu(&wdev->list); |
794 | rdev->devlist_generation++; | 799 | rdev->devlist_generation++; |
800 | cfg80211_mlme_purge_actions(wdev); | ||
795 | #ifdef CONFIG_CFG80211_WEXT | 801 | #ifdef CONFIG_CFG80211_WEXT |
796 | kfree(wdev->wext.keys); | 802 | kfree(wdev->wext.keys); |
797 | #endif | 803 | #endif |