--- if_fxp.c.orig Tue Jun 22 05:09:16 2004 +++ if_fxp.c Tue Jun 22 17:27:41 2004 @@ -829,7 +829,9 @@ * Let the system queue as many packets as we have available * TX descriptors. */ - ifp->if_snd.ifq_maxlen = FXP_NTXCB - 1; + IFQ_SET_MAXLEN(&ifp->if_snd, FXP_NTXCB - 1); + ifp->if_snd.ifq_drv_maxlen = FXP_NTXCB - 1; + IFQ_SET_READY(&ifp->if_snd); /* * Hook our interrupt after all initialization is complete. @@ -1313,12 +1315,15 @@ * NOTE: One TxCB is reserved to guarantee that fxp_mc_setup() can add * a NOP command when needed. */ - while (ifp->if_snd.ifq_head != NULL && sc->tx_queued < FXP_NTXCB - 1) { + while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd) && + sc->tx_queued < FXP_NTXCB - 1) { /* * Grab a packet to transmit. */ - IF_DEQUEUE(&ifp->if_snd, mb_head); + IFQ_DRV_DEQUEUE(&ifp->if_snd, mb_head); + if (mb_head == NULL) + break; /* * Get pointer to next available tx desc. @@ -1669,7 +1674,7 @@ /* * Try to start more packets transmitting. */ - if (ifp->if_snd.ifq_head != NULL) + if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) fxp_start_body(ifp); }