summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorthorpej <thorpej@NetBSD.org>2022-08-20 19:11:08 +0000
committerthorpej <thorpej@NetBSD.org>2022-08-20 19:11:08 +0000
commit0383ec00c64b8819f29a79972d230e8dbdff147a (patch)
tree6b8726c35b54b4924acbaeb172d08d2ff2cd18b3 /sys/dev/usb
parented885e4647c58ce820b5aa5489c33e425d804c19 (diff)
ural_start(): Replace "IFQ_DEQUEUE() -> IF_PREPEND() on failure" with
"IFQ_POLL() -> IFQ_DEQUEUE() on success". (This one was an even worse anti-pattern than the others!)
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/if_ural.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/usb/if_ural.c b/sys/dev/usb/if_ural.c
index 1e8b429b48f..5828e9bce2d 100644
--- a/sys/dev/usb/if_ural.c
+++ b/sys/dev/usb/if_ural.c
@@ -1,4 +1,4 @@
-/* $NetBSD: if_ural.c,v 1.65 2020/03/15 23:04:51 thorpej Exp $ */
+/* $NetBSD: if_ural.c,v 1.66 2022/08/20 19:11:08 thorpej Exp $ */
/* $FreeBSD: /repoman/r/ncvs/src/sys/dev/usb/if_ural.c,v 1.40 2006/06/02 23:14:40 sam Exp $ */
/*-
@@ -24,7 +24,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ural.c,v 1.65 2020/03/15 23:04:51 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ural.c,v 1.66 2022/08/20 19:11:08 thorpej Exp $");
#ifdef _KERNEL_OPT
#include "opt_usb.h"
@@ -1376,14 +1376,14 @@ ural_start(struct ifnet *ifp)
} else {
if (ic->ic_state != IEEE80211_S_RUN)
break;
- IFQ_DEQUEUE(&ifp->if_snd, m0);
+ IFQ_POLL(&ifp->if_snd, m0);
if (m0 == NULL)
break;
if (sc->tx_queued >= RAL_TX_LIST_COUNT) {
- IF_PREPEND(&ifp->if_snd, m0);
ifp->if_flags |= IFF_OACTIVE;
break;
}
+ IFQ_DEQUEUE(&ifp->if_snd, m0);
if (m0->m_len < sizeof(struct ether_header) &&
!(m0 = m_pullup(m0, sizeof(struct ether_header))))