Organize the various modes (CISCO/AUTO/DEMAND/LEASED) a little bit better,
centralize the code. Remember to call TLF/TLS on the hardware in CISCO mode.
This commit is contained in:
parent
74fa06c717
commit
4738ca443e
@ -28,7 +28,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: if_ar.c,v 1.23 1998/10/22 05:58:38 bde Exp $
|
||||
* $Id: if_ar.c,v 1.24 1998/12/16 18:42:38 phk Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -600,13 +600,6 @@ arioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
|
||||
|
||||
TRC(printf("ar%d: arioctl.\n", ifp->if_unit);)
|
||||
|
||||
if(cmd == SIOCSIFFLAGS) {
|
||||
if(ifp->if_flags & IFF_LINK2)
|
||||
sp->pp_flags |= PP_CISCO;
|
||||
else
|
||||
sp->pp_flags &= ~PP_CISCO;
|
||||
}
|
||||
|
||||
was_up = ifp->if_flags & IFF_RUNNING;
|
||||
|
||||
error = sppp_ioctl(ifp, cmd, data);
|
||||
|
@ -28,7 +28,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: if_ar.c,v 1.23 1998/10/22 05:58:38 bde Exp $
|
||||
* $Id: if_ar.c,v 1.24 1998/12/16 18:42:38 phk Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -600,13 +600,6 @@ arioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
|
||||
|
||||
TRC(printf("ar%d: arioctl.\n", ifp->if_unit);)
|
||||
|
||||
if(cmd == SIOCSIFFLAGS) {
|
||||
if(ifp->if_flags & IFF_LINK2)
|
||||
sp->pp_flags |= PP_CISCO;
|
||||
else
|
||||
sp->pp_flags &= ~PP_CISCO;
|
||||
}
|
||||
|
||||
was_up = ifp->if_flags & IFF_RUNNING;
|
||||
|
||||
error = sppp_ioctl(ifp, cmd, data);
|
||||
|
@ -27,7 +27,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: if_sr.c,v 1.20 1999/01/18 21:23:47 julian Exp $
|
||||
* $Id: if_sr.c,v 1.21 1999/01/18 21:27:03 julian Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -1275,13 +1275,6 @@ srioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
|
||||
ifp->if_flags &= ~IFF_LINK1;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Next we can handle minor protocol point(s)
|
||||
*/
|
||||
if (ifp->if_flags & IFF_LINK2)
|
||||
sp->pp_flags |= PP_CISCO;
|
||||
else
|
||||
sp->pp_flags &= ~PP_CISCO;
|
||||
}
|
||||
/*
|
||||
* Next, we'll allow the network service layer we've called process
|
||||
|
@ -27,7 +27,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: if_sr.c,v 1.20 1999/01/18 21:23:47 julian Exp $
|
||||
* $Id: if_sr.c,v 1.21 1999/01/18 21:27:03 julian Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -1275,13 +1275,6 @@ srioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
|
||||
ifp->if_flags &= ~IFF_LINK1;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Next we can handle minor protocol point(s)
|
||||
*/
|
||||
if (ifp->if_flags & IFF_LINK2)
|
||||
sp->pp_flags |= PP_CISCO;
|
||||
else
|
||||
sp->pp_flags &= ~PP_CISCO;
|
||||
}
|
||||
/*
|
||||
* Next, we'll allow the network service layer we've called process
|
||||
|
@ -28,7 +28,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: if_ar.c,v 1.23 1998/10/22 05:58:38 bde Exp $
|
||||
* $Id: if_ar.c,v 1.24 1998/12/16 18:42:38 phk Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -600,13 +600,6 @@ arioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
|
||||
|
||||
TRC(printf("ar%d: arioctl.\n", ifp->if_unit);)
|
||||
|
||||
if(cmd == SIOCSIFFLAGS) {
|
||||
if(ifp->if_flags & IFF_LINK2)
|
||||
sp->pp_flags |= PP_CISCO;
|
||||
else
|
||||
sp->pp_flags &= ~PP_CISCO;
|
||||
}
|
||||
|
||||
was_up = ifp->if_flags & IFF_RUNNING;
|
||||
|
||||
error = sppp_ioctl(ifp, cmd, data);
|
||||
|
@ -54,9 +54,6 @@ extern struct cdevsw cx_cdevsw;
|
||||
#include <machine/cronyx.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 cxattach __P((struct isa_device *id));
|
||||
static void cxput __P((cx_chan_t *c, char b));
|
||||
@ -821,20 +818,3 @@ cxinput (cx_chan_t *c, void *buf, unsigned len)
|
||||
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 (new.cisco)
|
||||
sp->pp_flags |= PP_CISCO;
|
||||
else
|
||||
sp->pp_flags &= ~PP_CISCO;
|
||||
if (new.keepalive)
|
||||
sp->pp_flags |= PP_KEEPALIVE;
|
||||
else
|
||||
sp->pp_flags &= ~PP_KEEPALIVE;
|
||||
}
|
||||
c->sopt = new;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: if_sr.c,v 1.20 1999/01/18 21:23:47 julian Exp $
|
||||
* $Id: if_sr.c,v 1.21 1999/01/18 21:27:03 julian Exp $
|
||||
*/
|
||||
|
||||
/*
|
||||
@ -1275,13 +1275,6 @@ srioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
|
||||
ifp->if_flags &= ~IFF_LINK1;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Next we can handle minor protocol point(s)
|
||||
*/
|
||||
if (ifp->if_flags & IFF_LINK2)
|
||||
sp->pp_flags |= PP_CISCO;
|
||||
else
|
||||
sp->pp_flags &= ~PP_CISCO;
|
||||
}
|
||||
/*
|
||||
* Next, we'll allow the network service layer we've called process
|
||||
|
Loading…
Reference in New Issue
Block a user