Skip to content

Commit

Permalink
ath9k: tune rc_stats to display only valid rates
Browse files Browse the repository at this point in the history
This could make rc_stats more simpler and ease the debugging.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Rajkumar Manoharan authored and John W. Linville committed Aug 10, 2012
1 parent 23d9939 commit c771b51
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/net/wireless/ath/ath9k/rc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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];
Expand Down

0 comments on commit c771b51

Please sign in to comment.