Skip to content

Commit

Permalink
iwlwifi: mvm: set SKIP_OVER_DTIM flag only if needed
Browse files Browse the repository at this point in the history
setting SKIP_OVER_DTIM when skip_dtim_periods is 0
causes a ucode assert. set the flag only if needed.

Signed-off-by: Eliad Peller <eliadx.peller@intel.com>
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
  • Loading branch information
Eliad Peller authored and Emmanuel Grumbach committed May 13, 2014
1 parent d090f87 commit 6f36105
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/net/wireless/iwlwifi/mvm/power.c
Original file line number Diff line number Diff line change
Expand Up @@ -902,9 +902,10 @@ int iwl_mvm_update_d0i3_power_mode(struct iwl_mvm *mvm,
if (WARN_ON(!dtimper_msec))
return 0;

cmd.flags |=
cpu_to_le16(POWER_FLAGS_SKIP_OVER_DTIM_MSK);
cmd.skip_dtim_periods = 300 / dtimper_msec;
if (cmd.skip_dtim_periods)
cmd.flags |=
cpu_to_le16(POWER_FLAGS_SKIP_OVER_DTIM_MSK);
}
iwl_mvm_power_log(mvm, &cmd);
#ifdef CONFIG_IWLWIFI_DEBUGFS
Expand Down

0 comments on commit 6f36105

Please sign in to comment.