Add ALTQ support for aue(4).

Tested by:	Greg Hennessy, Volker
MFC after:	1 week
This commit is contained in:
Max Laier 2007-02-03 13:53:22 +00:00
parent 5f6eff23ae
commit fe46dc7031
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=166464
2 changed files with 8 additions and 5 deletions

View File

@ -117,6 +117,7 @@ are required to use a certain network card with
They have been applied to the following hardware drivers:
.Xr an 4 ,
.Xr ath 4 ,
.Xr aue 4 ,
.Xr awi 4 ,
.Xr bce 4 ,
.Xr bfe 4 ,

View File

@ -722,7 +722,9 @@ USB_ATTACH(aue)
ifp->if_ioctl = aue_ioctl;
ifp->if_start = aue_start;
ifp->if_init = aue_init;
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);
/*
* Do MII setup.
@ -1002,7 +1004,7 @@ aue_tick_thread(struct aue_softc *sc)
if (!sc->aue_link && mii->mii_media_status & IFM_ACTIVE &&
IFM_SUBTYPE(mii->mii_media_active) != IFM_NONE) {
sc->aue_link++;
if (ifp->if_snd.ifq_head != NULL)
if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
aue_start_thread(sc);
}
resched:
@ -1079,13 +1081,13 @@ aue_start_thread(struct aue_softc *sc)
return;
}
IF_DEQUEUE(&ifp->if_snd, m_head);
IFQ_DRV_DEQUEUE(&ifp->if_snd, m_head);
if (m_head == NULL) {
return;
}
if (aue_encap(sc, m_head, 0)) {
IF_PREPEND(&ifp->if_snd, m_head);
IFQ_DRV_PREPEND(&ifp->if_snd, m_head);
ifp->if_drv_flags |= IFF_DRV_OACTIVE;
return;
}
@ -1321,7 +1323,7 @@ aue_watchdog(struct aue_softc *sc)
c->ue_status = stat;
aue_txeof_thread(sc);
if (ifp->if_snd.ifq_head != NULL)
if (!IFQ_IS_EMPTY(&ifp->if_snd))
aue_start_thread(sc);
return;
}