[PATCH][2.5] PPP still doesn't support XON/XOFF

Samuel Thibault (Samuel.Thibault@ens-lyon.fr)
Sun, 8 Jun 2003 18:54:58 -0400


Hi,

The ppp net driver still doesn't support xon/xoff (just try calling pppd
xonxoff and try to stop kernel sending data with ^S) although the pppd
man page clearly tells it does, here is a patch which handles it.

Regards,
Samuel Thibault

--- linux-2.5.70-bk12/drivers/net/ppp_async.c 2003-05-26 21:00:45.000000000 -0400
+++ linux-2.5.70-bk12-perso/drivers/net/ppp_async.c 2003-06-08 16:02:51.000000000 -0400
@@ -893,6 +893,25 @@
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)) {
+ if (!ap->tty->stopped) {
+ ap->tty->stopped = 1;
+ if (ap->tty->driver->stop)
+ (ap->tty->driver->stop)(ap->tty);
+ }
+ } else
+ if (c == START_CHAR(ap->tty)) {
+ if (ap->tty->stopped) {
+ ap->tty->stopped = 0;
+ if (ap->tty->driver->start)
+ (ap->tty->driver->start)(ap->tty);
+ if ((test_bit(TTY_DO_WRITE_WAKEUP, &ap->tty->flags)) &&
+ ap->tty->ldisc.write_wakeup)
+ (ap->tty->ldisc.write_wakeup)(ap->tty);
+ wake_up_interruptible(&ap->tty->write_wait);
+ }
+ }
}
/* 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/