tsec: Use IFQ_DRV macros for managing interface packet queue.
This lets tsec(4) work with ALTQ. Submitted by: Marcin Ligenza MFC after: 1 week
This commit is contained in:
parent
c6858769af
commit
04311706d0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=199580
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user