Skip to content

Commit

Permalink
CHROMIUM: iwl7000: mvm: use wowlan RX/TX timeouts in D0i3
Browse files Browse the repository at this point in the history
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>
iwl7000-tree: e46178386c581557f5f3e3ee9d11d9b2c90b92b9
  • Loading branch information
Johannes Berg authored and Anatol Pomazau committed Oct 23, 2015
1 parent 50ca4c7 commit 68f2d9a
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions drivers/net/wireless/iwl7000/iwlwifi/mvm/power.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,8 @@ static void iwl_mvm_power_config_skip_dtim(struct iwl_mvm *mvm,

static void iwl_mvm_power_build_cmd(struct iwl_mvm *mvm,
struct ieee80211_vif *vif,
struct iwl_mac_power_cmd *cmd)
struct iwl_mac_power_cmd *cmd,
bool host_awake)
{
int dtimper, bi;
int keep_alive;
Expand Down Expand Up @@ -394,10 +395,9 @@ static void iwl_mvm_power_build_cmd(struct iwl_mvm *mvm,
cmd->lprx_rssi_threshold = POWER_LPRX_RSSI_THRESHOLD;
}

iwl_mvm_power_config_skip_dtim(mvm, vif, cmd,
mvm->cur_ucode != IWL_UCODE_WOWLAN);
iwl_mvm_power_config_skip_dtim(mvm, vif, cmd, host_awake);

if (mvm->cur_ucode != IWL_UCODE_WOWLAN) {
if (host_awake) {
cmd->rx_data_timeout =
cpu_to_le32(IWL_MVM_DEFAULT_PS_RX_DATA_TIMEOUT);
cmd->tx_data_timeout =
Expand Down Expand Up @@ -463,7 +463,8 @@ static int iwl_mvm_power_send_cmd(struct iwl_mvm *mvm,
{
struct iwl_mac_power_cmd cmd = {};

iwl_mvm_power_build_cmd(mvm, vif, &cmd);
iwl_mvm_power_build_cmd(mvm, vif, &cmd,
mvm->cur_ucode != IWL_UCODE_WOWLAN);
iwl_mvm_power_log(mvm, &cmd);
#ifdef CPTCFG_IWLWIFI_DEBUGFS
memcpy(&iwl_mvm_vif_from_mac80211(vif)->mac_pwr_cmd, &cmd, sizeof(cmd));
Expand Down Expand Up @@ -999,11 +1000,7 @@ int iwl_mvm_update_d0i3_power_mode(struct iwl_mvm *mvm,
if (!vif->bss_conf.assoc)
return 0;

iwl_mvm_power_build_cmd(mvm, vif, &cmd);

/* when enabling D0i3, override the skip-over-dtim configuration */
if (enable)
iwl_mvm_power_config_skip_dtim(mvm, vif, &cmd, false);
iwl_mvm_power_build_cmd(mvm, vif, &cmd, !enable);

iwl_mvm_power_log(mvm, &cmd);
#ifdef CPTCFG_IWLWIFI_DEBUGFS
Expand Down

0 comments on commit 68f2d9a

Please sign in to comment.