qlge: fix endian issue
Subsystems (2)
PATCH 1/1 qlge: fix endian issue
From: RongQing.Li <[email protected]>
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 <[email protected]>
--- drivers/net/ethernet/qlogic/qlge/qlge_main.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/qlogic/qlge/qlge_main.c +3 -3
@@ -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" );
Signature · 1 line
1.7.1
David Miller
maintainerFrom: [email protected]
Date: Tue, 3 Jul 2012 16:47:56 +0800
Quoted 1 line
Signed-off-by RongQing.Li <[email protected]>
Is "RongQing.Li" really how you would write your name?
2012/7/3 David Miller <[email protected]>:
Quoted 6 lines
From: [email protected]
Date: Tue, 3 Jul 2012 16:47:56 +0800Quoted 1 line
Signed-off-by RongQing.Li <[email protected]>Is "RongQing.Li" really how you would write your name?
Yes
Chinese name, Li RongQing
I maybe should not add the dot.
-RongQing
David Miller
maintainerFrom: RongQing Li <[email protected]>
Date: Tue, 3 Jul 2012 17:44:58 +0800
Quoted 1 line
I maybe should not add the dot.
That's what I'm trying to say.