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 /net/8021q | |
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 'net/8021q')
-rw-r--r-- | net/8021q/vlan_core.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c index 35b3c192d7b9..3c32bd257b73 100644 --- a/net/8021q/vlan_core.c +++ b/net/8021q/vlan_core.c | |||
@@ -106,6 +106,12 @@ u16 vlan_dev_vlan_id(const struct net_device *dev) | |||
106 | } | 106 | } |
107 | EXPORT_SYMBOL(vlan_dev_vlan_id); | 107 | EXPORT_SYMBOL(vlan_dev_vlan_id); |
108 | 108 | ||
109 | __be16 vlan_dev_vlan_proto(const struct net_device *dev) | ||
110 | { | ||
111 | return vlan_dev_priv(dev)->vlan_proto; | ||
112 | } | ||
113 | EXPORT_SYMBOL(vlan_dev_vlan_proto); | ||
114 | |||
109 | static struct sk_buff *vlan_reorder_header(struct sk_buff *skb) | 115 | static struct sk_buff *vlan_reorder_header(struct sk_buff *skb) |
110 | { | 116 | { |
111 | if (skb_cow(skb, skb_headroom(skb)) < 0) | 117 | if (skb_cow(skb, skb_headroom(skb)) < 0) |