summaryrefslogtreecommitdiffstats
path: root/sys/dev/an
diff options
context:
space:
mode:
authormlaier <mlaier@FreeBSD.org>2004-08-01 23:58:04 +0000
committermlaier <mlaier@FreeBSD.org>2004-08-01 23:58:04 +0000
commit14a50c4ac0247a8950847156b4fc16cf935c14ca (patch)
tree6ebb50d212d74e6c2bdec898a448d868eb8edfb1 /sys/dev/an
parentb0892abf37d766a8598aa74f40cb2e7585bca172 (diff)
downloadFreeBSD-src-14a50c4ac0247a8950847156b4fc16cf935c14ca.zip
FreeBSD-src-14a50c4ac0247a8950847156b4fc16cf935c14ca.tar.gz
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)
Diffstat (limited to 'sys/dev/an')
-rw-r--r--sys/dev/an/if_an.c12
1 files changed, 7 insertions, 5 deletions
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;
}
OpenPOWER on IntegriCloud