From 14a50c4ac0247a8950847156b4fc16cf935c14ca Mon Sep 17 00:00:00 2001 From: mlaier Date: Sun, 1 Aug 2004 23:58:04 +0000 Subject: Second part of ALTQ driver modifications, covering: an(4), ath(4), hme(4), ndis(4), vr(4) and wi(4) Please help testing: http://people.freebsd.org/~mlaier/ALTQ_driver/ Tested by: Vaidas Damosevicius (an, ath, wi) Roman Divacky (vr) Submitted by: yongari (hme) --- sys/dev/an/if_an.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'sys/dev/an/if_an.c') diff --git a/sys/dev/an/if_an.c b/sys/dev/an/if_an.c index fb08f70..c348738 100644 --- a/sys/dev/an/if_an.c +++ b/sys/dev/an/if_an.c @@ -760,7 +760,9 @@ an_attach(sc, unit, flags) ifp->if_watchdog = an_watchdog; ifp->if_init = an_init; ifp->if_baudrate = 10000000; - ifp->if_snd.ifq_maxlen = IFQ_MAXLEN; + IFQ_SET_MAXLEN(&ifp->if_snd, IFQ_MAXLEN); + ifp->if_snd.ifq_drv_maxlen = IFQ_MAXLEN; + IFQ_SET_READY(&ifp->if_snd); bzero(sc->an_config.an_nodename, sizeof(sc->an_config.an_nodename)); bcopy(AN_DEFAULT_NODENAME, sc->an_config.an_nodename, @@ -1254,7 +1256,7 @@ an_intr(xsc) /* Re-enable interrupts. */ CSR_WRITE_2(sc, AN_INT_EN(sc->mpi350), AN_INTRS(sc->mpi350)); - if ((ifp->if_flags & IFF_UP) && (ifp->if_snd.ifq_head != NULL)) + if ((ifp->if_flags & IFF_UP) && !IFQ_DRV_IS_EMPTY(&ifp->if_snd)) an_start(ifp); AN_UNLOCK(sc); @@ -2655,7 +2657,7 @@ an_start(ifp) /* We can't send in monitor mode so toss any attempts. */ if (sc->an_monitor && (ifp->if_flags & IFF_PROMISC)) { for (;;) { - IF_DEQUEUE(&ifp->if_snd, m0); + IFQ_DRV_DEQUEUE(&ifp->if_snd, m0); if (m0 == NULL) break; m_freem(m0); @@ -2669,7 +2671,7 @@ 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_DRV_DEQUEUE(&ifp->if_snd, m0); if (m0 == NULL) break; @@ -2730,7 +2732,7 @@ an_start(ifp) while (sc->an_rdata.an_tx_empty || idx != sc->an_rdata.an_tx_cons) { - IF_DEQUEUE(&ifp->if_snd, m0); + IFQ_DRV_DEQUEUE(&ifp->if_snd, m0); if (m0 == NULL) { break; } -- cgit v1.1