diff options
Diffstat (limited to 'drivers/net/tg3.c')
-rw-r--r-- | drivers/net/tg3.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index 256969e1300c..62a3bba0097d 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/dma-mapping.h> | 40 | #include <linux/dma-mapping.h> |
41 | 41 | ||
42 | #include <net/checksum.h> | 42 | #include <net/checksum.h> |
43 | #include <net/ip.h> | ||
43 | 44 | ||
44 | #include <asm/system.h> | 45 | #include <asm/system.h> |
45 | #include <asm/io.h> | 46 | #include <asm/io.h> |
@@ -3909,8 +3910,7 @@ static int tg3_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
3909 | mss |= (skb_headlen(skb) - ETH_HLEN) << 9; | 3910 | mss |= (skb_headlen(skb) - ETH_HLEN) << 9; |
3910 | else { | 3911 | else { |
3911 | tcp_opt_len = ((skb->h.th->doff - 5) * 4); | 3912 | tcp_opt_len = ((skb->h.th->doff - 5) * 4); |
3912 | ip_tcp_len = (skb->nh.iph->ihl * 4) + | 3913 | ip_tcp_len = ip_hdrlen(skb) + sizeof(struct tcphdr); |
3913 | sizeof(struct tcphdr); | ||
3914 | 3914 | ||
3915 | skb->nh.iph->check = 0; | 3915 | skb->nh.iph->check = 0; |
3916 | skb->nh.iph->tot_len = htons(mss + ip_tcp_len + | 3916 | skb->nh.iph->tot_len = htons(mss + ip_tcp_len + |
@@ -4064,7 +4064,7 @@ static int tg3_start_xmit_dma_bug(struct sk_buff *skb, struct net_device *dev) | |||
4064 | } | 4064 | } |
4065 | 4065 | ||
4066 | tcp_opt_len = ((skb->h.th->doff - 5) * 4); | 4066 | tcp_opt_len = ((skb->h.th->doff - 5) * 4); |
4067 | ip_tcp_len = (skb->nh.iph->ihl * 4) + sizeof(struct tcphdr); | 4067 | ip_tcp_len = ip_hdrlen(skb) + sizeof(struct tcphdr); |
4068 | 4068 | ||
4069 | hdr_len = ip_tcp_len + tcp_opt_len; | 4069 | hdr_len = ip_tcp_len + tcp_opt_len; |
4070 | if (unlikely((ETH_HLEN + hdr_len) > 80) && | 4070 | if (unlikely((ETH_HLEN + hdr_len) > 80) && |