net: Fix emaclite driver to support little-endian microblaze

Support New emaclite AXI IP.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
This commit is contained in:
Michal Simek 2010-10-11 11:41:46 +10:00 committed by Ben Warren
parent f87a6f27e6
commit 3f91ec0fa1

View file

@ -322,7 +322,7 @@ int eth_rx (void)
#endif #endif
} }
/* Get the length of the frame that arrived */ /* Get the length of the frame that arrived */
switch(((in_be32 (baseaddress + XEL_RXBUFF_OFFSET + 0xC)) & switch(((ntohl(in_be32 (baseaddress + XEL_RXBUFF_OFFSET + 0xC))) &
0xFFFF0000 ) >> 16) { 0xFFFF0000 ) >> 16) {
case 0x806: case 0x806:
length = 42 + 20; /* FIXME size of ARP */ length = 42 + 20; /* FIXME size of ARP */
@ -330,7 +330,7 @@ int eth_rx (void)
break; break;
case 0x800: case 0x800:
length = 14 + 14 + length = 14 + 14 +
(((in_be32 (baseaddress + XEL_RXBUFF_OFFSET + 0x10)) & (((ntohl(in_be32 (baseaddress + XEL_RXBUFF_OFFSET + 0x10))) &
0xFFFF0000) >> 16); /* FIXME size of IP packet */ 0xFFFF0000) >> 16); /* FIXME size of IP packet */
debug ("IP Packet\n"); debug ("IP Packet\n");
break; break;