diff options
| author | dingtianhong <dingtianhong@huawei.com> | 2014-03-25 05:44:42 -0400 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2014-03-26 16:41:28 -0400 |
| commit | 71e415e44c1f9b7a4f05dac4f8038575dbef0c6f (patch) | |
| tree | a6ee4a671c70992ed02c1183fec49997ca65c99f /include/linux | |
| parent | 5a6b99170c7042702112c64bec46bcca9fbcc6d7 (diff) | |
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 <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/if_vlan.h | 7 |
1 files changed, 7 insertions, 0 deletions
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, | |||
| 110 | __be16 vlan_proto, u16 vlan_id); | 110 | __be16 vlan_proto, u16 vlan_id); |
| 111 | extern struct net_device *vlan_dev_real_dev(const struct net_device *dev); | 111 | extern struct net_device *vlan_dev_real_dev(const struct net_device *dev); |
| 112 | extern u16 vlan_dev_vlan_id(const struct net_device *dev); | 112 | extern u16 vlan_dev_vlan_id(const struct net_device *dev); |
| 113 | extern __be16 vlan_dev_vlan_proto(const struct net_device *dev); | ||
| 113 | 114 | ||
| 114 | /** | 115 | /** |
| 115 | * struct vlan_priority_tci_mapping - vlan egress priority mappings | 116 | * 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) | |||
| 216 | return 0; | 217 | return 0; |
| 217 | } | 218 | } |
| 218 | 219 | ||
| 220 | static inline __be16 vlan_dev_vlan_proto(const struct net_device *dev) | ||
| 221 | { | ||
| 222 | BUG(); | ||
| 223 | return 0; | ||
| 224 | } | ||
| 225 | |||
| 219 | static inline u16 vlan_dev_get_egress_qos_mask(struct net_device *dev, | 226 | static inline u16 vlan_dev_get_egress_qos_mask(struct net_device *dev, |
| 220 | u32 skprio) | 227 | u32 skprio) |
| 221 | { | 228 | { |
