Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci ipw_start(): Replace "IF_DEQUEUE() -> IF_PREPEND...



details:   https://anonhg.NetBSD.org/src/rev/cc8d3cea6dae
branches:  trunk
changeset: 369596:cc8d3cea6dae
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Mon Aug 22 18:08:05 2022 +0000

description:
ipw_start(): Replace "IF_DEQUEUE() -> IF_PREPEND() on failure" with
"IF_POLL() -> IF_DEQUEUE() on success".

diffstat:

 sys/dev/pci/if_ipw.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 0a1821d003ba -r cc8d3cea6dae sys/dev/pci/if_ipw.c
--- a/sys/dev/pci/if_ipw.c      Mon Aug 22 17:33:11 2022 +0000
+++ b/sys/dev/pci/if_ipw.c      Mon Aug 22 18:08:05 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ipw.c,v 1.75 2022/08/22 17:07:40 thorpej Exp $      */
+/*     $NetBSD: if_ipw.c,v 1.76 2022/08/22 18:08:05 thorpej Exp $      */
 /*     FreeBSD: src/sys/dev/ipw/if_ipw.c,v 1.15 2005/11/13 17:17:40 damien Exp         */
 
 /*-
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_ipw.c,v 1.75 2022/08/22 17:07:40 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ipw.c,v 1.76 2022/08/22 18:08:05 thorpej Exp $");
 
 /*-
  * Intel(R) PRO/Wireless 2100 MiniPCI driver
@@ -1520,15 +1520,15 @@
                return;
 
        for (;;) {
-               IF_DEQUEUE(&ifp->if_snd, m0);
+               IF_POLL(&ifp->if_snd, m0);
                if (m0 == NULL)
                        break;
 
                if (sc->txfree < 1 + IPW_MAX_NSEG) {
-                       IF_PREPEND(&ifp->if_snd, m0);
                        ifp->if_flags |= IFF_OACTIVE;
                        break;
                }
+               IF_DEQUEUE(&ifp->if_snd, m0);
 
                KASSERT(m0->m_len >= sizeof(struct ether_header));
 



Home | Main Index | Thread Index | Old Index