* [PATCH] qlge: fix endian issue
@ 2012-07-03 8:47 roy.qing.li
2012-07-03 9:22 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: roy.qing.li @ 2012-07-03 8:47 UTC (permalink / raw)
To: netdev; +Cc: ron.mercer
From: RongQing.Li <roy.qing.li@gmail.com>
commit 6d29b1ef introduces a bug, ntohs is __be16_to_cpu,
not cpu_to_be16.
We always use htons on IP_OFFSET and IP_MF, then compare
with network package.
Signed-off-by: RongQing.Li <roy.qing.li@gmail.com>
---
drivers/net/ethernet/qlogic/qlge/qlge_main.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_main.c b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
index 09d8d33..7c520fa 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge_main.c
+++ b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
@@ -1546,7 +1546,7 @@ static void ql_process_mac_rx_page(struct ql_adapter *qdev,
struct iphdr *iph =
(struct iphdr *) ((u8 *)addr + ETH_HLEN);
if (!(iph->frag_off &
- cpu_to_be16(IP_MF|IP_OFFSET))) {
+ htons(IP_MF|IP_OFFSET))) {
skb->ip_summed = CHECKSUM_UNNECESSARY;
netif_printk(qdev, rx_status, KERN_DEBUG,
qdev->ndev,
@@ -1654,7 +1654,7 @@ static void ql_process_mac_rx_skb(struct ql_adapter *qdev,
/* Unfragmented ipv4 UDP frame. */
struct iphdr *iph = (struct iphdr *) skb->data;
if (!(iph->frag_off &
- ntohs(IP_MF|IP_OFFSET))) {
+ htons(IP_MF|IP_OFFSET))) {
skb->ip_summed = CHECKSUM_UNNECESSARY;
netif_printk(qdev, rx_status, KERN_DEBUG,
qdev->ndev,
@@ -1968,7 +1968,7 @@ static void ql_process_mac_split_rx_intr(struct ql_adapter *qdev,
/* Unfragmented ipv4 UDP frame. */
struct iphdr *iph = (struct iphdr *) skb->data;
if (!(iph->frag_off &
- ntohs(IP_MF|IP_OFFSET))) {
+ htons(IP_MF|IP_OFFSET))) {
skb->ip_summed = CHECKSUM_UNNECESSARY;
netif_printk(qdev, rx_status, KERN_DEBUG, qdev->ndev,
"TCP checksum done!\n");
--
1.7.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] qlge: fix endian issue
2012-07-03 8:47 [PATCH] qlge: fix endian issue roy.qing.li
@ 2012-07-03 9:22 ` David Miller
2012-07-03 9:44 ` RongQing Li
0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2012-07-03 9:22 UTC (permalink / raw)
To: roy.qing.li; +Cc: netdev, ron.mercer
From: roy.qing.li@gmail.com
Date: Tue, 3 Jul 2012 16:47:56 +0800
> Signed-off-by: RongQing.Li <roy.qing.li@gmail.com>
Is "RongQing.Li" really how you would write your name?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] qlge: fix endian issue
2012-07-03 9:22 ` David Miller
@ 2012-07-03 9:44 ` RongQing Li
2012-07-03 9:47 ` David Miller
0 siblings, 1 reply; 4+ messages in thread
From: RongQing Li @ 2012-07-03 9:44 UTC (permalink / raw)
To: David Miller; +Cc: netdev, ron.mercer
2012/7/3 David Miller <davem@davemloft.net>:
> From: roy.qing.li@gmail.com
> Date: Tue, 3 Jul 2012 16:47:56 +0800
>
>> Signed-off-by: RongQing.Li <roy.qing.li@gmail.com>
>
> Is "RongQing.Li" really how you would write your name?
Yes
Chinese name, Li RongQing
I maybe should not add the dot.
-RongQing
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] qlge: fix endian issue
2012-07-03 9:44 ` RongQing Li
@ 2012-07-03 9:47 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2012-07-03 9:47 UTC (permalink / raw)
To: roy.qing.li; +Cc: netdev, ron.mercer
From: RongQing Li <roy.qing.li@gmail.com>
Date: Tue, 3 Jul 2012 17:44:58 +0800
> I maybe should not add the dot.
That's what I'm trying to say.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-07-03 9:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-03 8:47 [PATCH] qlge: fix endian issue roy.qing.li
2012-07-03 9:22 ` David Miller
2012-07-03 9:44 ` RongQing Li
2012-07-03 9:47 ` 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).