aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGleb Smirnoff <glebius@FreeBSD.org>2014-09-18 20:18:55 +0000
committerGleb Smirnoff <glebius@FreeBSD.org>2014-09-18 20:18:55 +0000
commit2c705cad0588bbb756cd3b74f10c33bc8b2a4af2 (patch)
treef660e2f35089bc5d5780391e4c0de990840d4d81
parent908c14ce5591998917c6268c23e8dfbe28d4dc00 (diff)
Notes
-rw-r--r--sys/dev/mwl/if_mwl.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/sys/dev/mwl/if_mwl.c b/sys/dev/mwl/if_mwl.c
index 7b3308848b61..3ea24749421b 100644
--- a/sys/dev/mwl/if_mwl.c
+++ b/sys/dev/mwl/if_mwl.c
@@ -1434,7 +1434,7 @@ mwl_start(struct ifnet *ifp)
* Pass the frame to the h/w for transmission.
*/
if (mwl_tx_start(sc, ni, bf, m)) {
- ifp->if_oerrors++;
+ if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
mwl_puttxbuf_head(txq, bf);
ieee80211_free_node(ni);
continue;
@@ -1504,7 +1504,7 @@ mwl_raw_xmit(struct ieee80211_node *ni, struct mbuf *m,
* Pass the frame to the h/w for transmission.
*/
if (mwl_tx_start(sc, ni, bf, m)) {
- ifp->if_oerrors++;
+ if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
mwl_puttxbuf_head(txq, bf);
ieee80211_free_node(ni);
@@ -2741,7 +2741,7 @@ mwl_rx_proc(void *arg, int npending)
#endif
status = ds->Status;
if (status & EAGLE_RXD_STATUS_DECRYPT_ERR_MASK) {
- ifp->if_ierrors++;
+ if_inc_counter(ifp, IFCOUNTER_IERRORS, 1);
sc->sc_stats.mst_rx_crypto++;
/*
* NB: Check EAGLE_RXD_STATUS_GENERAL_DECRYPT_ERR
@@ -2887,7 +2887,7 @@ mwl_rx_proc(void *arg, int npending)
ieee80211_dump_pkt(ic, mtod(m, caddr_t),
len, ds->Rate, rssi);
}
- ifp->if_ipackets++;
+ if_inc_counter(ifp, IFCOUNTER_IPACKETS, 1);
/* dispatch */
ni = ieee80211_find_rxnode(ic,
@@ -3405,7 +3405,7 @@ mwl_tx_start(struct mwl_softc *sc, struct ieee80211_node *ni, struct mwl_txbuf *
STAILQ_INSERT_TAIL(&txq->active, bf, bf_list);
MWL_TXDESC_SYNC(txq, ds, BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE);
- ifp->if_opackets++;
+ if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1);
sc->sc_tx_timer = 5;
MWL_TXQ_UNLOCK(txq);
@@ -4785,7 +4785,7 @@ mwl_watchdog(void *arg)
mwl_reset(ifp);
mwl_txq_dump(&sc->sc_txq[0]);/*XXX*/
#endif
- ifp->if_oerrors++;
+ if_inc_counter(ifp, IFCOUNTER_OERRORS, 1);
sc->sc_stats.mst_watchdog++;
}
}
@@ -4928,8 +4928,10 @@ mwl_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data)
case SIOCGMVSTATS:
mwl_hal_gethwstats(sc->sc_mh, &sc->sc_stats.hw_stats);
/* NB: embed these numbers to get a consistent view */
- sc->sc_stats.mst_tx_packets = ifp->if_opackets;
- sc->sc_stats.mst_rx_packets = ifp->if_ipackets;
+ sc->sc_stats.mst_tx_packets =
+ ifp->if_get_counter(ifp, IFCOUNTER_OPACKETS);
+ sc->sc_stats.mst_rx_packets =
+ ifp->if_get_counter(ifp, IFCOUNTER_IPACKETS);
/*
* NB: Drop the softc lock in case of a page fault;
* we'll accept any potential inconsisentcy in the