summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi
diff options
context:
space:
mode:
authorEster Kummer2008-09-26 09:09:33 +0200
committerJohn W. Linville2008-09-30 20:07:22 +0200
commite602cb180e97c46dfb01a4644781ec68ee0cda22 (patch)
tree5b5de46f5e9ef42cb1f82d38e15331ddbe2db330 /drivers/net/wireless/iwlwifi
parentiwlwifi: refactor rx register initialization (diff)
downloadkernel-qcow2-linux-e602cb180e97c46dfb01a4644781ec68ee0cda22.tar.gz
kernel-qcow2-linux-e602cb180e97c46dfb01a4644781ec68ee0cda22.tar.xz
kernel-qcow2-linux-e602cb180e97c46dfb01a4644781ec68ee0cda22.zip
iwlwifi: enable power save setting upon config
This patch enables power save setting from config (iwconfig power) The sysfs power_level interface is still preserved as it has mac80211 power implementation is not yet rich enough. Signed-off-by: Ester Kummer <ester.kummer@intel.com> Reviewed-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 7330890fd05e..a589f7ea57f3 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -2875,6 +2875,13 @@ static int iwl4965_mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *co
goto out;
}
+ if (conf->flags & IEEE80211_CONF_PS)
+ ret = iwl_power_set_user_mode(priv, IWL_POWER_INDEX_3);
+ else
+ ret = iwl_power_set_user_mode(priv, IWL_POWER_MODE_CAM);
+ if (ret)
+ IWL_DEBUG_MAC80211("Error setting power level\n");
+
IWL_DEBUG_MAC80211("TX Power old=%d new=%d\n",
priv->tx_power_user_lmt, conf->power_level);