summaryrefslogtreecommitdiff
path: root/include/linux/if_vlan.h
diff options
context:
space:
mode:
authorNeil Horman <nhorman@tuxdriver.com>2011-05-24 12:31:08 +0400
committerDavid S. Miller <davem@davemloft.net>2011-05-26 01:55:23 +0400
commit6dcbbe25dcc9bd2bdeb4f685f8fb874ffc10e6be (patch)
tree8e8147187fe6be8b909445c6541f58c4ef474b2b /include/linux/if_vlan.h
parent22e95ac87d62bdc65b8a694a23cd4a364689b013 (diff)
downloadlinux-6dcbbe25dcc9bd2bdeb4f685f8fb874ffc10e6be.tar.xz
net: move is_vlan_dev into public header file (v2)
Migrate is_vlan_dev() to if_vlan.h so that core networkig can use it Signed-off-by: Neil Horman <nhorman@tuxdriver.com> CC: davem@davemloft.net CC: bhutchings@solarflare.com Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/if_vlan.h')
-rw-r--r--include/linux/if_vlan.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index 290bd8ac94cf..dc01681fbb42 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -110,6 +110,11 @@ static inline void vlan_group_set_device(struct vlan_group *vg,
array[vlan_id % VLAN_GROUP_ARRAY_PART_LEN] = dev;
}
+static inline int is_vlan_dev(struct net_device *dev)
+{
+ return dev->priv_flags & IFF_802_1Q_VLAN;
+}
+
#define vlan_tx_tag_present(__skb) ((__skb)->vlan_tci & VLAN_TAG_PRESENT)
#define vlan_tx_tag_get(__skb) ((__skb)->vlan_tci & ~VLAN_TAG_PRESENT)