iwlwifi: mvm: correct skip-over-DTIM implementation
The formula used in D0i3 should also be used in D3, instead of
the hardcoded value.
Additionally, the formula is actually wrong - if the calculation
yields 0 then 1 should be used instead of disabling entirely.
Also need to add 1 since the firmware needs 3 to skip 2, etc.
To make all this clearer, centralize the calculation into a
single function.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>