svn commit: r225284 -
user/adrian/if_ath_tx/sys/dev/ath/ath_rate/sample
Adrian Chadd
adrian at FreeBSD.org
Wed Aug 31 07:20:44 UTC 2011
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,
More information about the svn-src-user
mailing list