aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/meth.c
diff options
context:
space:
mode:
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