netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 3/5] [VLAN]: Use is_vlan_dev()
@ 2008-04-11 13:58 Joonwoo Park
  2008-05-27  5:40 ` Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: Joonwoo Park @ 2008-04-11 13:58 UTC (permalink / raw)
  To: kaber; +Cc: davem, netdev

Use simplified is_vlan_dev function.

Signed-off-by: Joonwoo Park <joonwpark81@gmail.com>
---
 net/8021q/vlan.c     |    3 +--
 net/8021q/vlan_dev.c |    2 +-
 net/8021q/vlanproc.c |    2 +-
 3 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index b33410a..a213bd1 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -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;
 	}
 
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 480ea90..df9786f 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -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,
diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c
index 9671aa5..5727f57 100644
--- a/net/8021q/vlanproc.c
+++ b/net/8021q/vlanproc.c
@@ -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,
-- 
1.5.4.3



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 3/5] [VLAN]: Use is_vlan_dev()
  2008-04-11 13:58 [PATCH 3/5] [VLAN]: Use is_vlan_dev() Joonwoo Park
@ 2008-05-27  5:40 ` Patrick McHardy
  0 siblings, 0 replies; 2+ messages in thread
From: Patrick McHardy @ 2008-05-27  5:40 UTC (permalink / raw)
  To: Joonwoo Park; +Cc: davem, netdev

Joonwoo Park wrote:
> Use simplified is_vlan_dev function.
> 
> Signed-off-by: Joonwoo Park <joonwpark81@gmail.com>


Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-05-27  5:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-11 13:58 [PATCH 3/5] [VLAN]: Use is_vlan_dev() Joonwoo Park
2008-05-27  5:40 ` Patrick McHardy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).