diff options
Diffstat (limited to 'drivers/net/benet')
-rw-r--r-- | drivers/net/benet/be_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/benet/be_main.c b/drivers/net/benet/be_main.c index 18e0a80d3e61..fa10f13242c3 100644 --- a/drivers/net/benet/be_main.c +++ b/drivers/net/benet/be_main.c | |||
@@ -432,7 +432,7 @@ static int make_tx_wrbs(struct be_adapter *adapter, | |||
432 | map_head = txq->head; | 432 | map_head = txq->head; |
433 | 433 | ||
434 | if (skb->len > skb->data_len) { | 434 | if (skb->len > skb->data_len) { |
435 | int len = skb->len - skb->data_len; | 435 | int len = skb_headlen(skb); |
436 | busaddr = pci_map_single(pdev, skb->data, len, | 436 | busaddr = pci_map_single(pdev, skb->data, len, |
437 | PCI_DMA_TODEVICE); | 437 | PCI_DMA_TODEVICE); |
438 | if (pci_dma_mapping_error(pdev, busaddr)) | 438 | if (pci_dma_mapping_error(pdev, busaddr)) |
@@ -1098,7 +1098,7 @@ static void be_tx_compl_process(struct be_adapter *adapter, u16 last_index) | |||
1098 | cur_index = txq->tail; | 1098 | cur_index = txq->tail; |
1099 | wrb = queue_tail_node(txq); | 1099 | wrb = queue_tail_node(txq); |
1100 | unmap_tx_frag(adapter->pdev, wrb, (unmap_skb_hdr && | 1100 | unmap_tx_frag(adapter->pdev, wrb, (unmap_skb_hdr && |
1101 | sent_skb->len > sent_skb->data_len)); | 1101 | skb_headlen(sent_skb))); |
1102 | unmap_skb_hdr = false; | 1102 | unmap_skb_hdr = false; |
1103 | 1103 | ||
1104 | num_wrbs++; | 1104 | num_wrbs++; |