-/* $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
return;
}
- IF_DEQUEUE(&sc->sc_if.if_snd, m);
+ IF_DEQUEUE(&ifp->if_snd, m);
if (m == 0)
return;
* 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
/*
len = m->m_pkthdr.len;
m_freem(m);
} else {
- IF_PREPEND(sc->sc_if.if_snd, m);
+ IF_PREPEND(ifp->if_snd, m);
return;
}
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. */
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;
}
}
* 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 */
-/* $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
#include <net/if.h>
-#ifdef INET
#include <netinet/in.h>
#include <netinet/if_ether.h>
-#endif
#include <machine/bus.h>
#include <machine/viareg.h>
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
};
-/* $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
#include <net/if.h>
-#ifdef INET
#include <netinet/in.h>
#include <netinet/if_ether.h>
-#endif
#include <machine/bus.h>
#include <machine/macinfo.h>
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