aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/meth.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2007-03-27 17:55:52 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:28:23 -0400
commitd626f62b11e00c16e81e4308ab93d3f13551812a (patch)
treefac4af6ced853755e12fc709d55f0c2bec51265d /drivers/net/meth.c
parent2a123b86e2b242a4a6db990d2851d45e192f88e5 (diff)
[SK_BUFF]: Introduce skb_copy_from_linear_data{_offset}
To clearly state the intent of copying from 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@redhat.com>
Diffstat (limited to 'drivers/net/meth.c')
-rw-r--r--drivers/net/meth.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/meth.c b/drivers/net/meth.c
index fafe67835238..0343ea12b299 100644
--- a/drivers/net/meth.c
+++ b/drivers/net/meth.c
@@ -608,7 +608,7 @@ static void meth_tx_short_prepare(struct meth_private *priv,
608 608
609 desc->header.raw = METH_TX_CMD_INT_EN | (len-1) | ((128-len) << 16); 609 desc->header.raw = METH_TX_CMD_INT_EN | (len-1) | ((128-len) << 16);
610 /* maybe I should set whole thing to 0 first... */ 610 /* maybe I should set whole thing to 0 first... */
611 memcpy(desc->data.dt + (120 - len), skb->data, skb->len); 611 skb_copy_from_linear_data(skb, desc->data.dt + (120 - len), skb->len);
612 if (skb->len < len) 612 if (skb->len < len)
613 memset(desc->data.dt + 120 - len + skb->len, 0, len-skb->len); 613 memset(desc->data.dt + 120 - len + skb->len, 0, len-skb->len);
614} 614}
@@ -626,8 +626,8 @@ static void meth_tx_1page_prepare(struct meth_private *priv,
626 626
627 /* unaligned part */ 627 /* unaligned part */
628 if (unaligned_len) { 628 if (unaligned_len) {
629 memcpy(desc->data.dt + (120 - unaligned_len), 629 skb_copy_from_linear_data(skb, desc->data.dt + (120 - unaligned_len),
630 skb->data, unaligned_len); 630 unaligned_len);
631 desc->header.raw |= (128 - unaligned_len) << 16; 631 desc->header.raw |= (128 - unaligned_len) << 16;
632 } 632 }
633 633
@@ -652,8 +652,8 @@ static void meth_tx_2page_prepare(struct meth_private *priv,
652 desc->header.raw = METH_TX_CMD_INT_EN | TX_CATBUF1 | TX_CATBUF2| (skb->len - 1); 652 desc->header.raw = METH_TX_CMD_INT_EN | TX_CATBUF1 | TX_CATBUF2| (skb->len - 1);
653 /* unaligned part */ 653 /* unaligned part */
654 if (unaligned_len){ 654 if (unaligned_len){
655 memcpy(desc->data.dt + (120 - unaligned_len), 655 skb_copy_from_linear_data(skb, desc->data.dt + (120 - unaligned_len),
656 skb->data, unaligned_len); 656 unaligned_len);
657 desc->header.raw |= (128 - unaligned_len) << 16; 657 desc->header.raw |= (128 - unaligned_len) << 16;
658 } 658 }
659 659