aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/atlx/atl1.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c
index f4add3cafe24..99298222c8f6 100644
--- a/drivers/net/atlx/atl1.c
+++ b/drivers/net/atlx/atl1.c
@@ -1347,16 +1347,17 @@ static int atl1_tx_csum(struct atl1_adapter *adapter, struct sk_buff *skb,
1347 u8 css, cso; 1347 u8 css, cso;
1348 1348
1349 if (likely(skb->ip_summed == CHECKSUM_PARTIAL)) { 1349 if (likely(skb->ip_summed == CHECKSUM_PARTIAL)) {
1350 cso = skb_transport_offset(skb); 1350 css = (u8) (skb->csum_start - skb_headroom(skb));
1351 css = cso + skb->csum_offset; 1351 cso = css + (u8) skb->csum_offset;
1352 if (unlikely(cso & 0x1)) { 1352 if (unlikely(css & 0x1)) {
1353 /* L1 hardware requires an even number here */
1353 dev_printk(KERN_DEBUG, &adapter->pdev->dev, 1354 dev_printk(KERN_DEBUG, &adapter->pdev->dev,
1354 "payload offset not an even number\n"); 1355 "payload offset not an even number\n");
1355 return -1; 1356 return -1;
1356 } 1357 }
1357 ptpd->word3 |= (cso & TPD_PLOADOFFSET_MASK) << 1358 ptpd->word3 |= (css & TPD_PLOADOFFSET_MASK) <<
1358 TPD_PLOADOFFSET_SHIFT; 1359 TPD_PLOADOFFSET_SHIFT;
1359 ptpd->word3 |= (css & TPD_CCSUMOFFSET_MASK) << 1360 ptpd->word3 |= (cso & TPD_CCSUMOFFSET_MASK) <<
1360 TPD_CCSUMOFFSET_SHIFT; 1361 TPD_CCSUMOFFSET_SHIFT;
1361 ptpd->word3 |= 1 << TPD_CUST_CSUM_EN_SHIFT; 1362 ptpd->word3 |= 1 << TPD_CUST_CSUM_EN_SHIFT;
1362 return true; 1363 return true;