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

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

ksz884x: fix Endian



ETH_P_IP is host Endian, skb->protocol is big Endian, when
compare them, Using htons on skb->protocol is wrong.

And fix two code style issues: indentation and remove
unnecessary parentheses.

CC: Tristram Ha <Tristram.Ha@micrel.com>
CC: Ben Hutchings <bhutchings@solarflare.com>
CC: Joe Perches <joe@perches.com>
Signed-off-by: default avatarLi RongQing <roy.qing.li@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4e01df28
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -4879,8 +4879,8 @@ static netdev_tx_t netdev_tx(struct sk_buff *skb, struct net_device *dev)
	left = hw_alloc_pkt(hw, skb->len, num);
	if (left) {
		if (left < num ||
				((CHECKSUM_PARTIAL == skb->ip_summed) &&
				(ETH_P_IPV6 == htons(skb->protocol)))) {
		    (CHECKSUM_PARTIAL == skb->ip_summed &&
		     skb->protocol == htons(ETH_P_IPV6))) {
			struct sk_buff *org_skb = skb;

			skb = netdev_alloc_skb(dev, org_skb->len);