aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2015-10-06 07:28:48 -0400
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2015-10-25 07:45:03 -0400
commit9645edb607427a9728b9269dfded74e8c42a9d48 (patch)
tree59728b9d25e44ddcb679ed6da68bfba14b5ea271
parent78efc702c8b6ddd6563d836f0d9844bf1f288f9b (diff)
iwlwifi: mvm: use wowlan RX/TX timeouts in D0i3
In "hostless" mode (D3 or D0i3) the same parameters were intended to be used, but the code doesn't do that properly. Fix it. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Avri Altman <avri.altman@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/power.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/power.c b/drivers/net/wireless/iwlwifi/mvm/power.c
index 723b537341c4..7c354feb9be2 100644
--- a/drivers/net/wireless/iwlwifi/mvm/power.c
+++ b/drivers/net/wireless/iwlwifi/mvm/power.c
@@ -348,7 +348,8 @@ static void iwl_mvm_power_config_skip_dtim(struct iwl_mvm *mvm,
348 348
349static void iwl_mvm_power_build_cmd(struct iwl_mvm *mvm, 349static void iwl_mvm_power_build_cmd(struct iwl_mvm *mvm,
350 struct ieee80211_vif *vif, 350 struct ieee80211_vif *vif,
351 struct iwl_mac_power_cmd *cmd) 351 struct iwl_mac_power_cmd *cmd,
352 bool host_awake)
352{ 353{
353 int dtimper, bi; 354 int dtimper, bi;
354 int keep_alive; 355 int keep_alive;
@@ -389,10 +390,9 @@ static void iwl_mvm_power_build_cmd(struct iwl_mvm *mvm,
389 cmd->lprx_rssi_threshold = POWER_LPRX_RSSI_THRESHOLD; 390 cmd->lprx_rssi_threshold = POWER_LPRX_RSSI_THRESHOLD;
390 } 391 }
391 392
392 iwl_mvm_power_config_skip_dtim(mvm, vif, cmd, 393 iwl_mvm_power_config_skip_dtim(mvm, vif, cmd, host_awake);
393 mvm->cur_ucode != IWL_UCODE_WOWLAN);
394 394
395 if (mvm->cur_ucode != IWL_UCODE_WOWLAN) { 395 if (host_awake) {
396 cmd->rx_data_timeout = 396 cmd->rx_data_timeout =
397 cpu_to_le32(IWL_MVM_DEFAULT_PS_RX_DATA_TIMEOUT); 397 cpu_to_le32(IWL_MVM_DEFAULT_PS_RX_DATA_TIMEOUT);
398 cmd->tx_data_timeout = 398 cmd->tx_data_timeout =
@@ -458,7 +458,8 @@ static int iwl_mvm_power_send_cmd(struct iwl_mvm *mvm,
458{ 458{
459 struct iwl_mac_power_cmd cmd = {}; 459 struct iwl_mac_power_cmd cmd = {};
460 460
461 iwl_mvm_power_build_cmd(mvm, vif, &cmd); 461 iwl_mvm_power_build_cmd(mvm, vif, &cmd,
462 mvm->cur_ucode != IWL_UCODE_WOWLAN);
462 iwl_mvm_power_log(mvm, &cmd); 463 iwl_mvm_power_log(mvm, &cmd);
463#ifdef CONFIG_IWLWIFI_DEBUGFS 464#ifdef CONFIG_IWLWIFI_DEBUGFS
464 memcpy(&iwl_mvm_vif_from_mac80211(vif)->mac_pwr_cmd, &cmd, sizeof(cmd)); 465 memcpy(&iwl_mvm_vif_from_mac80211(vif)->mac_pwr_cmd, &cmd, sizeof(cmd));
@@ -994,11 +995,7 @@ int iwl_mvm_update_d0i3_power_mode(struct iwl_mvm *mvm,
994 if (!vif->bss_conf.assoc) 995 if (!vif->bss_conf.assoc)
995 return 0; 996 return 0;
996 997
997 iwl_mvm_power_build_cmd(mvm, vif, &cmd); 998 iwl_mvm_power_build_cmd(mvm, vif, &cmd, !enable);
998
999 /* when enabling D0i3, override the skip-over-dtim configuration */
1000 if (enable)
1001 iwl_mvm_power_config_skip_dtim(mvm, vif, &cmd, false);
1002 999
1003 iwl_mvm_power_log(mvm, &cmd); 1000 iwl_mvm_power_log(mvm, &cmd);
1004#ifdef CONFIG_IWLWIFI_DEBUGFS 1001#ifdef CONFIG_IWLWIFI_DEBUGFS