diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-07-01 15:26:57 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-10 15:01:51 -0400 |
commit | bc92afd92088ab41223383cc6863ab4792533c54 (patch) | |
tree | a31d14843f5a63a4a4561bb2ac59e83f4550433c /net/wireless/core.c | |
parent | f21293549f60f88c74fcb9944737f11048896dc4 (diff) |
cfg80211: implement iwpower
Just on/off and timeout, and with a hacky cfg80211 method
until we figure out what we want, though this is probably
sufficient as we want to use pm_qos for wifi everywhere.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless/core.c')
-rw-r--r-- | net/wireless/core.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c index e2f80dd0e4a6..413d291d07d7 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c | |||
@@ -550,12 +550,21 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb, | |||
550 | } | 550 | } |
551 | wdev->netdev = dev; | 551 | wdev->netdev = dev; |
552 | wdev->sme_state = CFG80211_SME_IDLE; | 552 | wdev->sme_state = CFG80211_SME_IDLE; |
553 | mutex_unlock(&rdev->devlist_mtx); | ||
553 | #ifdef CONFIG_WIRELESS_EXT | 554 | #ifdef CONFIG_WIRELESS_EXT |
554 | wdev->wext.default_key = -1; | 555 | wdev->wext.default_key = -1; |
555 | wdev->wext.default_mgmt_key = -1; | 556 | wdev->wext.default_mgmt_key = -1; |
556 | wdev->wext.connect.auth_type = NL80211_AUTHTYPE_AUTOMATIC; | 557 | wdev->wext.connect.auth_type = NL80211_AUTHTYPE_AUTOMATIC; |
558 | wdev->wext.ps = CONFIG_CFG80211_DEFAULT_PS_VALUE; | ||
559 | wdev->wext.ps_timeout = 500; | ||
560 | if (rdev->ops->set_power_mgmt) | ||
561 | if (rdev->ops->set_power_mgmt(wdev->wiphy, dev, | ||
562 | wdev->wext.ps, | ||
563 | wdev->wext.ps_timeout)) { | ||
564 | /* assume this means it's off */ | ||
565 | wdev->wext.ps = false; | ||
566 | } | ||
557 | #endif | 567 | #endif |
558 | mutex_unlock(&rdev->devlist_mtx); | ||
559 | break; | 568 | break; |
560 | case NETDEV_GOING_DOWN: | 569 | case NETDEV_GOING_DOWN: |
561 | if (!wdev->ssid_len) | 570 | if (!wdev->ssid_len) |