diff options
author | Felix Fietkau <nbd@nbd.name> | 2020-08-07 14:19:06 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2020-10-28 04:49:11 +0100 |
commit | 3023b0cc73520cf7b14e1bfa9075072098b6a753 (patch) | |
tree | 497f337b16ada29e941c984dba1e50a799dca62b /interface.c | |
parent | 24ce1eab4910869576406bafd0489daf0d3e6e28 (diff) |
bridge: add support for defining port member vlans via hotplug ops
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'interface.c')
-rw-r--r-- | interface.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/interface.c b/interface.c index 782174f..c53c091 100644 --- a/interface.c +++ b/interface.c @@ -1038,7 +1038,8 @@ interface_remove_link(struct interface *iface, struct device *dev) } static int -interface_add_link(struct interface *iface, struct device *dev, bool link_ext) +interface_add_link(struct interface *iface, struct device *dev, + struct blob_attr *vlan, bool link_ext) { struct device *mdev = iface->main_dev.dev; @@ -1050,7 +1051,7 @@ interface_add_link(struct interface *iface, struct device *dev, bool link_ext) if (mdev) { if (mdev->hotplug_ops) - return mdev->hotplug_ops->add(mdev, dev); + return mdev->hotplug_ops->add(mdev, dev, vlan); else return UBUS_STATUS_NOT_SUPPORTED; } @@ -1064,7 +1065,8 @@ interface_add_link(struct interface *iface, struct device *dev, bool link_ext) } int -interface_handle_link(struct interface *iface, const char *name, bool add, bool link_ext) +interface_handle_link(struct interface *iface, const char *name, + struct blob_attr *vlan, bool add, bool link_ext) { struct device *dev; int ret; @@ -1081,7 +1083,7 @@ interface_handle_link(struct interface *iface, const char *name, bool add, bool interface_set_device_config(iface, dev); device_set_present(dev, true); - ret = interface_add_link(iface, dev, link_ext); + ret = interface_add_link(iface, dev, vlan, link_ext); } else { ret = interface_remove_link(iface, dev); } |