summaryrefslogtreecommitdiff
path: root/vlandev.c
diff options
context:
space:
mode:
authorHans Dedecker <dedeckeh@gmail.com>2016-09-23 15:08:21 +0200
committerFelix Fietkau <nbd@nbd.name>2016-09-26 11:51:19 +0200
commit824c5f4b3a041183604018e0068ccf123ee10221 (patch)
tree0026967a97dafa4d4f5eda7ae154a410b0752ee3 /vlandev.c
parentc22fe6777381e368f5e9ca3ef7b4258c4a2754b5 (diff)
downloadnetifd-824c5f4b3a041183604018e0068ccf123ee10221.tar.gz
vlandev: Register 8021ad and 8021q s device types
Fixes creation of vlan 8021ad/8021q devices by UCI due to device handlers rework Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
Diffstat (limited to 'vlandev.c')
-rw-r--r--vlandev.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/vlandev.c b/vlandev.c
index becaed8..b065c27 100644
--- a/vlandev.c
+++ b/vlandev.c
@@ -241,8 +241,18 @@ vlandev_create(const char *name, struct device_type *devtype,
return dev;
}
-static struct device_type vlandev_device_type = {
- .name = "VLANDEV",
+static struct device_type vlan8021ad_device_type = {
+ .name = "8021ad",
+ .config_params = &vlandev_attr_list,
+ .create = vlandev_create,
+ .config_init = vlandev_config_init,
+ .reload = vlandev_reload,
+ .free = vlandev_free,
+ .dump_info = vlandev_dump_info,
+};
+
+static struct device_type vlan8021q_device_type = {
+ .name = "8021q",
.config_params = &vlandev_attr_list,
.create = vlandev_create,
.config_init = vlandev_config_init,
@@ -253,5 +263,6 @@ static struct device_type vlandev_device_type = {
static void __init vlandev_device_type_init(void)
{
- device_type_add(&vlandev_device_type);
+ device_type_add(&vlan8021ad_device_type);
+ device_type_add(&vlan8021q_device_type);
}