diff options
-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 e9a5f8ca4c27..fe01de29bfe8 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c | |||
@@ -718,13 +718,6 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb, | |||
718 | wdev->ps = false; | 718 | wdev->ps = false; |
719 | /* allow mac80211 to determine the timeout */ | 719 | /* allow mac80211 to determine the timeout */ |
720 | wdev->ps_timeout = -1; | 720 | wdev->ps_timeout = -1; |
721 | if (rdev->ops->set_power_mgmt) | ||
722 | if (rdev->ops->set_power_mgmt(wdev->wiphy, dev, | ||
723 | wdev->ps, | ||
724 | wdev->ps_timeout)) { | ||
725 | /* assume this means it's off */ | ||
726 | wdev->ps = false; | ||
727 | } | ||
728 | 721 | ||
729 | if (!dev->ethtool_ops) | 722 | if (!dev->ethtool_ops) |
730 | dev->ethtool_ops = &cfg80211_ethtool_ops; | 723 | dev->ethtool_ops = &cfg80211_ethtool_ops; |
@@ -813,6 +806,19 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb, | |||
813 | rdev->opencount++; | 806 | rdev->opencount++; |
814 | mutex_unlock(&rdev->devlist_mtx); | 807 | mutex_unlock(&rdev->devlist_mtx); |
815 | cfg80211_unlock_rdev(rdev); | 808 | cfg80211_unlock_rdev(rdev); |
809 | |||
810 | /* | ||
811 | * Configure power management to the driver here so that its | ||
812 | * correctly set also after interface type changes etc. | ||
813 | */ | ||
814 | if (wdev->iftype == NL80211_IFTYPE_STATION && | ||
815 | rdev->ops->set_power_mgmt) | ||
816 | if (rdev->ops->set_power_mgmt(wdev->wiphy, dev, | ||
817 | wdev->ps, | ||
818 | wdev->ps_timeout)) { | ||
819 | /* assume this means it's off */ | ||
820 | wdev->ps = false; | ||
821 | } | ||
816 | break; | 822 | break; |
817 | case NETDEV_UNREGISTER: | 823 | case NETDEV_UNREGISTER: |
818 | /* | 824 | /* |