diff options
author | Jitendra Kalsaria <jitendra.kalsaria@qlogic.com> | 2012-02-03 18:06:49 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-02-05 00:59:30 +0400 |
commit | e02ef3311ae7329335d7c2b954b3988f7628a109 (patch) | |
tree | ee2a98a8b2e453c3aa16f3d55cc2986f13325d94 /drivers/net/ethernet/qlogic | |
parent | 97bf2262e7f8177706ecdac897be165c0b455c6f (diff) | |
download | linux-e02ef3311ae7329335d7c2b954b3988f7628a109.tar.xz |
qlge: Fixed invalid reference to ip header
we have copied skb into addr(page), skb->data doesn't contain ip
header information.
Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qlogic')
-rw-r--r-- | drivers/net/ethernet/qlogic/qlge/qlge_main.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_main.c b/drivers/net/ethernet/qlogic/qlge/qlge_main.c index b54898737284..582b23746876 100644 --- a/drivers/net/ethernet/qlogic/qlge/qlge_main.c +++ b/drivers/net/ethernet/qlogic/qlge/qlge_main.c @@ -1576,13 +1576,14 @@ static void ql_process_mac_rx_page(struct ql_adapter *qdev, } else if ((ib_mac_rsp->flags2 & IB_MAC_IOCB_RSP_U) && (ib_mac_rsp->flags3 & IB_MAC_IOCB_RSP_V4)) { /* Unfragmented ipv4 UDP frame. */ - struct iphdr *iph = (struct iphdr *) skb->data; + struct iphdr *iph = + (struct iphdr *) ((u8 *)addr + ETH_HLEN); if (!(iph->frag_off & cpu_to_be16(IP_MF|IP_OFFSET))) { skb->ip_summed = CHECKSUM_UNNECESSARY; netif_printk(qdev, rx_status, KERN_DEBUG, qdev->ndev, - "TCP checksum done!\n"); + "UDP checksum done!\n"); } } } @@ -1690,7 +1691,7 @@ static void ql_process_mac_rx_skb(struct ql_adapter *qdev, skb->ip_summed = CHECKSUM_UNNECESSARY; netif_printk(qdev, rx_status, KERN_DEBUG, qdev->ndev, - "TCP checksum done!\n"); + "UDP checksum done!\n"); } } } |