Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Aug 2011 07:20:44 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r225284 - user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample
Message-ID:  <201108310720.p7V7KiDG087985@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Wed Aug 31 07:20:43 2011
New Revision: 225284
URL: http://svn.freebsd.org/changeset/base/225284

Log:
  Fix up the rate control logic a little more to correctly tracking failed aggregate
  packet counts.
  
  This still isn't entirely correct but it's better than before.

Modified:
  user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c

Modified: user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c
==============================================================================
--- user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c	Wed Aug 31 06:48:00 2011	(r225283)
+++ user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample/sample.c	Wed Aug 31 07:20:43 2011	(r225284)
@@ -557,7 +557,7 @@ update_stats(struct ath_softc *sc, struc
 			 (tt * (100 - ssc->smoothing_rate))) / 100;
 	}
 	
-	if (status != 0) {
+	if (nframes == nbad) {
 		int y;
 		sn->stats[size_bin][rix0].successive_failures += nbad;
 		for (y = size_bin+1; y < NUM_PACKET_SIZE_BINS; y++) {
@@ -572,7 +572,7 @@ update_stats(struct ath_softc *sc, struc
 			sn->stats[y][rix0].total_packets += nframes;
 		}
 	} else {
-		sn->stats[size_bin][rix0].packets_acked += nframes;
+		sn->stats[size_bin][rix0].packets_acked += (nframes - nbad);
 		sn->stats[size_bin][rix0].successive_failures = 0;
 	}
 	sn->stats[size_bin][rix0].tries += tries;
@@ -624,10 +624,6 @@ ath_rate_tx_complete(struct ath_softc *s
 	if (frame_size == 0)		    /* NB: should not happen */
 		frame_size = 1500;
 
-	/* If nbad > 1, override status to FAIL */
-	if (nbad > 0)
-		status = 1;
-
 	if (sn->ratemask == 0) {
 		IEEE80211_NOTE(an->an_node.ni_vap, IEEE80211_MSG_RATECTL,
 		    &an->an_node,



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