sync ppp update for new driver

This commit is contained in:
Paul Mackerras 1999-11-17 03:51:14 +00:00
parent 68bdfaefd4
commit 8dfe4c1687
2 changed files with 10 additions and 0 deletions

View File

@ -98,6 +98,8 @@ The new driver is divided into two files: ppp_generic.c and
ppp_async.c. The old ppp.c is still present in the kernel sources but
is not used. If you compile PPP as a module, you will get two
separate modules, called ppp_generic and ppp_async.
Another module ppp_synctty is used for synchronous tty devices
such as high-speed WAN adapters for leased T1/E1 lines.
To talk to the new driver, pppd needs to be able to open /dev/ppp,
character device (108,0). If the special file node /dev/ppp is not
@ -110,6 +112,7 @@ If you use module autoloading and have PPP as a module, you will need
to add the following to your /etc/modules.conf or /etc/conf.modules:
alias tty-ldisc-3 ppp_async
alias tty-ldisc-14 ppp_synctty
alias char-major-108 ppp_generic

View File

@ -377,6 +377,13 @@ int establish_ppp (int tty_fd)
/*
* Set the current tty to the PPP discpline
*/
#ifndef N_SYNC_PPP
#define N_SYNC_PPP 14
#endif
if (new_style_driver)
ppp_disc = sync_serial ? N_SYNC_PPP:N_PPP;
if (ioctl(tty_fd, TIOCSETD, &ppp_disc) < 0) {
if ( ! ok_error (errno) )
fatal("ioctl(TIOCSETD): %m(%d)", errno);