summaryrefslogtreecommitdiffstats
path: root/sys/dev/bge
diff options
context:
space:
mode:
authoryongari <yongari@FreeBSD.org>2010-08-31 19:59:18 +0000
committeryongari <yongari@FreeBSD.org>2010-08-31 19:59:18 +0000
commite68eacd3f9b2b62433c90d8cc84ca02409d8661d (patch)
treee2873af903cd853e6c13ee1580967a9b241f8b37 /sys/dev/bge
parentfc642a405bf986ef9b4610674ae1179420e7dbda (diff)
downloadFreeBSD-src-e68eacd3f9b2b62433c90d8cc84ca02409d8661d.zip
FreeBSD-src-e68eacd3f9b2b62433c90d8cc84ca02409d8661d.tar.gz
bge_txeof() already checks whether it has to free transmitted mbufs
or not by comparing reported TX consumer index with saved index. So remove unnecessary check done after freeing transmitted mbufs. While I'm here nuke unnecessary variable initializations.
Diffstat (limited to 'sys/dev/bge')
-rw-r--r--sys/dev/bge/if_bge.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c
index 042bd1e..585e1f6 100644
--- a/sys/dev/bge/if_bge.c
+++ b/sys/dev/bge/if_bge.c
@@ -3394,7 +3394,7 @@ bge_rxeof(struct bge_softc *sc, uint16_t rx_prod, int holdlck)
static void
bge_txeof(struct bge_softc *sc, uint16_t tx_cons)
{
- struct bge_tx_bd *cur_tx = NULL;
+ struct bge_tx_bd *cur_tx;
struct ifnet *ifp;
BGE_LOCK_ASSERT(sc);
@@ -3412,7 +3412,7 @@ bge_txeof(struct bge_softc *sc, uint16_t tx_cons)
* frames that have been sent.
*/
while (sc->bge_tx_saved_considx != tx_cons) {
- uint32_t idx = 0;
+ uint32_t idx;
idx = sc->bge_tx_saved_considx;
cur_tx = &sc->bge_ldata.bge_tx_ring[idx];
@@ -3431,8 +3431,7 @@ bge_txeof(struct bge_softc *sc, uint16_t tx_cons)
BGE_INC(sc->bge_tx_saved_considx, BGE_TX_RING_CNT);
}
- if (cur_tx != NULL)
- ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
+ ifp->if_drv_flags &= ~IFF_DRV_OACTIVE;
if (sc->bge_txcnt == 0)
sc->bge_timer = 0;
}
OpenPOWER on IntegriCloud