diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/init.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/init.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c index 0237b2868961..2ba494567777 100644 --- a/drivers/net/wireless/ath/ath9k/init.c +++ b/drivers/net/wireless/ath/ath9k/init.c | |||
@@ -787,8 +787,7 @@ void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw) | |||
787 | hw->wiphy->iface_combinations = if_comb; | 787 | hw->wiphy->iface_combinations = if_comb; |
788 | hw->wiphy->n_iface_combinations = ARRAY_SIZE(if_comb); | 788 | hw->wiphy->n_iface_combinations = ARRAY_SIZE(if_comb); |
789 | 789 | ||
790 | if (AR_SREV_5416(sc->sc_ah)) | 790 | hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT; |
791 | hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT; | ||
792 | 791 | ||
793 | hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN; | 792 | hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN; |
794 | hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS; | 793 | hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS; |
@@ -830,10 +829,6 @@ void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw) | |||
830 | sc->ant_rx = hw->wiphy->available_antennas_rx; | 829 | sc->ant_rx = hw->wiphy->available_antennas_rx; |
831 | sc->ant_tx = hw->wiphy->available_antennas_tx; | 830 | sc->ant_tx = hw->wiphy->available_antennas_tx; |
832 | 831 | ||
833 | #ifdef CONFIG_ATH9K_RATE_CONTROL | ||
834 | hw->rate_control_algorithm = "ath9k_rate_control"; | ||
835 | #endif | ||
836 | |||
837 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ) | 832 | if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ) |
838 | hw->wiphy->bands[IEEE80211_BAND_2GHZ] = | 833 | hw->wiphy->bands[IEEE80211_BAND_2GHZ] = |
839 | &sc->sbands[IEEE80211_BAND_2GHZ]; | 834 | &sc->sbands[IEEE80211_BAND_2GHZ]; |
@@ -906,7 +901,7 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc, | |||
906 | if (!ath_is_world_regd(reg)) { | 901 | if (!ath_is_world_regd(reg)) { |
907 | error = regulatory_hint(hw->wiphy, reg->alpha2); | 902 | error = regulatory_hint(hw->wiphy, reg->alpha2); |
908 | if (error) | 903 | if (error) |
909 | goto unregister; | 904 | goto debug_cleanup; |
910 | } | 905 | } |
911 | 906 | ||
912 | ath_init_leds(sc); | 907 | ath_init_leds(sc); |
@@ -914,6 +909,8 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc, | |||
914 | 909 | ||
915 | return 0; | 910 | return 0; |
916 | 911 | ||
912 | debug_cleanup: | ||
913 | ath9k_deinit_debug(sc); | ||
917 | unregister: | 914 | unregister: |
918 | ieee80211_unregister_hw(hw); | 915 | ieee80211_unregister_hw(hw); |
919 | rx_cleanup: | 916 | rx_cleanup: |
@@ -942,11 +939,6 @@ static void ath9k_deinit_softc(struct ath_softc *sc) | |||
942 | sc->dfs_detector->exit(sc->dfs_detector); | 939 | sc->dfs_detector->exit(sc->dfs_detector); |
943 | 940 | ||
944 | ath9k_eeprom_release(sc); | 941 | 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 | } | 942 | } |
951 | 943 | ||
952 | void ath9k_deinit_device(struct ath_softc *sc) | 944 | void ath9k_deinit_device(struct ath_softc *sc) |
@@ -960,6 +952,7 @@ void ath9k_deinit_device(struct ath_softc *sc) | |||
960 | 952 | ||
961 | ath9k_ps_restore(sc); | 953 | ath9k_ps_restore(sc); |
962 | 954 | ||
955 | ath9k_deinit_debug(sc); | ||
963 | ieee80211_unregister_hw(hw); | 956 | ieee80211_unregister_hw(hw); |
964 | ath_rx_cleanup(sc); | 957 | ath_rx_cleanup(sc); |
965 | ath9k_deinit_softc(sc); | 958 | ath9k_deinit_softc(sc); |