Module Name: src Committed By: thorpej Date: Sun Sep 18 11:30:40 UTC 2022
Modified Files: src/sys/arch/mips/atheros/dev: if_ae.c Log Message: Eliminate use of IFF_OACTIVE. To generate a diff of this commit: cvs rdiff -u -r1.40 -r1.41 src/sys/arch/mips/atheros/dev/if_ae.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/mips/atheros/dev/if_ae.c diff -u src/sys/arch/mips/atheros/dev/if_ae.c:1.40 src/sys/arch/mips/atheros/dev/if_ae.c:1.41 --- src/sys/arch/mips/atheros/dev/if_ae.c:1.40 Wed Sep 2 08:26:05 2020 +++ src/sys/arch/mips/atheros/dev/if_ae.c Sun Sep 18 11:30:40 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ae.c,v 1.40 2020/09/02 08:26:05 msaitoh Exp $ */ +/* $NetBSD: if_ae.c,v 1.41 2022/09/18 11:30:40 thorpej Exp $ */ /*- * Copyright (c) 2006 Urbana-Champaign Independent Media Center. * Copyright (c) 2006 Garrett D'Amore. @@ -98,7 +98,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: if_ae.c,v 1.40 2020/09/02 08:26:05 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ae.c,v 1.41 2022/09/18 11:30:40 thorpej Exp $"); #include <sys/param.h> @@ -556,7 +556,7 @@ ae_start(struct ifnet *ifp) device_xname(sc->sc_dev), sc->sc_flags, ifp->if_flags)); - if ((ifp->if_flags & (IFF_RUNNING | IFF_OACTIVE)) != IFF_RUNNING) + if ((ifp->if_flags & IFF_RUNNING) == 0) return; /* @@ -638,7 +638,6 @@ ae_start(struct ifnet *ifp) * XXX We could allocate an mbuf and copy, but * XXX it is worth it? */ - ifp->if_flags |= IFF_OACTIVE; bus_dmamap_unload(sc->sc_dmat, dmamap); if (m != NULL) m_freem(m); @@ -735,11 +734,6 @@ ae_start(struct ifnet *ifp) bpf_mtap(ifp, m0, BPF_D_OUT); } - if (txs == NULL || sc->sc_txfree == 0) { - /* No more slots left; notify upper layer. */ - ifp->if_flags |= IFF_OACTIVE; - } - if (sc->sc_txfree != ofree) { DPRINTF(sc, ("%s: packets enqueued, IC on %d, OWN on %d\n", device_xname(sc->sc_dev), lasttx, firsttx)); @@ -1154,8 +1148,6 @@ ae_txintr(struct ae_softc *sc) DPRINTF(sc, ("%s: ae_txintr: sc_flags 0x%08x\n", device_xname(sc->sc_dev), sc->sc_flags)); - ifp->if_flags &= ~IFF_OACTIVE; - /* * Go through our Tx list and free mbufs for those * frames that have been transmitted. @@ -1447,12 +1439,11 @@ ae_init(struct ifnet *ifp) * Note that the interface is now running. */ ifp->if_flags |= IFF_RUNNING; - ifp->if_flags &= ~IFF_OACTIVE; sc->sc_if_flags = ifp->if_flags; out: if (error) { - ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); + ifp->if_flags &= ~IFF_RUNNING; ifp->if_timer = 0; printf("%s: interface not running\n", device_xname(sc->sc_dev)); } @@ -1598,7 +1589,7 @@ ae_stop(struct ifnet *ifp, int disable) /* * Mark the interface down and cancel the watchdog timer. */ - ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); + ifp->if_flags &= ~IFF_RUNNING; sc->sc_if_flags = ifp->if_flags; ifp->if_timer = 0;