summaryrefslogtreecommitdiffstats
path: root/net/8021q/vlan_dev.c
diff options
context:
space:
mode:
authorDoug Goldstein <cardoe@cardoe.com>2012-10-21 21:53:57 +0200
committerDavid S. Miller <davem@davemloft.net>2012-11-09 04:02:23 +0100
commite949b09b71d975a82f13ac88ce4ad338fed213da (patch)
tree999986dcaa708fee3331d42b3ea3f31f23280596 /net/8021q/vlan_dev.c
parentirda: sh-irda: Remove SH7377 support (diff)
downloadlinux-e949b09b71d975a82f13ac88ce4ad338fed213da.tar.xz
linux-e949b09b71d975a82f13ac88ce4ad338fed213da.zip
vlan: set sysfs device_type to 'vlan'
Sets the sysfs device_type to 'vlan' for udev. This makes it easier for applications that query network information via udev to identify vlans instead of using strrchr(). Signed-off-by: Doug Goldstein <cardoe@cardoe.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/8021q/vlan_dev.c')
-rw-r--r--net/8021q/vlan_dev.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 6da96d433175..4a6d31a082b9 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -531,6 +531,10 @@ static const struct header_ops vlan_header_ops = {
.parse = eth_header_parse,
};
+static struct device_type vlan_type = {
+ .name = "vlan",
+};
+
static const struct net_device_ops vlan_netdev_ops;
static int vlan_dev_init(struct net_device *dev)
@@ -579,6 +583,8 @@ static int vlan_dev_init(struct net_device *dev)
dev->netdev_ops = &vlan_netdev_ops;
+ SET_NETDEV_DEVTYPE(dev, &vlan_type);
+
if (is_vlan_dev(real_dev))
subclass = 1;