aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/rc80211_minstrel_ht_debugfs.c
diff options
context:
space:
mode:
authorThomas Huehn <thomas@net.t-labs.tu-berlin.de>2015-03-24 16:09:39 -0400
committerJohannes Berg <johannes.berg@intel.com>2015-04-01 14:44:31 -0400
commit9134073bc693633b5e1f1a7252c93b3fb262aae4 (patch)
treebc3d44c87bbcf5006f45f0afbd45da209a2101ee /net/mac80211/rc80211_minstrel_ht_debugfs.c
parentf62838bcc5f58f580961aaf8c9fe59036b7be825 (diff)
mac80211: improve Minstrel variable & function naming
This patch ensures a consistent usage of variable names for type "minstrel_rate_stats" to be used as "mrs" and from type minstrel_rate as "mr" across both Minstrel & Minstrel-HT. In addition some variable and function names got changed to more meaningful ones. 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.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/net/mac80211/rc80211_minstrel_ht_debugfs.c b/net/mac80211/rc80211_minstrel_ht_debugfs.c
index 95731e639d4e..84183dee9ef2 100644
--- a/net/mac80211/rc80211_minstrel_ht_debugfs.c
+++ b/net/mac80211/rc80211_minstrel_ht_debugfs.c
@@ -38,7 +38,7 @@ minstrel_ht_stats_dump(struct minstrel_ht_sta *mi, int i, char *p)
38 gimode = 'S'; 38 gimode = 'S';
39 39
40 for (j = 0; j < MCS_GROUP_RATES; j++) { 40 for (j = 0; j < MCS_GROUP_RATES; j++) {
41 struct minstrel_rate_stats *mr = &mi->groups[i].rates[j]; 41 struct minstrel_rate_stats *mrs = &mi->groups[i].rates[j];
42 static const int bitrates[4] = { 10, 20, 55, 110 }; 42 static const int bitrates[4] = { 10, 20, 55, 110 };
43 int idx = i * MCS_GROUP_RATES + j; 43 int idx = i * MCS_GROUP_RATES + j;
44 44
@@ -81,20 +81,20 @@ minstrel_ht_stats_dump(struct minstrel_ht_sta *mi, int i, char *p)
81 tx_time = DIV_ROUND_CLOSEST(mg->duration[j], 1000); 81 tx_time = DIV_ROUND_CLOSEST(mg->duration[j], 1000);
82 p += sprintf(p, "%6u ", tx_time); 82 p += sprintf(p, "%6u ", tx_time);
83 83
84 tp = mr->cur_tp / 10; 84 tp = mrs->cur_tp / 10;
85 prob = MINSTREL_TRUNC(mr->cur_prob * 1000); 85 prob = MINSTREL_TRUNC(mrs->cur_prob * 1000);
86 eprob = MINSTREL_TRUNC(mr->probability * 1000); 86 eprob = MINSTREL_TRUNC(mrs->prob_ewma * 1000);
87 87
88 p += sprintf(p, "%4u.%1u %3u.%1u %3u.%1u " 88 p += sprintf(p, "%4u.%1u %3u.%1u %3u.%1u "
89 "%3u %3u %-3u %9llu %-9llu\n", 89 "%3u %3u %-3u %9llu %-9llu\n",
90 tp / 10, tp % 10, 90 tp / 10, tp % 10,
91 eprob / 10, eprob % 10, 91 eprob / 10, eprob % 10,
92 prob / 10, prob % 10, 92 prob / 10, prob % 10,
93 mr->retry_count, 93 mrs->retry_count,
94 mr->last_success, 94 mrs->last_success,
95 mr->last_attempts, 95 mrs->last_attempts,
96 (unsigned long long)mr->succ_hist, 96 (unsigned long long)mrs->succ_hist,
97 (unsigned long long)mr->att_hist); 97 (unsigned long long)mrs->att_hist);
98 } 98 }
99 99
100 return p; 100 return p;
@@ -182,7 +182,7 @@ minstrel_ht_stats_csv_dump(struct minstrel_ht_sta *mi, int i, char *p)
182 gimode = 'S'; 182 gimode = 'S';
183 183
184 for (j = 0; j < MCS_GROUP_RATES; j++) { 184 for (j = 0; j < MCS_GROUP_RATES; j++) {
185 struct minstrel_rate_stats *mr = &mi->groups[i].rates[j]; 185 struct minstrel_rate_stats *mrs = &mi->groups[i].rates[j];
186 static const int bitrates[4] = { 10, 20, 55, 110 }; 186 static const int bitrates[4] = { 10, 20, 55, 110 };
187 int idx = i * MCS_GROUP_RATES + j; 187 int idx = i * MCS_GROUP_RATES + j;
188 188
@@ -222,19 +222,19 @@ minstrel_ht_stats_csv_dump(struct minstrel_ht_sta *mi, int i, char *p)
222 tx_time = DIV_ROUND_CLOSEST(mg->duration[j], 1000); 222 tx_time = DIV_ROUND_CLOSEST(mg->duration[j], 1000);
223 p += sprintf(p, "%u,", tx_time); 223 p += sprintf(p, "%u,", tx_time);
224 224
225 tp = mr->cur_tp / 10; 225 tp = mrs->cur_tp / 10;
226 prob = MINSTREL_TRUNC(mr->cur_prob * 1000); 226 prob = MINSTREL_TRUNC(mrs->cur_prob * 1000);
227 eprob = MINSTREL_TRUNC(mr->probability * 1000); 227 eprob = MINSTREL_TRUNC(mrs->prob_ewma * 1000);
228 228
229 p += sprintf(p, "%u.%u,%u.%u,%u.%u,%u,%u,%u,%llu,%llu,", 229 p += sprintf(p, "%u.%u,%u.%u,%u.%u,%u,%u,%u,%llu,%llu,",
230 tp / 10, tp % 10, 230 tp / 10, tp % 10,
231 eprob / 10, eprob % 10, 231 eprob / 10, eprob % 10,
232 prob / 10, prob % 10, 232 prob / 10, prob % 10,
233 mr->retry_count, 233 mrs->retry_count,
234 mr->last_success, 234 mrs->last_success,
235 mr->last_attempts, 235 mrs->last_attempts,
236 (unsigned long long)mr->succ_hist, 236 (unsigned long long)mrs->succ_hist,
237 (unsigned long long)mr->att_hist); 237 (unsigned long long)mrs->att_hist);
238 p += sprintf(p, "%d,%d,%d.%d\n", 238 p += sprintf(p, "%d,%d,%d.%d\n",
239 max(0, (int) mi->total_packets - 239 max(0, (int) mi->total_packets -
240 (int) mi->sample_packets), 240 (int) mi->sample_packets),