mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2025-02-18 09:10:38 +01:00
scan: add MaximumPeriodicScanInterval setting
This commit is contained in:
parent
3a9c401f63
commit
88f2b44bba
15
src/scan.c
15
src/scan.c
@ -50,9 +50,12 @@
|
|||||||
#include "src/mpdu.h"
|
#include "src/mpdu.h"
|
||||||
#include "src/scan.h"
|
#include "src/scan.h"
|
||||||
|
|
||||||
#define SCAN_MAX_INTERVAL 320
|
|
||||||
#define SCAN_INIT_INTERVAL 10
|
#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_queue *scan_contexts;
|
||||||
|
|
||||||
static struct l_genl_family *nl80211;
|
static struct l_genl_family *nl80211;
|
||||||
@ -1313,9 +1316,6 @@ static struct scan_bss *scan_parse_result(struct l_genl_msg *msg,
|
|||||||
return bss;
|
return bss;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* User configurable options */
|
|
||||||
static double RANK_5G_FACTOR;
|
|
||||||
|
|
||||||
static void scan_bss_compute_rank(struct scan_bss *bss)
|
static void scan_bss_compute_rank(struct scan_bss *bss)
|
||||||
{
|
{
|
||||||
static const double RANK_RSNE_FACTOR = 1.2;
|
static const double RANK_RSNE_FACTOR = 1.2;
|
||||||
@ -2215,6 +2215,13 @@ static int scan_init(void)
|
|||||||
&RANK_5G_FACTOR))
|
&RANK_5G_FACTOR))
|
||||||
RANK_5G_FACTOR = 1.0;
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user