dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Doug Goldstein 2012-10-21 19:53:57 +00:00 committed by David S. Miller
parent 2361263243
commit e949b09b71
1 changed files with 6 additions and 0 deletions

View File

@ -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;