diff options
author | Pravin B Shelar <pshelar@nicira.com> | 2011-11-19 01:15:54 +0400 |
---|---|---|
committer | Jesse Gross <jesse@nicira.com> | 2011-12-03 21:35:09 +0400 |
commit | 396cf9430505cfba529a2f2a037d782719fa5844 (patch) | |
tree | d628b40d09c5e608d1bd41ac14f64774c8fddf10 /net/8021q/vlan_core.c | |
parent | b4e16611c4e1cd98765269c8fdaf43f96baa57b1 (diff) | |
download | linux-396cf9430505cfba529a2f2a037d782719fa5844.tar.xz |
vlan: Move vlan_set_encap_proto() to vlan header file
Open vSwitch needs this function for vlan handling.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'net/8021q/vlan_core.c')
-rw-r--r-- | net/8021q/vlan_core.c | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/net/8021q/vlan_core.c b/net/8021q/vlan_core.c index f5ffc02729d6..9c95e8e054f9 100644 --- a/net/8021q/vlan_core.c +++ b/net/8021q/vlan_core.c @@ -110,39 +110,6 @@ static struct sk_buff *vlan_reorder_header(struct sk_buff *skb) return skb; } -static void vlan_set_encap_proto(struct sk_buff *skb, struct vlan_hdr *vhdr) -{ - __be16 proto; - unsigned char *rawp; - - /* - * Was a VLAN packet, grab the encapsulated protocol, which the layer - * three protocols care about. - */ - - proto = vhdr->h_vlan_encapsulated_proto; - if (ntohs(proto) >= 1536) { - skb->protocol = proto; - return; - } - - rawp = skb->data; - if (*(unsigned short *) rawp == 0xFFFF) - /* - * This is a magic hack to spot IPX packets. Older Novell - * breaks the protocol design and runs IPX over 802.3 without - * an 802.2 LLC layer. We look for FFFF which isn't a used - * 802.2 SSAP/DSAP. This won't work for fault tolerant netware - * but does for the rest. - */ - skb->protocol = htons(ETH_P_802_3); - else - /* - * Real 802.2 LLC - */ - skb->protocol = htons(ETH_P_802_2); -} - struct sk_buff *vlan_untag(struct sk_buff *skb) { struct vlan_hdr *vhdr; |