eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit 88f2b44bbae9a8f7e53410be35d1d84889d9fece
parent 3a9c401f63f678f434235ead075c2cd9dc2b320e
Author: Alvin Šipraga <ALSI@bang-olufsen.dk>
Date:   Fri, 12 Feb 2021 15:41:13 +0000

scan: add MaximumPeriodicScanInterval setting

Diffstat:
Msrc/scan.c | 15+++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/src/scan.c b/src/scan.c @@ -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; }