aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/atl1/atl1_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/atl1/atl1_main.c')
-rw-r--r--drivers/net/atl1/atl1_main.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/net/atl1/atl1_main.c b/drivers/net/atl1/atl1_main.c
index 793a61b2140f..d2be79a30f8a 100644
--- a/drivers/net/atl1/atl1_main.c
+++ b/drivers/net/atl1/atl1_main.c
@@ -1294,17 +1294,18 @@ static int atl1_tso(struct atl1_adapter *adapter, struct sk_buff *skb,
1294 } 1294 }
1295 1295
1296 if (skb->protocol == ntohs(ETH_P_IP)) { 1296 if (skb->protocol == ntohs(ETH_P_IP)) {
1297 skb->nh.iph->tot_len = 0; 1297 struct iphdr *iph = ip_hdr(skb);
1298 skb->nh.iph->check = 0; 1298
1299 skb->h.th->check = 1299 iph->tot_len = 0;
1300 ~csum_tcpudp_magic(skb->nh.iph->saddr, 1300 iph->check = 0;
1301 skb->nh.iph->daddr, 0, 1301 skb->h.th->check = ~csum_tcpudp_magic(iph->saddr,
1302 IPPROTO_TCP, 0); 1302 iph->daddr, 0,
1303 IPPROTO_TCP, 0);
1303 ipofst = skb_network_offset(skb); 1304 ipofst = skb_network_offset(skb);
1304 if (ipofst != ENET_HEADER_SIZE) /* 802.3 frame */ 1305 if (ipofst != ENET_HEADER_SIZE) /* 802.3 frame */
1305 tso->tsopl |= 1 << TSO_PARAM_ETHTYPE_SHIFT; 1306 tso->tsopl |= 1 << TSO_PARAM_ETHTYPE_SHIFT;
1306 1307
1307 tso->tsopl |= (skb->nh.iph->ihl & 1308 tso->tsopl |= (iph->ihl &
1308 CSUM_PARAM_IPHL_MASK) << CSUM_PARAM_IPHL_SHIFT; 1309 CSUM_PARAM_IPHL_MASK) << CSUM_PARAM_IPHL_SHIFT;
1309 tso->tsopl |= ((skb->h.th->doff << 2) & 1310 tso->tsopl |= ((skb->h.th->doff << 2) &
1310 TSO_PARAM_TCPHDRLEN_MASK) << TSO_PARAM_TCPHDRLEN_SHIFT; 1311 TSO_PARAM_TCPHDRLEN_MASK) << TSO_PARAM_TCPHDRLEN_SHIFT;