diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath5k/debug.c')
-rw-r--r-- | drivers/net/wireless/ath/ath5k/debug.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/net/wireless/ath/ath5k/debug.c b/drivers/net/wireless/ath/ath5k/debug.c index a342a9da1b3..a3b21712533 100644 --- a/drivers/net/wireless/ath/ath5k/debug.c +++ b/drivers/net/wireless/ath/ath5k/debug.c | |||
@@ -725,20 +725,21 @@ static ssize_t read_file_ani(struct file *file, char __user *user_buf, | |||
725 | len += snprintf(buf+len, sizeof(buf)-len, | 725 | len += snprintf(buf+len, sizeof(buf)-len, |
726 | "beacon RSSI average:\t%d\n", | 726 | "beacon RSSI average:\t%d\n", |
727 | sc->ah->ah_beacon_rssi_avg.avg); | 727 | sc->ah->ah_beacon_rssi_avg.avg); |
728 | |||
729 | #define CC_PRINT(_struct, _field) \ | ||
730 | _struct._field, \ | ||
731 | _struct.cycles > 0 ? \ | ||
732 | _struct._field*100/_struct.cycles : 0 | ||
733 | |||
728 | len += snprintf(buf+len, sizeof(buf)-len, "profcnt tx\t\t%u\t(%d%%)\n", | 734 | len += snprintf(buf+len, sizeof(buf)-len, "profcnt tx\t\t%u\t(%d%%)\n", |
729 | as->pfc_tx, | 735 | CC_PRINT(as->last_cc, tx_frame)); |
730 | as->pfc_cycles > 0 ? | ||
731 | as->pfc_tx*100/as->pfc_cycles : 0); | ||
732 | len += snprintf(buf+len, sizeof(buf)-len, "profcnt rx\t\t%u\t(%d%%)\n", | 736 | len += snprintf(buf+len, sizeof(buf)-len, "profcnt rx\t\t%u\t(%d%%)\n", |
733 | as->pfc_rx, | 737 | CC_PRINT(as->last_cc, rx_frame)); |
734 | as->pfc_cycles > 0 ? | ||
735 | as->pfc_rx*100/as->pfc_cycles : 0); | ||
736 | len += snprintf(buf+len, sizeof(buf)-len, "profcnt busy\t\t%u\t(%d%%)\n", | 738 | len += snprintf(buf+len, sizeof(buf)-len, "profcnt busy\t\t%u\t(%d%%)\n", |
737 | as->pfc_busy, | 739 | CC_PRINT(as->last_cc, rx_busy)); |
738 | as->pfc_cycles > 0 ? | 740 | #undef CC_PRINT |
739 | as->pfc_busy*100/as->pfc_cycles : 0); | ||
740 | len += snprintf(buf+len, sizeof(buf)-len, "profcnt cycles\t\t%u\n", | 741 | len += snprintf(buf+len, sizeof(buf)-len, "profcnt cycles\t\t%u\n", |
741 | as->pfc_cycles); | 742 | as->last_cc.cycles); |
742 | len += snprintf(buf+len, sizeof(buf)-len, | 743 | len += snprintf(buf+len, sizeof(buf)-len, |
743 | "listen time\t\t%d\tlast: %d\n", | 744 | "listen time\t\t%d\tlast: %d\n", |
744 | as->listen_time, as->last_listen); | 745 | as->listen_time, as->last_listen); |