aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/if_vlan.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/if_vlan.h')
-rw-r--r--include/linux/if_vlan.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h
index 13aff1e2183b..33a6e1951d4d 100644
--- a/include/linux/if_vlan.h
+++ b/include/linux/if_vlan.h
@@ -18,10 +18,9 @@
18#include <linux/etherdevice.h> 18#include <linux/etherdevice.h>
19#include <linux/rtnetlink.h> 19#include <linux/rtnetlink.h>
20 20
21#define VLAN_HLEN 4 /* The additional bytes (on top of the Ethernet header) 21#define VLAN_HLEN 4 /* The additional bytes required by VLAN
22 * that VLAN requires. 22 * (in addition to the Ethernet header)
23 */ 23 */
24#define VLAN_ETH_ALEN 6 /* Octets in one ethernet addr */
25#define VLAN_ETH_HLEN 18 /* Total octets in header. */ 24#define VLAN_ETH_HLEN 18 /* Total octets in header. */
26#define VLAN_ETH_ZLEN 64 /* Min. octets in frame sans FCS */ 25#define VLAN_ETH_ZLEN 64 /* Min. octets in frame sans FCS */
27 26
@@ -177,7 +176,7 @@ static inline struct sk_buff *vlan_insert_tag(struct sk_buff *skb, u16 vlan_tci)
177 veth = (struct vlan_ethhdr *)skb_push(skb, VLAN_HLEN); 176 veth = (struct vlan_ethhdr *)skb_push(skb, VLAN_HLEN);
178 177
179 /* Move the mac addresses to the beginning of the new header. */ 178 /* Move the mac addresses to the beginning of the new header. */
180 memmove(skb->data, skb->data + VLAN_HLEN, 2 * VLAN_ETH_ALEN); 179 memmove(skb->data, skb->data + VLAN_HLEN, 2 * ETH_ALEN);
181 skb->mac_header -= VLAN_HLEN; 180 skb->mac_header -= VLAN_HLEN;
182 181
183 /* first, the ethernet type */ 182 /* first, the ethernet type */