]> git.kernelconcepts.de Git - karo-tx-linux.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)
commit560676282e19a9cb99378547530aca3d085eb99f
tree240bbac0ae27320a4634591cf6803464cc2358f8
parent0df2f6c11813a3e522f72f6998b00ae8e17dd4df
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