summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/if_athn_usb.c4
-rw-r--r--sys/dev/usb/if_atu.c4
-rw-r--r--sys/dev/usb/if_otus.c4
-rw-r--r--sys/dev/usb/if_ral.c6
-rw-r--r--sys/dev/usb/if_rum.c6
-rw-r--r--sys/dev/usb/if_run.c4
-rw-r--r--sys/dev/usb/if_uath.c6
-rw-r--r--sys/dev/usb/if_upgt.c6
-rw-r--r--sys/dev/usb/if_urtw.c6
-rw-r--r--sys/dev/usb/if_urtwn.c4
-rw-r--r--sys/dev/usb/if_zyd.c4
11 files changed, 26 insertions, 28 deletions
diff --git a/sys/dev/usb/if_athn_usb.c b/sys/dev/usb/if_athn_usb.c
index e35a21e8b8a..f63a3e53730 100644
--- a/sys/dev/usb/if_athn_usb.c
+++ b/sys/dev/usb/if_athn_usb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_athn_usb.c,v 1.37 2015/10/25 12:11:56 mpi Exp $ */
+/* $OpenBSD: if_athn_usb.c,v 1.38 2015/11/04 12:12:00 dlg Exp $ */
/*-
* Copyright (c) 2011 Damien Bergamini <damien.bergamini@free.fr>
@@ -2065,7 +2065,7 @@ athn_usb_start(struct ifnet *ifp)
break;
}
/* Send pending management frames first. */
- IF_DEQUEUE(&ic->ic_mgtq, m);
+ m = mq_dequeue(&ic->ic_mgtq);
if (m != NULL) {
ni = m->m_pkthdr.ph_cookie;
goto sendit;
diff --git a/sys/dev/usb/if_atu.c b/sys/dev/usb/if_atu.c
index a6bfdee6901..f795acd4aaf 100644
--- a/sys/dev/usb/if_atu.c
+++ b/sys/dev/usb/if_atu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_atu.c,v 1.113 2015/10/25 12:11:56 mpi Exp $ */
+/* $OpenBSD: if_atu.c,v 1.114 2015/11/04 12:12:00 dlg Exp $ */
/*
* Copyright (c) 2003, 2004
* Daan Vreeken <Danovitsch@Vitsch.net>. All rights reserved.
@@ -1944,7 +1944,7 @@ atu_start(struct ifnet *ifp)
* Poll the management queue for frames, it has priority over
* normal data frames.
*/
- IF_DEQUEUE(&ic->ic_mgtq, m);
+ m = mq_dequeue(&ic->ic_mgtq);
if (m == NULL) {
DPRINTFN(10, ("%s: atu_start: data packet\n",
sc->atu_dev.dv_xname));
diff --git a/sys/dev/usb/if_otus.c b/sys/dev/usb/if_otus.c
index 1e7c2a35f36..f2cce0ecd88 100644
--- a/sys/dev/usb/if_otus.c
+++ b/sys/dev/usb/if_otus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_otus.c,v 1.47 2015/10/25 12:11:56 mpi Exp $ */
+/* $OpenBSD: if_otus.c,v 1.48 2015/11/04 12:12:00 dlg Exp $ */
/*-
* Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr>
@@ -1416,7 +1416,7 @@ otus_start(struct ifnet *ifp)
break;
}
/* Send pending management frames first. */
- IF_DEQUEUE(&ic->ic_mgtq, m);
+ m = mq_dequeue(&ic->ic_mgtq);
if (m != NULL) {
ni = m->m_pkthdr.ph_cookie;
goto sendit;
diff --git a/sys/dev/usb/if_ral.c b/sys/dev/usb/if_ral.c
index 7a12cca9c36..2f906b1b2c6 100644
--- a/sys/dev/usb/if_ral.c
+++ b/sys/dev/usb/if_ral.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ral.c,v 1.133 2015/10/25 12:11:56 mpi Exp $ */
+/* $OpenBSD: if_ral.c,v 1.134 2015/11/04 12:12:00 dlg Exp $ */
/*-
* Copyright (c) 2005, 2006
@@ -1238,13 +1238,13 @@ ural_start(struct ifnet *ifp)
return;
for (;;) {
- IF_POLL(&ic->ic_mgtq, m0);
+ m0 = mq_dequeue(&ic->ic_mgtq);
if (m0 != NULL) {
if (sc->tx_queued >= RAL_TX_LIST_COUNT - 1) {
+ mq_requeue(&ic->ic_mgtq, m0);
ifp->if_flags |= IFF_OACTIVE;
break;
}
- IF_DEQUEUE(&ic->ic_mgtq, m0);
ni = m0->m_pkthdr.ph_cookie;
#if NBPFILTER > 0
diff --git a/sys/dev/usb/if_rum.c b/sys/dev/usb/if_rum.c
index ef0466cd88c..567d20e0349 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.112 2015/10/25 12:11:56 mpi Exp $ */
+/* $OpenBSD: if_rum.c,v 1.113 2015/11/04 12:12:00 dlg Exp $ */
/*-
* Copyright (c) 2005-2007 Damien Bergamini <damien.bergamini@free.fr>
@@ -1242,13 +1242,13 @@ rum_start(struct ifnet *ifp)
return;
for (;;) {
- IF_POLL(&ic->ic_mgtq, m0);
+ 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;
}
- IF_DEQUEUE(&ic->ic_mgtq, m0);
ni = m0->m_pkthdr.ph_cookie;
#if NBPFILTER > 0
diff --git a/sys/dev/usb/if_run.c b/sys/dev/usb/if_run.c
index 639bc68d521..ac7c22b2d13 100644
--- a/sys/dev/usb/if_run.c
+++ b/sys/dev/usb/if_run.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_run.c,v 1.111 2015/10/25 12:11:56 mpi Exp $ */
+/* $OpenBSD: if_run.c,v 1.112 2015/11/04 12:12:00 dlg Exp $ */
/*-
* Copyright (c) 2008-2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -2530,7 +2530,7 @@ run_start(struct ifnet *ifp)
break;
}
/* send pending management frames first */
- IF_DEQUEUE(&ic->ic_mgtq, m);
+ m = mq_dequeue(&ic->ic_mgtq);
if (m != NULL) {
ni = m->m_pkthdr.ph_cookie;
goto sendit;
diff --git a/sys/dev/usb/if_uath.c b/sys/dev/usb/if_uath.c
index 0a044f36bf2..84293ed3806 100644
--- a/sys/dev/usb/if_uath.c
+++ b/sys/dev/usb/if_uath.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_uath.c,v 1.70 2015/10/25 12:11:56 mpi Exp $ */
+/* $OpenBSD: if_uath.c,v 1.71 2015/11/04 12:12:00 dlg Exp $ */
/*-
* Copyright (c) 2006
@@ -1477,13 +1477,13 @@ uath_start(struct ifnet *ifp)
return;
for (;;) {
- IF_POLL(&ic->ic_mgtq, m0);
+ m0 = mq_dequeue(&ic->ic_mgtq);
if (m0 != NULL) {
if (sc->tx_queued >= UATH_TX_DATA_LIST_COUNT) {
+ mq_requeue(&ic->ic_mgtq, m0);
ifp->if_flags |= IFF_OACTIVE;
break;
}
- IF_DEQUEUE(&ic->ic_mgtq, m0);
ni = m0->m_pkthdr.ph_cookie;
#if NBPFILTER > 0
diff --git a/sys/dev/usb/if_upgt.c b/sys/dev/usb/if_upgt.c
index ebba641d27b..108bcddfa10 100644
--- a/sys/dev/usb/if_upgt.c
+++ b/sys/dev/usb/if_upgt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_upgt.c,v 1.70 2015/10/25 12:11:56 mpi Exp $ */
+/* $OpenBSD: if_upgt.c,v 1.71 2015/11/04 12:12:00 dlg Exp $ */
/*
* Copyright (c) 2007 Marcus Glocker <mglocker@openbsd.org>
@@ -1377,11 +1377,9 @@ upgt_start(struct ifnet *ifp)
for (i = 0; i < UPGT_TX_COUNT; i++) {
struct upgt_data *data_tx = &sc->tx_data[i];
- IF_POLL(&ic->ic_mgtq, m);
+ m = mq_dequeue(&ic->ic_mgtq);
if (m != NULL) {
/* management frame */
- IF_DEQUEUE(&ic->ic_mgtq, m);
-
ni = m->m_pkthdr.ph_cookie;
#if NBPFILTER > 0
if (ic->ic_rawbpf != NULL)
diff --git a/sys/dev/usb/if_urtw.c b/sys/dev/usb/if_urtw.c
index 064acb822ac..22f4254bb20 100644
--- a/sys/dev/usb/if_urtw.c
+++ b/sys/dev/usb/if_urtw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_urtw.c,v 1.55 2015/10/25 12:11:56 mpi Exp $ */
+/* $OpenBSD: if_urtw.c,v 1.56 2015/11/04 12:12:00 dlg Exp $ */
/*-
* Copyright (c) 2009 Martynas Venckus <martynas@openbsd.org>
@@ -2429,15 +2429,15 @@ urtw_start(struct ifnet *ifp)
return;
for (;;) {
- IF_POLL(&ic->ic_mgtq, m0);
+ m0 = mq_dequeue(&ic->ic_mgtq);
if (m0 != NULL) {
if (sc->sc_tx_low_queued >= URTW_TX_DATA_LIST_COUNT ||
sc->sc_tx_normal_queued >=
URTW_TX_DATA_LIST_COUNT) {
+ mq_requeue(&ic->ic_mgtq, m0);
ifp->if_flags |= IFF_OACTIVE;
break;
}
- IF_DEQUEUE(&ic->ic_mgtq, m0);
ni = m0->m_pkthdr.ph_cookie;
#if NBPFILTER > 0
if (ic->ic_rawbpf != NULL)
diff --git a/sys/dev/usb/if_urtwn.c b/sys/dev/usb/if_urtwn.c
index 6e28ee96b5e..3ae8885bcd6 100644
--- a/sys/dev/usb/if_urtwn.c
+++ b/sys/dev/usb/if_urtwn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_urtwn.c,v 1.53 2015/10/25 12:11:56 mpi Exp $ */
+/* $OpenBSD: if_urtwn.c,v 1.54 2015/11/04 12:12:00 dlg Exp $ */
/*-
* Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -2142,7 +2142,7 @@ urtwn_start(struct ifnet *ifp)
break;
}
/* Send pending management frames first. */
- IF_DEQUEUE(&ic->ic_mgtq, m);
+ m = mq_dequeue(&ic->ic_mgtq);
if (m != NULL) {
ni = m->m_pkthdr.ph_cookie;
goto sendit;
diff --git a/sys/dev/usb/if_zyd.c b/sys/dev/usb/if_zyd.c
index 9f3eb309ae3..08547d7e358 100644
--- a/sys/dev/usb/if_zyd.c
+++ b/sys/dev/usb/if_zyd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_zyd.c,v 1.109 2015/10/25 12:11:56 mpi Exp $ */
+/* $OpenBSD: if_zyd.c,v 1.110 2015/11/04 12:12:00 dlg Exp $ */
/*-
* Copyright (c) 2006 by Damien Bergamini <damien.bergamini@free.fr>
@@ -2242,7 +2242,7 @@ zyd_start(struct ifnet *ifp)
break;
}
/* send pending management frames first */
- IF_DEQUEUE(&ic->ic_mgtq, m);
+ m = mq_dequeue(&ic->ic_mgtq);
if (m != NULL) {
ni = m->m_pkthdr.ph_cookie;
goto sendit;