mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-28 16:50:16 +01:00
Clamp scan interval to 120s
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@3368 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
parent
7c1d11d12e
commit
41c09c229c
1 changed files with 2 additions and 0 deletions
|
|
@ -1528,6 +1528,8 @@ schedule_scan (NMDevice80211Wireless *self, gboolean backoff)
|
|||
priv->scan_interval += (SCAN_INTERVAL_STEP / factor);
|
||||
/* Ensure the scan interval will never be less than 20s... */
|
||||
priv->scan_interval = MAX(priv->scan_interval, SCAN_INTERVAL_MIN + SCAN_INTERVAL_STEP);
|
||||
/* ... or more than 120s */
|
||||
priv->scan_interval = MIN(priv->scan_interval, SCAN_INTERVAL_MAX);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue