Commit 26a25239 authored by Joonwoo Park's avatar Joonwoo Park Committed by David S. Miller

vlan: Use is_vlan_dev()

Use simplified is_vlan_dev function.
Signed-off-by: default avatarJoonwoo Park <joonwpark81@gmail.com>
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent acc81e14
...@@ -570,8 +570,7 @@ static int vlan_ioctl_handler(struct net *net, void __user *arg) ...@@ -570,8 +570,7 @@ static int vlan_ioctl_handler(struct net *net, void __user *arg)
goto out; goto out;
err = -EINVAL; err = -EINVAL;
if (args.cmd != ADD_VLAN_CMD && if (args.cmd != ADD_VLAN_CMD && !is_vlan_dev(dev))
!(dev->priv_flags & IFF_802_1Q_VLAN))
goto out; goto out;
} }
......
...@@ -694,7 +694,7 @@ static int vlan_dev_init(struct net_device *dev) ...@@ -694,7 +694,7 @@ static int vlan_dev_init(struct net_device *dev)
dev->hard_start_xmit = vlan_dev_hard_start_xmit; dev->hard_start_xmit = vlan_dev_hard_start_xmit;
} }
if (real_dev->priv_flags & IFF_802_1Q_VLAN) if (is_vlan_dev(real_dev))
subclass = 1; subclass = 1;
lockdep_set_class_and_subclass(&dev->_xmit_lock, lockdep_set_class_and_subclass(&dev->_xmit_lock,
......
...@@ -290,7 +290,7 @@ static int vlandev_seq_show(struct seq_file *seq, void *offset) ...@@ -290,7 +290,7 @@ static int vlandev_seq_show(struct seq_file *seq, void *offset)
static const char fmt[] = "%30s %12lu\n"; static const char fmt[] = "%30s %12lu\n";
int i; int i;
if (!(vlandev->priv_flags & IFF_802_1Q_VLAN)) if (!is_vlan_dev(vlandev))
return 0; return 0;
seq_printf(seq, seq_printf(seq,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment