Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Apr 2011 13:12:12 +0000 (UTC)
From:      Bernhard Schmidt <bschmidt@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r220719 - head/sys/dev/iwn
Message-ID:  <201104161312.p3GDCCEB006147@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bschmidt
Date: Sat Apr 16 13:12:12 2011
New Revision: 220719
URL: http://svn.freebsd.org/changeset/base/220719

Log:
  Remove if_ierrors which do not necessarily indicate a RX error, also
  do account send packets. While here use the IWN_TX_FAIL constant.

Modified:
  head/sys/dev/iwn/if_iwn.c

Modified: head/sys/dev/iwn/if_iwn.c
==============================================================================
--- head/sys/dev/iwn/if_iwn.c	Sat Apr 16 12:46:46 2011	(r220718)
+++ head/sys/dev/iwn/if_iwn.c	Sat Apr 16 13:12:12 2011	(r220719)
@@ -2069,7 +2069,6 @@ iwn_rx_done(struct iwn_softc *sc, struct
 		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
 		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
 	/*
 	 * 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);
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201104161312.p3GDCCEB006147>