summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/rc.h
diff options
context:
space:
mode:
authorSujith Manoharan <c_manoha@qca.qualcomm.com>2012-11-21 18:13:14 +0530
committerJohn W. Linville <linville@tuxdriver.com>2012-11-21 14:16:04 -0500
commit4d28f771ff2ca0701999b037df38ad06e949edf6 (patch)
tree09543a522d4285833278289c14eca7facec50d6c /drivers/net/wireless/ath/ath9k/rc.h
parent1c11e10b6a64f14427be518ccc2a242b73fc3d9f (diff)
downloadop-kernel-dev-4d28f771ff2ca0701999b037df38ad06e949edf6.zip
op-kernel-dev-4d28f771ff2ca0701999b037df38ad06e949edf6.tar.gz
ath9k: Fix rate control debugging
Update the rate statistics only when debugfs has been enabled in ath9k and mac80211 and move the stat() functions under proper conditionals. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/rc.h')
-rw-r--r--drivers/net/wireless/ath/ath9k/rc.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/rc.h b/drivers/net/wireless/ath/ath9k/rc.h
index 528c83c..267dbfc 100644
--- a/drivers/net/wireless/ath/ath9k/rc.h
+++ b/drivers/net/wireless/ath/ath9k/rc.h
@@ -213,10 +213,24 @@ struct ath_rate_priv {
#if defined(CONFIG_MAC80211_DEBUGFS) && defined(CONFIG_ATH9K_DEBUGFS)
struct dentry *debugfs_rcstats;
-#endif
struct ath_rc_stats rcstats[RATE_TABLE_SIZE];
+#endif
};
+#if defined(CONFIG_MAC80211_DEBUGFS) && defined(CONFIG_ATH9K_DEBUGFS)
+void ath_debug_stat_rc(struct ath_rate_priv *rc, int final_rate);
+void ath_debug_stat_retries(struct ath_rate_priv *rc, int rix,
+ int xretries, int retries, u8 per);
+#else
+static inline void ath_debug_stat_rc(struct ath_rate_priv *rc, int final_rate)
+{
+}
+static inline void ath_debug_stat_retries(struct ath_rate_priv *rc, int rix,
+ int xretries, int retries, u8 per)
+{
+}
+#endif
+
#ifdef CONFIG_ATH9K_RATE_CONTROL
int ath_rate_control_register(void);
void ath_rate_control_unregister(void);
OpenPOWER on IntegriCloud