From: Ron Mercer Date: Mon, 5 Jul 2010 12:19:40 +0000 (+0000) Subject: qlge: Fix possible endian issue for rx UDP csum. X-Git-Tag: firefly_0821_release~9833^2~1306^2~340 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=6d29b1ef311d96e737084032a4b080653015aedf;p=firefly-linux-kernel-4.4.55.git qlge: Fix possible endian issue for rx UDP csum. Signed-off-by: Ron Mercer Signed-off-by: David S. Miller --- diff --git a/drivers/net/qlge/qlge_main.c b/drivers/net/qlge/qlge_main.c index e39451b5196e..a41b6b564042 100644 --- a/drivers/net/qlge/qlge_main.c +++ b/drivers/net/qlge/qlge_main.c @@ -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");