diff options
author | 2013-04-16 12:05:04 +0000 | |
---|---|---|
committer | 2013-04-16 12:05:04 +0000 | |
commit | 1e63ef38080d99c3fdd51752958edcc528cc07ba (patch) | |
tree | 4a52318f77d01d3890ac914cb17ee974a4b080ec | |
parent | pass state correctly so we can do error messages. (diff) | |
download | wireguard-openbsd-1e63ef38080d99c3fdd51752958edcc528cc07ba.tar.xz wireguard-openbsd-1e63ef38080d99c3fdd51752958edcc528cc07ba.zip |
Remove code under ifndef OpenBSD. No object change.
-rw-r--r-- | sys/net/if_sl.c | 32 |
1 files changed, 1 insertions, 31 deletions
diff --git a/sys/net/if_sl.c b/sys/net/if_sl.c index 134867e1d80..34d1384d1b1 100644 --- a/sys/net/if_sl.c +++ b/sys/net/if_sl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sl.c,v 1.47 2013/03/28 16:55:27 deraadt Exp $ */ +/* $OpenBSD: if_sl.c,v 1.48 2013/04/16 12:05:04 mpi Exp $ */ /* $NetBSD: if_sl.c,v 1.39.4.1 1996/06/02 16:26:31 thorpej Exp $ */ /* @@ -71,9 +71,7 @@ #include <sys/tty.h> #include <sys/kernel.h> #include <sys/conf.h> -#if defined(__NetBSD__) || defined(__OpenBSD__) #include <sys/systm.h> -#endif #include <net/if.h> @@ -153,9 +151,6 @@ #error Huh? SLMTU way too small. #endif #define SLIP_HIWAT 100 -#if !(defined(__NetBSD__) || defined(__OpenBSD__)) /* XXX - cgd */ -#define CLISTRESERVE 1024 /* Can't let clists get too low */ -#endif /* !NetBSD */ /* * SLIP ABORT ESCAPE MECHANISM: @@ -308,7 +303,6 @@ slopen(dev, tp) tp->t_state |= TS_ISOPEN | TS_XCLUDE; splx(s); ttyflush(tp, FREAD | FWRITE); -#if defined(__NetBSD__) || defined(__OpenBSD__) /* * make sure tty output queue is large enough * to hold a full-sized packet (including frame @@ -327,7 +321,6 @@ slopen(dev, tp) } else sc->sc_oldbufsize = sc->sc_oldbufquot = 0; splx(s); -#endif /* NetBSD */ return (0); } return (ENXIO); @@ -358,13 +351,11 @@ slclose(tp) sc->sc_mbuf = NULL; sc->sc_ep = sc->sc_mp = sc->sc_pktstart = NULL; -#if defined(__NetBSD__) || defined(__OpenBSD__) /* if necessary, install a new outq buffer of the appropriate size */ if (sc->sc_oldbufsize != 0) { clfree(&tp->t_outq); clalloc(&tp->t_outq, sc->sc_oldbufsize, sc->sc_oldbufquot); } -#endif splx(s); } } @@ -494,9 +485,6 @@ slstart(tp) u_char bpfbuf[SLMTU + SLIP_HDRLEN]; int len = 0; #endif -#if !(defined(__NetBSD__) || defined(__OpenBSD__)) /* XXX - cgd */ - extern int cfreecount; -#endif for (;;) { /* @@ -515,7 +503,6 @@ slstart(tp) if (sc == NULL) return; -#if defined(__NetBSD__) || defined(__OpenBSD__) /* XXX - cgd */ /* * Do not remove the packet from the IP queue if it * doesn't look like the packet will fit into the @@ -524,7 +511,6 @@ slstart(tp) */ if (tp->t_outq.c_cn - tp->t_outq.c_cc < 2*SLMTU+2) return; -#endif /* NetBSD */ /* * Get a packet and send it to the interface. @@ -588,18 +574,6 @@ slstart(tp) #endif getmicrotime(&sc->sc_lastpacket); -#if !(defined(__NetBSD__) || defined(__OpenBSD__)) /* XXX - cgd */ - /* - * If system is getting low on clists, just flush our - * output queue (if the stuff was important, it'll get - * retransmitted). - */ - if (cfreecount < CLISTRESERVE + SLMTU) { - m_freem(m); - sc->sc_if.if_collisions++; - continue; - } -#endif /* !__NetBSD__ */ /* * The extra FRAME_END will start up a new packet, and thus * will flush any accumulated garbage. We do this whenever @@ -635,11 +609,7 @@ slstart(tp) * Put n characters at once * into the tty output queue. */ -#if defined(__NetBSD__) || defined(__OpenBSD__) /* XXX - cgd */ if (b_to_q((u_char *)bp, cp - bp, -#else - if (b_to_q((char *)bp, cp - bp, -#endif &tp->t_outq)) break; sc->sc_if.if_obytes += cp - bp; |