]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - net/8021q/vlan_dev.c
[SK_BUFF]: unions of just one member don't get anything done, kill them
[net-next-2.6.git] / net / 8021q / vlan_dev.c
index 2fc8fe2cb366e4887e25c998ef2881834d25dbbe..42a35bed0881d388c21fc7eb1ef433f44afa9696 100644 (file)
@@ -83,7 +83,7 @@ static inline struct sk_buff *vlan_check_reorder_header(struct sk_buff *skb)
                        /* Lifted from Gleb's VLAN code... */
                        memmove(skb->data - ETH_HLEN,
                                skb->data - VLAN_ETH_HLEN, 12);
-                       skb->mac.raw += VLAN_HLEN;
+                       skb->mac_header += VLAN_HLEN;
                }
        }
 
@@ -258,7 +258,7 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
         * won't work for fault tolerant netware but does for the rest.
         */
        if (*(unsigned short *)rawp == 0xFFFF) {
-               skb->protocol = __constant_htons(ETH_P_802_3);
+               skb->protocol = htons(ETH_P_802_3);
                /* place it back on the queue to be handled by true layer 3 protocols.
                 */
 
@@ -281,7 +281,7 @@ int vlan_skb_recv(struct sk_buff *skb, struct net_device *dev,
        /*
         *      Real 802.2 LLC
         */
-       skb->protocol = __constant_htons(ETH_P_802_2);
+       skb->protocol = htons(ETH_P_802_2);
        /* place it back on the queue to be handled by upper layer protocols.
         */
 
@@ -380,6 +380,9 @@ int vlan_dev_hard_header(struct sk_buff *skb, struct net_device *dev,
                } else {
                        vhdr->h_vlan_encapsulated_proto = htons(len);
                }
+
+               skb->protocol = htons(ETH_P_8021Q);
+               skb->nh.raw = skb->data;
        }
 
        /* Before delegating work to the lower layer, enter our MAC-address */
@@ -445,7 +448,7 @@ int vlan_dev_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
         * OTHER THINGS LIKE FDDI/TokenRing/802.3 SNAPs...
         */
 
-       if (veth->h_vlan_proto != __constant_htons(ETH_P_8021Q)) {
+       if (veth->h_vlan_proto != htons(ETH_P_8021Q)) {
                int orig_headroom = skb_headroom(skb);
                unsigned short veth_TCI;