Messages in this thread Patch in this message | ![/](/images/icornerl.gif) | | Date | Sat, 26 Jul 2003 17:35:31 -0400 | From | Samuel Thibault <> | Subject | [PATCH] [2.6] adding xon/xoff support to ppp |
| |
Hi,
It seems to have been dropped again, so I resend it.
Linux' ppp has not been implementing xon/xoff since 2.0 at least (a thread on linux-ppp clearly stated that some years ago: just type "pppd xonxoff": without the patch you can't stop the flow), here is a patch to correct this on 2.6.0-test1 kernel. It has been well tested and updated over the 2.2, 2.4 and 2.6 kernels.
Regards, Samuel thibault
Add xon/xoff support to the ppp line discipline for async ports.
--- linux-2.6.0-test1-orig/drivers/char/tty_io.c 2003-07-26 17:25:28.000000000 -0400 +++ linux-2.6.0-test1-perso/drivers/char/tty_io.c 2003-07-14 01:11:25.000000000 -0400 @@ -611,6 +611,8 @@ (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 @@ 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) { --- linux-2.6.0-test1-orig/drivers/net/ppp_async.c 2003-07-26 17:23:56.000000000 -0400 +++ linux-2.6.0-test1-perso/drivers/net/ppp_async.c 2003-07-14 01:12:45.000000000 -0400 @@ -891,6 +891,11 @@ process_input_packet(ap); } else if (c == PPP_ESCAPE) { ap->state |= SC_ESCAPE; + } else if (I_IXON(ap->tty)) { + if (c == STOP_CHAR(ap->tty)) + stop_tty(ap->tty); + else if (c == START_CHAR(ap->tty)) + start_tty(ap->tty); } /* otherwise it's a char in the recv ACCM */ ++n; - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |