From 71e415e44c1f9b7a4f05dac4f8038575dbef0c6f Mon Sep 17 00:00:00 2001 From: dingtianhong Date: Tue, 25 Mar 2014 17:44:42 +0800 Subject: vlan: make a new function vlan_dev_vlan_proto() and export The vlan support 2 proto: 802.1q and 802.1ad, so make a new function called vlan_dev_vlan_proto() which could return the vlan proto for input dev. Signed-off-by: Ding Tianhong Signed-off-by: David S. Miller --- include/linux/if_vlan.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include/linux/if_vlan.h') diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index d3d2306f00bf..13bbbde00e68 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h @@ -110,6 +110,7 @@ extern struct net_device *__vlan_find_dev_deep(struct net_device *real_dev, __be16 vlan_proto, u16 vlan_id); extern struct net_device *vlan_dev_real_dev(const struct net_device *dev); extern u16 vlan_dev_vlan_id(const struct net_device *dev); +extern __be16 vlan_dev_vlan_proto(const struct net_device *dev); /** * struct vlan_priority_tci_mapping - vlan egress priority mappings @@ -216,6 +217,12 @@ static inline u16 vlan_dev_vlan_id(const struct net_device *dev) return 0; } +static inline __be16 vlan_dev_vlan_proto(const struct net_device *dev) +{ + BUG(); + return 0; +} + static inline u16 vlan_dev_get_egress_qos_mask(struct net_device *dev, u32 skprio) { -- cgit v1.2.3-59-g8ed1b