ALTQ'ify.
This commit is contained in:
parent
b983552f77
commit
6b16911a43
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: am7990.c,v 1.60 2000/09/28 10:10:14 tsutsui Exp $ */
|
||||
/* $NetBSD: am7990.c,v 1.61 2000/12/14 06:27:23 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
|
||||
@ -517,7 +517,7 @@ am7990_start(ifp)
|
||||
sc->sc_no_td, sc->sc_last_td);
|
||||
}
|
||||
|
||||
IF_DEQUEUE(&ifp->if_snd, m);
|
||||
IFQ_DEQUEUE(&ifp->if_snd, m);
|
||||
if (m == 0)
|
||||
break;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: am79900.c,v 1.7 2000/09/28 10:10:14 tsutsui Exp $ */
|
||||
/* $NetBSD: am79900.c,v 1.8 2000/12/14 06:27:24 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998
|
||||
@ -467,7 +467,7 @@ am79900_start(ifp)
|
||||
sc->sc_no_td, sc->sc_last_td);
|
||||
}
|
||||
|
||||
IF_DEQUEUE(&ifp->if_snd, m);
|
||||
IFQ_DEQUEUE(&ifp->if_snd, m);
|
||||
if (m == 0)
|
||||
break;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: an.c,v 1.7 2000/12/14 04:11:26 onoe Exp $ */
|
||||
/* $NetBSD: an.c,v 1.8 2000/12/14 06:27:24 thorpej Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1997, 1998, 1999
|
||||
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
|
||||
@ -270,6 +270,7 @@ int an_attach(sc)
|
||||
ifp->if_init = an_init;
|
||||
ifp->if_stop = an_stop;
|
||||
ifp->if_watchdog = an_watchdog;
|
||||
IFQ_SET_READY(&ifp->if_snd);
|
||||
|
||||
memcpy(ifp->if_xname, sc->an_dev.dv_xname, IFNAMSIZ);
|
||||
|
||||
@ -591,7 +592,7 @@ int an_intr(xsc)
|
||||
/* Re-enable interrupts. */
|
||||
CSR_WRITE_2(sc, AN_INT_EN, AN_INTRS);
|
||||
|
||||
if (ifp->if_snd.ifq_head != NULL)
|
||||
if (IFQ_IS_EMPTY(&ifp->if_snd) == 0)
|
||||
an_start(ifp);
|
||||
|
||||
return 1;
|
||||
@ -1365,7 +1366,7 @@ static void an_start(ifp)
|
||||
bzero((char *)&tx_frame_802_3, sizeof(tx_frame_802_3));
|
||||
|
||||
while(sc->an_rdata.an_tx_ring[idx] == 0) {
|
||||
IF_DEQUEUE(&ifp->if_snd, m0);
|
||||
IFQ_DEQUEUE(&ifp->if_snd, m0);
|
||||
if (m0 == NULL)
|
||||
break;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: awi.c,v 1.28 2000/11/26 11:08:57 takemura Exp $ */
|
||||
/* $NetBSD: awi.c,v 1.29 2000/12/14 06:27:24 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@ -310,6 +310,7 @@ awi_attach(sc)
|
||||
memcpy(sc->sc_ec.ac_enaddr, sc->sc_mib_addr.aMAC_Address,
|
||||
ETHER_ADDR_LEN);
|
||||
#endif
|
||||
IFQ_SET_READY(&ifp->if_snd);
|
||||
|
||||
printf("%s: IEEE802.11 %s %dMbps (firmware %s)\n",
|
||||
sc->sc_dev.dv_xname,
|
||||
@ -858,7 +859,6 @@ awi_stop(sc)
|
||||
{
|
||||
struct ifnet *ifp = sc->sc_ifp;
|
||||
struct awi_bss *bp;
|
||||
struct mbuf *m;
|
||||
|
||||
sc->sc_status = AWI_ST_INIT;
|
||||
if (!sc->sc_invalid) {
|
||||
@ -871,18 +871,8 @@ awi_stop(sc)
|
||||
ifp->if_flags &= ~(IFF_RUNNING|IFF_OACTIVE);
|
||||
ifp->if_timer = 0;
|
||||
sc->sc_tx_timer = sc->sc_rx_timer = sc->sc_mgt_timer = 0;
|
||||
for (;;) {
|
||||
IF_DEQUEUE(&sc->sc_mgtq, m);
|
||||
if (m == NULL)
|
||||
break;
|
||||
m_freem(m);
|
||||
}
|
||||
for (;;) {
|
||||
IF_DEQUEUE(&ifp->if_snd, m);
|
||||
if (m == NULL)
|
||||
break;
|
||||
m_freem(m);
|
||||
}
|
||||
IF_PURGE(&sc->sc_mgtq);
|
||||
IFQ_PURGE(&ifp->if_snd);
|
||||
while ((bp = TAILQ_FIRST(&sc->sc_scan)) != NULL) {
|
||||
TAILQ_REMOVE(&sc->sc_scan, bp, list);
|
||||
free(bp, M_DEVBUF);
|
||||
@ -951,17 +941,17 @@ awi_start(ifp)
|
||||
|
||||
for (;;) {
|
||||
txd = sc->sc_txnext;
|
||||
IF_DEQUEUE(&sc->sc_mgtq, m0);
|
||||
IF_POLL(&sc->sc_mgtq, m0);
|
||||
if (m0 != NULL) {
|
||||
if (awi_next_txd(sc, m0->m_pkthdr.len, &frame, &ntxd)) {
|
||||
IF_PREPEND(&sc->sc_mgtq, m0);
|
||||
ifp->if_flags |= IFF_OACTIVE;
|
||||
break;
|
||||
}
|
||||
IF_DEQUEUE(&sc->sc_mgtq, m0);
|
||||
} else {
|
||||
if (!(ifp->if_flags & IFF_RUNNING))
|
||||
break;
|
||||
IF_DEQUEUE(&ifp->if_snd, m0);
|
||||
IFQ_POLL(&ifp->if_snd, m0);
|
||||
if (m0 == NULL)
|
||||
break;
|
||||
len = m0->m_pkthdr.len + sizeof(struct ieee80211_frame);
|
||||
@ -976,6 +966,7 @@ awi_start(ifp)
|
||||
ifp->if_flags |= IFF_OACTIVE;
|
||||
break;
|
||||
}
|
||||
IFQ_DEQUEUE(&ifp->if_snd, m0);
|
||||
AWI_BPF_MTAP(sc, m0, AWI_BPF_NORM);
|
||||
m0 = awi_fix_txhdr(sc, m0);
|
||||
if (sc->sc_wep_algo != NULL && m0 != NULL)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: dp8390.c,v 1.40 2000/11/15 01:02:16 thorpej Exp $ */
|
||||
/* $NetBSD: dp8390.c,v 1.41 2000/12/14 06:27:24 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Device driver for National Semiconductor DS8390/WD83C690 based ethernet
|
||||
@ -132,6 +132,7 @@ dp8390_config(sc, media, nmedia, defmedia)
|
||||
ifp->if_watchdog = dp8390_watchdog;
|
||||
ifp->if_flags =
|
||||
IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS | IFF_MULTICAST;
|
||||
IFQ_SET_READY(&ifp->if_snd);
|
||||
|
||||
/* Initialize media goo. */
|
||||
ifmedia_init(&sc->sc_media, 0, dp8390_mediachange, dp8390_mediastatus);
|
||||
@ -478,7 +479,7 @@ outloop:
|
||||
ifp->if_flags |= IFF_OACTIVE;
|
||||
return;
|
||||
}
|
||||
IF_DEQUEUE(&ifp->if_snd, m0);
|
||||
IFQ_DEQUEUE(&ifp->if_snd, m0);
|
||||
if (m0 == 0)
|
||||
return;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: elink3.c,v 1.85 2000/11/15 01:02:16 thorpej Exp $ */
|
||||
/* $NetBSD: elink3.c,v 1.86 2000/12/14 06:27:24 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -432,6 +432,7 @@ epconfig(sc, chipset, enaddr)
|
||||
ifp->if_watchdog = epwatchdog;
|
||||
ifp->if_flags =
|
||||
IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS | IFF_MULTICAST;
|
||||
IFQ_SET_READY(&ifp->if_snd);
|
||||
|
||||
if_attach(ifp);
|
||||
ether_ifattach(ifp, enaddr);
|
||||
@ -1136,7 +1137,7 @@ epstart(ifp)
|
||||
|
||||
startagain:
|
||||
/* Sneak a peek at the next packet */
|
||||
m0 = ifp->if_snd.ifq_head;
|
||||
IFQ_POLL(&ifp->if_snd, m0);
|
||||
if (m0 == 0)
|
||||
return;
|
||||
|
||||
@ -1155,7 +1156,7 @@ startagain:
|
||||
if (len + pad > ETHER_MAX_LEN) {
|
||||
/* packet is obviously too large: toss it */
|
||||
++ifp->if_oerrors;
|
||||
IF_DEQUEUE(&ifp->if_snd, m0);
|
||||
IFQ_DEQUEUE(&ifp->if_snd, m0);
|
||||
m_freem(m0);
|
||||
goto readcheck;
|
||||
}
|
||||
@ -1173,7 +1174,7 @@ startagain:
|
||||
SET_TX_AVAIL_THRESH | ELINK_THRESH_DISABLE);
|
||||
}
|
||||
|
||||
IF_DEQUEUE(&ifp->if_snd, m0);
|
||||
IFQ_DEQUEUE(&ifp->if_snd, m0);
|
||||
if (m0 == 0) /* not really needed */
|
||||
return;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: elinkxl.c,v 1.45 2000/11/15 01:02:16 thorpej Exp $ */
|
||||
/* $NetBSD: elinkxl.c,v 1.46 2000/12/14 06:27:25 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -435,6 +435,7 @@ ex_config(sc)
|
||||
ifp->if_stop = ex_stop;
|
||||
ifp->if_flags =
|
||||
IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS | IFF_MULTICAST;
|
||||
IFQ_SET_READY(&ifp->if_snd);
|
||||
|
||||
/*
|
||||
* We can support 802.1Q VLAN-sized frames.
|
||||
@ -920,8 +921,9 @@ ex_start(ifp)
|
||||
volatile struct ex_fraghdr *fr = NULL;
|
||||
volatile struct ex_dpd *dpd = NULL, *prevdpd = NULL;
|
||||
struct ex_txdesc *txp;
|
||||
struct mbuf *mb_head;
|
||||
bus_dmamap_t dmamap;
|
||||
int offset, totlen;
|
||||
int offset, totlen, segment, error;
|
||||
|
||||
if (sc->tx_head || sc->tx_free == NULL)
|
||||
return;
|
||||
@ -932,14 +934,13 @@ ex_start(ifp)
|
||||
* We're finished if there is nothing more to add to the list or if
|
||||
* we're all filled up with buffers to transmit.
|
||||
*/
|
||||
while (ifp->if_snd.ifq_head != NULL && sc->tx_free != NULL) {
|
||||
struct mbuf *mb_head;
|
||||
int segment, error;
|
||||
|
||||
while (sc->tx_free != NULL) {
|
||||
/*
|
||||
* Grab a packet to transmit.
|
||||
*/
|
||||
IF_DEQUEUE(&ifp->if_snd, mb_head);
|
||||
IFQ_DEQUEUE(&ifp->if_snd, mb_head);
|
||||
if (mb_head == NULL)
|
||||
break;
|
||||
|
||||
/*
|
||||
* Get pointer to next available tx desc.
|
||||
@ -1252,7 +1253,7 @@ ex_intr(arg)
|
||||
}
|
||||
|
||||
/* no more interrupts */
|
||||
if (ret && ifp->if_snd.ifq_head)
|
||||
if (ret && IFQ_IS_EMPTY(&ifp->if_snd) == 0)
|
||||
ex_start(ifp);
|
||||
return ret;
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: hme.c,v 1.19 2000/11/17 19:08:00 bouyer Exp $ */
|
||||
/* $NetBSD: hme.c,v 1.20 2000/12/14 06:27:25 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1999 The NetBSD Foundation, Inc.
|
||||
@ -250,6 +250,7 @@ hme_config(sc)
|
||||
ifp->if_watchdog = hme_watchdog;
|
||||
ifp->if_flags =
|
||||
IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS | IFF_MULTICAST;
|
||||
IFQ_SET_READY(&ifp->if_snd);
|
||||
|
||||
/* Initialize ifmedia structures and MII info */
|
||||
mii->mii_ifp = ifp;
|
||||
@ -809,7 +810,7 @@ hme_start(ifp)
|
||||
ri = sc->sc_rb.rb_tdhead;
|
||||
|
||||
for (;;) {
|
||||
IF_DEQUEUE(&ifp->if_snd, m);
|
||||
IFQ_DEQUEUE(&ifp->if_snd, m);
|
||||
if (m == 0)
|
||||
break;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: i82557.c,v 1.42 2000/11/26 11:08:58 takemura Exp $ */
|
||||
/* $NetBSD: i82557.c,v 1.43 2000/12/14 06:27:25 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc.
|
||||
@ -334,6 +334,7 @@ fxp_attach(sc)
|
||||
ifp->if_watchdog = fxp_watchdog;
|
||||
ifp->if_init = fxp_init;
|
||||
ifp->if_stop = fxp_stop;
|
||||
IFQ_SET_READY(&ifp->if_snd);
|
||||
|
||||
/*
|
||||
* We can support 802.1Q VLAN-sized frames.
|
||||
@ -730,7 +731,7 @@ fxp_start(ifp)
|
||||
/*
|
||||
* Grab a packet off the queue.
|
||||
*/
|
||||
IF_DEQUEUE(&ifp->if_snd, m0);
|
||||
IFQ_POLL(&ifp->if_snd, m0);
|
||||
if (m0 == NULL)
|
||||
break;
|
||||
|
||||
@ -755,7 +756,6 @@ fxp_start(ifp)
|
||||
if (m == NULL) {
|
||||
printf("%s: unable to allocate Tx mbuf\n",
|
||||
sc->sc_dev.dv_xname);
|
||||
IF_PREPEND(&ifp->if_snd, m0);
|
||||
break;
|
||||
}
|
||||
if (m0->m_pkthdr.len > MHLEN) {
|
||||
@ -764,7 +764,6 @@ fxp_start(ifp)
|
||||
printf("%s: unable to allocate Tx "
|
||||
"cluster\n", sc->sc_dev.dv_xname);
|
||||
m_freem(m);
|
||||
IF_PREPEND(&ifp->if_snd, m0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -777,11 +776,12 @@ fxp_start(ifp)
|
||||
if (error) {
|
||||
printf("%s: unable to load Tx buffer, "
|
||||
"error = %d\n", sc->sc_dev.dv_xname, error);
|
||||
IF_PREPEND(&ifp->if_snd, m0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
IFQ_DEQUEUE(&ifp->if_snd, m0);
|
||||
|
||||
/* Initialize the fraglist. */
|
||||
for (seg = 0; seg < dmamap->dm_nsegs; seg++) {
|
||||
tbd->tbd_d[seg].tb_addr =
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: i82586.c,v 1.32 2000/11/15 01:02:16 thorpej Exp $ */
|
||||
/* $NetBSD: i82586.c,v 1.33 2000/12/14 06:27:25 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -147,7 +147,7 @@ Mode of operation:
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: i82586.c,v 1.32 2000/11/15 01:02:16 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: i82586.c,v 1.33 2000/12/14 06:27:25 thorpej Exp $");
|
||||
|
||||
#include <sys/systm.h>
|
||||
#include <sys/mbuf.h>
|
||||
@ -261,6 +261,7 @@ i82586_attach(sc, name, etheraddr, media, nmedia, defmedia)
|
||||
ifp->if_watchdog = i82586_watchdog;
|
||||
ifp->if_flags =
|
||||
IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS | IFF_MULTICAST;
|
||||
IFQ_SET_READY(&ifp->if_snd);
|
||||
|
||||
/* Initialize media goo. */
|
||||
ifmedia_init(&sc->sc_media, 0, i82586_mediachange, i82586_mediastatus);
|
||||
@ -1183,7 +1184,7 @@ i82586_start(ifp)
|
||||
head = sc->xchead;
|
||||
xbase = sc->xbds;
|
||||
|
||||
IF_DEQUEUE(&ifp->if_snd, m0);
|
||||
IFQ_DEQUEUE(&ifp->if_snd, m0);
|
||||
if (m0 == 0)
|
||||
break;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lance.c,v 1.16 2000/11/15 01:02:16 thorpej Exp $ */
|
||||
/* $NetBSD: lance.c,v 1.17 2000/12/14 06:27:25 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
|
||||
@ -226,6 +226,7 @@ lance_config(sc)
|
||||
#ifdef LANCE_REVC_BUG
|
||||
ifp->if_flags &= ~IFF_MULTICAST;
|
||||
#endif
|
||||
IFQ_SET_READY(&ifp->if_snd);
|
||||
|
||||
/* Initialize ifmedia structures. */
|
||||
ifmedia_init(&sc->sc_media, 0, lance_mediachange, lance_mediastatus);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: lemac.c,v 1.17 2000/11/15 01:02:17 thorpej Exp $ */
|
||||
/* $NetBSD: lemac.c,v 1.18 2000/12/14 06:27:25 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994, 1995, 1997 Matt Thomas <matt@3am-software.com>
|
||||
@ -628,18 +628,21 @@ lemac_ifstart(
|
||||
struct ifnet *ifp)
|
||||
{
|
||||
lemac_softc_t * const sc = LEMAC_IFP_TO_SOFTC(ifp);
|
||||
struct ifqueue * const ifq = &ifp->if_snd;
|
||||
|
||||
if ((ifp->if_flags & IFF_RUNNING) == 0)
|
||||
return;
|
||||
|
||||
LEMAC_INTR_DISABLE(sc);
|
||||
|
||||
while (ifq->ifq_head != NULL) {
|
||||
for (;;) {
|
||||
struct mbuf *m;
|
||||
struct mbuf *m0;
|
||||
int tx_pg;
|
||||
|
||||
IFQ_POLL(&ifp->if_snd, m);
|
||||
if (m == NULL)
|
||||
break;
|
||||
|
||||
if ((sc->sc_csr.csr_tqc = LEMAC_INB(sc, LEMAC_REG_TQC)) >= lemac_txmax) {
|
||||
sc->sc_cntrs.cntr_txfull++;
|
||||
ifp->if_flags |= IFF_OACTIVE;
|
||||
@ -659,7 +662,7 @@ lemac_ifstart(
|
||||
break;
|
||||
}
|
||||
|
||||
IF_DEQUEUE(ifq, m);
|
||||
IFQ_DEQUEUE(&ifp->if_snd, m);
|
||||
|
||||
/*
|
||||
* The first four bytes of each transmit buffer are for
|
||||
@ -1034,6 +1037,8 @@ lemac_ifattach(
|
||||
if (sc->sc_flags & LEMAC_ALIVE) {
|
||||
int media;
|
||||
|
||||
IFQ_SET_READY(&ifp->if_snd);
|
||||
|
||||
if_attach(ifp);
|
||||
ether_ifattach(ifp, sc->sc_enaddr);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: mb86960.c,v 1.43 2000/11/15 01:02:17 thorpej Exp $ */
|
||||
/* $NetBSD: mb86960.c,v 1.44 2000/12/14 06:27:25 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* All Rights Reserved, Copyright (C) Fujitsu Limited 1995
|
||||
@ -210,6 +210,7 @@ mb86960_config(sc, media, nmedia, defmedia)
|
||||
ifp->if_watchdog = mb86960_watchdog;
|
||||
ifp->if_flags =
|
||||
IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS | IFF_MULTICAST;
|
||||
IFQ_SET_READY(&ifp->if_snd);
|
||||
|
||||
#if FE_DEBUG >= 3
|
||||
log(LOG_INFO, "%s: mb86960_config()\n", sc->sc_dev.dv_xname);
|
||||
@ -767,7 +768,7 @@ mb86960_start(ifp)
|
||||
/*
|
||||
* Get the next mbuf chain for a packet to send.
|
||||
*/
|
||||
IF_DEQUEUE(&ifp->if_snd, m);
|
||||
IFQ_DEQUEUE(&ifp->if_snd, m);
|
||||
if (m == 0) {
|
||||
/* No more packets to send. */
|
||||
goto indicate_inactive;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: pdq_ifsubr.c,v 1.29 2000/12/12 18:00:23 thorpej Exp $ */
|
||||
/* $NetBSD: pdq_ifsubr.c,v 1.30 2000/12/14 06:27:25 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1996 Matt Thomas <matt@3am-software.com>
|
||||
@ -162,7 +162,7 @@ pdq_ifwatchdog(
|
||||
ifp->if_timer = 0;
|
||||
for (;;) {
|
||||
struct mbuf *m;
|
||||
IF_DEQUEUE(&ifp->if_snd, m);
|
||||
IFQ_DEQUEUE(&ifp->if_snd, m);
|
||||
if (m == NULL)
|
||||
return;
|
||||
PDQ_OS_DATABUF_FREE(PDQ_OS_IFP_TO_SOFTC(ifp)->sc_pdq, m);
|
||||
@ -174,7 +174,6 @@ pdq_ifstart(
|
||||
struct ifnet *ifp)
|
||||
{
|
||||
pdq_softc_t * const sc = PDQ_OS_IFP_TO_SOFTC(ifp);
|
||||
struct ifqueue *ifq = &ifp->if_snd;
|
||||
struct mbuf *m;
|
||||
int tx = 0;
|
||||
|
||||
@ -189,7 +188,7 @@ pdq_ifstart(
|
||||
return;
|
||||
}
|
||||
for (;; tx = 1) {
|
||||
IF_DEQUEUE(ifq, m);
|
||||
IFQ_POLL(&ifp->if_snd, m);
|
||||
if (m == NULL)
|
||||
break;
|
||||
#if defined(PDQ_BUS_DMA) && !defined(PDQ_BUS_DMA_NOTX)
|
||||
@ -222,11 +221,10 @@ pdq_ifstart(
|
||||
|
||||
if (pdq_queue_transmit_data(sc->sc_pdq, m) == PDQ_FALSE)
|
||||
break;
|
||||
IFQ_DEQUEUE(&ifp->if_snd, m);
|
||||
}
|
||||
if (m != NULL) {
|
||||
if (m != NULL)
|
||||
ifp->if_flags |= IFF_OACTIVE;
|
||||
IF_PREPEND(ifq, m);
|
||||
}
|
||||
if (tx)
|
||||
PDQ_DO_TYPE2_PRODUCER(sc->sc_pdq);
|
||||
}
|
||||
@ -281,7 +279,7 @@ pdq_os_restart_transmitter(
|
||||
{
|
||||
pdq_softc_t *sc = pdq->pdq_os_ctx;
|
||||
sc->sc_if.if_flags &= ~IFF_OACTIVE;
|
||||
if (sc->sc_if.if_snd.ifq_head != NULL) {
|
||||
if (IFQ_IS_EMPTY(&sc->sc_if.if_snd) == 0) {
|
||||
sc->sc_if.if_timer = PDQ_OS_TX_TIMEOUT;
|
||||
pdq_ifstart(&sc->sc_if);
|
||||
} else {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rrunner.c,v 1.20 2000/12/12 18:00:24 thorpej Exp $ */
|
||||
/* $NetBSD: rrunner.c,v 1.21 2000/12/14 06:27:25 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
|
||||
@ -413,6 +413,7 @@ eshconfig(sc)
|
||||
ifp->if_ioctl = eshioctl;
|
||||
ifp->if_watchdog = eshwatchdog;
|
||||
ifp->if_flags = IFF_SIMPLEX | IFF_NOTRAILERS | IFF_NOARP;
|
||||
IFQ_SET_READY(&ifp->if_snd);
|
||||
|
||||
if_attach(ifp);
|
||||
hippi_ifattach(ifp, sc->sc_ula);
|
||||
@ -2003,7 +2004,7 @@ eshstart(ifp)
|
||||
while ((sc->sc_flags & ESH_FL_SNAP_RING_UP) != 0 &&
|
||||
(m = send->ec_cur_mbuf) == NULL && send->ec_cur_buf == NULL &&
|
||||
send->ec_cur_dmainfo == NULL) {
|
||||
IF_DEQUEUE(&ifp->if_snd, m);
|
||||
IFQ_DEQUEUE(&ifp->if_snd, m);
|
||||
if (m == 0) /* not really needed */
|
||||
break;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: rtl81x9.c,v 1.24 2000/12/09 02:02:20 tsutsui Exp $ */
|
||||
/* $NetBSD: rtl81x9.c,v 1.25 2000/12/14 06:27:26 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997, 1998
|
||||
@ -717,6 +717,7 @@ rtk_attach(sc)
|
||||
ifp->if_watchdog = rtk_watchdog;
|
||||
ifp->if_init = rtk_init;
|
||||
ifp->if_stop = rtk_stop;
|
||||
IFQ_SET_READY(&ifp->if_snd);
|
||||
|
||||
/*
|
||||
* Do ifmedia setup.
|
||||
@ -1231,9 +1232,8 @@ int rtk_intr(arg)
|
||||
/* Re-enable interrupts. */
|
||||
CSR_WRITE_2(sc, RTK_IMR, RTK_INTRS);
|
||||
|
||||
if (ifp->if_snd.ifq_head != NULL) {
|
||||
if (IFQ_IS_EMPTY(&ifp->if_snd) == 0)
|
||||
rtk_start(ifp);
|
||||
}
|
||||
|
||||
return (handled);
|
||||
}
|
||||
@ -1252,7 +1252,7 @@ STATIC void rtk_start(ifp)
|
||||
sc = ifp->if_softc;
|
||||
|
||||
while(RTK_CUR_TXMBUF(sc) == NULL) {
|
||||
IF_DEQUEUE(&ifp->if_snd, m_head);
|
||||
IFQ_POLL(&ifp->if_snd, m_head);
|
||||
if (m_head == NULL)
|
||||
break;
|
||||
|
||||
@ -1270,7 +1270,6 @@ STATIC void rtk_start(ifp)
|
||||
if (m_new == NULL) {
|
||||
printf("%s: unable to allocate Tx mbuf\n",
|
||||
sc->sc_dev.dv_xname);
|
||||
IF_PREPEND(&ifp->if_snd, m_new);
|
||||
break;
|
||||
}
|
||||
if (m_head->m_pkthdr.len > MHLEN) {
|
||||
@ -1279,7 +1278,6 @@ STATIC void rtk_start(ifp)
|
||||
printf("%s: unable to allocate Tx "
|
||||
"cluster\n", sc->sc_dev.dv_xname);
|
||||
m_freem(m_new);
|
||||
IF_PREPEND(&ifp->if_snd, m_head);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1294,10 +1292,10 @@ STATIC void rtk_start(ifp)
|
||||
if (error) {
|
||||
printf("%s: unable to load Tx buffer, "
|
||||
"error = %d\n", sc->sc_dev.dv_xname, error);
|
||||
IF_PREPEND(&ifp->if_snd, m_head);
|
||||
break;
|
||||
}
|
||||
}
|
||||
IFQ_DEQUEUE(&ifp->if_snd, m_head);
|
||||
|
||||
RTK_CUR_TXMBUF(sc) = m_head;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: seeq8005.c,v 1.6 2000/11/15 01:02:17 thorpej Exp $ */
|
||||
/* $NetBSD: seeq8005.c,v 1.7 2000/12/14 06:27:26 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2000 Ben Harris
|
||||
@ -58,7 +58,7 @@
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
||||
__RCSID("$NetBSD: seeq8005.c,v 1.6 2000/11/15 01:02:17 thorpej Exp $");
|
||||
__RCSID("$NetBSD: seeq8005.c,v 1.7 2000/12/14 06:27:26 thorpej Exp $");
|
||||
|
||||
#include <sys/systm.h>
|
||||
#include <sys/endian.h>
|
||||
@ -228,6 +228,7 @@ seeq8005_attach(struct seeq8005_softc *sc, const u_int8_t *myaddr)
|
||||
ifp->if_stop = ea_stop;
|
||||
ifp->if_watchdog = ea_watchdog;
|
||||
ifp->if_flags = IFF_BROADCAST | IFF_MULTICAST | IFF_NOTRAILERS;
|
||||
IFQ_SET_READY(&ifp->if_snd);
|
||||
|
||||
/* Now we can attach the interface. */
|
||||
|
||||
@ -742,7 +743,7 @@ eatxpacket(struct seeq8005_softc *sc)
|
||||
ifp = &sc->sc_ethercom.ec_if;
|
||||
|
||||
/* Dequeue the next packet. */
|
||||
IF_DEQUEUE(&ifp->if_snd, m0);
|
||||
IFQ_DEQUEUE(&ifp->if_snd, m0);
|
||||
|
||||
/* If there's nothing to send, return. */
|
||||
if (!m0) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sgec.c,v 1.10 2000/11/15 01:02:17 thorpej Exp $ */
|
||||
/* $NetBSD: sgec.c,v 1.11 2000/12/14 06:27:26 thorpej Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1999 Ludd, University of Lule}, Sweden. All rights reserved.
|
||||
*
|
||||
@ -206,6 +206,7 @@ sgec_attach(sc)
|
||||
ifp->if_start = zestart;
|
||||
ifp->if_ioctl = zeioctl;
|
||||
ifp->if_watchdog = zetimeout;
|
||||
IFQ_SET_READY(&ifp->if_snd);
|
||||
|
||||
/*
|
||||
* Attach the interface.
|
||||
@ -325,7 +326,7 @@ zestart(ifp)
|
||||
continue;
|
||||
}
|
||||
idx = sc->sc_nexttx;
|
||||
IF_DEQUEUE(&sc->sc_if.if_snd, m);
|
||||
IFQ_POLL(&sc->sc_if.if_snd, m);
|
||||
if (m == 0)
|
||||
goto out;
|
||||
/*
|
||||
@ -340,7 +341,6 @@ zestart(ifp)
|
||||
panic("zestart"); /* XXX */
|
||||
|
||||
if ((i + sc->sc_inq) >= (TXDESCS - 1)) {
|
||||
IF_PREPEND(&sc->sc_if.if_snd, m);
|
||||
ifp->if_flags |= IFF_OACTIVE;
|
||||
goto out;
|
||||
}
|
||||
@ -382,6 +382,7 @@ zestart(ifp)
|
||||
idx = 0;
|
||||
sc->sc_inq++;
|
||||
}
|
||||
IFQ_DEQUEUE(&ifp->if_snd, m);
|
||||
#ifdef DIAGNOSTIC
|
||||
if (totlen != m->m_pkthdr.len)
|
||||
panic("zestart: len fault");
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: smc83c170.c,v 1.39 2000/11/15 01:02:17 thorpej Exp $ */
|
||||
/* $NetBSD: smc83c170.c,v 1.40 2000/12/14 06:27:26 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
|
||||
@ -257,6 +257,7 @@ epic_attach(sc)
|
||||
ifp->if_watchdog = epic_watchdog;
|
||||
ifp->if_init = epic_init;
|
||||
ifp->if_stop = epic_stop;
|
||||
IFQ_SET_READY(&ifp->if_snd);
|
||||
|
||||
/*
|
||||
* We can support 802.1Q VLAN-sized frames.
|
||||
@ -350,7 +351,7 @@ epic_start(ifp)
|
||||
/*
|
||||
* Grab a packet off the queue.
|
||||
*/
|
||||
IF_DEQUEUE(&ifp->if_snd, m0);
|
||||
IFQ_POLL(&ifp->if_snd, m0);
|
||||
if (m0 == NULL)
|
||||
break;
|
||||
|
||||
@ -375,7 +376,6 @@ epic_start(ifp)
|
||||
if (m == NULL) {
|
||||
printf("%s: unable to allocate Tx mbuf\n",
|
||||
sc->sc_dev.dv_xname);
|
||||
IF_PREPEND(&ifp->if_snd, m0);
|
||||
break;
|
||||
}
|
||||
if (m0->m_pkthdr.len > MHLEN) {
|
||||
@ -384,7 +384,6 @@ epic_start(ifp)
|
||||
printf("%s: unable to allocate Tx "
|
||||
"cluster\n", sc->sc_dev.dv_xname);
|
||||
m_freem(m);
|
||||
IF_PREPEND(&ifp->if_snd, m0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -397,10 +396,10 @@ epic_start(ifp)
|
||||
if (error) {
|
||||
printf("%s: unable to load Tx buffer, "
|
||||
"error = %d\n", sc->sc_dev.dv_xname, error);
|
||||
IF_PREPEND(&ifp->if_snd, m0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
IFQ_DEQUEUE(&ifp->if_snd, m0);
|
||||
|
||||
/* Initialize the fraglist. */
|
||||
fr->ef_nfrags = dmamap->dm_nsegs;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: smc90cx6.c,v 1.36 2000/12/12 18:00:24 thorpej Exp $ */
|
||||
/* $NetBSD: smc90cx6.c,v 1.37 2000/12/14 06:27:26 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1994, 1995, 1998 The NetBSD Foundation, Inc.
|
||||
@ -203,6 +203,7 @@ bah_attach_subr(sc)
|
||||
ifp->if_ioctl = bah_ioctl;
|
||||
ifp->if_timer = 0;
|
||||
ifp->if_watchdog = bah_watchdog;
|
||||
IFQ_SET_READY(&ifp->if_snd);
|
||||
|
||||
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS;
|
||||
|
||||
@ -384,7 +385,7 @@ bah_start(ifp)
|
||||
return;
|
||||
}
|
||||
|
||||
IF_DEQUEUE(&ifp->if_snd, m);
|
||||
IFQ_DEQUEUE(&ifp->if_snd, m);
|
||||
buffer = sc->sc_tx_act ^ 1;
|
||||
|
||||
splx(s);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: smc91cxx.c,v 1.31 2000/11/15 01:02:17 thorpej Exp $ */
|
||||
/* $NetBSD: smc91cxx.c,v 1.32 2000/12/14 06:27:26 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 The NetBSD Foundation, Inc.
|
||||
@ -283,6 +283,7 @@ smc91cxx_attach(sc, myea)
|
||||
ifp->if_watchdog = smc91cxx_watchdog;
|
||||
ifp->if_flags =
|
||||
IFF_BROADCAST | IFF_SIMPLEX | IFF_NOTRAILERS | IFF_MULTICAST;
|
||||
IFQ_SET_READY(&ifp->if_snd);
|
||||
|
||||
/* Attach the interface. */
|
||||
if_attach(ifp);
|
||||
@ -580,7 +581,8 @@ smc91cxx_start(ifp)
|
||||
/*
|
||||
* Peek at the next packet.
|
||||
*/
|
||||
if ((m = ifp->if_snd.ifq_head) == NULL)
|
||||
IFQ_POLL(&ifp->if_snd, m);
|
||||
if (m == NULL)
|
||||
return;
|
||||
|
||||
/*
|
||||
@ -599,7 +601,7 @@ smc91cxx_start(ifp)
|
||||
if ((len + pad) > (ETHER_MAX_LEN - ETHER_CRC_LEN)) {
|
||||
printf("%s: large packet discarded\n", sc->sc_dev.dv_xname);
|
||||
ifp->if_oerrors++;
|
||||
IF_DEQUEUE(&ifp->if_snd, m);
|
||||
IFQ_DEQUEUE(&ifp->if_snd, m);
|
||||
m_freem(m);
|
||||
goto readcheck;
|
||||
}
|
||||
@ -676,7 +678,7 @@ smc91cxx_start(ifp)
|
||||
* Get the packet from the kernel. This will include the Ethernet
|
||||
* frame header, MAC address, etc.
|
||||
*/
|
||||
IF_DEQUEUE(&ifp->if_snd, m);
|
||||
IFQ_DEQUEUE(&ifp->if_snd, m);
|
||||
|
||||
/*
|
||||
* Push the packet out to the card.
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tropic.c,v 1.15 2000/12/12 18:00:24 thorpej Exp $ */
|
||||
/* $NetBSD: tropic.c,v 1.16 2000/12/14 06:27:26 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Ported to NetBSD by Onno van der Linden
|
||||
@ -349,6 +349,7 @@ tr_attach(sc)
|
||||
ifp->if_start = tr_oldstart;
|
||||
ifp->if_flags = IFF_BROADCAST | IFF_NOTRAILERS;
|
||||
ifp->if_watchdog = tr_watchdog;
|
||||
IFQ_SET_READY(&ifp->if_snd);
|
||||
|
||||
switch (MM_INB(sc, TR_MEDIAS_OFFSET)) {
|
||||
case 0xF:
|
||||
@ -739,7 +740,7 @@ next:
|
||||
return;
|
||||
|
||||
/* if data in queue, copy mbuf chain to fast path buffers */
|
||||
IF_DEQUEUE(&ifp->if_snd, m0);
|
||||
IFQ_DEQUEUE(&ifp->if_snd, m0);
|
||||
|
||||
if (m0 == 0)
|
||||
return;
|
||||
@ -810,8 +811,6 @@ next:
|
||||
}
|
||||
|
||||
|
||||
#define IF_EMPTYQUEUE(queue) ((queue).ifq_head == 0)
|
||||
|
||||
/*
|
||||
* tr_intr - interrupt handler. Find the cause of the interrupt and
|
||||
* service it.
|
||||
@ -1127,7 +1126,7 @@ tr_intr(arg)
|
||||
* XXX should this be done here ?
|
||||
*/
|
||||
/* if data on send queue */
|
||||
if (!IF_EMPTYQUEUE(ifp->if_snd))
|
||||
if (IFQ_IS_EMPTY(&ifp->if_snd) == 0)
|
||||
tr_oldstart(ifp);
|
||||
break;
|
||||
|
||||
@ -1361,7 +1360,7 @@ struct tr_softc *sc;
|
||||
* XXX what's command here ? command = 0x0d (always ?)
|
||||
*/
|
||||
/* if data in queue, copy mbuf chain to DHB */
|
||||
IF_DEQUEUE(&ifp->if_snd, m0);
|
||||
IFQ_DEQUEUE(&ifp->if_snd, m0);
|
||||
if (m0 != 0) {
|
||||
#if NBPFILTER > 0
|
||||
if (ifp->if_bpf)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: tulip.c,v 1.82 2000/11/26 11:08:58 takemura Exp $ */
|
||||
/* $NetBSD: tulip.c,v 1.83 2000/12/14 06:27:26 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
|
||||
@ -503,6 +503,7 @@ tlp_attach(sc, enaddr)
|
||||
ifp->if_watchdog = tlp_watchdog;
|
||||
ifp->if_init = tlp_init;
|
||||
ifp->if_stop = tlp_stop;
|
||||
IFQ_SET_READY(&ifp->if_snd);
|
||||
|
||||
/*
|
||||
* We can support 802.1Q VLAN-sized frames.
|
||||
@ -730,7 +731,7 @@ tlp_start(ifp)
|
||||
/*
|
||||
* Grab a packet off the queue.
|
||||
*/
|
||||
IF_DEQUEUE(&ifp->if_snd, m0);
|
||||
IFQ_POLL(&ifp->if_snd, m0);
|
||||
if (m0 == NULL)
|
||||
break;
|
||||
|
||||
@ -755,7 +756,6 @@ tlp_start(ifp)
|
||||
if (m == NULL) {
|
||||
printf("%s: unable to allocate Tx mbuf\n",
|
||||
sc->sc_dev.dv_xname);
|
||||
IF_PREPEND(&ifp->if_snd, m0);
|
||||
break;
|
||||
}
|
||||
if (m0->m_pkthdr.len > MHLEN) {
|
||||
@ -764,7 +764,6 @@ tlp_start(ifp)
|
||||
printf("%s: unable to allocate Tx "
|
||||
"cluster\n", sc->sc_dev.dv_xname);
|
||||
m_freem(m);
|
||||
IF_PREPEND(&ifp->if_snd, m0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -777,7 +776,6 @@ tlp_start(ifp)
|
||||
if (error) {
|
||||
printf("%s: unable to load Tx buffer, "
|
||||
"error = %d\n", sc->sc_dev.dv_xname, error);
|
||||
IF_PREPEND(&ifp->if_snd, m0);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -799,10 +797,11 @@ tlp_start(ifp)
|
||||
*/
|
||||
ifp->if_flags |= IFF_OACTIVE;
|
||||
bus_dmamap_unload(sc->sc_dmat, dmamap);
|
||||
IF_PREPEND(&ifp->if_snd, m0);
|
||||
break;
|
||||
}
|
||||
|
||||
IFQ_DEQUEUE(&ifp->if_snd, m0);
|
||||
|
||||
/*
|
||||
* WE ARE NOW COMMITTED TO TRANSMITTING THE PACKET.
|
||||
*/
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_cnw.c,v 1.16 2000/11/15 01:02:18 thorpej Exp $ */
|
||||
/* $NetBSD: if_cnw.c,v 1.17 2000/12/14 06:29:37 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
@ -587,6 +587,7 @@ cnw_attach(parent, self, aux)
|
||||
ifp->if_watchdog = cnw_watchdog;
|
||||
ifp->if_flags = IFF_BROADCAST | IFF_MULTICAST | IFF_SIMPLEX |
|
||||
IFF_NOTRAILERS;
|
||||
IFQ_SET_READY(&ifp->if_snd);
|
||||
|
||||
/* Attach the interface */
|
||||
if_attach(ifp);
|
||||
@ -697,7 +698,7 @@ cnw_start(ifp)
|
||||
|
||||
sc->sc_stats.nws_tx++;
|
||||
|
||||
IF_DEQUEUE(&ifp->if_snd, m0);
|
||||
IFQ_DEQUEUE(&ifp->if_snd, m0);
|
||||
if (m0 == 0)
|
||||
break;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_ray.c,v 1.26 2000/12/13 07:35:49 mycroft Exp $ */
|
||||
/* $NetBSD: if_ray.c,v 1.27 2000/12/14 06:29:38 thorpej Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2000 Christian E. Hopps
|
||||
* All rights reserved.
|
||||
@ -635,6 +635,8 @@ ray_attach(parent, self, aux)
|
||||
ifp->if_ioctl = ray_ioctl;
|
||||
ifp->if_mtu = ETHERMTU;
|
||||
ifp->if_flags = IFF_BROADCAST|IFF_SIMPLEX|IFF_MULTICAST;
|
||||
IFQ_SET_READY(&ifp->if_snd);
|
||||
|
||||
if_attach(ifp);
|
||||
ether_ifattach(ifp, ep->e_station_addr);
|
||||
/* need enough space for ieee80211_header + (snap or e2) */
|
||||
@ -1192,16 +1194,15 @@ ray_intr_start(sc)
|
||||
|
||||
ifp = &sc->sc_if;
|
||||
|
||||
RAY_DPRINTF(("%s: start free %d qlen %d qmax %d\n",
|
||||
ifp->if_xname, sc->sc_txfree, ifp->if_snd.ifq_len,
|
||||
ifp->if_snd.ifq_maxlen));
|
||||
RAY_DPRINTF(("%s: start free %d\n",
|
||||
ifp->if_xname, sc->sc_txfree));
|
||||
|
||||
ray_cmd_cancel(sc, SCP_IFSTART);
|
||||
|
||||
if ((ifp->if_flags & IFF_RUNNING) == 0 || !sc->sc_havenet)
|
||||
return;
|
||||
|
||||
if (ifp->if_snd.ifq_len == 0)
|
||||
if (IFQ_IS_EMPTY(&ifp->if_snd))
|
||||
return;
|
||||
|
||||
firsti = i = previ = RAY_CCS_LINK_NULL;
|
||||
@ -1233,7 +1234,7 @@ ray_intr_start(sc)
|
||||
}
|
||||
}
|
||||
|
||||
IF_DEQUEUE(&ifp->if_snd, m0);
|
||||
IFQ_DEQUEUE(&ifp->if_snd, m0);
|
||||
if (!m0) {
|
||||
RAY_DPRINTF(("%s: dry queue.\n", ifp->if_xname));
|
||||
break;
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_wi.c,v 1.44 2000/12/12 04:04:29 thorpej Exp $ */
|
||||
/* $NetBSD: if_wi.c,v 1.45 2000/12/14 06:29:38 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997, 1998, 1999
|
||||
@ -398,6 +398,7 @@ wi_attach(parent, self, aux)
|
||||
ifp->if_init = wi_init;
|
||||
ifp->if_stop = wi_stop;
|
||||
ifp->if_flags = IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST;
|
||||
IFQ_SET_READY(&ifp->if_snd);
|
||||
|
||||
(void)wi_set_ssid(&sc->wi_nodeid, WI_DEFAULT_NODENAME,
|
||||
sizeof(WI_DEFAULT_NODENAME) - 1);
|
||||
@ -730,7 +731,7 @@ int wi_intr(arg)
|
||||
/* Re-enable interrupts. */
|
||||
CSR_WRITE_2(sc, WI_INT_EN, WI_INTRS);
|
||||
|
||||
if (ifp->if_snd.ifq_head != NULL)
|
||||
if (IFQ_IS_EMPTY(&ifp->if_snd) == 0)
|
||||
wi_start(ifp);
|
||||
|
||||
#if NRND > 0
|
||||
@ -1577,7 +1578,7 @@ static void wi_start(ifp)
|
||||
if (ifp->if_flags & IFF_OACTIVE)
|
||||
return;
|
||||
|
||||
IF_DEQUEUE(&ifp->if_snd, m0);
|
||||
IFQ_DEQUEUE(&ifp->if_snd, m0);
|
||||
if (m0 == NULL)
|
||||
return;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: if_xi.c,v 1.6 2000/11/15 01:02:18 thorpej Exp $ */
|
||||
/* $NetBSD: if_xi.c,v 1.7 2000/12/14 06:29:38 thorpej Exp $ */
|
||||
/* OpenBSD: if_xe.c,v 1.9 1999/09/16 11:28:42 niklas Exp */
|
||||
|
||||
/*
|
||||
@ -467,7 +467,7 @@ xi_pcmcia_attach(parent, self, aux)
|
||||
ifp->if_watchdog = xi_watchdog;
|
||||
ifp->if_flags =
|
||||
IFF_BROADCAST | IFF_NOTRAILERS | IFF_SIMPLEX | IFF_MULTICAST;
|
||||
ifp->if_snd.ifq_maxlen = IFQ_MAXLEN;
|
||||
IFQ_SET_READY(&ifp->if_snd);
|
||||
|
||||
/* Reset and initialize the card. */
|
||||
xi_full_reset(sc);
|
||||
@ -785,7 +785,7 @@ xi_intr(arg)
|
||||
}
|
||||
|
||||
/* Try to start more packets transmitting. */
|
||||
if (ifp->if_snd.ifq_head)
|
||||
if (IFQ_IS_EMPTY(&ifp->if_snd) == 0)
|
||||
xi_start(ifp);
|
||||
|
||||
/* Detected excessive collisions? */
|
||||
@ -1182,7 +1182,7 @@ xi_start(ifp)
|
||||
}
|
||||
|
||||
/* Peek at the next packet. */
|
||||
m0 = ifp->if_snd.ifq_head;
|
||||
IFQ_POLL(&ifp->if_snd, m0);
|
||||
if (m0 == 0)
|
||||
return;
|
||||
|
||||
@ -1205,7 +1205,7 @@ xi_start(ifp)
|
||||
return;
|
||||
}
|
||||
|
||||
IF_DEQUEUE(&ifp->if_snd, m0);
|
||||
IFQ_DEQUEUE(&ifp->if_snd, m0);
|
||||
|
||||
#if NBPFILTER > 0
|
||||
if (ifp->if_bpf)
|
||||
|
Loading…
Reference in New Issue
Block a user