diff options
author | Thomas Huehn <thomas@net.t-labs.tu-berlin.de> | 2015-03-24 21:09:40 +0100 |
---|---|---|
committer | Johannes Berg <johannes.berg@intel.com> | 2015-04-01 20:44:32 +0200 |
commit | 6a27b2c40b4829e625bc1dfdd0705c5ece720ab4 (patch) | |
tree | 78581e6b867299e807b9d31febe9655ba5579d7e /net/mac80211/rc80211_minstrel_ht_debugfs.c | |
parent | mac80211: improve Minstrel variable & function naming (diff) | |
download | linux-6a27b2c40b4829e625bc1dfdd0705c5ece720ab4.tar.xz linux-6a27b2c40b4829e625bc1dfdd0705c5ece720ab4.zip |
mac80211: restructure per-rate throughput calculation into function
This patch moves Minstrels and Minstrel-HTs per-rate throughput
calculation (EWMA(thr)) into a dedicated function to be called.
Therefore the variable "unsigned int cur_tp" within struct
"minstrel_rate_stats" becomes obsolete. and is removed to free
up its space.
Signed-off-by: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
Acked-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'net/mac80211/rc80211_minstrel_ht_debugfs.c')
-rw-r--r-- | net/mac80211/rc80211_minstrel_ht_debugfs.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/mac80211/rc80211_minstrel_ht_debugfs.c b/net/mac80211/rc80211_minstrel_ht_debugfs.c index 84183dee9ef2..721cf74ea9a6 100644 --- a/net/mac80211/rc80211_minstrel_ht_debugfs.c +++ b/net/mac80211/rc80211_minstrel_ht_debugfs.c @@ -19,7 +19,7 @@ static char * minstrel_ht_stats_dump(struct minstrel_ht_sta *mi, int i, char *p) { const struct mcs_group *mg; - unsigned int j, tp, prob, eprob, tx_time; + unsigned int j, tp_avg, prob, eprob, tx_time; char htmode = '2'; char gimode = 'L'; u32 gflags; @@ -81,13 +81,13 @@ minstrel_ht_stats_dump(struct minstrel_ht_sta *mi, int i, char *p) tx_time = DIV_ROUND_CLOSEST(mg->duration[j], 1000); p += sprintf(p, "%6u ", tx_time); - tp = mrs->cur_tp / 10; + tp_avg = minstrel_ht_get_tp_avg(mi, i, j); prob = MINSTREL_TRUNC(mrs->cur_prob * 1000); eprob = MINSTREL_TRUNC(mrs->prob_ewma * 1000); p += sprintf(p, "%4u.%1u %3u.%1u %3u.%1u " "%3u %3u %-3u %9llu %-9llu\n", - tp / 10, tp % 10, + tp_avg / 10, tp_avg % 10, eprob / 10, eprob % 10, prob / 10, prob % 10, mrs->retry_count, @@ -163,7 +163,7 @@ static char * minstrel_ht_stats_csv_dump(struct minstrel_ht_sta *mi, int i, char *p) { const struct mcs_group *mg; - unsigned int j, tp, prob, eprob, tx_time; + unsigned int j, tp_avg, prob, eprob, tx_time; char htmode = '2'; char gimode = 'L'; u32 gflags; @@ -222,12 +222,12 @@ minstrel_ht_stats_csv_dump(struct minstrel_ht_sta *mi, int i, char *p) tx_time = DIV_ROUND_CLOSEST(mg->duration[j], 1000); p += sprintf(p, "%u,", tx_time); - tp = mrs->cur_tp / 10; + tp_avg = minstrel_ht_get_tp_avg(mi, i, j); prob = MINSTREL_TRUNC(mrs->cur_prob * 1000); eprob = MINSTREL_TRUNC(mrs->prob_ewma * 1000); p += sprintf(p, "%u.%u,%u.%u,%u.%u,%u,%u,%u,%llu,%llu,", - tp / 10, tp % 10, + tp_avg / 10, tp_avg % 10, eprob / 10, eprob % 10, prob / 10, prob % 10, mrs->retry_count, |