From 45b4eddae6d0e60f4d545854265a7973f552d1e6 Mon Sep 17 00:00:00 2001 From: John Keeping Date: Thu, 28 Jul 2022 18:50:36 +0100 Subject: [PATCH] package/connman: add an option to disable stats generation By default connman periodically saves network interface statistics into an mmap'd round robin file. These are not accessible over the D-Bus interface and the only method to interact with this is ResetCounters() which is marked as experimental. Continually writing statistics will increase drive wear and may not be desirable in some devices with limited flash erase cycles, so add an option to disable this. Note that connman does not provide any runtime control over this facility, it can only be disabled via the configure script. Signed-off-by: John Keeping Signed-off-by: Thomas Petazzoni (cherry picked from commit b573a7029523925746efbe056f7ff02b63edbb7f) Signed-off-by: Peter Korsgaard --- package/connman/Config.in | 8 ++++++++ package/connman/connman.mk | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/package/connman/Config.in b/package/connman/Config.in index 72b76bf19d..af3e1f69f6 100644 --- a/package/connman/Config.in +++ b/package/connman/Config.in @@ -94,6 +94,14 @@ comment "ofono support needs a toolchain w/ headers >= 4.12" config BR2_PACKAGE_CONNMAN_DEBUG bool "enable compiling with debugging information" +config BR2_PACKAGE_CONNMAN_STATS + bool "enable statistics round robin file generation" + help + Enable generation of statistics in a round robin file. + + This is enabled by default upstream but is marked as + experimental. + config BR2_PACKAGE_CONNMAN_CLIENT bool "enable command line client" select BR2_PACKAGE_READLINE diff --git a/package/connman/connman.mk b/package/connman/connman.mk index 1b6fd611f5..a76a339e6f 100644 --- a/package/connman/connman.mk +++ b/package/connman/connman.mk @@ -65,6 +65,12 @@ else CONNMAN_CONF_OPTS += --disable-ofono endif +ifeq ($(BR2_PACKAGE_CONNMAN_STATS),y) +CONNMAN_CONF_OPTS += --enable-stats +else +CONNMAN_CONF_OPTS += --disable-stats +endif + ifeq ($(BR2_PACKAGE_CONNMAN_WIFI),y) CONNMAN_CONF_OPTS += --enable-wifi else