summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authoradrian <adrian@FreeBSD.org>2013-02-26 10:24:49 +0000
committeradrian <adrian@FreeBSD.org>2013-02-26 10:24:49 +0000
commit40f8a2948b0c4e6acc784c63eeb5a3ac8a7c573b (patch)
treec3cbf4398c8adf11c3b4d962f26c9f4730fa38b7 /sys/dev
parent1292edf08d47c715c2f18a75f5665443961e7ce6 (diff)
downloadFreeBSD-src-40f8a2948b0c4e6acc784c63eeb5a3ac8a7c573b.zip
FreeBSD-src-40f8a2948b0c4e6acc784c63eeb5a3ac8a7c573b.tar.gz
Update the EWMA statistics for each intermediary rate as well as the final
rate. This fixes two things: * The intermediary rates now also have their EWMA values changed; * The existing code was using the wrong value for longtries - so the EWMA stats were only adjusted for the first rate and not subsequent rates in a MRR setup. TODO: * Merge the EWMA updates into update_stats() now..
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/ath/ath_rate/sample/sample.c43
1 files changed, 33 insertions, 10 deletions
diff --git a/sys/dev/ath/ath_rate/sample/sample.c b/sys/dev/ath/ath_rate/sample/sample.c
index 54360f5..a7d6af6 100644
--- a/sys/dev/ath/ath_rate/sample/sample.c
+++ b/sys/dev/ath/ath_rate/sample/sample.c
@@ -1008,6 +1008,15 @@ ath_rate_tx_complete(struct ath_softc *sc, struct ath_node *an,
short_tries, long_tries,
long_tries > rc[0].tries,
nframes, nbad);
+ update_ewma_stats(sc, an, frame_size,
+ rc[0].rix, rc[0].tries,
+ rc[1].rix, rc[1].tries,
+ rc[2].rix, rc[2].tries,
+ rc[3].rix, rc[3].tries,
+ short_tries, long_tries,
+ long_tries > rc[0].tries,
+ nframes, nbad);
+
long_tries -= rc[0].tries;
}
@@ -1020,6 +1029,14 @@ ath_rate_tx_complete(struct ath_softc *sc, struct ath_node *an,
short_tries, long_tries,
status,
nframes, nbad);
+ update_ewma_stats(sc, an, frame_size,
+ rc[1].rix, rc[1].tries,
+ rc[2].rix, rc[2].tries,
+ rc[3].rix, rc[3].tries,
+ 0, 0,
+ short_tries, long_tries,
+ status,
+ nframes, nbad);
long_tries -= rc[1].tries;
}
@@ -1032,6 +1049,14 @@ ath_rate_tx_complete(struct ath_softc *sc, struct ath_node *an,
short_tries, long_tries,
status,
nframes, nbad);
+ update_ewma_stats(sc, an, frame_size,
+ rc[2].rix, rc[2].tries,
+ rc[3].rix, rc[3].tries,
+ 0, 0,
+ 0, 0,
+ short_tries, long_tries,
+ status,
+ nframes, nbad);
long_tries -= rc[2].tries;
}
@@ -1044,17 +1069,15 @@ ath_rate_tx_complete(struct ath_softc *sc, struct ath_node *an,
short_tries, long_tries,
status,
nframes, nbad);
+ update_ewma_stats(sc, an, frame_size,
+ rc[3].rix, rc[3].tries,
+ 0, 0,
+ 0, 0,
+ 0, 0,
+ short_tries, long_tries,
+ status,
+ nframes, nbad);
}
-
- update_ewma_stats(sc, an, frame_size,
- rc[0].rix, rc[0].tries,
- rc[1].rix, rc[1].tries,
- rc[2].rix, rc[2].tries,
- rc[3].rix, rc[3].tries,
- short_tries, long_tries,
- long_tries > rc[0].tries,
- nframes, nbad);
-
}
}
OpenPOWER on IntegriCloud