From: Alexandre Bounine Date: Wed, 2 Nov 2011 20:39:15 +0000 (-0700) Subject: drivers/net/rionet.c: fix ethernet address macros for LE platforms X-Git-Tag: firefly_0821_release~7541^2~2411 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=044ee31ce0a51153f27a9d8c55ea12db32e59667;p=firefly-linux-kernel-4.4.55.git 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 Cc: Chul Kim Cc: Kumar Gala Cc: Matt Porter Cc: Li Yang Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/rionet.c b/drivers/net/rionet.c index ca4694e8a586..1f421d73a88f 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) {