diff options
author | Alexander Bondar <alexander.bondar@intel.com> | 2013-04-23 13:32:35 +0300 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2013-05-16 23:09:51 +0200 |
commit | 5b1dbfc3aa26327dede4cf7a88d7c1e71728e024 (patch) | |
tree | 68ba045a1d2100e492c2607ddb6e8af0f29e0c63 | |
parent | 4270b871a266f615440ef716345c9f559f81eb30 (diff) | |
download | talos-op-linux-5b1dbfc3aa26327dede4cf7a88d7c1e71728e024.tar.gz talos-op-linux-5b1dbfc3aa26327dede4cf7a88d7c1e71728e024.zip |
iwlwifi: mvm: Add number of DTIMs to skip
New host-device API provides the ability to set the number
of DTIMs to skip. Add this parameter to the command and set
it (to a sane 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>
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/fw-api-power.h | 6 | ||||
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/power.c | 7 |
2 files changed, 9 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/fw-api-power.h b/drivers/net/wireless/iwlwifi/mvm/fw-api-power.h index 90fdfcda15b6..05e51927b848 100644 --- a/drivers/net/wireless/iwlwifi/mvm/fw-api-power.h +++ b/drivers/net/wireless/iwlwifi/mvm/fw-api-power.h @@ -101,19 +101,19 @@ enum iwl_power_flags { * @tx_data_timeout: Minimum time (usec) from last Tx packet for AM to * PSM transition - legacy PM * @sleep_interval: not in use - * @keep_alive_beacons: not in use + * @num_skip_dtim: Number of DTIMs to skip if Skip over DTIM flag is set * @lprx_rssi_threshold: Signal strength up to which LP RX can be enabled. * Default: 80dbm */ struct iwl_powertable_cmd { - /* PM_POWER_TABLE_CMD_API_S_VER_5 */ + /* PM_POWER_TABLE_CMD_API_S_VER_6 */ __le16 flags; u8 keep_alive_seconds; u8 debug_flags; __le32 rx_data_timeout; __le32 tx_data_timeout; __le32 sleep_interval[IWL_POWER_VEC_SIZE]; - __le32 keep_alive_beacons; + __le32 num_skip_dtim; __le32 lprx_rssi_threshold; } __packed; diff --git a/drivers/net/wireless/iwlwifi/mvm/power.c b/drivers/net/wireless/iwlwifi/mvm/power.c index 30a5c27bd623..6c5dfc9a8d43 100644 --- a/drivers/net/wireless/iwlwifi/mvm/power.c +++ b/drivers/net/wireless/iwlwifi/mvm/power.c @@ -91,6 +91,9 @@ static void iwl_mvm_power_log(struct iwl_mvm *mvm, le32_to_cpu(cmd->tx_data_timeout)); IWL_DEBUG_POWER(mvm, "LP RX RSSI threshold = %u\n", cmd->lprx_rssi_threshold); + if (cmd->flags & cpu_to_le16(POWER_FLAGS_SKIP_OVER_DTIM_MSK)) + IWL_DEBUG_POWER(mvm, "DTIMs to skip = %u\n", + le32_to_cpu(cmd->num_skip_dtim)); } } @@ -135,8 +138,10 @@ void iwl_mvm_power_build_cmd(struct iwl_mvm *mvm, struct ieee80211_vif *vif, /* Check skip over DTIM conditions */ if (!radar_detect && (dtimper <= 10) && - (iwlmvm_mod_params.power_scheme == IWL_POWER_SCHEME_LP)) + (iwlmvm_mod_params.power_scheme == IWL_POWER_SCHEME_LP)) { cmd->flags |= cpu_to_le16(POWER_FLAGS_SKIP_OVER_DTIM_MSK); + cmd->num_skip_dtim = cpu_to_le32(2); + } /* Check that keep alive period is at least 3 * DTIM */ dtimper_msec = dtimper * vif->bss_conf.beacon_int; |