diff options
author | Li RongQing <roy.qing.li@gmail.com> | 2012-07-04 16:05:42 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-09 00:14:16 -0700 |
commit | e8efcec5394cbf7ae67ccb137cb1a45ae3e6f6c8 (patch) | |
tree | 01b25e4d9b576f39ed472cf5c539cb6e3b0b4bd0 /drivers | |
parent | 806a0fbea7b6e6083867cf8bf642f9cbf8e9695e (diff) |
be2net: Fix Endian
ETH_P_IP is host Endian, skb->protocol is big Endian, when
compare them, we should change ETH_P_IP from host endian
to big endian, htons, not ntohs.
CC: Somnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: Li RongQing <roy.qing.li@gmail.com>
Acked-by: Somnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/emulex/benet/be.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/emulex/benet/be.h b/drivers/net/ethernet/emulex/benet/be.h index 7a71fb66c6d..0490a04ca0b 100644 --- a/drivers/net/ethernet/emulex/benet/be.h +++ b/drivers/net/ethernet/emulex/benet/be.h @@ -575,7 +575,7 @@ static inline u8 is_udp_pkt(struct sk_buff *skb) static inline bool is_ipv4_pkt(struct sk_buff *skb) { - return skb->protocol == ntohs(ETH_P_IP) && ip_hdr(skb)->version == 4; + return skb->protocol == htons(ETH_P_IP) && ip_hdr(skb)->version == 4; } static inline void be_vf_eth_addr_generate(struct be_adapter *adapter, u8 *mac) |