iwlwifi: mvm: correct skip-over-DTIM implementation
authorJohannes Berg <johannes.berg@intel.com>
Tue, 1 Sep 2015 12:15:17 +0000 (14:15 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Mon, 5 Oct 2015 09:28:50 +0000 (12:28 +0300)
commita6449126518d908f0d706cce85c9bf243342b7b0
treed4238cdf9b3462bf8b9061093609d32d497db185
parentbb35dc14182c16e9646f6323cce25f3cfe3ba593
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>
drivers/net/wireless/iwlwifi/mvm/power.c