Module Name: src Committed By: thorpej Date: Sat Aug 20 19:11:08 UTC 2022
Modified Files: src/sys/dev/usb: if_ural.c Log Message: 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!) To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/sys/dev/usb/if_ural.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/dev/usb/if_ural.c diff -u src/sys/dev/usb/if_ural.c:1.65 src/sys/dev/usb/if_ural.c:1.66 --- src/sys/dev/usb/if_ural.c:1.65 Sun Mar 15 23:04:51 2020 +++ src/sys/dev/usb/if_ural.c Sat Aug 20 19:11:08 2022 @@ -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))))