do not recreate or restart external devices on settings changes, apply them at runtime
authorFelix Fietkau <nbd@openwrt.org>
Thu, 12 Jul 2012 21:48:29 +0000 (23:48 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Thu, 12 Jul 2012 21:48:29 +0000 (23:48 +0200)
device.c

index bc5bc46335d3a71036286515d286919f1f0f0439..0788757380aab309232500b5e3499f540b314994 100644 (file)
--- a/device.c
+++ b/device.c
@@ -584,6 +584,10 @@ device_create(const char *name, const struct device_type *type,
        if (odev) {
                odev->current_config = true;
                change = device_set_config(odev, type, config);
+               if (odev->external) {
+                       system_if_apply_settings(odev, &odev->settings);
+                       change = DEV_CONFIG_APPLIED;
+               }
                switch (change) {
                case DEV_CONFIG_RESTART:
                case DEV_CONFIG_APPLIED: