bnx: Remove redundant TX/RX index reading from polling code
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 9 Dec 2012 12:15:49 +0000 (20:15 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 9 Dec 2012 13:14:16 +0000 (21:14 +0800)
sys/dev/netif/bnx/if_bnx.c

index 9848b50..f19bd52 100644 (file)
@@ -2691,11 +2691,9 @@ bnx_npoll_compat(struct ifnet *ifp, void *arg __unused, int cycle __unused)
        rx_prod = sblk->bge_idx[0].bge_rx_prod_idx;
        tx_cons = sblk->bge_idx[0].bge_tx_cons_idx;
 
-       rx_prod = sblk->bge_idx[0].bge_rx_prod_idx;
        if (sc->bnx_rx_saved_considx != rx_prod)
                bnx_rxeof(sc, rx_prod);
 
-       tx_cons = sblk->bge_idx[0].bge_tx_cons_idx;
        if (sc->bnx_tx_saved_considx != tx_cons)
                bnx_txeof(sc, tx_cons);