diff options
author | David S. Miller <davem@davemloft.net> | 2011-02-08 16:52:31 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-02-08 16:52:31 -0500 |
commit | c0c84ef5c130f8871adbdaac2ba824b9195cb6d9 (patch) | |
tree | d7221b5323d5a4d3d84676d32bdca21d21d85a18 /net/wireless | |
parent | 2360d2e8f01043632d6b651672bec66c49892f94 (diff) | |
parent | 3ad97fbcc233a295f2ccc2c6bdeb32323e360a5e (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'net/wireless')
-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 | /* |