From: Patrick McHardy <kaber@trash.net>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, Patrick McHardy <kaber@trash.net>
Subject: vlan 02/07: Use is_vlan_dev()
Date: Mon, 7 Jul 2008 14:36:01 +0200 (MEST) [thread overview]
Message-ID: <20080707123600.23947.37696.sendpatchset@localhost.localdomain> (raw)
In-Reply-To: <20080707123557.23947.70114.sendpatchset@localhost.localdomain>
vlan: Use is_vlan_dev()
Use simplified is_vlan_dev function.
Signed-off-by: Joonwoo Park <joonwpark81@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
---
commit 5d835c9df8f14434867d206073316f771cfaac48
tree e30923fbd12ea4dbe12fb7a4b82d9e5261df935a
parent 12680f9e7c4d8c1d4dd89569e63f4f74d57243b0
author Joonwoo Park <joonwpark81@gmail.com> Mon, 07 Jul 2008 14:26:43 +0200
committer Patrick McHardy <kaber@trash.net> Mon, 07 Jul 2008 14:26:43 +0200
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 b529110..8141e2d 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -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;
}
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 4a85259..88f318a 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -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,
diff --git a/net/8021q/vlanproc.c b/net/8021q/vlanproc.c
index 08b54b5..6073a88 100644
--- a/net/8021q/vlanproc.c
+++ b/net/8021q/vlanproc.c
@@ -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,
next prev parent reply other threads:[~2008-07-07 12:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-07 12:35 vlan 00/07: VLAN update part 1 Patrick McHardy
2008-07-07 12:35 ` vlan 01/07: fix network_header/mac_header adjustments Patrick McHardy
2008-07-07 12:36 ` Patrick McHardy [this message]
2008-07-07 12:36 ` vlan 03/07: Add ethtool support Patrick McHardy
2008-07-07 16:52 ` Ben Hutchings
2008-07-07 16:59 ` Patrick McHardy
2008-07-07 17:21 ` Ben Hutchings
2008-07-07 17:47 ` Patrick McHardy
2008-07-08 13:54 ` Ben Hutchings
2008-07-08 14:01 ` Patrick McHardy
2008-07-07 12:36 ` vlan 04/07: uninline __vlan_hwaccel_rx Patrick McHardy
2008-07-07 12:36 ` vlan 05/07: move struct vlan_dev_info to private header Patrick McHardy
2008-07-07 12:36 ` vlan 06/07: remove useless struct hlist_node declaration from if_vlan.h Patrick McHardy
2008-07-07 12:36 ` vlan 07/07: TCI related type and naming cleanups Patrick McHardy
2008-07-08 10:44 ` vlan 00/07: VLAN update part 1 David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080707123600.23947.37696.sendpatchset@localhost.localdomain \
--to=kaber@trash.net \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).