summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbschmidt <bschmidt@FreeBSD.org>2011-04-16 13:12:12 +0000
committerbschmidt <bschmidt@FreeBSD.org>2011-04-16 13:12:12 +0000
commit52a6150689609acdfd882f6db838052f033d3d4b (patch)
treeaf9849acd5ffd642e7f9ed1d0cfc1080b90afc58
parent1d6c475a4a06595be85d2ec5b0d2c78452b696e8 (diff)
downloadFreeBSD-src-52a6150689609acdfd882f6db838052f033d3d4b.zip
FreeBSD-src-52a6150689609acdfd882f6db838052f033d3d4b.tar.gz
Remove if_ierrors which do not necessarily indicate a RX error, also
do account send packets. While here use the IWN_TX_FAIL constant.
-rw-r--r--sys/dev/iwn/if_iwn.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/iwn/if_iwn.c b/sys/dev/iwn/if_iwn.c
index 5de918c..c4b0888 100644
--- a/sys/dev/iwn/if_iwn.c
+++ b/sys/dev/iwn/if_iwn.c
@@ -2069,7 +2069,6 @@ iwn_rx_done(struct iwn_softc *sc, struct iwn_rx_desc *desc,
if (!sc->last_rx_valid) {
DPRINTF(sc, IWN_DEBUG_ANY,
"%s: missing RX_PHY\n", __func__);
- ifp->if_ierrors++;
return;
}
sc->last_rx_valid = 0;
@@ -2083,7 +2082,6 @@ iwn_rx_done(struct iwn_softc *sc, struct iwn_rx_desc *desc,
device_printf(sc->sc_dev,
"%s: invalid rx statistic header, len %d\n",
__func__, stat->cfg_phy_len);
- ifp->if_ierrors++;
return;
}
if (desc->type == IWN_MPDU_RX_DONE) {
@@ -2427,11 +2425,12 @@ iwn_tx_done(struct iwn_softc *sc, struct iwn_rx_desc *desc, int ackfailcnt,
/*
* Update rate control statistics for the node.
*/
- if (status & 0x80) {
+ if (status & IWN_TX_FAIL) {
ifp->if_oerrors++;
ieee80211_ratectl_tx_complete(vap, ni,
IEEE80211_RATECTL_TX_FAILURE, &ackfailcnt, NULL);
} else {
+ ifp->if_opackets++;
ieee80211_ratectl_tx_complete(vap, ni,
IEEE80211_RATECTL_TX_SUCCESS, &ackfailcnt, NULL);
}
OpenPOWER on IntegriCloud