mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-09 06:10:29 +01:00
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.
This commit is contained in:
parent
4d1025f602
commit
af6f2e49b4
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue