diff options
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/hw.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 8949debeb0fe..4bfb3a847920 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include "ar5008_initvals.h" | 23 | #include "ar5008_initvals.h" |
24 | #include "ar9001_initvals.h" | 24 | #include "ar9001_initvals.h" |
25 | #include "ar9002_initvals.h" | 25 | #include "ar9002_initvals.h" |
26 | #include "ar9003_initvals.h" | ||
26 | 27 | ||
27 | #define ATH9K_CLOCK_RATE_CCK 22 | 28 | #define ATH9K_CLOCK_RATE_CCK 22 |
28 | #define ATH9K_CLOCK_RATE_5GHZ_OFDM 40 | 29 | #define ATH9K_CLOCK_RATE_5GHZ_OFDM 40 |
@@ -813,6 +814,77 @@ static void ar9002_hw_init_mode_regs(struct ath_hw *ah) | |||
813 | } | 814 | } |
814 | } | 815 | } |
815 | 816 | ||
817 | /* AR9003 2.0 - new INI format (pre, core, post arrays per subsystem) */ | ||
818 | static void ar9003_hw_init_mode_regs(struct ath_hw *ah) | ||
819 | { | ||
820 | /* mac */ | ||
821 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_PRE], NULL, 0, 0); | ||
822 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_CORE], | ||
823 | ar9300_2p0_mac_core, | ||
824 | ARRAY_SIZE(ar9300_2p0_mac_core), 2); | ||
825 | INIT_INI_ARRAY(&ah->iniMac[ATH_INI_POST], | ||
826 | ar9300_2p0_mac_postamble, | ||
827 | ARRAY_SIZE(ar9300_2p0_mac_postamble), 5); | ||
828 | |||
829 | /* bb */ | ||
830 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_PRE], NULL, 0, 0); | ||
831 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_CORE], | ||
832 | ar9300_2p0_baseband_core, | ||
833 | ARRAY_SIZE(ar9300_2p0_baseband_core), 2); | ||
834 | INIT_INI_ARRAY(&ah->iniBB[ATH_INI_POST], | ||
835 | ar9300_2p0_baseband_postamble, | ||
836 | ARRAY_SIZE(ar9300_2p0_baseband_postamble), 5); | ||
837 | |||
838 | /* radio */ | ||
839 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_PRE], NULL, 0, 0); | ||
840 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_CORE], | ||
841 | ar9300_2p0_radio_core, | ||
842 | ARRAY_SIZE(ar9300_2p0_radio_core), 2); | ||
843 | INIT_INI_ARRAY(&ah->iniRadio[ATH_INI_POST], | ||
844 | ar9300_2p0_radio_postamble, | ||
845 | ARRAY_SIZE(ar9300_2p0_radio_postamble), 5); | ||
846 | |||
847 | /* soc */ | ||
848 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_PRE], | ||
849 | ar9300_2p0_soc_preamble, | ||
850 | ARRAY_SIZE(ar9300_2p0_soc_preamble), 2); | ||
851 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_CORE], NULL, 0, 0); | ||
852 | INIT_INI_ARRAY(&ah->iniSOC[ATH_INI_POST], | ||
853 | ar9300_2p0_soc_postamble, | ||
854 | ARRAY_SIZE(ar9300_2p0_soc_postamble), 5); | ||
855 | |||
856 | /* rx/tx gain */ | ||
857 | INIT_INI_ARRAY(&ah->iniModesRxGain, | ||
858 | ar9300Common_rx_gain_table_2p0, | ||
859 | ARRAY_SIZE(ar9300Common_rx_gain_table_2p0), 2); | ||
860 | INIT_INI_ARRAY(&ah->iniModesTxGain, | ||
861 | ar9300Modes_lowest_ob_db_tx_gain_table_2p0, | ||
862 | ARRAY_SIZE(ar9300Modes_lowest_ob_db_tx_gain_table_2p0), | ||
863 | 5); | ||
864 | |||
865 | /* Load PCIE SERDES settings from INI */ | ||
866 | |||
867 | /* Awake Setting */ | ||
868 | |||
869 | INIT_INI_ARRAY(&ah->iniPcieSerdes, | ||
870 | ar9300PciePhy_pll_on_clkreq_disable_L1_2p0, | ||
871 | ARRAY_SIZE(ar9300PciePhy_pll_on_clkreq_disable_L1_2p0), | ||
872 | 2); | ||
873 | |||
874 | /* Sleep Setting */ | ||
875 | |||
876 | INIT_INI_ARRAY(&ah->iniPcieSerdesLowPower, | ||
877 | ar9300PciePhy_clkreq_enable_L1_2p0, | ||
878 | ARRAY_SIZE(ar9300PciePhy_clkreq_enable_L1_2p0), | ||
879 | 2); | ||
880 | |||
881 | /* Fast clock modal settings */ | ||
882 | INIT_INI_ARRAY(&ah->iniModesAdditional, | ||
883 | ar9300Modes_fast_clock_2p0, | ||
884 | ARRAY_SIZE(ar9300Modes_fast_clock_2p0), | ||
885 | 3); | ||
886 | } | ||
887 | |||
816 | static void ath9k_hw_init_mode_gain_regs(struct ath_hw *ah) | 888 | static void ath9k_hw_init_mode_gain_regs(struct ath_hw *ah) |
817 | { | 889 | { |
818 | if (AR_SREV_9287_11_OR_LATER(ah)) | 890 | if (AR_SREV_9287_11_OR_LATER(ah)) |
@@ -3581,6 +3653,7 @@ static void ar9003_hw_attach_ops(struct ath_hw *ah) | |||
3581 | { | 3653 | { |
3582 | struct ath_hw_private_ops *priv_ops = ath9k_hw_private_ops(ah); | 3654 | struct ath_hw_private_ops *priv_ops = ath9k_hw_private_ops(ah); |
3583 | 3655 | ||
3656 | priv_ops->init_mode_regs = ar9003_hw_init_mode_regs; | ||
3584 | priv_ops->macversion_supported = ar9003_hw_macversion_supported; | 3657 | priv_ops->macversion_supported = ar9003_hw_macversion_supported; |
3585 | 3658 | ||
3586 | ar9003_hw_attach_phy_ops(ah); | 3659 | ar9003_hw_attach_phy_ops(ah); |