From: briggs Date: Mon, 17 Mar 1997 04:16:59 +0000 (+0000) Subject: A couple of cleanup items suggested by is@netbsd.org. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=0dbfda635bc27da6177975b16688797cd778776b;p=openbsd A couple of cleanup items suggested by is@netbsd.org. --- diff --git a/sys/arch/mac68k/dev/if_sn.c b/sys/arch/mac68k/dev/if_sn.c index f6c393c41b5..745c98a7878 100644 --- a/sys/arch/mac68k/dev/if_sn.c +++ b/sys/arch/mac68k/dev/if_sn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_sn.c,v 1.11 1997/03/17 04:04:32 briggs Exp $ */ +/* $OpenBSD: if_sn.c,v 1.12 1997/03/17 04:20:54 briggs Exp $ */ /* * National Semiconductor SONIC Driver @@ -331,7 +331,7 @@ outloop: return; } - IF_DEQUEUE(&sc->sc_if.if_snd, m); + IF_DEQUEUE(&ifp->if_snd, m); if (m == 0) return; @@ -344,8 +344,8 @@ outloop: * If bpf is listening on this interface, let it * see the packet before we commit it to the wire. */ - if (sc->sc_if.if_bpf) - bpf_mtap(sc->sc_if.if_bpf, m); + if (ifp->if_bpf) + bpf_mtap(ifp->if_bpf, m); #endif /* @@ -357,7 +357,7 @@ outloop: len = m->m_pkthdr.len; m_freem(m); } else { - IF_PREPEND(sc->sc_if.if_snd, m); + IF_PREPEND(ifp->if_snd, m); return; } @@ -367,7 +367,7 @@ outloop: sc->txb_inuse++; - sc->sc_if.if_opackets++; /* # of pkts */ + ifp->if_opackets++; /* # of pkts */ sc->sc_sum.ls_opacks++; /* # of pkts */ /* Jump back for possibly more punishment. */ @@ -513,9 +513,9 @@ snwatchdog(ifp) else log(LOG_ERR, "%s: Tx - lost interrupt\n", sc->sc_dev.dv_xname); - temp = sc->sc_if.if_flags & IFF_UP; + temp = ifp->if_flags & IFF_UP; snreset(sc); - sc->sc_if.if_flags |= temp; + ifp->if_flags |= temp; } } @@ -1045,8 +1045,8 @@ sonic_read(sc, pkt, len) * If so, hand off the raw packet to enet, then discard things * not destined for us (but be sure to keep broadcast/multicast). */ - if (sc->sc_if.if_bpf) { - bpf_tap(sc->sc_if.if_bpf, pkt, + if (ifp->if_bpf) { + bpf_tap(ifp->if_bpf, pkt, len + sizeof(struct ether_header)); if ((ifp->if_flags & IFF_PROMISC) != 0 && (et->ether_dhost[0] & 1) == 0 && /* !mcast and !bcast */ diff --git a/sys/arch/mac68k/dev/if_sn_nubus.c b/sys/arch/mac68k/dev/if_sn_nubus.c index 832b16e8aaf..745309a3b25 100644 --- a/sys/arch/mac68k/dev/if_sn_nubus.c +++ b/sys/arch/mac68k/dev/if_sn_nubus.c @@ -1,5 +1,4 @@ -/* $NetBSD$ */ -/* $OpenBSD: if_sn_nubus.c,v 1.2 1997/03/14 14:11:35 briggs Exp $ */ +/* $OpenBSD: if_sn_nubus.c,v 1.3 1997/03/17 04:16:59 briggs Exp $ */ /* * Copyright (C) 1997 Allen Briggs @@ -41,10 +40,8 @@ #include -#ifdef INET #include #include -#endif #include #include @@ -58,8 +55,6 @@ static int sn_nubus_match __P((struct device *, void *, void *)); static void sn_nubus_attach __P((struct device *, struct device *, void *)); static int sn_nb_card_vendor __P((struct nubus_attach_args *)); -void snsetup __P((struct sn_softc *)); - struct cfattach sn_nubus_ca = { sizeof(struct sn_softc), sn_nubus_match, sn_nubus_attach }; diff --git a/sys/arch/mac68k/dev/if_sn_obio.c b/sys/arch/mac68k/dev/if_sn_obio.c index 0b4d381c564..726c29c4966 100644 --- a/sys/arch/mac68k/dev/if_sn_obio.c +++ b/sys/arch/mac68k/dev/if_sn_obio.c @@ -1,5 +1,4 @@ -/* $NetBSD$ */ -/* $OpenBSD: if_sn_obio.c,v 1.2 1997/03/14 14:11:35 briggs Exp $ */ +/* $OpenBSD: if_sn_obio.c,v 1.3 1997/03/17 04:17:00 briggs Exp $ */ /* * Copyright (C) 1997 Allen Briggs @@ -41,10 +40,8 @@ #include -#ifdef INET #include #include -#endif #include #include @@ -60,7 +57,6 @@ static int sn_obio_match __P((struct device *, void *, void *)); static void sn_obio_attach __P((struct device *, struct device *, void *)); static void sn_obio_getaddr __P((struct sn_softc *)); -void snsetup __P((struct sn_softc *)); struct cfattach sn_obio_ca = { sizeof(struct sn_softc), sn_obio_match, sn_obio_attach