]> git.baikalelectronics.ru Git - kernel.git/commit
mac80211_hwsim: fix beacon timers
authorJohannes Berg <johannes.berg@intel.com>
Tue, 3 Mar 2015 21:09:05 +0000 (22:09 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Wed, 4 Mar 2015 09:34:15 +0000 (10:34 +0100)
commit8ed31ccb0eb8c06eb18d7296e23bcd30e3a47400
tree240bbac0ae27320a4634591cf6803464cc2358f8
parent5687190042195d064bdd1cd435b582e2e79fad43
mac80211_hwsim: fix beacon timers

Jouni reported that certain combinations of hwsim test cases failed,
and we found that beaconing was erroneously enabled too early on any
channel switch, which lead to the BI of 2000 TU from the first test
case to leak into the second one, which then didn't beacon properly.

To fix this, set data->beacon_int to zero when all stop beaconing so
that beaconing cannot be started (which was intended as 'restarted')
elsewhere.

Additionally, Jouni found that due to this 'restart' and the beacon
interval handling station interfaces would also have a needlessly
running beacon timer all the time, of course not doing anything.

To also fix the latter case only use the beacon interval when it's
actually needed, i.e. when beaconing gets enabled.

Reported-by: Jouni Malinen <j@w1.fi>
Tested-by: Jouni Malinen <j@w1.fi>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/mac80211_hwsim.c