3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-12-22 13:02:44 +01:00

scan: add InitialPeriodicScanInterval setting

This commit is contained in:
Alvin Šipraga 2021-02-12 15:41:14 +00:00 committed by Denis Kenzior
parent 2df581d1ff
commit ff82133050

View File

@ -50,11 +50,10 @@
#include "src/mpdu.h"
#include "src/scan.h"
#define SCAN_INIT_INTERVAL 10
/* User configurable options */
static double RANK_5G_FACTOR;
static uint32_t SCAN_MAX_INTERVAL;
static uint32_t SCAN_INIT_INTERVAL;
static struct l_queue *scan_contexts;
@ -2215,6 +2214,13 @@ static int scan_init(void)
&RANK_5G_FACTOR))
RANK_5G_FACTOR = 1.0;
if (!l_settings_get_uint(config, "Scan", "InitialPeriodicScanInterval",
&SCAN_INIT_INTERVAL))
SCAN_INIT_INTERVAL = 10;
if (SCAN_INIT_INTERVAL > UINT16_MAX)
SCAN_INIT_INTERVAL = UINT16_MAX;
if (!l_settings_get_uint(config, "Scan", "MaximumPeriodicScanInterval",
&SCAN_MAX_INTERVAL))
SCAN_MAX_INTERVAL = 300;