diff options
Diffstat (limited to 'drivers/net/bnx2.c')
-rw-r--r-- | drivers/net/bnx2.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index b8091c55d441..eb0c4f1d4483 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -4513,6 +4513,7 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
4513 | if ((mss = skb_shinfo(skb)->gso_size) && | 4513 | if ((mss = skb_shinfo(skb)->gso_size) && |
4514 | (skb->len > (bp->dev->mtu + ETH_HLEN))) { | 4514 | (skb->len > (bp->dev->mtu + ETH_HLEN))) { |
4515 | u32 tcp_opt_len, ip_tcp_len; | 4515 | u32 tcp_opt_len, ip_tcp_len; |
4516 | struct iphdr *iph; | ||
4516 | 4517 | ||
4517 | if (skb_header_cloned(skb) && | 4518 | if (skb_header_cloned(skb) && |
4518 | pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) { | 4519 | pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) { |
@@ -4529,16 +4530,15 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
4529 | } | 4530 | } |
4530 | ip_tcp_len = ip_hdrlen(skb) + sizeof(struct tcphdr); | 4531 | ip_tcp_len = ip_hdrlen(skb) + sizeof(struct tcphdr); |
4531 | 4532 | ||
4532 | skb->nh.iph->check = 0; | 4533 | iph = ip_hdr(skb); |
4533 | skb->nh.iph->tot_len = htons(mss + ip_tcp_len + tcp_opt_len); | 4534 | iph->check = 0; |
4534 | skb->h.th->check = | 4535 | iph->tot_len = htons(mss + ip_tcp_len + tcp_opt_len); |
4535 | ~csum_tcpudp_magic(skb->nh.iph->saddr, | 4536 | skb->h.th->check = ~csum_tcpudp_magic(iph->saddr, iph->daddr, |
4536 | skb->nh.iph->daddr, | 4537 | 0, IPPROTO_TCP, 0); |
4537 | 0, IPPROTO_TCP, 0); | ||
4538 | 4538 | ||
4539 | if (tcp_opt_len || (skb->nh.iph->ihl > 5)) { | 4539 | if (tcp_opt_len || (iph->ihl > 5)) { |
4540 | vlan_tag_flags |= ((skb->nh.iph->ihl - 5) + | 4540 | vlan_tag_flags |= ((iph->ihl - 5) + |
4541 | (tcp_opt_len >> 2)) << 8; | 4541 | (tcp_opt_len >> 2)) << 8; |
4542 | } | 4542 | } |
4543 | } | 4543 | } |
4544 | else | 4544 | else |