Skip to content

Commit

Permalink
vlan: Use is_vlan_dev()
Browse files Browse the repository at this point in the history
Use simplified is_vlan_dev function.

Signed-off-by: Joonwoo Park <[email protected]>
Signed-off-by: Patrick McHardy <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
joonwpark authored and davem330 committed Jul 8, 2008
1 parent acc81e1 commit 26a2523
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions net/8021q/vlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -570,8 +570,7 @@ static int vlan_ioctl_handler(struct net *net, void __user *arg)
goto out;

err = -EINVAL;
if (args.cmd != ADD_VLAN_CMD &&
!(dev->priv_flags & IFF_802_1Q_VLAN))
if (args.cmd != ADD_VLAN_CMD && !is_vlan_dev(dev))
goto out;
}

Expand Down
2 changes: 1 addition & 1 deletion net/8021q/vlan_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ static int vlan_dev_init(struct net_device *dev)
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;

lockdep_set_class_and_subclass(&dev->_xmit_lock,
Expand Down
2 changes: 1 addition & 1 deletion net/8021q/vlanproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ static int vlandev_seq_show(struct seq_file *seq, void *offset)
static const char fmt[] = "%30s %12lu\n";
int i;

if (!(vlandev->priv_flags & IFF_802_1Q_VLAN))
if (!is_vlan_dev(vlandev))
return 0;

seq_printf(seq,
Expand Down

0 comments on commit 26a2523

Please sign in to comment.