X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fnetifd.git;a=blobdiff_plain;f=vlan.c;h=354e12f661d662bcf1d37200239d2caeb6b255b2;hp=28e561b61dd2aa5523ecff3466bb21e7ed022f34;hb=5a0909caaff498d61b5cf17162fd0c5c5b381b8b;hpb=3d317e90f15eec480b23f4dcddb841c292bef690 diff --git a/vlan.c b/vlan.c index 28e561b..354e12f 100644 --- a/vlan.c +++ b/vlan.c @@ -50,7 +50,7 @@ static int vlan_set_device_state(struct device *dev, bool up) } ret = device_claim(&vldev->dep); - if (ret) + if (ret < 0) return ret; system_vlan_add(vldev->dep.dev, vldev->id); @@ -102,6 +102,7 @@ static struct device *get_vlan_device(struct device *dev, int id, bool create) static const struct device_type vlan_type = { .name = "VLAN", .config_params = &device_attr_list, + .keep_link_status = true, .free = free_vlan_if, }; struct vlan_device *vldev;