Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 203453
b: refs/heads/master
c: 34195c3
h: refs/heads/master
i:
  203451: f580102
v: v3
  • Loading branch information
Matt Carlson authored and David S. Miller committed Jul 12, 2010
1 parent 9104cc1 commit 9ee7e68
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 20d7375c1fdf054ca8ab9e5b9fe7fe62b39fa218
refs/heads/master: 34195c3dce84fd0ee47f4131584ff1f6f283b93c
20 changes: 14 additions & 6 deletions trunk/drivers/net/tg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -5779,28 +5779,36 @@ static netdev_tx_t tg3_start_xmit_dma_bug(struct sk_buff *skb,

if ((mss = skb_shinfo(skb)->gso_size) != 0) {
struct iphdr *iph;
u32 tcp_opt_len, ip_tcp_len, hdr_len;
u32 tcp_opt_len, hdr_len;

if (skb_header_cloned(skb) &&
pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) {
dev_kfree_skb(skb);
goto out_unlock;
}

iph = ip_hdr(skb);
tcp_opt_len = tcp_optlen(skb);
ip_tcp_len = ip_hdrlen(skb) + sizeof(struct tcphdr);

hdr_len = ip_tcp_len + tcp_opt_len;
if (skb_shinfo(skb)->gso_type & SKB_GSO_TCPV6) {
hdr_len = skb_headlen(skb) - ETH_HLEN;
} else {
u32 ip_tcp_len;

ip_tcp_len = ip_hdrlen(skb) + sizeof(struct tcphdr);
hdr_len = ip_tcp_len + tcp_opt_len;

iph->check = 0;
iph->tot_len = htons(mss + hdr_len);
}

if (unlikely((ETH_HLEN + hdr_len) > 80) &&
(tp->tg3_flags2 & TG3_FLG2_TSO_BUG))
return tg3_tso_bug(tp, skb);

base_flags |= (TXD_FLAG_CPU_PRE_DMA |
TXD_FLAG_CPU_POST_DMA);

iph = ip_hdr(skb);
iph->check = 0;
iph->tot_len = htons(mss + hdr_len);
if (tp->tg3_flags2 & TG3_FLG2_HW_TSO) {
tcp_hdr(skb)->check = 0;
base_flags &= ~TXD_FLAG_TCPUDP_CSUM;
Expand Down

0 comments on commit 9ee7e68

Please sign in to comment.