aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/atl1/atl1_main.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-04-21 01:47:35 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:25:10 -0400
commiteddc9ec53be2ecdbf4efe0efd4a83052594f0ac0 (patch)
tree4a38ab4dbd9d61fdf5a5ea6ed61463e0b9e33ba7 /drivers/net/atl1/atl1_main.c
parente023dd643798c4f06c16466af90b4d250e4b8bd7 (diff)
[SK_BUFF]: Introduce ip_hdr(), remove skb->nh.iph
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
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;