]> git.karo-electronics.de Git - linux-beck.git/commitdiff
qlge: Fix possible endian issue for rx UDP csum.
authorRon Mercer <ron.mercer@qlogic.com>
Mon, 5 Jul 2010 12:19:40 +0000 (12:19 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Jul 2010 02:41:21 +0000 (19:41 -0700)
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/qlge/qlge_main.c

index e39451b5196ef01d5bb56f8a2754db8b0bc74444..a41b6b56404235974b8de1590faea00faf78f2be 100644 (file)
@@ -1677,7 +1677,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 &
-                               cpu_to_be16(IP_MF|IP_OFFSET))) {
+                               ntohs(IP_MF|IP_OFFSET))) {
                                skb->ip_summed = CHECKSUM_UNNECESSARY;
                                netif_printk(qdev, rx_status, KERN_DEBUG,
                                             qdev->ndev,
@@ -1997,7 +1997,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 &
-                               cpu_to_be16(IP_MF|IP_OFFSET))) {
+                               ntohs(IP_MF|IP_OFFSET))) {
                                skb->ip_summed = CHECKSUM_UNNECESSARY;
                                netif_printk(qdev, rx_status, KERN_DEBUG, qdev->ndev,
                                             "TCP checksum done!\n");