aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Bounine <[email protected]>2011-11-02 13:39:15 -0700
committerLinus Torvalds <[email protected]>2011-11-02 16:07:01 -0700
commite0c87bd95e8dad455c23bc56513af8dcb1737e55 (patch)
tree5719a1829787df33bbaea4aeea35d9ddd70d868d
parent166c050bda80bb5dd627a287b6efcdfb68d172b4 (diff)
drivers/net/rionet.c: fix ethernet address macros for LE platforms
Modify Ethernet addess macros to be compatible with BE/LE platforms Signed-off-by: Alexandre Bounine <[email protected]> Cc: Chul Kim <[email protected]> Cc: Kumar Gala <[email protected]> Cc: Matt Porter <[email protected]> Cc: Li Yang <[email protected]> Cc: <[email protected]> [2.6.39+] Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--drivers/net/rionet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/rionet.c b/drivers/net/rionet.c
index 3bb131137033..7145714a5ec9 100644
--- a/drivers/net/rionet.c
+++ b/drivers/net/rionet.c
@@ -88,8 +88,8 @@ static struct rio_dev **rionet_active;
#define dev_rionet_capable(dev) \
is_rionet_capable(dev->src_ops, dev->dst_ops)
-#define RIONET_MAC_MATCH(x) (*(u32 *)x == 0x00010001)
-#define RIONET_GET_DESTID(x) (*(u16 *)(x + 4))
+#define RIONET_MAC_MATCH(x) (!memcmp((x), "\00\01\00\01", 4))
+#define RIONET_GET_DESTID(x) ((*((u8 *)x + 4) << 8) | *((u8 *)x + 5))
static int rionet_rx_clean(struct net_device *ndev)
{