struct list_head list;
const char *name;
+ bool keep_link_status;
+
const struct uci_blob_param_list *config_params;
struct device *(*create)(const char *name, struct blob_attr *attr);
const struct device_type macvlan_device_type = {
.name = "MAC VLAN",
.config_params = &macvlan_attr_list,
+ .keep_link_status = true,
.create = macvlan_create,
.config_init = macvlan_config_init,
goto out;
device_set_ifindex(dev, ifi->ifi_index);
- device_set_link(dev, ifi->ifi_flags & IFF_LOWER_UP ? true : false);
+ if (!dev->type->keep_link_status)
+ device_set_link(dev, ifi->ifi_flags & IFF_LOWER_UP ? true : false);
out:
return 0;
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;
const struct device_type vlandev_device_type = {
.name = "VLANDEV",
.config_params = &vlandev_attr_list,
+ .keep_link_status = true,
.create = vlandev_create,
.config_init = vlandev_config_init,