summaryrefslogtreecommitdiffstats
path: root/sys/dev/an
diff options
context:
space:
mode:
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