aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/xilinx_emaclite.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
index ecbbb688eba0..4da1d90c2895 100644
--- a/drivers/net/xilinx_emaclite.c
+++ b/drivers/net/xilinx_emaclite.c
@@ -430,8 +430,8 @@ static u16 xemaclite_recv_data(struct net_local *drvdata, u8 *data)
430 } 430 }
431 431
432 /* Get the protocol type of the ethernet frame that arrived */ 432 /* Get the protocol type of the ethernet frame that arrived */
433 proto_type = ((in_be32(addr + XEL_HEADER_OFFSET + 433 proto_type = ((ntohl(in_be32(addr + XEL_HEADER_OFFSET +
434 XEL_RXBUFF_OFFSET) >> XEL_HEADER_SHIFT) & 434 XEL_RXBUFF_OFFSET)) >> XEL_HEADER_SHIFT) &
435 XEL_RPLR_LENGTH_MASK); 435 XEL_RPLR_LENGTH_MASK);
436 436
437 /* Check if received ethernet frame is a raw ethernet frame 437 /* Check if received ethernet frame is a raw ethernet frame
@@ -439,9 +439,9 @@ static u16 xemaclite_recv_data(struct net_local *drvdata, u8 *data)
439 if (proto_type > (ETH_FRAME_LEN + ETH_FCS_LEN)) { 439 if (proto_type > (ETH_FRAME_LEN + ETH_FCS_LEN)) {
440 440
441 if (proto_type == ETH_P_IP) { 441 if (proto_type == ETH_P_IP) {
442 length = ((in_be32(addr + 442 length = ((ntohl(in_be32(addr +
443 XEL_HEADER_IP_LENGTH_OFFSET + 443 XEL_HEADER_IP_LENGTH_OFFSET +
444 XEL_RXBUFF_OFFSET) >> 444 XEL_RXBUFF_OFFSET)) >>
445 XEL_HEADER_SHIFT) & 445 XEL_HEADER_SHIFT) &
446 XEL_RPLR_LENGTH_MASK); 446 XEL_RPLR_LENGTH_MASK);
447 length += ETH_HLEN + ETH_FCS_LEN; 447 length += ETH_HLEN + ETH_FCS_LEN;