diff options
author | Wey-Yi Guy <wey-yi.w.guy@intel.com> | 2009-10-16 23:25:58 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-10-27 21:48:34 +0100 |
commit | 4ad177b5c860dc0b1083eccc55957daf4a116b90 (patch) | |
tree | 379f270437a2152f7628f0dcafaf77b58a8b6afd /drivers/net/wireless/iwlwifi/iwl-debugfs.c | |
parent | iwlwifi: no chain noise support for 6x50 series (diff) | |
download | linux-4ad177b5c860dc0b1083eccc55957daf4a116b90.tar.xz linux-4ad177b5c860dc0b1083eccc55957daf4a116b90.zip |
iwlwifi: rework for static power save
For static power save, the actual intervals are calculated by driver based on
the default table and DTIM flag, then sent to uCode when the scheme
is changed.
Three tables are defined based on DTIM period.
1. DTIM 0 - 2
2. DTIM 3 - 10
3. DTIM > 11
The actual number of DTIM a station may miss may not exceed the
following:
. Only 1 DTIM may be skipped at PI=4 when allowed
. Only 2 DTIMs may be skipped at PI=5 when allowed
. DTIM may be skipped only 5 sec after last activity
. DTIM may be skipped only 30 sec after connection establishment
Only allow user to override the power_level when rf is ready to make sure
power level gets changed upon request.
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-debugfs.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl-debugfs.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-debugfs.c b/drivers/net/wireless/iwlwifi/iwl-debugfs.c index e78cd26b809f..8784911fd56e 100644 --- a/drivers/net/wireless/iwlwifi/iwl-debugfs.c +++ b/drivers/net/wireless/iwlwifi/iwl-debugfs.c @@ -809,9 +809,12 @@ static ssize_t iwl_dbgfs_sleep_level_override_write(struct file *file, if (value != -1 && (value < 0 || value >= IWL_POWER_NUM)) return -EINVAL; + if (!iwl_is_ready_rf(priv)) + return -EAGAIN; + priv->power_data.debug_sleep_level_override = value; - iwl_power_update_mode(priv, false); + iwl_power_update_mode(priv, true); return count; } |