aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k
diff options
context:
space:
mode:
authorSenthil Balasubramanian <senthilkumar@atheros.com>2011-04-08 06:00:34 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-04-12 16:58:39 -0400
commit7d75541499319dff375af252345ae1999540b4a9 (patch)
tree66e4dc7cfcff0e15bb63d5b687a64343fc362199 /drivers/net/wireless/ath/ath9k
parent1570ca59279a74db73b8ff840abdfaf64a9ee2ff (diff)
ath9k: Add RSSI information from control and extension chains
Export RSSI information from all the control and extension channel chains to debugfs. Also add rx antenna information to debugfs. This will be useful for debugging purpose. Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k')
-rw-r--r--drivers/net/wireless/ath/ath9k/debug.c40
-rw-r--r--drivers/net/wireless/ath/ath9k/debug.h7
2 files changed, 46 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
index a762cadb3ab7..34f191ec8e8c 100644
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -845,7 +845,7 @@ static ssize_t read_file_recv(struct file *file, char __user *user_buf,
845 845
846 struct ath_softc *sc = file->private_data; 846 struct ath_softc *sc = file->private_data;
847 char *buf; 847 char *buf;
848 unsigned int len = 0, size = 1152; 848 unsigned int len = 0, size = 1400;
849 ssize_t retval = 0; 849 ssize_t retval = 0;
850 850
851 buf = kzalloc(size, GFP_KERNEL); 851 buf = kzalloc(size, GFP_KERNEL);
@@ -874,6 +874,34 @@ static ssize_t read_file_recv(struct file *file, char __user *user_buf,
874 "%18s : %10u\n", "DECRYPT BUSY ERR", 874 "%18s : %10u\n", "DECRYPT BUSY ERR",
875 sc->debug.stats.rxstats.decrypt_busy_err); 875 sc->debug.stats.rxstats.decrypt_busy_err);
876 876
877 len += snprintf(buf + len, size - len,
878 "%18s : %10d\n", "RSSI-CTL0",
879 sc->debug.stats.rxstats.rs_rssi_ctl0);
880
881 len += snprintf(buf + len, size - len,
882 "%18s : %10d\n", "RSSI-CTL1",
883 sc->debug.stats.rxstats.rs_rssi_ctl1);
884
885 len += snprintf(buf + len, size - len,
886 "%18s : %10d\n", "RSSI-CTL2",
887 sc->debug.stats.rxstats.rs_rssi_ctl2);
888
889 len += snprintf(buf + len, size - len,
890 "%18s : %10d\n", "RSSI-EXT0",
891 sc->debug.stats.rxstats.rs_rssi_ext0);
892
893 len += snprintf(buf + len, size - len,
894 "%18s : %10d\n", "RSSI-EXT1",
895 sc->debug.stats.rxstats.rs_rssi_ext1);
896
897 len += snprintf(buf + len, size - len,
898 "%18s : %10d\n", "RSSI-EXT2",
899 sc->debug.stats.rxstats.rs_rssi_ext2);
900
901 len += snprintf(buf + len, size - len,
902 "%18s : %10d\n", "Rx Antenna",
903 sc->debug.stats.rxstats.rs_antenna);
904
877 PHY_ERR("UNDERRUN", ATH9K_PHYERR_UNDERRUN); 905 PHY_ERR("UNDERRUN", ATH9K_PHYERR_UNDERRUN);
878 PHY_ERR("TIMING", ATH9K_PHYERR_TIMING); 906 PHY_ERR("TIMING", ATH9K_PHYERR_TIMING);
879 PHY_ERR("PARITY", ATH9K_PHYERR_PARITY); 907 PHY_ERR("PARITY", ATH9K_PHYERR_PARITY);
@@ -948,6 +976,16 @@ void ath_debug_stat_rx(struct ath_softc *sc, struct ath_rx_status *rs)
948 RX_PHY_ERR_INC(phyerr); 976 RX_PHY_ERR_INC(phyerr);
949 } 977 }
950 978
979 sc->debug.stats.rxstats.rs_rssi_ctl0 = rs->rs_rssi_ctl0;
980 sc->debug.stats.rxstats.rs_rssi_ctl1 = rs->rs_rssi_ctl1;
981 sc->debug.stats.rxstats.rs_rssi_ctl2 = rs->rs_rssi_ctl2;
982
983 sc->debug.stats.rxstats.rs_rssi_ext0 = rs->rs_rssi_ext0;
984 sc->debug.stats.rxstats.rs_rssi_ext1 = rs->rs_rssi_ext1;
985 sc->debug.stats.rxstats.rs_rssi_ext2 = rs->rs_rssi_ext2;
986
987 sc->debug.stats.rxstats.rs_antenna = rs->rs_antenna;
988
951#undef RX_STAT_INC 989#undef RX_STAT_INC
952#undef RX_PHY_ERR_INC 990#undef RX_PHY_ERR_INC
953} 991}
diff --git a/drivers/net/wireless/ath/ath9k/debug.h b/drivers/net/wireless/ath/ath9k/debug.h
index 59338de0ce19..1f9f8eada465 100644
--- a/drivers/net/wireless/ath/ath9k/debug.h
+++ b/drivers/net/wireless/ath/ath9k/debug.h
@@ -157,6 +157,13 @@ struct ath_rx_stats {
157 u32 post_delim_crc_err; 157 u32 post_delim_crc_err;
158 u32 decrypt_busy_err; 158 u32 decrypt_busy_err;
159 u32 phy_err_stats[ATH9K_PHYERR_MAX]; 159 u32 phy_err_stats[ATH9K_PHYERR_MAX];
160 int8_t rs_rssi_ctl0;
161 int8_t rs_rssi_ctl1;
162 int8_t rs_rssi_ctl2;
163 int8_t rs_rssi_ext0;
164 int8_t rs_rssi_ext1;
165 int8_t rs_rssi_ext2;
166 u8 rs_antenna;
160}; 167};
161 168
162struct ath_stats { 169struct ath_stats {