Skip to contentSkip to conversation

: Use is_vlan_dev()

PATCH Applied Joonwoo Park 2 participants 2 messages Apr 11, 2008 – May 27, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 3/5 : Use is_vlan_dev()

Use simplified is_vlan_dev function.

---
 net/8021q/vlan.c     |    3 +--
 net/8021q/vlan_dev.c |    2 +-
 net/8021q/vlanproc.c |    2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)
net/8021q/vlan.c +1 -2
index b33410a..a213bd1 100644
@@ -527,8 +527,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;
 	}
 
net/8021q/vlan_dev.c +1 -1
index 480ea90..df9786f 100644
@@ -684,7 +684,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,
net/8021q/vlanproc.c +1 -1
index 9671aa5..5727f57 100644
@@ -289,7 +289,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,
Signature · 1 line
1.5.4.3