Commit 4eca0fd5 authored by Johannes Berg's avatar Johannes Berg

wifi: iwlwifi: mvm: adjust skip-over-dtim in D3

The current formula can skip both too much and not enough time,
given the +1 (where the comment about firmware is wrong). Adjust
the formula accordingly.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
Signed-off-by: default avatarGregory Greenman <gregory.greenman@intel.com>
Link: https://lore.kernel.org/r/20230620125813.32406b6828ae.I88c315b85f7c56ac6109f84580b95a3dd104ff6c@changeidSigned-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent de107600
......@@ -327,12 +327,11 @@ static void iwl_mvm_power_config_skip_dtim(struct iwl_mvm *mvm,
if (WARN_ON(!dtimper_tu))
return;
/* configure skip over dtim up to 306TU - 314 msec */
skip = max_t(u8, 1, 306 / dtimper_tu);
/* configure skip over dtim up to 900 TU DTIM interval */
skip = max_t(u8, 1, 900 / dtimper_tu);
}
/* the firmware really expects "look at every X DTIMs", so add 1 */
cmd->skip_dtim_periods = 1 + skip;
cmd->skip_dtim_periods = skip;
cmd->flags |= cpu_to_le16(POWER_FLAGS_SKIP_OVER_DTIM_MSK);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment