aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ppp_async.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ppp_async.c')
-rw-r--r--drivers/net/ppp_async.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/ppp_async.c b/drivers/net/ppp_async.c
index 6567fabd2e1..6de8399d6dd 100644
--- a/drivers/net/ppp_async.c
+++ b/drivers/net/ppp_async.c
@@ -157,6 +157,7 @@ ppp_asynctty_open(struct tty_struct *tty)
{
struct asyncppp *ap;
int err;
+ int speed;
if (tty->ops->write == NULL)
return -EOPNOTSUPP;
@@ -187,6 +188,8 @@ ppp_asynctty_open(struct tty_struct *tty)
ap->chan.private = ap;
ap->chan.ops = &async_ops;
ap->chan.mtu = PPP_MRU;
+ speed = tty_get_baud_rate(tty);
+ ap->chan.speed = speed;
err = ppp_register_channel(&ap->chan);
if (err)
goto out_free;
@@ -233,11 +236,9 @@ ppp_asynctty_close(struct tty_struct *tty)
tasklet_kill(&ap->tsk);
ppp_unregister_channel(&ap->chan);
- if (ap->rpkt)
- kfree_skb(ap->rpkt);
+ kfree_skb(ap->rpkt);
skb_queue_purge(&ap->rqueue);
- if (ap->tpkt)
- kfree_skb(ap->tpkt);
+ kfree_skb(ap->tpkt);
kfree(ap);
}