iwlwifi: mvm: Increase session protection time after CS
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>
Wed, 28 Feb 2018 15:18:48 +0000 (17:18 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Mon, 19 Mar 2018 08:50:36 +0000 (10:50 +0200)
commit19125cb0591ae63cd4591e3dfe4c22058e748518
tree1f24d8709f673bc9c2dd02f80e0d3e5334625870
parent1259055170287a350cad453e9eac139c81609860
iwlwifi: mvm: Increase session protection time after CS

After switching to a new channel, driver schedules session protection
time event in order to hear the beacon on the new channel.
The duration of the protection is two beacon intervals.
However, since we start to switch slightly before beacon with count 1, in
case we don't hear (or AP doesn't transmit) the very first beacon on the
new channel the protection ends without hearing any beacon at all.
At this stage the switch is not complete, the queues are closed and the
interface doesn't have quota yet or TBTT events. As the result, we are
stuck forever waiting for iwl_mvm_post_channel_switch() to be called.

Fix this by increasing the protection time to be 3 beacon intervals and
in addition drop the connection if the time event ends before we got any
beacon.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c
drivers/net/wireless/intel/iwlwifi/mvm/mvm.h
drivers/net/wireless/intel/iwlwifi/mvm/time-event.c