Commit 7416fd0c authored by Samuel Thibault's avatar Samuel Thibault Committed by Stephen Hemminger

[PPP]: Fix ppp_async xon/xoff handling.

parent a698aef2
......@@ -611,6 +611,8 @@ void stop_tty(struct tty_struct *tty)
(tty->driver->stop)(tty);
}
EXPORT_SYMBOL(stop_tty);
void start_tty(struct tty_struct *tty)
{
if (!tty->stopped || tty->flow_stopped)
......@@ -629,6 +631,8 @@ void start_tty(struct tty_struct *tty)
wake_up_interruptible(&tty->write_wait);
}
EXPORT_SYMBOL(start_tty);
static ssize_t tty_read(struct file * file, char * buf, size_t count,
loff_t *ppos)
{
......
......@@ -891,6 +891,11 @@ ppp_async_input(struct asyncppp *ap, const unsigned char *buf,
process_input_packet(ap);
} else if (c == PPP_ESCAPE) {
ap->state |= SC_ESCAPE;
} else if (I_IXON(ap->tty)) {
if (c == START_CHAR(ap->tty))
start_tty(ap->tty);
else if (c == STOP_CHAR(ap->tty))
stop_tty(ap->tty);
}
/* otherwise it's a char in the recv ACCM */
++n;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment