Add back cxswitch() it was used afterall.

This commit is contained in:
Poul-Henning Kamp 1999-04-02 13:58:01 +00:00
parent c4a6db710a
commit 1f8601aee2

View File

@ -54,6 +54,9 @@ extern struct cdevsw cx_cdevsw;
#include <machine/cronyx.h> #include <machine/cronyx.h>
#include <i386/isa/cxreg.h> #include <i386/isa/cxreg.h>
/* XXX exported. */
void cxswitch (cx_chan_t *c, cx_soft_opt_t new);
static int cxprobe __P((struct isa_device *id)); static int cxprobe __P((struct isa_device *id));
static int cxattach __P((struct isa_device *id)); static int cxattach __P((struct isa_device *id));
static void cxput __P((cx_chan_t *c, char b)); static void cxput __P((cx_chan_t *c, char b));
@ -818,3 +821,22 @@ cxinput (cx_chan_t *c, void *buf, unsigned len)
sppp_input (c->master, m); sppp_input (c->master, m);
} }
void cxswitch (cx_chan_t *c, cx_soft_opt_t new)
{
new.ext = 0;
if (! new.ext) {
struct sppp *sp = (struct sppp*) c->ifp;
#if 0 /* Doesn't work this way any more 990402 /phk */
if (new.cisco)
sp->pp_flags |= PP_CISCO;
else
sp->pp_flags &= ~PP_CISCO;
#endif
if (new.keepalive)
sp->pp_flags |= PP_KEEPALIVE;
else
sp->pp_flags &= ~PP_KEEPALIVE;
}
c->sopt = new;
}