diff options
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_sl.c | 9 | ||||
-rw-r--r-- | sys/net/ppp_tty.c | 12 |
2 files changed, 4 insertions, 17 deletions
diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c index c05ecd0..3595b77 100644 --- a/sys/net/if_sl.c +++ b/sys/net/if_sl.c @@ -186,8 +186,7 @@ static int slstart(struct tty *); static struct linesw slipdisc = { slopen, slclose, l_noread, l_nowrite, - sltioctl, slinput, slstart, ttymodem, - FRAME_END + sltioctl, slinput, slstart, ttymodem }; /* @@ -350,17 +349,14 @@ slopen(dev, tp) if (error) return (error); - if (tp->t_line == SLIPDISC) - return (0); - if ((sc = slcreate()) == NULL) return (ENOBUFS); + tp->t_hotchar = FRAME_END; tp->t_sc = (caddr_t)sc; sc->sc_ttyp = tp; sc->sc_if.if_baudrate = tp->t_ospeed; ttyflush(tp, FREAD | FWRITE); - tp->t_line = SLIPDISC; /* * We don't use t_canq or t_rawq, so reduce their @@ -417,7 +413,6 @@ slclose(tp,flag) */ s = splimp(); /* actually, max(spltty, splnet) */ clist_free_cblocks(&tp->t_outq); - tp->t_line = 0; sc = (struct sl_softc *)tp->t_sc; if (sc != NULL) { if (sc->sc_outfill) { diff --git a/sys/net/ppp_tty.c b/sys/net/ppp_tty.c index 0270acb..05ffb16 100644 --- a/sys/net/ppp_tty.c +++ b/sys/net/ppp_tty.c @@ -148,8 +148,7 @@ void pppasyncdetach(void); static struct linesw pppdisc = { pppopen, pppclose, pppread, pppwrite, - ppptioctl, pppinput, pppstart, ttymodem, - PPP_FLAG + ppptioctl, pppinput, pppstart, ttymodem }; void @@ -185,13 +184,7 @@ pppopen(dev, tp) s = spltty(); - if (tp->t_line == PPPDISC) { - sc = (struct ppp_softc *) tp->t_sc; - if (sc != NULL && sc->sc_devp == (void *) tp) { - splx(s); - return (0); - } - } + tp->t_hotchar = PPP_FLAG; if ((sc = pppalloc(td->td_proc->p_pid)) == NULL) { splx(s); @@ -254,7 +247,6 @@ pppclose(tp, flag) ttyflush(tp, FREAD | FWRITE); clist_free_cblocks(&tp->t_canq); clist_free_cblocks(&tp->t_outq); - tp->t_line = 0; sc = (struct ppp_softc *) tp->t_sc; if (sc != NULL) { tp->t_sc = NULL; |