summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2020-11-05 11:58:40 +0100
committerFelix Fietkau <nbd@nbd.name>2020-11-05 12:03:49 +0100
commit3a2b21001c3c93dbe8502a8df465e415f18a84b1 (patch)
tree7fd36d655e487960e0857be5a8c1a4965a7a2e78
parentd1e8884f89111726446bdba70ef3a17f84336613 (diff)
system-dummy: set present state only for simple devices
Fixes an issue with bringing up VLANs/bridges too early Signed-off-by: Felix Fietkau <nbd@nbd.name>
-rw-r--r--system-dummy.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/system-dummy.c b/system-dummy.c
index aeba9db..7a5c839 100644
--- a/system-dummy.c
+++ b/system-dummy.c
@@ -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;