diff options
Diffstat (limited to 'drivers/net/atl1/atl1_main.c')
-rw-r--r-- | drivers/net/atl1/atl1_main.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/atl1/atl1_main.c b/drivers/net/atl1/atl1_main.c index d2be79a30f8a..c26f8ce320e6 100644 --- a/drivers/net/atl1/atl1_main.c +++ b/drivers/net/atl1/atl1_main.c | |||
@@ -1326,8 +1326,8 @@ static int atl1_tx_csum(struct atl1_adapter *adapter, struct sk_buff *skb, | |||
1326 | u8 css, cso; | 1326 | u8 css, cso; |
1327 | 1327 | ||
1328 | if (likely(skb->ip_summed == CHECKSUM_PARTIAL)) { | 1328 | if (likely(skb->ip_summed == CHECKSUM_PARTIAL)) { |
1329 | cso = skb->h.raw - skb->data; | 1329 | cso = skb_transport_offset(skb); |
1330 | css = (skb->h.raw + skb->csum_offset) - skb->data; | 1330 | css = cso + skb->csum; |
1331 | if (unlikely(cso & 0x1)) { | 1331 | if (unlikely(cso & 0x1)) { |
1332 | printk(KERN_DEBUG "%s: payload offset != even number\n", | 1332 | printk(KERN_DEBUG "%s: payload offset != even number\n", |
1333 | atl1_driver_name); | 1333 | atl1_driver_name); |
@@ -1369,8 +1369,8 @@ 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 = | 1372 | proto_hdr_len = (skb_transport_offset(skb) + |
1373 | ((skb->h.raw - skb->data) + (skb->h.th->doff << 2)); | 1373 | (skb->h.th->doff << 2)); |
1374 | buffer_info->length = proto_hdr_len; | 1374 | buffer_info->length = proto_hdr_len; |
1375 | page = virt_to_page(skb->data); | 1375 | page = virt_to_page(skb->data); |
1376 | offset = (unsigned long)skb->data & ~PAGE_MASK; | 1376 | offset = (unsigned long)skb->data & ~PAGE_MASK; |
@@ -1562,7 +1562,7 @@ static int atl1_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
1562 | mss = skb_shinfo(skb)->gso_size; | 1562 | mss = skb_shinfo(skb)->gso_size; |
1563 | if (mss) { | 1563 | if (mss) { |
1564 | if (skb->protocol == htons(ETH_P_IP)) { | 1564 | if (skb->protocol == htons(ETH_P_IP)) { |
1565 | proto_hdr_len = ((skb->h.raw - skb->data) + | 1565 | proto_hdr_len = (skb_transport_offset(skb) + |
1566 | (skb->h.th->doff << 2)); | 1566 | (skb->h.th->doff << 2)); |
1567 | if (unlikely(proto_hdr_len > len)) { | 1567 | if (unlikely(proto_hdr_len > len)) { |
1568 | dev_kfree_skb_any(skb); | 1568 | dev_kfree_skb_any(skb); |