Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8efcec5 authored by Li RongQing's avatar Li RongQing Committed by David S. Miller
Browse files

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: default avatarLi RongQing <roy.qing.li@gmail.com>
Acked-by: default avatarSomnath Kotur <somnath.kotur@emulex.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 806a0fbe
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)