aboutsummaryrefslogtreecommitdiffstats
path: root/net/8021q
diff options
context:
space:
mode:
authorDoug Goldstein <cardoe@cardoe.com>2012-10-21 15:53:57 -0400
committerDavid S. Miller <davem@davemloft.net>2012-11-08 22:02:23 -0500
commite949b09b71d975a82f13ac88ce4ad338fed213da (patch)
tree999986dcaa708fee3331d42b3ea3f31f23280596 /net/8021q
parent23612632435892fe66268f9598d5550ccdfdeea8 (diff)
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')
-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 = {
531 .parse = eth_header_parse, 531 .parse = eth_header_parse,
532}; 532};
533 533
534static struct device_type vlan_type = {
535 .name = "vlan",
536};
537
534static const struct net_device_ops vlan_netdev_ops; 538static const struct net_device_ops vlan_netdev_ops;
535 539
536static int vlan_dev_init(struct net_device *dev) 540static int vlan_dev_init(struct net_device *dev)
@@ -579,6 +583,8 @@ static int vlan_dev_init(struct net_device *dev)
579 583
580 dev->netdev_ops = &vlan_netdev_ops; 584 dev->netdev_ops = &vlan_netdev_ops;
581 585
586 SET_NETDEV_DEVTYPE(dev, &vlan_type);
587
582 if (is_vlan_dev(real_dev)) 588 if (is_vlan_dev(real_dev))
583 subclass = 1; 589 subclass = 1;
584 590