diff options
-rw-r--r-- | drivers/net/wireless/ath/ath9k/debug.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/debug.h | 5 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/init.c | 10 |
3 files changed, 17 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c index e6307b86363a..b37eb8d38811 100644 --- a/drivers/net/wireless/ath/ath9k/debug.c +++ b/drivers/net/wireless/ath/ath9k/debug.c | |||
@@ -2008,6 +2008,14 @@ void ath9k_get_et_stats(struct ieee80211_hw *hw, | |||
2008 | WARN_ON(i != ATH9K_SSTATS_LEN); | 2008 | WARN_ON(i != ATH9K_SSTATS_LEN); |
2009 | } | 2009 | } |
2010 | 2010 | ||
2011 | void ath9k_deinit_debug(struct ath_softc *sc) | ||
2012 | { | ||
2013 | if (config_enabled(CONFIG_ATH9K_DEBUGFS) && sc->rfs_chan_spec_scan) { | ||
2014 | relay_close(sc->rfs_chan_spec_scan); | ||
2015 | sc->rfs_chan_spec_scan = NULL; | ||
2016 | } | ||
2017 | } | ||
2018 | |||
2011 | int ath9k_init_debug(struct ath_hw *ah) | 2019 | int ath9k_init_debug(struct ath_hw *ah) |
2012 | { | 2020 | { |
2013 | struct ath_common *common = ath9k_hw_common(ah); | 2021 | struct ath_common *common = ath9k_hw_common(ah); |
diff --git a/drivers/net/wireless/ath/ath9k/debug.h b/drivers/net/wireless/ath/ath9k/debug.h index 794a7ec83a24..9d49aab8b989 100644 --- a/drivers/net/wireless/ath/ath9k/debug.h +++ b/drivers/net/wireless/ath/ath9k/debug.h | |||
@@ -304,6 +304,7 @@ struct ath9k_debug { | |||
304 | }; | 304 | }; |
305 | 305 | ||
306 | int ath9k_init_debug(struct ath_hw *ah); | 306 | int ath9k_init_debug(struct ath_hw *ah); |
307 | void ath9k_deinit_debug(struct ath_softc *sc); | ||
307 | 308 | ||
308 | void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status); | 309 | void ath_debug_stat_interrupt(struct ath_softc *sc, enum ath9k_int status); |
309 | void ath_debug_stat_tx(struct ath_softc *sc, struct ath_buf *bf, | 310 | void ath_debug_stat_tx(struct ath_softc *sc, struct ath_buf *bf, |
@@ -339,6 +340,10 @@ static inline int ath9k_init_debug(struct ath_hw *ah) | |||
339 | return 0; | 340 | return 0; |
340 | } | 341 | } |
341 | 342 | ||
343 | static inline void ath9k_deinit_debug(struct ath_softc *sc) | ||
344 | { | ||
345 | } | ||
346 | |||
342 | static inline void ath_debug_stat_interrupt(struct ath_softc *sc, | 347 | static inline void ath_debug_stat_interrupt(struct ath_softc *sc, |
343 | enum ath9k_int status) | 348 | enum ath9k_int status) |
344 | { | 349 | { |
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index 0237b2868961..aba415103f94 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c | |||
@@ -906,7 +906,7 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc, | |||
906 | if (!ath_is_world_regd(reg)) { | 906 | if (!ath_is_world_regd(reg)) { |
907 | error = regulatory_hint(hw->wiphy, reg->alpha2); | 907 | error = regulatory_hint(hw->wiphy, reg->alpha2); |
908 | if (error) | 908 | if (error) |
909 | goto unregister; | 909 | goto debug_cleanup; |
910 | } | 910 | } |
911 | 911 | ||
912 | ath_init_leds(sc); | 912 | ath_init_leds(sc); |
@@ -914,6 +914,8 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc, | |||
914 | 914 | ||
915 | return 0; | 915 | return 0; |
916 | 916 | ||
917 | debug_cleanup: | ||
918 | ath9k_deinit_debug(sc); | ||
917 | unregister: | 919 | unregister: |
918 | ieee80211_unregister_hw(hw); | 920 | ieee80211_unregister_hw(hw); |
919 | rx_cleanup: | 921 | rx_cleanup: |
@@ -942,11 +944,6 @@ static void ath9k_deinit_softc(struct ath_softc *sc) | |||
942 | sc->dfs_detector->exit(sc->dfs_detector); | 944 | sc->dfs_detector->exit(sc->dfs_detector); |
943 | 945 | ||
944 | ath9k_eeprom_release(sc); | 946 | ath9k_eeprom_release(sc); |
945 | |||
946 | if (config_enabled(CONFIG_ATH9K_DEBUGFS) && sc->rfs_chan_spec_scan) { | ||
947 | relay_close(sc->rfs_chan_spec_scan); | ||
948 | sc->rfs_chan_spec_scan = NULL; | ||
949 | } | ||
950 | } | 947 | } |
951 | 948 | ||
952 | void ath9k_deinit_device(struct ath_softc *sc) | 949 | void ath9k_deinit_device(struct ath_softc *sc) |
@@ -960,6 +957,7 @@ void ath9k_deinit_device(struct ath_softc *sc) | |||
960 | 957 | ||
961 | ath9k_ps_restore(sc); | 958 | ath9k_ps_restore(sc); |
962 | 959 | ||
960 | ath9k_deinit_debug(sc); | ||
963 | ieee80211_unregister_hw(hw); | 961 | ieee80211_unregister_hw(hw); |
964 | ath_rx_cleanup(sc); | 962 | ath_rx_cleanup(sc); |
965 | ath9k_deinit_softc(sc); | 963 | ath9k_deinit_softc(sc); |