From e8b4e32dfca815ca3a7694b956ed3726a20c1590 Mon Sep 17 00:00:00 2001 From: Ming Liu Date: Wed, 2 Feb 2022 16:59:30 +0100 Subject: connman: disable background scan Disable BackgroundScan in main.conf. Related-to: ELB-4148 Signed-off-by: Ming Liu (cherry picked from commit 097df183d8e70cfcf4267425c195a6dcfcdbc9ed) --- .../connman/0001-Adjust-main-configuration.patch | 41 ++++++++++++++++++++++ ...ck-ntp-client-should-not-update-time-time.patch | 28 +++++++++++++++ .../0002-main.conf-blacklist-rndis-nic-s.patch | 28 --------------- ...ck-ntp-client-should-not-update-time-time.patch | 28 --------------- recipes-connectivity/connman/connman_%.bbappend | 4 +-- 5 files changed, 71 insertions(+), 58 deletions(-) create mode 100644 recipes-connectivity/connman/connman/0001-Adjust-main-configuration.patch create mode 100644 recipes-connectivity/connman/connman/0001-connman-clock-ntp-client-should-not-update-time-time.patch delete mode 100644 recipes-connectivity/connman/connman/0002-main.conf-blacklist-rndis-nic-s.patch delete mode 100644 recipes-connectivity/connman/connman/0003-connman-clock-ntp-client-should-not-update-time-time.patch diff --git a/recipes-connectivity/connman/connman/0001-Adjust-main-configuration.patch b/recipes-connectivity/connman/connman/0001-Adjust-main-configuration.patch new file mode 100644 index 0000000..91949a2 --- /dev/null +++ b/recipes-connectivity/connman/connman/0001-Adjust-main-configuration.patch @@ -0,0 +1,41 @@ +From 0d23846576b53b6a2a8391a29d44e82bf3aed588 Mon Sep 17 00:00:00 2001 +From: Ming Liu +Date: Tue, 28 Dec 2021 13:50:13 +0100 +Subject: [PATCH] Adjust main configuration + +- Blacklist rndis nic's, we want them handled by systemd's networkd. +- Disable background scan, to avoid significant increase in bandwidth. + +Upstream-Status: Inappropriate [Toradex specific] + +Signed-off-by: Max Krummenacher +Signed-off-by: Ming Liu +--- + src/main.conf | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/main.conf b/src/main.conf +index 14965e1..24a17bf 100644 +--- a/src/main.conf ++++ b/src/main.conf +@@ -23,7 +23,7 @@ + # When BackgroundScanning is false, ConnMan will not perform any scan + # regardless of wifi is connected or not, unless it is requested by + # the user through a D-Bus call. +-# BackgroundScanning = true ++BackgroundScanning = false + + # Assume that service gateways also function as timeservers. + # UseGatewaysAsTimeservers = false +@@ -67,7 +67,7 @@ + # not be handled by ConnMan, if their first characters + # match any of the list entries. Default value is + # vmnet,vboxnet,virbr,ifb,ve-,vb-. +-# NetworkInterfaceBlacklist = vmnet,vboxnet,virbr,ifb,ve-,vb- ++NetworkInterfaceBlacklist = vmnet,vboxnet,virbr,ifb,ve-,vb-,usb,rndis + + # Allow ConnMan to change the system hostname. This can + # happen for example if we receive DHCP hostname option. +-- +2.25.1 + diff --git a/recipes-connectivity/connman/connman/0001-connman-clock-ntp-client-should-not-update-time-time.patch b/recipes-connectivity/connman/connman/0001-connman-clock-ntp-client-should-not-update-time-time.patch new file mode 100644 index 0000000..c570812 --- /dev/null +++ b/recipes-connectivity/connman/connman/0001-connman-clock-ntp-client-should-not-update-time-time.patch @@ -0,0 +1,28 @@ +From fcf27214f779478b449ea5ffe6d915fd6057cade Mon Sep 17 00:00:00 2001 +From: Igor Opaniuk +Date: Mon, 30 Nov 2020 15:17:30 +0200 +Subject: [PATCH] connman: clock: ntp client should not update time/timezone + +NTP client should not update time/timezone unless otherwise stated +explicitly in the settings. + +Signed-off-by: Igor Opaniuk +--- + src/clock.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/clock.c b/src/clock.c +index 0fde2c3..c9a26c6 100644 +--- a/src/clock.c ++++ b/src/clock.c +@@ -35,8 +35,8 @@ enum timezone_updates { + TIMEZONE_UPDATES_AUTO = 2, + }; + +-static enum time_updates time_updates_config = TIME_UPDATES_AUTO; +-static enum timezone_updates timezone_updates_config = TIMEZONE_UPDATES_AUTO; ++static enum time_updates time_updates_config = TIME_UPDATES_MANUAL; ++static enum timezone_updates timezone_updates_config = TIME_UPDATES_MANUAL; + + static char *timezone_config = NULL; + diff --git a/recipes-connectivity/connman/connman/0002-main.conf-blacklist-rndis-nic-s.patch b/recipes-connectivity/connman/connman/0002-main.conf-blacklist-rndis-nic-s.patch deleted file mode 100644 index dd6bafa..0000000 --- a/recipes-connectivity/connman/connman/0002-main.conf-blacklist-rndis-nic-s.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 38a7afa59f0edc1e4c6a49e778e6456f6cd30446 Mon Sep 17 00:00:00 2001 -From: Max Krummenacher -Date: Fri, 30 Dec 2016 13:41:47 +0100 -Subject: [PATCH 2/2] main.conf: blacklist rndis nic's - -We want them handled by systemd's networkd. - -Signed-off-by: Max Krummenacher ---- - src/main.conf | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/main.conf b/src/main.conf -index 14965e1..d7b2951 100644 ---- a/src/main.conf -+++ b/src/main.conf -@@ -67,7 +67,7 @@ - # not be handled by ConnMan, if their first characters - # match any of the list entries. Default value is - # vmnet,vboxnet,virbr,ifb,ve-,vb-. --# NetworkInterfaceBlacklist = vmnet,vboxnet,virbr,ifb,ve-,vb- -+NetworkInterfaceBlacklist = vmnet,vboxnet,virbr,ifb,ve-,vb-,usb,rndis - - # Allow ConnMan to change the system hostname. This can - # happen for example if we receive DHCP hostname option. --- -2.13.6 - diff --git a/recipes-connectivity/connman/connman/0003-connman-clock-ntp-client-should-not-update-time-time.patch b/recipes-connectivity/connman/connman/0003-connman-clock-ntp-client-should-not-update-time-time.patch deleted file mode 100644 index c570812..0000000 --- a/recipes-connectivity/connman/connman/0003-connman-clock-ntp-client-should-not-update-time-time.patch +++ /dev/null @@ -1,28 +0,0 @@ -From fcf27214f779478b449ea5ffe6d915fd6057cade Mon Sep 17 00:00:00 2001 -From: Igor Opaniuk -Date: Mon, 30 Nov 2020 15:17:30 +0200 -Subject: [PATCH] connman: clock: ntp client should not update time/timezone - -NTP client should not update time/timezone unless otherwise stated -explicitly in the settings. - -Signed-off-by: Igor Opaniuk ---- - src/clock.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/src/clock.c b/src/clock.c -index 0fde2c3..c9a26c6 100644 ---- a/src/clock.c -+++ b/src/clock.c -@@ -35,8 +35,8 @@ enum timezone_updates { - TIMEZONE_UPDATES_AUTO = 2, - }; - --static enum time_updates time_updates_config = TIME_UPDATES_AUTO; --static enum timezone_updates timezone_updates_config = TIMEZONE_UPDATES_AUTO; -+static enum time_updates time_updates_config = TIME_UPDATES_MANUAL; -+static enum timezone_updates timezone_updates_config = TIME_UPDATES_MANUAL; - - static char *timezone_config = NULL; - diff --git a/recipes-connectivity/connman/connman_%.bbappend b/recipes-connectivity/connman/connman_%.bbappend index 78e6e24..683a023 100644 --- a/recipes-connectivity/connman/connman_%.bbappend +++ b/recipes-connectivity/connman/connman_%.bbappend @@ -1,8 +1,8 @@ FILESEXTRAPATHS:prepend := "${THISDIR}/connman:" SRC_URI:append = " \ - file://0002-main.conf-blacklist-rndis-nic-s.patch \ - file://0003-connman-clock-ntp-client-should-not-update-time-time.patch \ + file://0001-Adjust-main-configuration.patch \ + file://0001-connman-clock-ntp-client-should-not-update-time-time.patch \ " do_install:append() { -- cgit v1.2.3