Fix autoscan exponential to limit interval in all cases
The first time the limit is exceeded could result in using larger value - avoid that by limiting the interval also in that case. Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
ccea4eb3e8
commit
460b36d0c0
1 changed files with 4 additions and 1 deletions
|
@ -86,8 +86,11 @@ static int autoscan_exponential_notify_scan(void *priv,
|
||||||
|
|
||||||
if (data->interval <= 0)
|
if (data->interval <= 0)
|
||||||
data->interval = data->base;
|
data->interval = data->base;
|
||||||
else
|
else {
|
||||||
data->interval = data->interval * data->base;
|
data->interval = data->interval * data->base;
|
||||||
|
if (data->interval > data->limit)
|
||||||
|
return data->limit;
|
||||||
|
}
|
||||||
|
|
||||||
return data->interval;
|
return data->interval;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue