diff options
author | Luis R. Rodriguez <lrodriguez@atheros.com> | 2010-04-15 17:38:20 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-04-16 15:43:20 -0400 |
commit | bab1f62e214f19d2edb1b5508ad5ba1b0a8a22ec (patch) | |
tree | cbc7cf8784b41573bd2043340a14858583b69208 /drivers/net/wireless/ath/ath9k/hw.c | |
parent | 8525f2801df14b6c4ae6a96127e47d646be5304c (diff) |
ath9k_hw: move init config and default after chip is up
This allows us to add SREV checks on these helpers.
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/hw.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index f057d1ad929..65c3b9e5d9c 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -409,8 +409,6 @@ static void ath9k_hw_init_defaults(struct ath_hw *ah) | |||
409 | ah->hw_version.subvendorid = 0; | 409 | ah->hw_version.subvendorid = 0; |
410 | 410 | ||
411 | ah->ah_flags = 0; | 411 | ah->ah_flags = 0; |
412 | if (ah->hw_version.devid == AR5416_AR9100_DEVID) | ||
413 | ah->hw_version.macVersion = AR_SREV_VERSION_9100; | ||
414 | if (!AR_SREV_9100(ah)) | 412 | if (!AR_SREV_9100(ah)) |
415 | ah->ah_flags = AH_USE_EEPROM; | 413 | ah->ah_flags = AH_USE_EEPROM; |
416 | 414 | ||
@@ -873,8 +871,8 @@ static int __ath9k_hw_init(struct ath_hw *ah) | |||
873 | struct ath_common *common = ath9k_hw_common(ah); | 871 | struct ath_common *common = ath9k_hw_common(ah); |
874 | int r = 0; | 872 | int r = 0; |
875 | 873 | ||
876 | ath9k_hw_init_defaults(ah); | 874 | if (ah->hw_version.devid == AR5416_AR9100_DEVID) |
877 | ath9k_hw_init_config(ah); | 875 | ah->hw_version.macVersion = AR_SREV_VERSION_9100; |
878 | 876 | ||
879 | if (!ath9k_hw_set_reset_reg(ah, ATH9K_RESET_POWER_ON)) { | 877 | if (!ath9k_hw_set_reset_reg(ah, ATH9K_RESET_POWER_ON)) { |
880 | ath_print(common, ATH_DBG_FATAL, | 878 | ath_print(common, ATH_DBG_FATAL, |
@@ -882,6 +880,9 @@ static int __ath9k_hw_init(struct ath_hw *ah) | |||
882 | return -EIO; | 880 | return -EIO; |
883 | } | 881 | } |
884 | 882 | ||
883 | ath9k_hw_init_defaults(ah); | ||
884 | ath9k_hw_init_config(ah); | ||
885 | |||
885 | ath9k_hw_attach_ops(ah); | 886 | ath9k_hw_attach_ops(ah); |
886 | 887 | ||
887 | if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE)) { | 888 | if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE)) { |