aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/macb.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@ghostprotocols.net>2007-03-31 10:55:19 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:28:29 -0400
commit27d7ff46a3498d3debc6ba68fb8014c702b81170 (patch)
treeb5a0c617cf8339524d3b1f1633e08eae7b94cf86 /drivers/net/macb.c
parent3dbad80ac7632f243b824d469301abb97ec634a1 (diff)
[SK_BUFF]: Introduce skb_copy_to_linear_data{_offset}
To clearly state the intent of copying to linear sk_buffs, _offset being a overly long variant but interesting for the sake of saving some bytes. Signed-off-by: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Diffstat (limited to 'drivers/net/macb.c')
-rw-r--r--drivers/net/macb.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index 9e233f8216a7..0e04f7ac3f2e 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -367,9 +367,10 @@ static int macb_rx_frame(struct macb *bp, unsigned int first_frag,
367 BUG_ON(frag != last_frag); 367 BUG_ON(frag != last_frag);
368 frag_len = len - offset; 368 frag_len = len - offset;
369 } 369 }
370 memcpy(skb->data + offset, 370 skb_copy_to_linear_data_offset(skb, offset,
371 bp->rx_buffers + (RX_BUFFER_SIZE * frag), 371 (bp->rx_buffers +
372 frag_len); 372 (RX_BUFFER_SIZE * frag)),
373 frag_len);
373 offset += RX_BUFFER_SIZE; 374 offset += RX_BUFFER_SIZE;
374 bp->rx_ring[frag].addr &= ~MACB_BIT(RX_USED); 375 bp->rx_ring[frag].addr &= ~MACB_BIT(RX_USED);
375 wmb(); 376 wmb();