Skip to content

Commit

Permalink
if_vlan: Remove VLAN_ETH_ALEN define and the 1 use of it
Browse files Browse the repository at this point in the history
Just use ETH_ALEN.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Joe Perches authored and David S. Miller committed Mar 19, 2012
1 parent c862815 commit a3f671b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions include/linux/if_vlan.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@
#include <linux/etherdevice.h>
#include <linux/rtnetlink.h>

#define VLAN_HLEN 4 /* The additional bytes (on top of the Ethernet header)
* that VLAN requires.
#define VLAN_HLEN 4 /* The additional bytes required by VLAN
* (in addition to the Ethernet header)
*/
#define VLAN_ETH_ALEN 6 /* Octets in one ethernet addr */
#define VLAN_ETH_HLEN 18 /* Total octets in header. */
#define VLAN_ETH_ZLEN 64 /* Min. octets in frame sans FCS */

Expand Down Expand Up @@ -177,7 +176,7 @@ static inline struct sk_buff *vlan_insert_tag(struct sk_buff *skb, u16 vlan_tci)
veth = (struct vlan_ethhdr *)skb_push(skb, VLAN_HLEN);

/* Move the mac addresses to the beginning of the new header. */
memmove(skb->data, skb->data + VLAN_HLEN, 2 * VLAN_ETH_ALEN);
memmove(skb->data, skb->data + VLAN_HLEN, 2 * ETH_ALEN);
skb->mac_header -= VLAN_HLEN;

/* first, the ethernet type */
Expand Down

0 comments on commit a3f671b

Please sign in to comment.