summaryrefslogtreecommitdiff
path: root/drivers/net/ppp/ppp_async.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ppp/ppp_async.c')
-rw-r--r--drivers/net/ppp/ppp_async.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ppp/ppp_async.c b/drivers/net/ppp/ppp_async.c
index feb9569e3345..814fd8fae67d 100644
--- a/drivers/net/ppp/ppp_async.c
+++ b/drivers/net/ppp/ppp_async.c
@@ -802,7 +802,7 @@ process_input_packet(struct asyncppp *ap)
proto = p[0];
if (proto & 1) {
/* protocol is compressed */
- skb_push(skb, 1)[0] = 0;
+ *(u8 *)skb_push(skb, 1) = 0;
} else {
if (skb->len < 2)
goto err;
@@ -894,8 +894,7 @@ ppp_async_input(struct asyncppp *ap, const unsigned char *buf,
/* packet overflowed MRU */
ap->state |= SC_TOSS;
} else {
- sp = skb_put(skb, n);
- memcpy(sp, buf, n);
+ sp = skb_put_data(skb, buf, n);
if (ap->state & SC_ESCAPE) {
sp[0] ^= PPP_TRANS;
ap->state &= ~SC_ESCAPE;