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

scan: add MaximumPeriodicScanInterval setting

This commit is contained in:
Alvin Šipraga 2021-02-12 15:41:13 +00:00 committed by Denis Kenzior
parent 3a9c401f63
commit 88f2b44bba

View File

@ -50,9 +50,12 @@
#include "src/mpdu.h"
#include "src/scan.h"
#define SCAN_MAX_INTERVAL 320
#define SCAN_INIT_INTERVAL 10
/* User configurable options */
static double RANK_5G_FACTOR;
static uint32_t SCAN_MAX_INTERVAL;
static struct l_queue *scan_contexts;
static struct l_genl_family *nl80211;
@ -1313,9 +1316,6 @@ static struct scan_bss *scan_parse_result(struct l_genl_msg *msg,
return bss;
}
/* User configurable options */
static double RANK_5G_FACTOR;
static void scan_bss_compute_rank(struct scan_bss *bss)
{
static const double RANK_RSNE_FACTOR = 1.2;
@ -2215,6 +2215,13 @@ static int scan_init(void)
&RANK_5G_FACTOR))
RANK_5G_FACTOR = 1.0;
if (!l_settings_get_uint(config, "Scan", "MaximumPeriodicScanInterval",
&SCAN_MAX_INTERVAL))
SCAN_MAX_INTERVAL = 300;
if (SCAN_MAX_INTERVAL > UINT16_MAX)
SCAN_MAX_INTERVAL = UINT16_MAX;
return 0;
}