diff options
Diffstat (limited to 'sys/dev/usb/if_rum.c')
-rw-r--r-- | sys/dev/usb/if_rum.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/sys/dev/usb/if_rum.c b/sys/dev/usb/if_rum.c index 567d20e0349..09a42757608 100644 --- a/sys/dev/usb/if_rum.c +++ b/sys/dev/usb/if_rum.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_rum.c,v 1.113 2015/11/04 12:12:00 dlg Exp $ */ +/* $OpenBSD: if_rum.c,v 1.114 2015/11/13 10:36:29 mpi Exp $ */ /*- * Copyright (c) 2005-2007 Damien Bergamini <damien.bergamini@free.fr> @@ -1242,14 +1242,13 @@ rum_start(struct ifnet *ifp) return; for (;;) { + if (sc->tx_queued >= RUM_TX_LIST_COUNT - 1) { + ifp->if_flags |= IFF_OACTIVE; + break; + } + m0 = mq_dequeue(&ic->ic_mgtq); if (m0 != NULL) { - if (sc->tx_queued >= RUM_TX_LIST_COUNT - 1) { - mq_requeue(&ic->ic_mgtq, m0); - ifp->if_flags |= IFF_OACTIVE; - break; - } - ni = m0->m_pkthdr.ph_cookie; #if NBPFILTER > 0 if (ic->ic_rawbpf != NULL) @@ -1261,14 +1260,10 @@ rum_start(struct ifnet *ifp) } else { if (ic->ic_state != IEEE80211_S_RUN) break; - IFQ_POLL(&ifp->if_snd, m0); + + IFQ_DEQUEUE(&ifp->if_snd, m0); if (m0 == NULL) break; - if (sc->tx_queued >= RUM_TX_LIST_COUNT - 1) { - ifp->if_flags |= IFF_OACTIVE; - break; - } - IFQ_DEQUEUE(&ifp->if_snd, m0); #if NBPFILTER > 0 if (ifp->if_bpf != NULL) bpf_mtap(ifp->if_bpf, m0, BPF_DIRECTION_OUT); |