mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-25 00:38:24 -05:00
bgscan_simple: Fix short_scan_count comparison
Previously, the check was done after we reached the maximum and another scan was already triggered. While at it, remove an irrelevant comment that the previous change in the logic here missed. Signed-off-by: Beni Lev <beni.lev@intel.com>
This commit is contained in:
parent
517b5f928f
commit
e72faadb49
@ -56,12 +56,7 @@ static void bgscan_simple_timeout(void *eloop_ctx, void *timeout_ctx)
|
||||
} else {
|
||||
if (data->scan_interval == data->short_interval) {
|
||||
data->short_scan_count++;
|
||||
/*
|
||||
* Spend at most the duration of a long scan interval
|
||||
* scanning at the short scan interval. After that,
|
||||
* revert to the long scan interval.
|
||||
*/
|
||||
if (data->short_scan_count > data->max_short_scans) {
|
||||
if (data->short_scan_count >= data->max_short_scans) {
|
||||
data->scan_interval = data->long_interval;
|
||||
wpa_printf(MSG_DEBUG, "bgscan simple: Backing "
|
||||
"off to long scan interval");
|
||||
|
Loading…
Reference in New Issue
Block a user