summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Bounine <alexandre.bounine@idt.com>2011-11-02 13:39:15 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2011-11-07 13:47:42 -0800
commit8f22b38e8446a3bba7a3f54825d5d22c92e2ca5a (patch)
tree73562d463ca4d8163b54fbc55cb7df1093268dff
parent56e66f0894df0cb2c18e10422d77da6693fd98bb (diff)
drivers/net/rionet.c: fix ethernet address macros for LE platforms
commit e0c87bd95e8dad455c23bc56513af8dcb1737e55 upstream. Modify Ethernet addess macros to be compatible with BE/LE platforms Signed-off-by: Alexandre Bounine <alexandre.bounine@idt.com> Cc: Chul Kim <chul.kim@idt.com> Cc: Kumar Gala <galak@kernel.crashing.org> Cc: Matt Porter <mporter@kernel.crashing.org> Cc: Li Yang <leoli@freescale.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-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 ede937ee50c7..ae88ce8b7b8e 100644
--- a/drivers/net/rionet.c
+++ b/drivers/net/rionet.c
@@ -87,8 +87,8 @@ static struct rio_dev **rionet_active;
#define dev_rionet_capable(dev) \
is_rionet_capable(dev->pef, 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)
{