Commit af6f2e49 authored by Thomas Haller's avatar Thomas Haller

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.
parent 4d1025f6
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment