eiwd

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

commit e4a76018fdb1550f95dba6641df9e75c4840d390
parent 7b8c0693839663c1865d69c7fb75ea0e42110720
Author: Tim Kourt <tim.a.kourt@linux.intel.com>
Date:   Thu, 15 Nov 2018 12:54:24 -0800

scan: Make periodic scan optional

Diffstat:
Msrc/scan.c | 17++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/src/scan.c b/src/scan.c @@ -2,7 +2,7 @@ * * Wireless daemon for Linux * - * Copyright (C) 2015 Intel Corporation. All rights reserved. + * Copyright (C) 2015-2018 Intel Corporation. All rights reserved. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -654,11 +654,26 @@ static bool scan_periodic_send_start(struct scan_context *sc) return true; } +static bool scan_periodic_is_disabled(void) +{ + const struct l_settings *config = iwd_get_config(); + bool disabled; + + if (!l_settings_get_bool(config, "Scan", "disable_periodic_scan", + &disabled)) + return false; + + return disabled; +} + void scan_periodic_start(uint32_t ifindex, scan_trigger_func_t trigger, scan_notify_func_t func, void *userdata) { struct scan_context *sc; + if (scan_periodic_is_disabled()) + return; + sc = l_queue_find(scan_contexts, scan_context_match, L_UINT_TO_PTR(ifindex));