From af6f2e49b43955cb5965a4b066989d7329e9588e Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 13 Dec 2017 13:09:36 +0100 Subject: [PATCH] wifi: downgrade logging level and support reloading "wifi-backend" configuration NM_CONFIG_GET_DATA_ORIG is the configuration that was loaded the first time. NM_CONFIG_GET_DATA is the currently loaded one. Sometimes we want to always stick to the original configuration, if we don't support reloading the parameter (for example main.plugins, because it would be cumbersome to properly implementing loading/unloading setting plugins. In this case however, we can allow reloading the configuration just fine. Of course, this only matters, if the device appears after the configuration is reloaded, for example by reloading the driver. Also, don't log any warnings, unless necessary. --- src/devices/wifi/nm-wifi-factory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/devices/wifi/nm-wifi-factory.c b/src/devices/wifi/nm-wifi-factory.c index c7f11feaa4..1272e94139 100644 --- a/src/devices/wifi/nm-wifi-factory.c +++ b/src/devices/wifi/nm-wifi-factory.c @@ -104,12 +104,12 @@ create_device (NMDeviceFactory *factory, if (plink->type != NM_LINK_TYPE_WIFI) return nm_device_olpc_mesh_new (iface); - backend = nm_config_data_get_value (NM_CONFIG_GET_DATA_ORIG, + backend = nm_config_data_get_value (NM_CONFIG_GET_DATA, NM_CONFIG_KEYFILE_GROUP_MAIN, NM_CONFIG_KEYFILE_KEY_MAIN_WIFI_BACKEND, NM_CONFIG_GET_VALUE_STRIP); - nm_log_warn (LOGD_PLATFORM | LOGD_WIFI, "(%s) config: backend is %s, %i", iface, backend, WITH_IWD); + nm_log_dbg (LOGD_PLATFORM | LOGD_WIFI, "(%s) config: backend is %s, %i", iface, backend, WITH_IWD); if (!backend || !strcasecmp (backend, "wpa_supplicant")) return nm_device_wifi_new (iface, capabilities); #if WITH_IWD