From: Li RongQing Date: Mon, 9 Jul 2012 20:56:06 +0000 (+0000) Subject: ksz884x: fix Endian X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5b70ca3599071a0e26bceab9dd6d7e4c53318881;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 CC: Ben Hutchings CC: Joe Perches Signed-off-by: Li RongQing Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/micrel/ksz884x.c b/drivers/net/ethernet/micrel/ksz884x.c index 37b44b91950b..318fee91c79d 100644 --- a/drivers/net/ethernet/micrel/ksz884x.c +++ b/drivers/net/ethernet/micrel/ksz884x.c @@ -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);