* [v2 PATCH] ksz884x: fix Endian
@ 2012-07-10 6:56 roy.qing.li
2012-07-11 8:31 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: roy.qing.li @ 2012-07-10 6:56 UTC (permalink / raw)
To: netdev; +Cc: Tristram.Ha, bhutchings, joe
From: Li RongQing <roy.qing.li@gmail.com>
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>
---
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 eaf9ff0..0fbe2e2 100644
--- a/drivers/net/ethernet/micrel/ksz884x.c
+++ b/drivers/net/ethernet/micrel/ksz884x.c
@@ -4881,8 +4881,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);
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [v2 PATCH] ksz884x: fix Endian
2012-07-10 6:56 [v2 PATCH] ksz884x: fix Endian roy.qing.li
@ 2012-07-11 8:31 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-07-11 8:31 UTC (permalink / raw)
To: roy.qing.li; +Cc: netdev, Tristram.Ha, bhutchings, joe
From: roy.qing.li@gmail.com
Date: Tue, 10 Jul 2012 14:56:06 +0800
> From: Li RongQing <roy.qing.li@gmail.com>
>
> 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>
Applied.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-07-11 8:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-10 6:56 [v2 PATCH] ksz884x: fix Endian roy.qing.li
2012-07-11 8:31 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).