diff options
Diffstat (limited to 'net/irda/irttp.c')
-rw-r--r-- | net/irda/irttp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/irda/irttp.c b/net/irda/irttp.c index da3f2bc1b6f6..7069e4a58257 100644 --- a/net/irda/irttp.c +++ b/net/irda/irttp.c | |||
@@ -256,7 +256,7 @@ static struct sk_buff *irttp_reassemble_skb(struct tsap_cb *self) | |||
256 | * Copy all fragments to a new buffer | 256 | * Copy all fragments to a new buffer |
257 | */ | 257 | */ |
258 | while ((frag = skb_dequeue(&self->rx_fragments)) != NULL) { | 258 | while ((frag = skb_dequeue(&self->rx_fragments)) != NULL) { |
259 | memcpy(skb->data+n, frag->data, frag->len); | 259 | skb_copy_to_linear_data_offset(skb, n, frag->data, frag->len); |
260 | n += frag->len; | 260 | n += frag->len; |
261 | 261 | ||
262 | dev_kfree_skb(frag); | 262 | dev_kfree_skb(frag); |
@@ -314,8 +314,8 @@ static inline void irttp_fragment_skb(struct tsap_cb *self, | |||
314 | skb_reserve(frag, self->max_header_size); | 314 | skb_reserve(frag, self->max_header_size); |
315 | 315 | ||
316 | /* Copy data from the original skb into this fragment. */ | 316 | /* Copy data from the original skb into this fragment. */ |
317 | memcpy(skb_put(frag, self->max_seg_size), skb->data, | 317 | skb_copy_from_linear_data(skb, skb_put(frag, self->max_seg_size), |
318 | self->max_seg_size); | 318 | self->max_seg_size); |
319 | 319 | ||
320 | /* Insert TTP header, with the more bit set */ | 320 | /* Insert TTP header, with the more bit set */ |
321 | frame = skb_push(frag, TTP_HEADER); | 321 | frame = skb_push(frag, TTP_HEADER); |
@@ -551,7 +551,7 @@ int irttp_udata_request(struct tsap_cb *self, struct sk_buff *skb) | |||
551 | } | 551 | } |
552 | 552 | ||
553 | if (skb->len > self->max_seg_size) { | 553 | if (skb->len > self->max_seg_size) { |
554 | IRDA_DEBUG(1, "%s(), UData is to large for IrLAP!\n", | 554 | IRDA_DEBUG(1, "%s(), UData is too large for IrLAP!\n", |
555 | __FUNCTION__); | 555 | __FUNCTION__); |
556 | goto err; | 556 | goto err; |
557 | } | 557 | } |
@@ -598,7 +598,7 @@ int irttp_data_request(struct tsap_cb *self, struct sk_buff *skb) | |||
598 | * inside an IrLAP frame | 598 | * inside an IrLAP frame |
599 | */ | 599 | */ |
600 | if ((self->tx_max_sdu_size == 0) && (skb->len > self->max_seg_size)) { | 600 | if ((self->tx_max_sdu_size == 0) && (skb->len > self->max_seg_size)) { |
601 | IRDA_ERROR("%s: SAR disabled, and data is to large for IrLAP!\n", | 601 | IRDA_ERROR("%s: SAR disabled, and data is too large for IrLAP!\n", |
602 | __FUNCTION__); | 602 | __FUNCTION__); |
603 | ret = -EMSGSIZE; | 603 | ret = -EMSGSIZE; |
604 | goto err; | 604 | goto err; |