diff options
author | Bruno Randolf <br1@einfach.org> | 2010-03-25 01:49:42 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-03-31 14:39:10 -0400 |
commit | da35111ad970081bdf6e848d1861c7d16e71079b (patch) | |
tree | 2cdb7d166f14d89526dfb6dbf2a33b5b060b0edc /drivers/net/wireless/ath/ath5k/debug.c | |
parent | 495391d715a310a7cbf622850e372d40ac86ef6e (diff) |
ath5k: update phy errors codes
Update PHY error codes from the HAL, and keep them in statistics for debugging
via the 'frameerrors' file. This will also be used by ANI.
Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/debug.c')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/debug.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath5k/debug.c b/drivers/net/wireless/ath/ath5k/debug.c index bccd4a78027e..90247dc74198 100644 --- a/drivers/net/wireless/ath/ath5k/debug.c +++ b/drivers/net/wireless/ath/ath5k/debug.c | |||
@@ -474,6 +474,7 @@ static ssize_t read_file_frameerrors(struct file *file, char __user *user_buf, | |||
474 | struct ath5k_statistics *st = &sc->stats; | 474 | struct ath5k_statistics *st = &sc->stats; |
475 | char buf[700]; | 475 | char buf[700]; |
476 | unsigned int len = 0; | 476 | unsigned int len = 0; |
477 | int i; | ||
477 | 478 | ||
478 | len += snprintf(buf+len, sizeof(buf)-len, | 479 | len += snprintf(buf+len, sizeof(buf)-len, |
479 | "RX\n---------------------\n"); | 480 | "RX\n---------------------\n"); |
@@ -485,6 +486,13 @@ static ssize_t read_file_frameerrors(struct file *file, char __user *user_buf, | |||
485 | st->rxerr_phy, | 486 | st->rxerr_phy, |
486 | st->rx_all_count > 0 ? | 487 | st->rx_all_count > 0 ? |
487 | st->rxerr_phy*100/st->rx_all_count : 0); | 488 | st->rxerr_phy*100/st->rx_all_count : 0); |
489 | for (i = 0; i < 32; i++) { | ||
490 | if (st->rxerr_phy_code[i]) | ||
491 | len += snprintf(buf+len, sizeof(buf)-len, | ||
492 | " phy_err[%d]\t%d\n", | ||
493 | i, st->rxerr_phy_code[i]); | ||
494 | } | ||
495 | |||
488 | len += snprintf(buf+len, sizeof(buf)-len, "FIFO\t%d\t(%d%%)\n", | 496 | len += snprintf(buf+len, sizeof(buf)-len, "FIFO\t%d\t(%d%%)\n", |
489 | st->rxerr_fifo, | 497 | st->rxerr_fifo, |
490 | st->rx_all_count > 0 ? | 498 | st->rx_all_count > 0 ? |