diff options
Diffstat (limited to 'drivers/net/atl1/atl1_main.c')
-rw-r--r-- | drivers/net/atl1/atl1_main.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/atl1/atl1_main.c b/drivers/net/atl1/atl1_main.c index c26f8ce320e6..8d5994751e2e 100644 --- a/drivers/net/atl1/atl1_main.c +++ b/drivers/net/atl1/atl1_main.c | |||
@@ -1307,7 +1307,7 @@ static int atl1_tso(struct atl1_adapter *adapter, struct sk_buff *skb, | |||
1307 | 1307 | ||
1308 | tso->tsopl |= (iph->ihl & | 1308 | tso->tsopl |= (iph->ihl & |
1309 | CSUM_PARAM_IPHL_MASK) << CSUM_PARAM_IPHL_SHIFT; | 1309 | CSUM_PARAM_IPHL_MASK) << CSUM_PARAM_IPHL_SHIFT; |
1310 | tso->tsopl |= ((skb->h.th->doff << 2) & | 1310 | tso->tsopl |= (tcp_hdrlen(skb) & |
1311 | TSO_PARAM_TCPHDRLEN_MASK) << TSO_PARAM_TCPHDRLEN_SHIFT; | 1311 | TSO_PARAM_TCPHDRLEN_MASK) << TSO_PARAM_TCPHDRLEN_SHIFT; |
1312 | tso->tsopl |= (skb_shinfo(skb)->gso_size & | 1312 | tso->tsopl |= (skb_shinfo(skb)->gso_size & |
1313 | TSO_PARAM_MSS_MASK) << TSO_PARAM_MSS_SHIFT; | 1313 | TSO_PARAM_MSS_MASK) << TSO_PARAM_MSS_SHIFT; |
@@ -1369,8 +1369,7 @@ static void atl1_tx_map(struct atl1_adapter *adapter, | |||
1369 | 1369 | ||
1370 | if (tcp_seg) { | 1370 | if (tcp_seg) { |
1371 | /* TSO/GSO */ | 1371 | /* TSO/GSO */ |
1372 | proto_hdr_len = (skb_transport_offset(skb) + | 1372 | proto_hdr_len = skb_transport_offset(skb) + tcp_hdrlen(skb); |
1373 | (skb->h.th->doff << 2)); | ||
1374 | buffer_info->length = proto_hdr_len; | 1373 | buffer_info->length = proto_hdr_len; |
1375 | page = virt_to_page(skb->data); | 1374 | page = virt_to_page(skb->data); |
1376 | offset = (unsigned long)skb->data & ~PAGE_MASK; | 1375 | offset = (unsigned long)skb->data & ~PAGE_MASK; |
@@ -1563,7 +1562,7 @@ static int atl1_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
1563 | if (mss) { | 1562 | if (mss) { |
1564 | if (skb->protocol == htons(ETH_P_IP)) { | 1563 | if (skb->protocol == htons(ETH_P_IP)) { |
1565 | proto_hdr_len = (skb_transport_offset(skb) + | 1564 | proto_hdr_len = (skb_transport_offset(skb) + |
1566 | (skb->h.th->doff << 2)); | 1565 | tcp_hdrlen(skb)); |
1567 | if (unlikely(proto_hdr_len > len)) { | 1566 | if (unlikely(proto_hdr_len > len)) { |
1568 | dev_kfree_skb_any(skb); | 1567 | dev_kfree_skb_any(skb); |
1569 | return NETDEV_TX_OK; | 1568 | return NETDEV_TX_OK; |