aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/debug.h
diff options
context:
space:
mode:
authorRajkumar Manoharan <rmanohar@qca.qualcomm.com>2011-08-27 06:47:47 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-08-29 15:33:03 -0400
commitcf3af74824b1bf2bd60eb6a0dd82b27f9e9236ac (patch)
treec5ae88548f8acc38549032e8d659b39333b19417 /drivers/net/wireless/ath/ath9k/debug.h
parent059ee09b99942bf64f4075196a7a2a992e64193d (diff)
ath9k: Add debugfs support for mac/baseband samples
This patch keep track of number of samples that includes DMA debugs registers, PCU observe, CR, channel noise, cycle conters, noisefloor history buffer and last N number of tx and rx descriptor status. These samples are grouped in table manner which dumping in debgufs. Debugfs file location: <debugfs_mnt>/ieee80211/phy#/ath9k/samples Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/debug.h')
-rw-r--r--drivers/net/wireless/ath/ath9k/debug.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/debug.h b/drivers/net/wireless/ath/ath9k/debug.h
index 4a04510e1111..95f85bdc8db7 100644
--- a/drivers/net/wireless/ath/ath9k/debug.h
+++ b/drivers/net/wireless/ath/ath9k/debug.h
@@ -177,14 +177,57 @@ struct ath_stats {
177 struct ath_rx_stats rxstats; 177 struct ath_rx_stats rxstats;
178}; 178};
179 179
180#define ATH_DBG_MAX_SAMPLES 10
181struct ath_dbg_bb_mac_samp {
182 u32 dma_dbg_reg_vals[ATH9K_NUM_DMA_DEBUG_REGS];
183 u32 pcu_obs, pcu_cr, noise;
184 struct {
185 u64 jiffies;
186 int8_t rssi_ctl0;
187 int8_t rssi_ctl1;
188 int8_t rssi_ctl2;
189 int8_t rssi_ext0;
190 int8_t rssi_ext1;
191 int8_t rssi_ext2;
192 int8_t rssi;
193 bool isok;
194 u8 rts_fail_cnt;
195 u8 data_fail_cnt;
196 u8 rateindex;
197 u8 qid;
198 u8 tid;
199 } ts[ATH_DBG_MAX_SAMPLES];
200 struct {
201 u64 jiffies;
202 int8_t rssi_ctl0;
203 int8_t rssi_ctl1;
204 int8_t rssi_ctl2;
205 int8_t rssi_ext0;
206 int8_t rssi_ext1;
207 int8_t rssi_ext2;
208 int8_t rssi;
209 bool is_mybeacon;
210 u8 antenna;
211 u8 rate;
212 } rs[ATH_DBG_MAX_SAMPLES];
213 struct ath_cycle_counters cc;
214 struct ath9k_nfcal_hist nfCalHist[NUM_NF_READINGS];
215};
216
180struct ath9k_debug { 217struct ath9k_debug {
181 struct dentry *debugfs_phy; 218 struct dentry *debugfs_phy;
182 u32 regidx; 219 u32 regidx;
183 struct ath_stats stats; 220 struct ath_stats stats;
221 spinlock_t samp_lock;
222 struct ath_dbg_bb_mac_samp bb_mac_samp[ATH_DBG_MAX_SAMPLES];
223 u8 sampidx;
224 u8 tsidx;
225 u8 rsidx;
184}; 226};
185 227
186int ath9k_init_debug(struct ath_hw *ah); 228int ath9k_init_debug(struct ath_hw *ah);
187 229
230void ath9k_debug_samp_bb_mac(struct ath_softc *sc);
188void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status); 231void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status);
189void ath_debug_stat_tx(struct ath_softc *sc, struct ath_buf *bf, 232void ath_debug_stat_tx(struct ath_softc *sc, struct ath_buf *bf,
190 struct ath_tx_status *ts, struct ath_txq *txq); 233 struct ath_tx_status *ts, struct ath_txq *txq);
@@ -197,6 +240,10 @@ static inline int ath9k_init_debug(struct ath_hw *ah)
197 return 0; 240 return 0;
198} 241}
199 242
243static inline void ath9k_debug_samp_bb_mac(struct ath_softc *sc)
244{
245}
246
200static inline void ath_debug_stat_interrupt(struct ath_softc *sc, 247static inline void ath_debug_stat_interrupt(struct ath_softc *sc,
201 enum ath9k_int status) 248 enum ath9k_int status)
202{ 249{