summaryrefslogtreecommitdiff
path: root/sys/dev/ic/malo.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/ic/malo.c')
-rw-r--r--sys/dev/ic/malo.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/ic/malo.c b/sys/dev/ic/malo.c
index caeefbe719b..22f82b1d81a 100644
--- a/sys/dev/ic/malo.c
+++ b/sys/dev/ic/malo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: malo.c,v 1.110 2015/11/16 10:03:01 mpi Exp $ */
+/* $OpenBSD: malo.c,v 1.111 2015/11/25 03:09:58 dlg Exp $ */
/*
* Copyright (c) 2006 Claudio Jeker <claudio@openbsd.org>
@@ -1006,12 +1006,12 @@ malo_start(struct ifnet *ifp)
DPRINTF(2, "%s: %s\n", sc->sc_dev.dv_xname, __func__);
- if ((ifp->if_flags & (IFF_RUNNING | IFF_OACTIVE)) != IFF_RUNNING)
+ if (!(ifp->if_flags & IFF_RUNNING) || ifq_is_oactive(&ifp->if_snd))
return;
for (;;) {
if (sc->sc_txring.queued >= MALO_TX_RING_COUNT - 1) {
- ifp->if_flags |= IFF_OACTIVE;
+ ifq_set_oactive(&ifp->if_snd);
break;
}
@@ -1065,7 +1065,8 @@ malo_stop(struct malo_softc *sc)
malo_ctl_write4(sc, 0x0c18, (1 << 15));
/* device is not running anymore */
- ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
+ ifp->if_flags &= ~IFF_RUNNING;
+ ifq_clr_oactive(&ifp->if_snd);
/* change back to initial state */
ieee80211_new_state(ic, IEEE80211_S_INIT, -1);
@@ -1369,7 +1370,7 @@ next:
}
sc->sc_tx_timer = 0;
- ifp->if_flags &= ~IFF_OACTIVE;
+ ifq_clr_oactive(&ifp->if_snd);
malo_start(ifp);
}