diff options
author | Sujith Manoharan <c_manoha@qca.qualcomm.com> | 2012-11-21 18:13:14 +0530 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-11-21 14:16:04 -0500 |
commit | 4d28f771ff2ca0701999b037df38ad06e949edf6 (patch) | |
tree | 09543a522d4285833278289c14eca7facec50d6c /drivers/net/wireless/ath/ath9k/rc.h | |
parent | 1c11e10b6a64f14427be518ccc2a242b73fc3d9f (diff) |
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.h | 16 |
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 528c83cf701..267dbfcfaa9 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); |