MFC r199580:

tsec: Use IFQ_DRV macros for managing interface packet queue.

This lets tsec(4) work with ALTQ.

Submitted by:	Marcin Ligenza
This commit is contained in:
Rafal Jaworowski 2009-11-27 13:38:59 +00:00
parent 96b404c963
commit 000d6fb9d9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/stable/8/; revision=199865

View File

@ -716,9 +716,9 @@ tsec_start_locked(struct ifnet *ifp)
bus_dmamap_sync(sc->tsec_tx_dtag, sc->tsec_tx_dmap,
BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE);
for (;;) {
while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) {
/* Get packet from the queue */
IF_DEQUEUE(&ifp->if_snd, m0);
IFQ_DRV_DEQUEUE(&ifp->if_snd, m0);
if (m0 == NULL)
break;
@ -755,7 +755,7 @@ tsec_start_locked(struct ifnet *ifp)
m0 = mtmp;
if (tsec_encap(sc, m0, fcb_inserted)) {
IF_PREPEND(&ifp->if_snd, m0);
IFQ_DRV_PREPEND(&ifp->if_snd, m0);
ifp->if_drv_flags |= IFF_DRV_OACTIVE;
break;
}