iwlwifi: mvm: Fix channel switch in case of count <= 1
authorIlan Peer <ilan.peer@intel.com>
Tue, 8 Aug 2017 11:56:58 +0000 (14:56 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Fri, 18 Aug 2017 13:16:11 +0000 (16:16 +0300)
commitf5d8f50f271d1f80c2afd7eada1c91a863c87a06
treeb78906b658b276487fe2968b1abc794bb9512229
parent5f5537ac3f0f7bd527d332aa166a009be833dfae
iwlwifi: mvm: Fix channel switch in case of count <= 1

The code did not consider the case that the channel switch counter
is <= 1, which would result with an inaccurate calculation of the
time event apply time.

As the specification states that in case of counter == 0 the switch
occurs at any time after the reception the frame, and for counter == 1
the switch would happens before the next TBTT, schedule the time
event immediately.

Signed-off-by: Ilan Peer <ilan.peer@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c