ath9k: tune rc_stats to display only valid rates
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Sat Sep 29 10:59:34 EDT 2012
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=c771b518199eb329c3a38e479b36b36553e25b2d
Commit: c771b518199eb329c3a38e479b36b36553e25b2d
Parent: 23d9939459362c555d2ad18f9c036f55594e7fee
Author: Rajkumar Manoharan <rmanohar at qca.qualcomm.com>
AuthorDate: Fri Aug 10 16:47:30 2012 +0530
Committer: John W. Linville <linville at tuxdriver.com>
CommitDate: Fri Aug 10 15:27:20 2012 -0400
ath9k: tune rc_stats to display only valid rates
This could make rc_stats more simpler and ease the debugging.
Signed-off-by: Rajkumar Manoharan <rmanohar at qca.qualcomm.com>
Signed-off-by: John W. Linville <linville at tuxdriver.com>
---
drivers/net/wireless/ath/ath9k/rc.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/rc.c b/drivers/net/wireless/ath/ath9k/rc.c
index 4a04fff..4b12c34 100644
--- a/drivers/net/wireless/ath/ath9k/rc.c
+++ b/drivers/net/wireless/ath/ath9k/rc.c
@@ -1355,7 +1355,7 @@ static ssize_t read_file_rcstat(struct file *file, char __user *user_buf,
struct ath_rate_priv *rc = file->private_data;
char *buf;
unsigned int len = 0, max;
- int i = 0;
+ int rix;
ssize_t retval;
if (rc->rate_table == NULL)
@@ -1371,7 +1371,8 @@ static ssize_t read_file_rcstat(struct file *file, char __user *user_buf,
"HT", "MCS", "Rate",
"Success", "Retries", "XRetries", "PER");
- for (i = 0; i < rc->rate_table_size; i++) {
+ for (rix = 0; rix < rc->max_valid_rate; rix++) {
+ u8 i = rc->valid_rate_index[rix];
u32 ratekbps = rc->rate_table->info[i].ratekbps;
struct ath_rc_stats *stats = &rc->rcstats[i];
char mcs[5];
More information about the linux-mtd-cvs
mailing list