diff options
Diffstat (limited to 'drivers/net/e1000/e1000_main.c')
-rw-r--r-- | drivers/net/e1000/e1000_main.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c index 86161011b539..c324866c9789 100644 --- a/drivers/net/e1000/e1000_main.c +++ b/drivers/net/e1000/e1000_main.c | |||
@@ -2890,14 +2890,12 @@ e1000_tso(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring, | |||
2890 | hdr_len = ((skb->h.raw - skb->data) + (skb->h.th->doff << 2)); | 2890 | hdr_len = ((skb->h.raw - skb->data) + (skb->h.th->doff << 2)); |
2891 | mss = skb_shinfo(skb)->gso_size; | 2891 | mss = skb_shinfo(skb)->gso_size; |
2892 | if (skb->protocol == htons(ETH_P_IP)) { | 2892 | if (skb->protocol == htons(ETH_P_IP)) { |
2893 | skb->nh.iph->tot_len = 0; | 2893 | struct iphdr *iph = ip_hdr(skb); |
2894 | skb->nh.iph->check = 0; | 2894 | iph->tot_len = 0; |
2895 | skb->h.th->check = | 2895 | iph->check = 0; |
2896 | ~csum_tcpudp_magic(skb->nh.iph->saddr, | 2896 | skb->h.th->check = ~csum_tcpudp_magic(iph->saddr, |
2897 | skb->nh.iph->daddr, | 2897 | iph->daddr, 0, |
2898 | 0, | 2898 | IPPROTO_TCP, 0); |
2899 | IPPROTO_TCP, | ||
2900 | 0); | ||
2901 | cmd_length = E1000_TXD_CMD_IP; | 2899 | cmd_length = E1000_TXD_CMD_IP; |
2902 | ipcse = skb->h.raw - skb->data - 1; | 2900 | ipcse = skb->h.raw - skb->data - 1; |
2903 | } else if (skb->protocol == htons(ETH_P_IPV6)) { | 2901 | } else if (skb->protocol == htons(ETH_P_IPV6)) { |
@@ -2911,7 +2909,7 @@ e1000_tso(struct e1000_adapter *adapter, struct e1000_tx_ring *tx_ring, | |||
2911 | ipcse = 0; | 2909 | ipcse = 0; |
2912 | } | 2910 | } |
2913 | ipcss = skb_network_offset(skb); | 2911 | ipcss = skb_network_offset(skb); |
2914 | ipcso = (void *)&(skb->nh.iph->check) - (void *)skb->data; | 2912 | ipcso = (void *)&(ip_hdr(skb)->check) - (void *)skb->data; |
2915 | tucss = skb->h.raw - skb->data; | 2913 | tucss = skb->h.raw - skb->data; |
2916 | tucso = (void *)&(skb->h.th->check) - (void *)skb->data; | 2914 | tucso = (void *)&(skb->h.th->check) - (void *)skb->data; |
2917 | tucse = 0; | 2915 | tucse = 0; |