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 <>
CC: Ben Hutchings <>
CC: Joe Perches <>
Signed-off-by: default avatarLi RongQing <>
Signed-off-by: default avatarDavid S. Miller <>
parent 4e01df28
......@@ -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);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment