]> Pileus Git - ~andy/linux/blobdiff - drivers/net/wireless/ath/ath9k/debug.h
ath9k: Add a debugfs file "node_recv"
[~andy/linux] / drivers / net / wireless / ath / ath9k / debug.h
index ec02d38ea8eae813b4078106a2426c2cd1862319..b01b8c3ec570468ee440ce50cc267c4a604a6546 100644 (file)
@@ -27,11 +27,13 @@ struct fft_sample_tlv;
 
 #ifdef CONFIG_ATH9K_DEBUGFS
 #define TX_STAT_INC(q, c) sc->debug.stats.txstats[q].c++
+#define RX_STAT_INC(c) (sc->debug.stats.rxstats.c++)
 #define RESET_STAT_INC(sc, type) sc->debug.stats.reset[type]++
 #define ANT_STAT_INC(i, c) sc->debug.stats.ant_stats[i].c++
 #define ANT_LNA_INC(i, c) sc->debug.stats.ant_stats[i].lna_recv_cnt[c]++;
 #else
 #define TX_STAT_INC(q, c) do { } while (0)
+#define RX_STAT_INC(c)
 #define RESET_STAT_INC(sc, type) do { } while (0)
 #define ANT_STAT_INC(i, c) do { } while (0)
 #define ANT_LNA_INC(i, c) do { } while (0)
@@ -201,7 +203,23 @@ struct ath_tx_stats {
                                 TXSTATS[PR_QNUM(IEEE80211_AC_VO)].elem); \
        } while(0)
 
-#define RX_STAT_INC(c) (sc->debug.stats.rxstats.c++)
+struct ath_rx_rate_stats {
+       struct {
+               u32 ht20_cnt;
+               u32 ht40_cnt;
+               u32 sgi_cnt;
+               u32 lgi_cnt;
+       } ht_stats[24];
+
+       struct {
+               u32 ofdm_cnt;
+       } ofdm_stats[8];
+
+       struct {
+               u32 cck_lp_cnt;
+               u32 cck_sp_cnt;
+       } cck_stats[4];
+};
 
 /**
  * struct ath_rx_stats - RX Statistics
@@ -299,8 +317,6 @@ void ath9k_debug_sync_cause(struct ath_softc *sc, u32 sync_cause);
 
 #else
 
-#define RX_STAT_INC(c) /* NOP */
-
 static inline int ath9k_init_debug(struct ath_hw *ah)
 {
        return 0;
@@ -338,4 +354,16 @@ ath9k_debug_sync_cause(struct ath_softc *sc, u32 sync_cause)
 
 #endif /* CONFIG_ATH9K_DEBUGFS */
 
+#ifdef CONFIG_ATH9K_STATION_STATISTICS
+void ath_debug_rate_stats(struct ath_softc *sc,
+                         struct ath_rx_status *rs,
+                         struct sk_buff *skb);
+#else
+static inline void ath_debug_rate_stats(struct ath_softc *sc,
+                                       struct ath_rx_status *rs,
+                                       struct sk_buff *skb)
+{
+}
+#endif /* CONFIG_ATH9K_STATION_STATISTICS */
+
 #endif /* DEBUG_H */