diff options
Diffstat (limited to 'drivers/s390/net/ctcmain.c')
-rw-r--r-- | drivers/s390/net/ctcmain.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/s390/net/ctcmain.c b/drivers/s390/net/ctcmain.c index 54e3f806cd52..b0f813e6f48e 100644 --- a/drivers/s390/net/ctcmain.c +++ b/drivers/s390/net/ctcmain.c | |||
@@ -472,7 +472,8 @@ ctc_unpack_skb(struct channel *ch, struct sk_buff *pskb) | |||
472 | privptr->stats.rx_dropped++; | 472 | privptr->stats.rx_dropped++; |
473 | return; | 473 | return; |
474 | } | 474 | } |
475 | memcpy(skb_put(skb, pskb->len), pskb->data, pskb->len); | 475 | skb_copy_from_linear_data(pskb, skb_put(skb, pskb->len), |
476 | pskb->len); | ||
476 | skb_reset_mac_header(skb); | 477 | skb_reset_mac_header(skb); |
477 | skb->dev = pskb->dev; | 478 | skb->dev = pskb->dev; |
478 | skb->protocol = pskb->protocol; | 479 | skb->protocol = pskb->protocol; |
@@ -716,8 +717,9 @@ ch_action_txdone(fsm_instance * fi, int event, void *arg) | |||
716 | *((__u16 *) skb_put(ch->trans_skb, 2)) = ch->collect_len + 2; | 717 | *((__u16 *) skb_put(ch->trans_skb, 2)) = ch->collect_len + 2; |
717 | i = 0; | 718 | i = 0; |
718 | while ((skb = skb_dequeue(&ch->collect_queue))) { | 719 | while ((skb = skb_dequeue(&ch->collect_queue))) { |
719 | memcpy(skb_put(ch->trans_skb, skb->len), skb->data, | 720 | skb_copy_from_linear_data(skb, skb_put(ch->trans_skb, |
720 | skb->len); | 721 | skb->len), |
722 | skb->len); | ||
721 | privptr->stats.tx_packets++; | 723 | privptr->stats.tx_packets++; |
722 | privptr->stats.tx_bytes += skb->len - LL_HEADER_LENGTH; | 724 | privptr->stats.tx_bytes += skb->len - LL_HEADER_LENGTH; |
723 | atomic_dec(&skb->users); | 725 | atomic_dec(&skb->users); |
@@ -2268,8 +2270,9 @@ transmit_skb(struct channel *ch, struct sk_buff *skb) | |||
2268 | skb_reset_tail_pointer(ch->trans_skb); | 2270 | skb_reset_tail_pointer(ch->trans_skb); |
2269 | ch->trans_skb->len = 0; | 2271 | ch->trans_skb->len = 0; |
2270 | ch->ccw[1].count = skb->len; | 2272 | ch->ccw[1].count = skb->len; |
2271 | memcpy(skb_put(ch->trans_skb, skb->len), skb->data, | 2273 | skb_copy_from_linear_data(skb, skb_put(ch->trans_skb, |
2272 | skb->len); | 2274 | skb->len), |
2275 | skb->len); | ||
2273 | atomic_dec(&skb->users); | 2276 | atomic_dec(&skb->users); |
2274 | dev_kfree_skb_irq(skb); | 2277 | dev_kfree_skb_irq(skb); |
2275 | ccw_idx = 0; | 2278 | ccw_idx = 0; |