aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath9k/debug.c
diff options
context:
space:
mode:
authorSujith <Sujith.Manoharan@atheros.com>2009-02-03 21:40:26 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-02-11 11:44:22 -0500
commit029bc43270e770e0d57d67dc431fe711c58e74f5 (patch)
treec9f2247642743c97ef803c4fdefde8b7e2746af4 /drivers/net/wireless/ath9k/debug.c
parentd42c6b71a8e722e00a302e7e3365909560de478a (diff)
ath9k: Add retry counters to rate control debug file
Signed-off-by: Sujith <Sujith.Manoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath9k/debug.c')
-rw-r--r--drivers/net/wireless/ath9k/debug.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath9k/debug.c b/drivers/net/wireless/ath9k/debug.c
index 6181e49eecba..2de1b8a57b94 100644
--- a/drivers/net/wireless/ath9k/debug.c
+++ b/drivers/net/wireless/ath9k/debug.c
@@ -258,21 +258,36 @@ void ath_debug_stat_rc(struct ath_softc *sc, struct sk_buff *skb)
258 ath_debug_stat_legacy_rc(sc, skb); 258 ath_debug_stat_legacy_rc(sc, skb);
259} 259}
260 260
261/* FIXME: legacy rates, later on .. */
262void ath_debug_stat_retries(struct ath_softc *sc, int rix,
263 int xretries, int retries)
264{
265 if (conf_is_ht(&sc->hw->conf)) {
266 int idx = sc->cur_rate_table->info[rix].dot11rate;
267
268 sc->sc_debug.stats.n_rcstats[idx].xretries += xretries;
269 sc->sc_debug.stats.n_rcstats[idx].retries += retries;
270 }
271}
272
261static ssize_t ath_read_file_stat_11n_rc(struct file *file, 273static ssize_t ath_read_file_stat_11n_rc(struct file *file,
262 char __user *user_buf, 274 char __user *user_buf,
263 size_t count, loff_t *ppos) 275 size_t count, loff_t *ppos)
264{ 276{
265 struct ath_softc *sc = file->private_data; 277 struct ath_softc *sc = file->private_data;
266 char buf[512]; 278 char buf[1024];
267 unsigned int len = 0; 279 unsigned int len = 0;
268 int i = 0; 280 int i = 0;
269 281
270 len += sprintf(buf, "%7s %13s\n\n", "Rate", "Success"); 282 len += sprintf(buf, "%7s %13s %8s %8s\n\n", "Rate", "Success",
283 "Retries", "XRetries");
271 284
272 for (i = 0; i <= 15; i++) { 285 for (i = 0; i <= 15; i++) {
273 len += snprintf(buf + len, sizeof(buf) - len, 286 len += snprintf(buf + len, sizeof(buf) - len,
274 "%5s%3d: %8u\n", "MCS", i, 287 "%5s%3d: %8u %8u %8u\n", "MCS", i,
275 sc->sc_debug.stats.n_rcstats[i].success); 288 sc->sc_debug.stats.n_rcstats[i].success,
289 sc->sc_debug.stats.n_rcstats[i].retries,
290 sc->sc_debug.stats.n_rcstats[i].xretries);
276 } 291 }
277 292
278 return simple_read_from_buffer(user_buf, count, ppos, buf, len); 293 return simple_read_from_buffer(user_buf, count, ppos, buf, len);