From df0083eddd5f881551e4df3e7eb24ab24ecb5da7 Mon Sep 17 00:00:00 2001 From: Paul Mackerras Date: Mon, 1 Jul 1996 05:30:45 +0000 Subject: [PATCH] accommodate netbsd-1.0 as well --- netbsd-1.1/if_ppp.c | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/netbsd-1.1/if_ppp.c b/netbsd-1.1/if_ppp.c index d17cf8b..4f0072d 100644 --- a/netbsd-1.1/if_ppp.c +++ b/netbsd-1.1/if_ppp.c @@ -1,4 +1,4 @@ -/* $Id: if_ppp.c,v 1.3 1996/07/01 01:03:38 paulus Exp $ */ +/* $Id: if_ppp.c,v 1.4 1996/07/01 05:30:45 paulus Exp $ */ /* * if_ppp.c - Point-to-Point Protocol (PPP) Asynchronous driver. @@ -90,6 +90,10 @@ #include #include +#if NetBSD1_0 && defined(i386) +#include +#endif + #include #include #include @@ -116,6 +120,10 @@ #include #include +#if NetBSD1_0 +#define splsoftnet splnet +#endif + #ifdef PPP_COMPRESS #define PACKETPTR struct mbuf * #include @@ -197,6 +205,18 @@ pppattach() bpfattach(&sc->sc_bpf, &sc->sc_if, DLT_PPP, PPP_HDRLEN); #endif } + +#if NetBSD1_0 && defined(i386) + /* + * XXX kludge to fix the bug in the i386 interrupt handling code, + * where software interrupts could be taken while hardware + * interrupts were blocked. + */ + if ((imask[IPL_TTY] & (1 << SIR_NET)) == 0) { + imask[IPL_TTY] |= (1 << SIR_NET); + intr_calculatemasks(); + } +#endif } /* @@ -622,6 +642,8 @@ pppoutput(ifp, m0, dst, rtp) struct ip *ip; struct ifqueue *ifq; enum NPmode mode; + int len; + struct mbuf *m; if (sc->sc_devp == NULL || (ifp->if_flags & IFF_RUNNING) == 0 || ((ifp->if_flags & IFF_UP) == 0 && dst->sa_family != AF_UNSPEC)) { @@ -695,6 +717,10 @@ pppoutput(ifp, m0, dst, rtp) *cp++ = protocol & 0xff; m0->m_len += PPP_HDRLEN; + len = 0; + for (m = m0; m != 0; m = m->m_next) + len += m->m_len; + if (sc->sc_flags & SC_LOG_OUTPKT) { printf("ppp%d output: ", ifp->if_unit); pppdumpm(m0); -- 2.39.2