summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorRoman Kurakin <rik@FreeBSD.org>2004-05-12 17:19:15 +0000
committerRoman Kurakin <rik@FreeBSD.org>2004-05-12 17:19:15 +0000
commitabb49b2191bd2392a44adef3891485d17441b38d (patch)
tree7eada0a539d446a70f7a15e6e1d009b30791dc45 /sys
parentb0a8e657ba2fde886878dd9a7cb6a9fc49b88a4e (diff)
Notes
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/ctau/if_ct.c19
-rw-r--r--sys/dev/cx/if_cx.c25
2 files changed, 25 insertions, 19 deletions
diff --git a/sys/dev/ctau/if_ct.c b/sys/dev/ctau/if_ct.c
index 9541cae15a14..d3df364023b2 100644
--- a/sys/dev/ctau/if_ct.c
+++ b/sys/dev/ctau/if_ct.c
@@ -107,6 +107,11 @@ __FBSDID("$FreeBSD$");
#endif
#endif
+/* If we don't have Cronyx's sppp version, we don't have fr support via sppp */
+#ifndef PP_FR
+#define PP_FR 0
+#endif
+
#define CT_DEBUG(d,s) ({if (d->chan->debug) {\
printf ("%s: ", d->name); printf s;}})
#define CT_DEBUG2(d,s) ({if (d->chan->debug>1) {\
@@ -1333,7 +1338,7 @@ static int ct_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct threa
#ifndef NETGRAPH
case SERIAL_GETPROTO:
- strcpy ((char*)data, /*(d->pp.pp_flags & PP_FR) ? "fr" :*/
+ strcpy ((char*)data, (d->pp.pp_flags & PP_FR) ? "fr" :
(d->pp.pp_if.if_flags & PP_CISCO) ? "cisco" : "ppp");
return 0;
@@ -1351,21 +1356,21 @@ static int ct_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct threa
if (d->pp.pp_if.if_flags & IFF_RUNNING)
return EBUSY;
if (! strcmp ("cisco", (char*)data)) {
-/* d->pp.pp_flags &= ~(PP_FR);*/
+ d->pp.pp_flags &= ~(PP_FR);
d->pp.pp_flags |= PP_KEEPALIVE;
d->pp.pp_if.if_flags |= PP_CISCO;
-/* } else if (! strcmp ("fr", (char*)data)) {
+ } else if (! strcmp ("fr", (char*)data)) {
d->pp.pp_if.if_flags &= ~(PP_CISCO);
- d->pp.pp_flags |= PP_FR | PP_KEEPALIVE;*/
+ d->pp.pp_flags |= PP_FR | PP_KEEPALIVE;
} else if (! strcmp ("ppp", (char*)data)) {
- d->pp.pp_flags &= ~(/*PP_FR | */PP_KEEPALIVE);
+ d->pp.pp_flags &= ~(PP_FR | PP_KEEPALIVE);
d->pp.pp_if.if_flags &= ~(PP_CISCO);
} else
return EINVAL;
return 0;
case SERIAL_GETKEEPALIVE:
- if (/*(d->pp.pp_flags & PP_FR) ||*/
+ if ((d->pp.pp_flags & PP_FR) ||
(d->pp.pp_if.if_flags & PP_CISCO))
return EINVAL;
*(int*)data = (d->pp.pp_flags & PP_KEEPALIVE) ? 1 : 0;
@@ -1382,7 +1387,7 @@ static int ct_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct threa
#endif /* __FreeBSD_version >= 500000 */
if (error)
return error;
- if (/*(d->pp.pp_flags & PP_FR) ||*/
+ if ((d->pp.pp_flags & PP_FR) ||
(d->pp.pp_if.if_flags & PP_CISCO))
return EINVAL;
if (*(int*)data)
diff --git a/sys/dev/cx/if_cx.c b/sys/dev/cx/if_cx.c
index 1746c47740d7..6e6f3ff1b87e 100644
--- a/sys/dev/cx/if_cx.c
+++ b/sys/dev/cx/if_cx.c
@@ -110,6 +110,11 @@ __FBSDID("$FreeBSD$");
#endif
#endif
+/* If we don't have Cronyx's sppp version, we don't have fr support via sppp */
+#ifndef PP_FR
+#define PP_FR 0
+#endif
+
#define CX_DEBUG(d,s) ({if (d->chan->debug) {\
printf ("%s: ", d->name); printf s;}})
#define CX_DEBUG2(d,s) ({if (d->chan->debug>1) {\
@@ -226,7 +231,6 @@ static void disc_optim(struct tty *tp, struct termios *t);
static swihand_t cx_softintr;
#else
static void cx_softintr (void *);
-static void *cx_slow_ih;
static void *cx_fast_ih;
#endif
static void cx_down (drv_t *d);
@@ -1810,7 +1814,7 @@ static int cx_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct threa
CX_DEBUG2 (d, ("ioctl: getproto\n"));
s = splhigh ();
strcpy ((char*)data, (c->mode == M_ASYNC) ? "async" :
- /*(d->pp.pp_flags & PP_FR) ? "fr" :*/
+ (d->pp.pp_flags & PP_FR) ? "fr" :
(d->pp.pp_if.if_flags & PP_CISCO) ? "cisco" : "ppp");
splx (s);
return 0;
@@ -1832,14 +1836,14 @@ static int cx_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct threa
if (d->pp.pp_if.if_flags & IFF_RUNNING)
return EBUSY;
if (! strcmp ("cisco", (char*)data)) {
-/* d->pp.pp_flags &= ~(PP_FR);*/
+ d->pp.pp_flags &= ~(PP_FR);
d->pp.pp_flags |= PP_KEEPALIVE;
d->pp.pp_if.if_flags |= PP_CISCO;
-/* } else if (! strcmp ("fr", (char*)data)) {*/
-/* d->pp.pp_if.if_flags &= ~(PP_CISCO);*/
-/* d->pp.pp_flags |= PP_FR | PP_KEEPALIVE;*/
+ } else if (! strcmp ("fr", (char*)data)) {
+ d->pp.pp_if.if_flags &= ~(PP_CISCO);
+ d->pp.pp_flags |= PP_FR | PP_KEEPALIVE;
} else if (! strcmp ("ppp", (char*)data)) {
- d->pp.pp_flags &= ~(/*PP_FR |*/ PP_KEEPALIVE);
+ d->pp.pp_flags &= ~(PP_FR | PP_KEEPALIVE);
d->pp.pp_if.if_flags &= ~(PP_CISCO);
} else
return EINVAL;
@@ -1847,7 +1851,7 @@ static int cx_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct threa
case SERIAL_GETKEEPALIVE:
CX_DEBUG2 (d, ("ioctl: getkeepalive\n"));
- if (/*(d->pp.pp_flags & PP_FR) ||*/
+ if ((d->pp.pp_flags & PP_FR) ||
(d->pp.pp_if.if_flags & PP_CISCO) ||
(c->mode == M_ASYNC))
return EINVAL;
@@ -1868,7 +1872,7 @@ static int cx_ioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct threa
#endif /* __FreeBSD_version >= 500000 */
if (error)
return error;
- if (/*(d->pp.pp_flags & PP_FR) ||*/
+ if ((d->pp.pp_flags & PP_FR) ||
(d->pp.pp_if.if_flags & PP_CISCO))
return EINVAL;
s = splhigh ();
@@ -3145,8 +3149,6 @@ static int cx_modevent (module_t mod, int type, void *unused)
#else
swi_add(&tty_ithd, "tty:cx", cx_softintr, NULL, SWI_TTY, 0,
&cx_fast_ih);
- swi_add(&clk_ithd, "tty:cx", cx_softintr, NULL, SWI_TTY, 0,
- &cx_slow_ih);
#endif
break;
case MOD_UNLOAD:
@@ -3163,7 +3165,6 @@ static int cx_modevent (module_t mod, int type, void *unused)
untimeout (cx_timeout, 0, timeout_handle);
#if __FreeBSD_version >= 500000
ithread_remove_handler (cx_fast_ih);
- ithread_remove_handler (cx_slow_ih);
#else
unregister_swi (SWI_TTY, cx_softintr);
#endif