Commit 3f2aa13f authored by Oleksij Rempel's avatar Oleksij Rempel Committed by John W. Linville

ath9k_htc: add spectral scan debug interface

Signed-off-by: default avatarOleksij Rempel <linux@rempel-privat.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 83fb287e
...@@ -626,8 +626,10 @@ int ath9k_htc_resume(struct htc_target *htc_handle); ...@@ -626,8 +626,10 @@ int ath9k_htc_resume(struct htc_target *htc_handle);
#endif #endif
#ifdef CONFIG_ATH9K_HTC_DEBUGFS #ifdef CONFIG_ATH9K_HTC_DEBUGFS
int ath9k_htc_init_debug(struct ath_hw *ah); int ath9k_htc_init_debug(struct ath_hw *ah);
void ath9k_htc_deinit_debug(struct ath9k_htc_priv *priv);
#else #else
static inline int ath9k_htc_init_debug(struct ath_hw *ah) { return 0; }; static inline int ath9k_htc_init_debug(struct ath_hw *ah) { return 0; };
static inline void ath9k_htc_deinit_debug(struct ath9k_htc_priv *priv) { return 0; };
#endif /* CONFIG_ATH9K_HTC_DEBUGFS */ #endif /* CONFIG_ATH9K_HTC_DEBUGFS */
#endif /* HTC_H */ #endif /* HTC_H */
...@@ -490,6 +490,10 @@ void ath9k_htc_get_et_stats(struct ieee80211_hw *hw, ...@@ -490,6 +490,10 @@ void ath9k_htc_get_et_stats(struct ieee80211_hw *hw,
WARN_ON(i != ATH9K_HTC_SSTATS_LEN); WARN_ON(i != ATH9K_HTC_SSTATS_LEN);
} }
void ath9k_htc_deinit_debug(struct ath9k_htc_priv *priv)
{
ath9k_cmn_spectral_deinit_debug(&priv->spec_priv);
}
int ath9k_htc_init_debug(struct ath_hw *ah) int ath9k_htc_init_debug(struct ath_hw *ah)
{ {
...@@ -501,6 +505,8 @@ int ath9k_htc_init_debug(struct ath_hw *ah) ...@@ -501,6 +505,8 @@ int ath9k_htc_init_debug(struct ath_hw *ah)
if (!priv->debug.debugfs_phy) if (!priv->debug.debugfs_phy)
return -ENOMEM; return -ENOMEM;
ath9k_cmn_spectral_init_debug(&priv->spec_priv, priv->debug.debugfs_phy);
debugfs_create_file("tgt_int_stats", S_IRUSR, priv->debug.debugfs_phy, debugfs_create_file("tgt_int_stats", S_IRUSR, priv->debug.debugfs_phy,
priv, &fops_tgt_int_stats); priv, &fops_tgt_int_stats);
debugfs_create_file("tgt_tx_stats", S_IRUSR, priv->debug.debugfs_phy, debugfs_create_file("tgt_tx_stats", S_IRUSR, priv->debug.debugfs_phy,
......
...@@ -102,6 +102,7 @@ static void ath9k_deinit_device(struct ath9k_htc_priv *priv) ...@@ -102,6 +102,7 @@ static void ath9k_deinit_device(struct ath9k_htc_priv *priv)
wiphy_rfkill_stop_polling(hw->wiphy); wiphy_rfkill_stop_polling(hw->wiphy);
ath9k_deinit_leds(priv); ath9k_deinit_leds(priv);
ath9k_htc_deinit_debug(priv);
ieee80211_unregister_hw(hw); ieee80211_unregister_hw(hw);
ath9k_rx_cleanup(priv); ath9k_rx_cleanup(priv);
ath9k_tx_cleanup(priv); ath9k_tx_cleanup(priv);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment