diff options
author | Joe Perches <joe@perches.com> | 2013-10-01 22:04:40 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-10-02 17:04:45 -0400 |
commit | d458cdf712e0c671e8e819abb16ecd6e44f9daec (patch) | |
tree | ff93ce90fee219f2690a4f51f985815422664b7a /net/bridge | |
parent | 0b3d8e087bbee2a4e3f479d538a7edd3f1d2950c (diff) |
net:drivers/net: Miscellaneous conversions to ETH_ALEN
Convert the memset/memcpy uses of 6 to ETH_ALEN
where appropriate.
Also convert some struct definitions and u8 array
declarations of [6] to ETH_ALEN.
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r-- | net/bridge/br_multicast.c | 4 | ||||
-rw-r--r-- | net/bridge/netfilter/ebt_among.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c index d1c578630678..005d876dd86c 100644 --- a/net/bridge/br_multicast.c +++ b/net/bridge/br_multicast.c | |||
@@ -363,7 +363,7 @@ static struct sk_buff *br_ip4_multicast_alloc_query(struct net_bridge *br, | |||
363 | skb_reset_mac_header(skb); | 363 | skb_reset_mac_header(skb); |
364 | eth = eth_hdr(skb); | 364 | eth = eth_hdr(skb); |
365 | 365 | ||
366 | memcpy(eth->h_source, br->dev->dev_addr, 6); | 366 | memcpy(eth->h_source, br->dev->dev_addr, ETH_ALEN); |
367 | eth->h_dest[0] = 1; | 367 | eth->h_dest[0] = 1; |
368 | eth->h_dest[1] = 0; | 368 | eth->h_dest[1] = 0; |
369 | eth->h_dest[2] = 0x5e; | 369 | eth->h_dest[2] = 0x5e; |
@@ -433,7 +433,7 @@ static struct sk_buff *br_ip6_multicast_alloc_query(struct net_bridge *br, | |||
433 | skb_reset_mac_header(skb); | 433 | skb_reset_mac_header(skb); |
434 | eth = eth_hdr(skb); | 434 | eth = eth_hdr(skb); |
435 | 435 | ||
436 | memcpy(eth->h_source, br->dev->dev_addr, 6); | 436 | memcpy(eth->h_source, br->dev->dev_addr, ETH_ALEN); |
437 | eth->h_proto = htons(ETH_P_IPV6); | 437 | eth->h_proto = htons(ETH_P_IPV6); |
438 | skb_put(skb, sizeof(*eth)); | 438 | skb_put(skb, sizeof(*eth)); |
439 | 439 | ||
diff --git a/net/bridge/netfilter/ebt_among.c b/net/bridge/netfilter/ebt_among.c index 8b84c581be30..3fb3c848affe 100644 --- a/net/bridge/netfilter/ebt_among.c +++ b/net/bridge/netfilter/ebt_among.c | |||
@@ -28,7 +28,7 @@ static bool ebt_mac_wormhash_contains(const struct ebt_mac_wormhash *wh, | |||
28 | uint32_t cmp[2] = { 0, 0 }; | 28 | uint32_t cmp[2] = { 0, 0 }; |
29 | int key = ((const unsigned char *)mac)[5]; | 29 | int key = ((const unsigned char *)mac)[5]; |
30 | 30 | ||
31 | memcpy(((char *) cmp) + 2, mac, 6); | 31 | memcpy(((char *) cmp) + 2, mac, ETH_ALEN); |
32 | start = wh->table[key]; | 32 | start = wh->table[key]; |
33 | limit = wh->table[key + 1]; | 33 | limit = wh->table[key + 1]; |
34 | if (ip) { | 34 | if (ip) { |