vlan: adjust vlan_set_encap_proto() for its callers
[platform/adaptation/renesas_rcar/renesas_kernel.git] / include / linux / if_vlan.h
index d06cc5c..218a3b6 100644 (file)
@@ -331,7 +331,7 @@ static inline void vlan_set_encap_proto(struct sk_buff *skb,
                                        struct vlan_hdr *vhdr)
 {
        __be16 proto;
-       unsigned char *rawp;
+       unsigned short *rawp;
 
        /*
         * Was a VLAN packet, grab the encapsulated protocol, which the layer
@@ -344,8 +344,8 @@ static inline void vlan_set_encap_proto(struct sk_buff *skb,
                return;
        }
 
-       rawp = skb->data;
-       if (*(unsigned short *) rawp == 0xFFFF)
+       rawp = (unsigned short *)(vhdr + 1);
+       if (*rawp == 0xFFFF)
                /*
                 * This is a magic hack to spot IPX packets. Older Novell
                 * breaks the protocol design and runs IPX over 802.3 without