Skip to content

Commit e0c87bd

Browse files
Alexandre Bouninetorvalds
authored andcommitted
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 <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> Cc: <stable@kernel.org> [2.6.39+] Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 166c050 commit e0c87bd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎drivers/net/rionet.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,8 @@ static struct rio_dev **rionet_active;
8888
#define dev_rionet_capable(dev) \
8989
is_rionet_capable(dev->src_ops, dev->dst_ops)
9090

91-
#define RIONET_MAC_MATCH(x) (*(u32 *)x == 0x00010001)
92-
#define RIONET_GET_DESTID(x) (*(u16 *)(x + 4))
91+
#define RIONET_MAC_MATCH(x) (!memcmp((x), "\00\01\00\01", 4))
92+
#define RIONET_GET_DESTID(x) ((*((u8 *)x + 4) << 8) | *((u8 *)x + 5))
9393

9494
static int rionet_rx_clean(struct net_device *ndev)
9595
{

0 commit comments

Comments
 (0)