diff options
author | Li RongQing <roy.qing.li@gmail.com> | 2012-07-09 16:56:06 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-11 04:31:23 -0400 |
commit | 5b70ca3599071a0e26bceab9dd6d7e4c53318881 (patch) | |
tree | 979fa357f308329817c51229e6f3f9cbb324604b /drivers/net/ethernet/micrel | |
parent | 4e01df28d45464d82894bc7e3b551fc8e59fb76e (diff) |
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: Li RongQing <roy.qing.li@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/micrel')
-rw-r--r-- | drivers/net/ethernet/micrel/ksz884x.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) | |||
4879 | left = hw_alloc_pkt(hw, skb->len, num); | 4879 | left = hw_alloc_pkt(hw, skb->len, num); |
4880 | if (left) { | 4880 | if (left) { |
4881 | if (left < num || | 4881 | if (left < num || |
4882 | ((CHECKSUM_PARTIAL == skb->ip_summed) && | 4882 | (CHECKSUM_PARTIAL == skb->ip_summed && |
4883 | (ETH_P_IPV6 == htons(skb->protocol)))) { | 4883 | skb->protocol == htons(ETH_P_IPV6))) { |
4884 | struct sk_buff *org_skb = skb; | 4884 | struct sk_buff *org_skb = skb; |
4885 | 4885 | ||
4886 | skb = netdev_alloc_skb(dev, org_skb->len); | 4886 | skb = netdev_alloc_skb(dev, org_skb->len); |