system-dummy: set present state only for simple devices
authorFelix Fietkau <nbd@nbd.name>
Thu, 5 Nov 2020 10:58:40 +0000 (11:58 +0100)
committerFelix Fietkau <nbd@nbd.name>
Thu, 5 Nov 2020 11:03:49 +0000 (12:03 +0100)
Fixes an issue with bringing up VLANs/bridges too early

Signed-off-by: Felix Fietkau <nbd@nbd.name>
system-dummy.c

index aeba9db4e445606d491a4acad72a85173c8d7a0a..7a5c8395085a644d205c70a7543a8dc61184a620 100644 (file)
@@ -124,7 +124,9 @@ void system_if_clear_state(struct device *dev)
 
 int system_if_check(struct device *dev)
 {
-       device_set_present(dev, true);
+       if (dev->type == &simple_device_type)
+               device_set_present(dev, true);
+
        device_set_link(dev, true);
 
        return 0;