From 235af63d8bb10f0323b4590013378e40cf37ae50 Mon Sep 17 00:00:00 2001 From: Joerg Sonnenberger Date: Thu, 10 Feb 2005 00:08:38 +0000 Subject: [PATCH] Don't assign &ifp->if_snd to a temporary variable, it's type will change soon. Use ifp directly for BPF_MTAP. --- sys/dev/netif/le/if_le.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/sys/dev/netif/le/if_le.c b/sys/dev/netif/le/if_le.c index f1ba8ad095..9337617d9a 100644 --- a/sys/dev/netif/le/if_le.c +++ b/sys/dev/netif/le/if_le.c @@ -22,7 +22,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * $FreeBSD: src/sys/i386/isa/if_le.c,v 1.56.2.4 2002/06/05 23:24:10 paul Exp $ - * $DragonFly: src/sys/dev/netif/le/if_le.c,v 1.16 2005/01/23 20:21:31 joerg Exp $ + * $DragonFly: src/sys/dev/netif/le/if_le.c,v 1.17 2005/02/10 00:08:38 joerg Exp $ */ /* @@ -963,14 +963,13 @@ lemac_start( struct ifnet *ifp) { le_softc_t *sc = (le_softc_t *) ifp; - struct ifqueue *ifq = &ifp->if_snd; if ((ifp->if_flags & IFF_RUNNING) == 0) return; LEMAC_INTR_DISABLE(sc); - while (ifq->ifq_head != NULL) { + while (!IF_QEMPTY(&ifp->if_snd)) { struct mbuf *m; int tx_pg; u_int txhdr, txoff; @@ -990,7 +989,7 @@ lemac_start( break; } - IF_DEQUEUE(ifq, m); + IF_DEQUEUE(&ifp->if_snd, m); LE_OUTB(sc, LEMAC_REG_MPN, tx_pg); /* Shift 2K window. */ /* @@ -1012,7 +1011,7 @@ lemac_start( LE_OUTB(sc, LEMAC_REG_TQ, tx_pg); /* tell chip to transmit this packet */ - BPF_MTAP(&sc->le_if, m); + BPF_MTAP(ifp, m); m_freem(m); /* free the mbuf */ } @@ -1796,7 +1795,6 @@ lance_start( struct ifnet *ifp) { le_softc_t *sc = (le_softc_t *) ifp; - struct ifqueue *ifq = &ifp->if_snd; lance_ring_t *ri = &sc->lance_txinfo; lance_descinfo_t *di; ln_desc_t desc; @@ -1808,7 +1806,7 @@ lance_start( return; for (;;) { - IF_DEQUEUE(ifq, m); + IF_DEQUEUE(&ifp->if_snd, m); if (m == NULL) break; @@ -1834,7 +1832,7 @@ lance_start( */ if (lance_tx_intr(sc) > 0) { LN_STAT(tx_drains[0]++); - IF_PREPEND(ifq, m); + IF_PREPEND(&ifp->if_snd, m); continue; } LN_STAT(tx_nospc[0]++); @@ -1910,7 +1908,7 @@ lance_start( } if (m != NULL) { ifp->if_flags |= IFF_OACTIVE; - IF_PREPEND(ifq, m); + IF_PREPEND(&ifp->if_snd, m); } } -- 2.41.0