aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/bcmdhd/include/proto/ethernet.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/bcmdhd/include/proto/ethernet.h')
-rw-r--r--drivers/net/wireless/bcmdhd/include/proto/ethernet.h39
1 files changed, 29 insertions, 10 deletions
diff --git a/drivers/net/wireless/bcmdhd/include/proto/ethernet.h b/drivers/net/wireless/bcmdhd/include/proto/ethernet.h
index e45518564c1..7b9b2e2b794 100644
--- a/drivers/net/wireless/bcmdhd/include/proto/ethernet.h
+++ b/drivers/net/wireless/bcmdhd/include/proto/ethernet.h
@@ -21,10 +21,10 @@
* software in any way with any other Broadcom software provided under a license
* other than the GPL, without Broadcom's express prior written consent.
*
- * $Id: ethernet.h 309193 2012-01-19 00:03:57Z $
+ * $Id: ethernet.h 354714 2012-09-03 03:12:21Z $
*/
-#ifndef _NET_ETHERNET_H_
+#ifndef _NET_ETHERNET_H_
#define _NET_ETHERNET_H_
#ifndef _TYPEDEFS_H_
@@ -67,6 +67,11 @@
#define ETHER_TYPE_IPV6 0x86dd
#define ETHER_TYPE_BRCM 0x886c
#define ETHER_TYPE_802_1X 0x888e
+#ifdef PLC
+#define ETHER_TYPE_88E1 0x88e1
+#define ETHER_TYPE_8912 0x8912
+#define ETHER_TYPE_GIGLED 0xffff
+#endif
#define ETHER_TYPE_802_1X_PREAUTH 0x88c7
#define ETHER_TYPE_WAI 0x88b4
#define ETHER_TYPE_89_0D 0x890d
@@ -94,7 +99,7 @@
((uint8 *)ea)[5] = ((mgrp_ip) >> 0) & 0xff; \
}
-#ifndef __INCif_etherh
+#ifndef __INCif_etherh
BWL_PRE_PACKED_STRUCT struct ether_header {
uint8 ether_dhost[ETHER_ADDR_LEN];
@@ -122,19 +127,26 @@ BWL_PRE_PACKED_STRUCT struct ether_addr {
-#define ether_cmp(a, b) (!(((short*)(a))[0] == ((short*)(b))[0]) | \
- !(((short*)(a))[1] == ((short*)(b))[1]) | \
- !(((short*)(a))[2] == ((short*)(b))[2]))
+#define eacmp(a, b) ((((uint16 *)(a))[0] ^ ((uint16 *)(b))[0]) | \
+ (((uint16 *)(a))[1] ^ ((uint16 *)(b))[1]) | \
+ (((uint16 *)(a))[2] ^ ((uint16 *)(b))[2]))
+
+#define ether_cmp(a, b) eacmp(a, b)
-#define ether_copy(s, d) { \
- ((short*)(d))[0] = ((const short*)(s))[0]; \
- ((short*)(d))[1] = ((const short*)(s))[1]; \
- ((short*)(d))[2] = ((const short*)(s))[2]; }
+#define eacopy(s, d) \
+do { \
+ ((uint16 *)(d))[0] = ((const uint16 *)(s))[0]; \
+ ((uint16 *)(d))[1] = ((const uint16 *)(s))[1]; \
+ ((uint16 *)(d))[2] = ((const uint16 *)(s))[2]; \
+} while (0)
+
+#define ether_copy(s, d) eacopy(s, d)
static const struct ether_addr ether_bcast = {{255, 255, 255, 255, 255, 255}};
static const struct ether_addr ether_null = {{0, 0, 0, 0, 0, 0}};
+static const struct ether_addr ether_ipv6_mcast = {{0x33, 0x33, 0x00, 0x00, 0x00, 0x01}};
#define ETHER_ISBCAST(ea) ((((uint8 *)(ea))[0] & \
((uint8 *)(ea))[1] & \
@@ -149,6 +161,11 @@ static const struct ether_addr ether_null = {{0, 0, 0, 0, 0, 0}};
((uint8 *)(ea))[4] | \
((uint8 *)(ea))[5]) == 0)
+#define ETHER_ISNULLDEST(da) ((((const uint16 *)(da))[0] | \
+ ((const uint16 *)(da))[1] | \
+ ((const uint16 *)(da))[2]) == 0)
+#define ETHER_ISNULLSRC(sa) ETHER_ISNULLDEST(sa)
+
#define ETHER_MOVE_HDR(d, s) \
do { \
struct ether_header t; \
@@ -156,6 +173,8 @@ do { \
*(struct ether_header *)(d) = t; \
} while (0)
+#define ETHER_ISUCAST(ea) ((((uint8 *)(ea))[0] & 0x01) == 0)
+
#include <packed_section_end.h>