aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/benet
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-04-14 18:59:40 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-14 19:11:33 -0400
commite743d31312d00932391b123dfac3324d2b9e8c81 (patch)
treee5ac3aacbfdde1fe8eb44c4e010085915da5ea05 /drivers/net/benet
parentb4bf665c5761837f693e87ab27870a5868185ccc (diff)
drivers: net: use skb_headlen()
replaces (skb->len - skb->data_len) occurrences by skb_headlen(skb) Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/benet')
-rw-r--r--drivers/net/benet/be_main.c4
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++;