aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/init.c
diff options
context:
space:
mode:
authorJohn W. Linville <linville@tuxdriver.com>2013-06-12 14:35:23 -0400
committerJohn W. Linville <linville@tuxdriver.com>2013-06-12 14:35:23 -0400
commit861bca265e7808e2493590843b8585f6943af16f (patch)
treef9c6d3beee927191856479888bc845859cd135cf /drivers/net/wireless/ath/ath9k/init.c
parent8b3e7be437a6b62118d0485ad971e724afe23fdf (diff)
parente0e29b683d6784ef59bbc914eac85a04b650e63c (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
Conflicts: drivers/net/wireless/ath/ath9k/Kconfig net/mac80211/iface.c
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/init.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/init.c17
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 979bde3b8f9e..389ee1b59976 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -792,8 +792,7 @@ void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
792 hw->wiphy->iface_combinations = if_comb; 792 hw->wiphy->iface_combinations = if_comb;
793 hw->wiphy->n_iface_combinations = ARRAY_SIZE(if_comb); 793 hw->wiphy->n_iface_combinations = ARRAY_SIZE(if_comb);
794 794
795 if (AR_SREV_5416(sc->sc_ah)) 795 hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;
796 hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT;
797 796
798 hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN; 797 hw->wiphy->flags |= WIPHY_FLAG_IBSS_RSN;
799 hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS; 798 hw->wiphy->flags |= WIPHY_FLAG_SUPPORTS_TDLS;
@@ -831,10 +830,6 @@ void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
831 sc->ant_rx = hw->wiphy->available_antennas_rx; 830 sc->ant_rx = hw->wiphy->available_antennas_rx;
832 sc->ant_tx = hw->wiphy->available_antennas_tx; 831 sc->ant_tx = hw->wiphy->available_antennas_tx;
833 832
834#ifdef CONFIG_ATH9K_RATE_CONTROL
835 hw->rate_control_algorithm = "ath9k_rate_control";
836#endif
837
838 if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ) 833 if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_2GHZ)
839 hw->wiphy->bands[IEEE80211_BAND_2GHZ] = 834 hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
840 &sc->sbands[IEEE80211_BAND_2GHZ]; 835 &sc->sbands[IEEE80211_BAND_2GHZ];
@@ -907,7 +902,7 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc,
907 if (!ath_is_world_regd(reg)) { 902 if (!ath_is_world_regd(reg)) {
908 error = regulatory_hint(hw->wiphy, reg->alpha2); 903 error = regulatory_hint(hw->wiphy, reg->alpha2);
909 if (error) 904 if (error)
910 goto unregister; 905 goto debug_cleanup;
911 } 906 }
912 907
913 ath_init_leds(sc); 908 ath_init_leds(sc);
@@ -915,6 +910,8 @@ int ath9k_init_device(u16 devid, struct ath_softc *sc,
915 910
916 return 0; 911 return 0;
917 912
913debug_cleanup:
914 ath9k_deinit_debug(sc);
918unregister: 915unregister:
919 ieee80211_unregister_hw(hw); 916 ieee80211_unregister_hw(hw);
920rx_cleanup: 917rx_cleanup:
@@ -943,11 +940,6 @@ static void ath9k_deinit_softc(struct ath_softc *sc)
943 sc->dfs_detector->exit(sc->dfs_detector); 940 sc->dfs_detector->exit(sc->dfs_detector);
944 941
945 ath9k_eeprom_release(sc); 942 ath9k_eeprom_release(sc);
946
947 if (config_enabled(CONFIG_ATH9K_DEBUGFS) && sc->rfs_chan_spec_scan) {
948 relay_close(sc->rfs_chan_spec_scan);
949 sc->rfs_chan_spec_scan = NULL;
950 }
951} 943}
952 944
953void ath9k_deinit_device(struct ath_softc *sc) 945void ath9k_deinit_device(struct ath_softc *sc)
@@ -961,6 +953,7 @@ void ath9k_deinit_device(struct ath_softc *sc)
961 953
962 ath9k_ps_restore(sc); 954 ath9k_ps_restore(sc);
963 955
956 ath9k_deinit_debug(sc);
964 ieee80211_unregister_hw(hw); 957 ieee80211_unregister_hw(hw);
965 ath_rx_cleanup(sc); 958 ath_rx_cleanup(sc);
966 ath9k_deinit_softc(sc); 959 ath9k_deinit_softc(sc);