diff options
author | Alexander Bondar <alexander.bondar@intel.com> | 2013-05-21 07:49:09 -0400 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-05-29 03:03:23 -0400 |
commit | 1bd2d1755054c0cc13e2dc7766f2f2ead7d15444 (patch) | |
tree | a3b2d0697cff347ff0fd79afecd2c7daec4d2ef6 /drivers | |
parent | 9ee718aa9269cf56040cf12f0f6ac6e0057397b2 (diff) |
iwlwifi: mvm: Change number of DTIMs to skip semantics
If skip over DTIMs is enabled the driver can specify number of DTIMs
to skip. This parameter in host-device API implies number of DTIM
periods to skip. For example, to skip one DTIM means sleep over two
DTIM periods. Change semantics accordingly. Change this parameter's
default value.
Signed-off-by: Alexander Bondar <alexander.bondar@intel.com>
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/fw-api-power.h | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/power.c | 6 |
2 files changed, 7 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/fw-api-power.h b/drivers/net/wireless/iwlwifi/mvm/fw-api-power.h index b6bdfd36bebe..d8e19290b0f3 100644 --- a/drivers/net/wireless/iwlwifi/mvm/fw-api-power.h +++ b/drivers/net/wireless/iwlwifi/mvm/fw-api-power.h | |||
@@ -101,7 +101,9 @@ enum iwl_power_flags { | |||
101 | * @tx_data_timeout: Minimum time (usec) from last Tx packet for AM to | 101 | * @tx_data_timeout: Minimum time (usec) from last Tx packet for AM to |
102 | * PSM transition - legacy PM | 102 | * PSM transition - legacy PM |
103 | * @sleep_interval: not in use | 103 | * @sleep_interval: not in use |
104 | * @num_skip_dtim: Number of DTIMs to skip if Skip over DTIM flag is set | 104 | * @skip_dtim_periods: Number of DTIM periods to skip if Skip over DTIM flag |
105 | * is set. For example, if it is required to skip over | ||
106 | * one DTIM, this value need to be set to 2 (DTIM periods). | ||
105 | * @lprx_rssi_threshold: Signal strength up to which LP RX can be enabled. | 107 | * @lprx_rssi_threshold: Signal strength up to which LP RX can be enabled. |
106 | * Default: 80dbm | 108 | * Default: 80dbm |
107 | */ | 109 | */ |
@@ -113,7 +115,7 @@ struct iwl_powertable_cmd { | |||
113 | __le32 rx_data_timeout; | 115 | __le32 rx_data_timeout; |
114 | __le32 tx_data_timeout; | 116 | __le32 tx_data_timeout; |
115 | __le32 sleep_interval[IWL_POWER_VEC_SIZE]; | 117 | __le32 sleep_interval[IWL_POWER_VEC_SIZE]; |
116 | __le32 num_skip_dtim; | 118 | __le32 skip_dtim_periods; |
117 | __le32 lprx_rssi_threshold; | 119 | __le32 lprx_rssi_threshold; |
118 | } __packed; | 120 | } __packed; |
119 | 121 | ||
diff --git a/drivers/net/wireless/iwlwifi/mvm/power.c b/drivers/net/wireless/iwlwifi/mvm/power.c index c818d6d6aee6..516e64e7706f 100644 --- a/drivers/net/wireless/iwlwifi/mvm/power.c +++ b/drivers/net/wireless/iwlwifi/mvm/power.c | |||
@@ -139,8 +139,8 @@ static void iwl_mvm_power_log(struct iwl_mvm *mvm, | |||
139 | IWL_DEBUG_POWER(mvm, "LP RX RSSI threshold = %u\n", | 139 | IWL_DEBUG_POWER(mvm, "LP RX RSSI threshold = %u\n", |
140 | cmd->lprx_rssi_threshold); | 140 | cmd->lprx_rssi_threshold); |
141 | if (cmd->flags & cpu_to_le16(POWER_FLAGS_SKIP_OVER_DTIM_MSK)) | 141 | if (cmd->flags & cpu_to_le16(POWER_FLAGS_SKIP_OVER_DTIM_MSK)) |
142 | IWL_DEBUG_POWER(mvm, "DTIMs to skip = %u\n", | 142 | IWL_DEBUG_POWER(mvm, "DTIM periods to skip = %u\n", |
143 | le32_to_cpu(cmd->num_skip_dtim)); | 143 | le32_to_cpu(cmd->skip_dtim_periods)); |
144 | } | 144 | } |
145 | } | 145 | } |
146 | 146 | ||
@@ -188,7 +188,7 @@ void iwl_mvm_power_build_cmd(struct iwl_mvm *mvm, struct ieee80211_vif *vif, | |||
188 | (iwlmvm_mod_params.power_scheme == IWL_POWER_SCHEME_LP || | 188 | (iwlmvm_mod_params.power_scheme == IWL_POWER_SCHEME_LP || |
189 | mvm->cur_ucode == IWL_UCODE_WOWLAN)) { | 189 | mvm->cur_ucode == IWL_UCODE_WOWLAN)) { |
190 | cmd->flags |= cpu_to_le16(POWER_FLAGS_SKIP_OVER_DTIM_MSK); | 190 | cmd->flags |= cpu_to_le16(POWER_FLAGS_SKIP_OVER_DTIM_MSK); |
191 | cmd->num_skip_dtim = cpu_to_le32(2); | 191 | cmd->skip_dtim_periods = cpu_to_le32(3); |
192 | } | 192 | } |
193 | 193 | ||
194 | /* Check that keep alive period is at least 3 * DTIM */ | 194 | /* Check that keep alive period is at least 3 * DTIM */ |