diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-08-12 17:33:20 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-14 09:14:08 -0400 |
commit | 16cb9d42b68b339852e8914f2538ca9a2aec616c (patch) | |
tree | aef8822ae4d5dc7574af3c52501b8d6449c2ccc0 /net/wireless | |
parent | 36e6fea84905512ea776707e82b5b435220efc17 (diff) |
cfg80211: allow driver to override PS default
Sometimes drivers might have a good reason to override
the PS default, like iwlwifi right now where it affects
RX performance significantly at this point. This will
allow them to override the default, if desired, in a
way that users can still change it according to their
trade-off choices, not the driver's, like would happen
if the driver just disabled PS completely then.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/wireless')
-rw-r--r-- | net/wireless/core.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/wireless/core.c b/net/wireless/core.c index 35d83bedfe5b..bc99e4ec7463 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c | |||
@@ -412,6 +412,8 @@ struct wiphy *wiphy_new(const struct cfg80211_ops *ops, int sizeof_priv) | |||
412 | rdev->wiphy.dev.class = &ieee80211_class; | 412 | rdev->wiphy.dev.class = &ieee80211_class; |
413 | rdev->wiphy.dev.platform_data = rdev; | 413 | rdev->wiphy.dev.platform_data = rdev; |
414 | 414 | ||
415 | rdev->wiphy.ps_default = CONFIG_CFG80211_DEFAULT_PS_VALUE; | ||
416 | |||
415 | wiphy_net_set(&rdev->wiphy, &init_net); | 417 | wiphy_net_set(&rdev->wiphy, &init_net); |
416 | 418 | ||
417 | rdev->rfkill_ops.set_block = cfg80211_rfkill_set_block; | 419 | rdev->rfkill_ops.set_block = cfg80211_rfkill_set_block; |
@@ -674,7 +676,7 @@ static int cfg80211_netdev_notifier_call(struct notifier_block * nb, | |||
674 | wdev->wext.default_key = -1; | 676 | wdev->wext.default_key = -1; |
675 | wdev->wext.default_mgmt_key = -1; | 677 | wdev->wext.default_mgmt_key = -1; |
676 | wdev->wext.connect.auth_type = NL80211_AUTHTYPE_AUTOMATIC; | 678 | wdev->wext.connect.auth_type = NL80211_AUTHTYPE_AUTOMATIC; |
677 | wdev->wext.ps = CONFIG_CFG80211_DEFAULT_PS_VALUE; | 679 | wdev->wext.ps = wdev->wiphy->ps_default; |
678 | wdev->wext.ps_timeout = 100; | 680 | wdev->wext.ps_timeout = 100; |
679 | if (rdev->ops->set_power_mgmt) | 681 | if (rdev->ops->set_power_mgmt) |
680 | if (rdev->ops->set_power_mgmt(wdev->wiphy, dev, | 682 | if (rdev->ops->set_power_mgmt(wdev->wiphy, dev, |