diff options
author | Miaoqing Pan <miaoqing@qca.qualcomm.com> | 2014-12-18 20:03:59 -0500 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-01-15 07:25:03 -0500 |
commit | ede6a5e7b8596f85607b9bd15f186d2b26163bc8 (patch) | |
tree | 1e8e024f2f982ccc38aa4579ea8d9249c43fda94 | |
parent | df476df180bccb530b7c0db77bd9a9cde6451ff6 (diff) |
ath9k: Add QCA956x HW support
Signed-off-by: Miaoqing Pan <miaoqing@qca.qualcomm.com>
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ani.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 15 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/ar9003_phy.c | 47 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/hw.c | 37 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/mac.c | 3 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/recv.c | 3 |
6 files changed, 76 insertions, 32 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ani.c b/drivers/net/wireless/ath/ath9k/ani.c index ba502a2d199b..ca01d17d130f 100644 --- a/drivers/net/wireless/ath/ath9k/ani.c +++ b/drivers/net/wireless/ath/ath9k/ani.c | |||
@@ -259,7 +259,8 @@ static void ath9k_hw_set_cck_nil(struct ath_hw *ah, u_int8_t immunityLevel, | |||
259 | entry_cck->fir_step_level); | 259 | entry_cck->fir_step_level); |
260 | 260 | ||
261 | /* Skip MRC CCK for pre AR9003 families */ | 261 | /* Skip MRC CCK for pre AR9003 families */ |
262 | if (!AR_SREV_9300_20_OR_LATER(ah) || AR_SREV_9485(ah) || AR_SREV_9565(ah)) | 262 | if (!AR_SREV_9300_20_OR_LATER(ah) || AR_SREV_9485(ah) || |
263 | AR_SREV_9565(ah) || AR_SREV_9561(ah)) | ||
263 | return; | 264 | return; |
264 | 265 | ||
265 | if (aniState->mrcCCK != entry_cck->mrc_cck_on) | 266 | if (aniState->mrcCCK != entry_cck->mrc_cck_on) |
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c index 08225a0067c2..8b4561e8ce1a 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | |||
@@ -3536,7 +3536,7 @@ static void ar9003_hw_xpa_bias_level_apply(struct ath_hw *ah, bool is2ghz) | |||
3536 | int bias = ar9003_modal_header(ah, is2ghz)->xpaBiasLvl; | 3536 | int bias = ar9003_modal_header(ah, is2ghz)->xpaBiasLvl; |
3537 | 3537 | ||
3538 | if (AR_SREV_9485(ah) || AR_SREV_9330(ah) || AR_SREV_9340(ah) || | 3538 | if (AR_SREV_9485(ah) || AR_SREV_9330(ah) || AR_SREV_9340(ah) || |
3539 | AR_SREV_9531(ah)) | 3539 | AR_SREV_9531(ah) || AR_SREV_9561(ah)) |
3540 | REG_RMW_FIELD(ah, AR_CH0_TOP2, AR_CH0_TOP2_XPABIASLVL, bias); | 3540 | REG_RMW_FIELD(ah, AR_CH0_TOP2, AR_CH0_TOP2_XPABIASLVL, bias); |
3541 | else if (AR_SREV_9462(ah) || AR_SREV_9550(ah) || AR_SREV_9565(ah)) | 3541 | else if (AR_SREV_9462(ah) || AR_SREV_9550(ah) || AR_SREV_9565(ah)) |
3542 | REG_RMW_FIELD(ah, AR_CH0_TOP, AR_CH0_TOP_XPABIASLVL, bias); | 3542 | REG_RMW_FIELD(ah, AR_CH0_TOP, AR_CH0_TOP_XPABIASLVL, bias); |
@@ -3599,7 +3599,7 @@ static void ar9003_hw_ant_ctrl_apply(struct ath_hw *ah, bool is2ghz) | |||
3599 | if (AR_SREV_9462(ah) || AR_SREV_9565(ah)) { | 3599 | if (AR_SREV_9462(ah) || AR_SREV_9565(ah)) { |
3600 | REG_RMW_FIELD(ah, AR_PHY_SWITCH_COM, | 3600 | REG_RMW_FIELD(ah, AR_PHY_SWITCH_COM, |
3601 | AR_SWITCH_TABLE_COM_AR9462_ALL, value); | 3601 | AR_SWITCH_TABLE_COM_AR9462_ALL, value); |
3602 | } else if (AR_SREV_9550(ah) || AR_SREV_9531(ah)) { | 3602 | } else if (AR_SREV_9550(ah) || AR_SREV_9531(ah) || AR_SREV_9561(ah)) { |
3603 | REG_RMW_FIELD(ah, AR_PHY_SWITCH_COM, | 3603 | REG_RMW_FIELD(ah, AR_PHY_SWITCH_COM, |
3604 | AR_SWITCH_TABLE_COM_AR9550_ALL, value); | 3604 | AR_SWITCH_TABLE_COM_AR9550_ALL, value); |
3605 | } else | 3605 | } else |
@@ -3929,9 +3929,13 @@ void ar9003_hw_internal_regulator_apply(struct ath_hw *ah) | |||
3929 | REG_WRITE(ah, AR_PHY_PMU2, reg_pmu_set); | 3929 | REG_WRITE(ah, AR_PHY_PMU2, reg_pmu_set); |
3930 | if (!is_pmu_set(ah, AR_PHY_PMU2, reg_pmu_set)) | 3930 | if (!is_pmu_set(ah, AR_PHY_PMU2, reg_pmu_set)) |
3931 | return; | 3931 | return; |
3932 | } else if (AR_SREV_9462(ah) || AR_SREV_9565(ah)) { | 3932 | } else if (AR_SREV_9462(ah) || AR_SREV_9565(ah) || |
3933 | AR_SREV_9561(ah)) { | ||
3933 | reg_val = le32_to_cpu(pBase->swreg); | 3934 | reg_val = le32_to_cpu(pBase->swreg); |
3934 | REG_WRITE(ah, AR_PHY_PMU1, reg_val); | 3935 | REG_WRITE(ah, AR_PHY_PMU1, reg_val); |
3936 | |||
3937 | if (AR_SREV_9561(ah)) | ||
3938 | REG_WRITE(ah, AR_PHY_PMU2, 0x10200000); | ||
3935 | } else { | 3939 | } else { |
3936 | /* Internal regulator is ON. Write swreg register. */ | 3940 | /* Internal regulator is ON. Write swreg register. */ |
3937 | reg_val = le32_to_cpu(pBase->swreg); | 3941 | reg_val = le32_to_cpu(pBase->swreg); |
@@ -4034,7 +4038,8 @@ static void ar9003_hw_xpa_timing_control_apply(struct ath_hw *ah, bool is2ghz) | |||
4034 | if (!AR_SREV_9300(ah) && | 4038 | if (!AR_SREV_9300(ah) && |
4035 | !AR_SREV_9340(ah) && | 4039 | !AR_SREV_9340(ah) && |
4036 | !AR_SREV_9580(ah) && | 4040 | !AR_SREV_9580(ah) && |
4037 | !AR_SREV_9531(ah)) | 4041 | !AR_SREV_9531(ah) && |
4042 | !AR_SREV_9561(ah)) | ||
4038 | return; | 4043 | return; |
4039 | 4044 | ||
4040 | xpa_ctl = ar9003_modal_header(ah, is2ghz)->txFrameToXpaOn; | 4045 | xpa_ctl = ar9003_modal_header(ah, is2ghz)->txFrameToXpaOn; |
@@ -4812,7 +4817,7 @@ static void ar9003_hw_power_control_override(struct ath_hw *ah, | |||
4812 | } | 4817 | } |
4813 | 4818 | ||
4814 | tempslope: | 4819 | tempslope: |
4815 | if (AR_SREV_9550(ah) || AR_SREV_9531(ah)) { | 4820 | if (AR_SREV_9550(ah) || AR_SREV_9531(ah) || AR_SREV_9561(ah)) { |
4816 | u8 txmask = (eep->baseEepHeader.txrxMask & 0xf0) >> 4; | 4821 | u8 txmask = (eep->baseEepHeader.txrxMask & 0xf0) >> 4; |
4817 | 4822 | ||
4818 | /* | 4823 | /* |
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c index ae6cde273414..1ad66b76749b 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c | |||
@@ -183,7 +183,8 @@ static int ar9003_hw_set_channel(struct ath_hw *ah, struct ath9k_channel *chan) | |||
183 | } else { | 183 | } else { |
184 | channelSel = CHANSEL_2G(freq) >> 1; | 184 | channelSel = CHANSEL_2G(freq) >> 1; |
185 | } | 185 | } |
186 | } else if (AR_SREV_9550(ah) || AR_SREV_9531(ah)) { | 186 | } else if (AR_SREV_9550(ah) || AR_SREV_9531(ah) || |
187 | AR_SREV_9561(ah)) { | ||
187 | if (ah->is_clk_25mhz) | 188 | if (ah->is_clk_25mhz) |
188 | div = 75; | 189 | div = 75; |
189 | else | 190 | else |
@@ -198,7 +199,8 @@ static int ar9003_hw_set_channel(struct ath_hw *ah, struct ath9k_channel *chan) | |||
198 | /* Set to 2G mode */ | 199 | /* Set to 2G mode */ |
199 | bMode = 1; | 200 | bMode = 1; |
200 | } else { | 201 | } else { |
201 | if ((AR_SREV_9340(ah) || AR_SREV_9550(ah) || AR_SREV_9531(ah)) && | 202 | if ((AR_SREV_9340(ah) || AR_SREV_9550(ah) || |
203 | AR_SREV_9531(ah) || AR_SREV_9561(ah)) && | ||
202 | ah->is_clk_25mhz) { | 204 | ah->is_clk_25mhz) { |
203 | channelSel = freq / 75; | 205 | channelSel = freq / 75; |
204 | chan_frac = ((freq % 75) * 0x20000) / 75; | 206 | chan_frac = ((freq % 75) * 0x20000) / 75; |
@@ -265,7 +267,7 @@ static void ar9003_hw_spur_mitigate_mrc_cck(struct ath_hw *ah, | |||
265 | */ | 267 | */ |
266 | 268 | ||
267 | if (AR_SREV_9485(ah) || AR_SREV_9340(ah) || AR_SREV_9330(ah) || | 269 | if (AR_SREV_9485(ah) || AR_SREV_9340(ah) || AR_SREV_9330(ah) || |
268 | AR_SREV_9550(ah)) { | 270 | AR_SREV_9550(ah) || AR_SREV_9561(ah)) { |
269 | if (spur_fbin_ptr[0] == 0) /* No spur */ | 271 | if (spur_fbin_ptr[0] == 0) /* No spur */ |
270 | return; | 272 | return; |
271 | max_spur_cnts = 5; | 273 | max_spur_cnts = 5; |
@@ -292,7 +294,7 @@ static void ar9003_hw_spur_mitigate_mrc_cck(struct ath_hw *ah, | |||
292 | 294 | ||
293 | negative = 0; | 295 | negative = 0; |
294 | if (AR_SREV_9485(ah) || AR_SREV_9340(ah) || AR_SREV_9330(ah) || | 296 | if (AR_SREV_9485(ah) || AR_SREV_9340(ah) || AR_SREV_9330(ah) || |
295 | AR_SREV_9550(ah)) | 297 | AR_SREV_9550(ah) || AR_SREV_9561(ah)) |
296 | cur_bb_spur = ath9k_hw_fbin2freq(spur_fbin_ptr[i], | 298 | cur_bb_spur = ath9k_hw_fbin2freq(spur_fbin_ptr[i], |
297 | IS_CHAN_2GHZ(chan)); | 299 | IS_CHAN_2GHZ(chan)); |
298 | else | 300 | else |
@@ -641,8 +643,10 @@ static void ar9003_hw_set_channel_regs(struct ath_hw *ah, | |||
641 | (REG_READ(ah, AR_PHY_GEN_CTRL) & AR_PHY_GC_ENABLE_DAC_FIFO); | 643 | (REG_READ(ah, AR_PHY_GEN_CTRL) & AR_PHY_GC_ENABLE_DAC_FIFO); |
642 | 644 | ||
643 | /* Enable 11n HT, 20 MHz */ | 645 | /* Enable 11n HT, 20 MHz */ |
644 | phymode = AR_PHY_GC_HT_EN | AR_PHY_GC_SINGLE_HT_LTF1 | | 646 | phymode = AR_PHY_GC_HT_EN | AR_PHY_GC_SHORT_GI_40 | enableDacFifo; |
645 | AR_PHY_GC_SHORT_GI_40 | enableDacFifo; | 647 | |
648 | if (!AR_SREV_9561(ah)) | ||
649 | phymode |= AR_PHY_GC_SINGLE_HT_LTF1; | ||
646 | 650 | ||
647 | /* Configure baseband for dynamic 20/40 operation */ | 651 | /* Configure baseband for dynamic 20/40 operation */ |
648 | if (IS_CHAN_HT40(chan)) { | 652 | if (IS_CHAN_HT40(chan)) { |
@@ -745,7 +749,8 @@ static void ar9003_hw_override_ini(struct ath_hw *ah) | |||
745 | else | 749 | else |
746 | ah->enabled_cals &= ~TX_CL_CAL; | 750 | ah->enabled_cals &= ~TX_CL_CAL; |
747 | 751 | ||
748 | if (AR_SREV_9340(ah) || AR_SREV_9531(ah) || AR_SREV_9550(ah)) { | 752 | if (AR_SREV_9340(ah) || AR_SREV_9531(ah) || AR_SREV_9550(ah) || |
753 | AR_SREV_9561(ah)) { | ||
749 | if (ah->is_clk_25mhz) { | 754 | if (ah->is_clk_25mhz) { |
750 | REG_WRITE(ah, AR_RTC_DERIVED_CLK, 0x17c << 1); | 755 | REG_WRITE(ah, AR_RTC_DERIVED_CLK, 0x17c << 1); |
751 | REG_WRITE(ah, AR_SLP32_MODE, 0x0010f3d7); | 756 | REG_WRITE(ah, AR_SLP32_MODE, 0x0010f3d7); |
@@ -812,6 +817,19 @@ static int ar9550_hw_get_modes_txgain_index(struct ath_hw *ah, | |||
812 | return ret; | 817 | return ret; |
813 | } | 818 | } |
814 | 819 | ||
820 | static int ar9561_hw_get_modes_txgain_index(struct ath_hw *ah, | ||
821 | struct ath9k_channel *chan) | ||
822 | { | ||
823 | if (IS_CHAN_2GHZ(chan)) { | ||
824 | if (IS_CHAN_HT40(chan)) | ||
825 | return 1; | ||
826 | else | ||
827 | return 2; | ||
828 | } | ||
829 | |||
830 | return 0; | ||
831 | } | ||
832 | |||
815 | static void ar9003_doubler_fix(struct ath_hw *ah) | 833 | static void ar9003_doubler_fix(struct ath_hw *ah) |
816 | { | 834 | { |
817 | if (AR_SREV_9300(ah) || AR_SREV_9580(ah) || AR_SREV_9550(ah)) { | 835 | if (AR_SREV_9300(ah) || AR_SREV_9580(ah) || AR_SREV_9550(ah)) { |
@@ -911,21 +929,29 @@ static int ar9003_hw_process_ini(struct ath_hw *ah, | |||
911 | REG_WRITE_ARRAY(&ah->ini_modes_rxgain_5g_xlna, | 929 | REG_WRITE_ARRAY(&ah->ini_modes_rxgain_5g_xlna, |
912 | modesIndex, regWrites); | 930 | modesIndex, regWrites); |
913 | } | 931 | } |
932 | |||
933 | if (AR_SREV_9561(ah) && (ar9003_hw_get_rx_gain_idx(ah) == 0)) | ||
934 | REG_WRITE_ARRAY(&ah->ini_modes_rxgain_5g_xlna, | ||
935 | modesIndex, regWrites); | ||
914 | } | 936 | } |
915 | 937 | ||
916 | if (AR_SREV_9550(ah)) | 938 | if (AR_SREV_9550(ah) || AR_SREV_9561(ah)) |
917 | REG_WRITE_ARRAY(&ah->ini_modes_rx_gain_bounds, modesIndex, | 939 | REG_WRITE_ARRAY(&ah->ini_modes_rx_gain_bounds, modesIndex, |
918 | regWrites); | 940 | regWrites); |
919 | 941 | ||
920 | /* | 942 | /* |
921 | * TXGAIN initvals. | 943 | * TXGAIN initvals. |
922 | */ | 944 | */ |
923 | if (AR_SREV_9550(ah) || AR_SREV_9531(ah)) { | 945 | if (AR_SREV_9550(ah) || AR_SREV_9531(ah) || AR_SREV_9561(ah)) { |
924 | int modes_txgain_index = 1; | 946 | int modes_txgain_index = 1; |
925 | 947 | ||
926 | if (AR_SREV_9550(ah)) | 948 | if (AR_SREV_9550(ah)) |
927 | modes_txgain_index = ar9550_hw_get_modes_txgain_index(ah, chan); | 949 | modes_txgain_index = ar9550_hw_get_modes_txgain_index(ah, chan); |
928 | 950 | ||
951 | if (AR_SREV_9561(ah)) | ||
952 | modes_txgain_index = | ||
953 | ar9561_hw_get_modes_txgain_index(ah, chan); | ||
954 | |||
929 | if (modes_txgain_index < 0) | 955 | if (modes_txgain_index < 0) |
930 | return -EINVAL; | 956 | return -EINVAL; |
931 | 957 | ||
@@ -1989,7 +2015,8 @@ void ar9003_hw_attach_phy_ops(struct ath_hw *ah) | |||
1989 | priv_ops->rf_set_freq = ar9003_hw_set_channel; | 2015 | priv_ops->rf_set_freq = ar9003_hw_set_channel; |
1990 | priv_ops->spur_mitigate_freq = ar9003_hw_spur_mitigate; | 2016 | priv_ops->spur_mitigate_freq = ar9003_hw_spur_mitigate; |
1991 | 2017 | ||
1992 | if (AR_SREV_9340(ah) || AR_SREV_9550(ah) || AR_SREV_9531(ah)) | 2018 | if (AR_SREV_9340(ah) || AR_SREV_9550(ah) || AR_SREV_9531(ah) || |
2019 | AR_SREV_9561(ah)) | ||
1993 | priv_ops->compute_pll_control = ar9003_hw_compute_pll_control_soc; | 2020 | priv_ops->compute_pll_control = ar9003_hw_compute_pll_control_soc; |
1994 | else | 2021 | else |
1995 | priv_ops->compute_pll_control = ar9003_hw_compute_pll_control; | 2022 | priv_ops->compute_pll_control = ar9003_hw_compute_pll_control; |
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index 916b370be033..051540f78030 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -783,7 +783,8 @@ static void ath9k_hw_init_pll(struct ath_hw *ah, | |||
783 | /* program BB PLL phase_shift */ | 783 | /* program BB PLL phase_shift */ |
784 | REG_RMW_FIELD(ah, AR_CH0_BB_DPLL3, | 784 | REG_RMW_FIELD(ah, AR_CH0_BB_DPLL3, |
785 | AR_CH0_BB_DPLL3_PHASE_SHIFT, 0x1); | 785 | AR_CH0_BB_DPLL3_PHASE_SHIFT, 0x1); |
786 | } else if (AR_SREV_9340(ah) || AR_SREV_9550(ah) || AR_SREV_9531(ah)) { | 786 | } else if (AR_SREV_9340(ah) || AR_SREV_9550(ah) || AR_SREV_9531(ah) || |
787 | AR_SREV_9561(ah)) { | ||
787 | u32 regval, pll2_divint, pll2_divfrac, refdiv; | 788 | u32 regval, pll2_divint, pll2_divfrac, refdiv; |
788 | 789 | ||
789 | REG_WRITE(ah, AR_RTC_PLL_CONTROL, | 790 | REG_WRITE(ah, AR_RTC_PLL_CONTROL, |
@@ -794,7 +795,7 @@ static void ath9k_hw_init_pll(struct ath_hw *ah, | |||
794 | udelay(100); | 795 | udelay(100); |
795 | 796 | ||
796 | if (ah->is_clk_25mhz) { | 797 | if (ah->is_clk_25mhz) { |
797 | if (AR_SREV_9531(ah)) { | 798 | if (AR_SREV_9531(ah) || AR_SREV_9561(ah)) { |
798 | pll2_divint = 0x1c; | 799 | pll2_divint = 0x1c; |
799 | pll2_divfrac = 0xa3d2; | 800 | pll2_divfrac = 0xa3d2; |
800 | refdiv = 1; | 801 | refdiv = 1; |
@@ -810,14 +811,15 @@ static void ath9k_hw_init_pll(struct ath_hw *ah, | |||
810 | refdiv = 5; | 811 | refdiv = 5; |
811 | } else { | 812 | } else { |
812 | pll2_divint = 0x11; | 813 | pll2_divint = 0x11; |
813 | pll2_divfrac = | 814 | pll2_divfrac = (AR_SREV_9531(ah) || |
814 | AR_SREV_9531(ah) ? 0x26665 : 0x26666; | 815 | AR_SREV_9561(ah)) ? |
816 | 0x26665 : 0x26666; | ||
815 | refdiv = 1; | 817 | refdiv = 1; |
816 | } | 818 | } |
817 | } | 819 | } |
818 | 820 | ||
819 | regval = REG_READ(ah, AR_PHY_PLL_MODE); | 821 | regval = REG_READ(ah, AR_PHY_PLL_MODE); |
820 | if (AR_SREV_9531(ah)) | 822 | if (AR_SREV_9531(ah) || AR_SREV_9561(ah)) |
821 | regval |= (0x1 << 22); | 823 | regval |= (0x1 << 22); |
822 | else | 824 | else |
823 | regval |= (0x1 << 16); | 825 | regval |= (0x1 << 16); |
@@ -835,14 +837,16 @@ static void ath9k_hw_init_pll(struct ath_hw *ah, | |||
835 | (0x1 << 13) | | 837 | (0x1 << 13) | |
836 | (0x4 << 26) | | 838 | (0x4 << 26) | |
837 | (0x18 << 19); | 839 | (0x18 << 19); |
838 | else if (AR_SREV_9531(ah)) | 840 | else if (AR_SREV_9531(ah) || AR_SREV_9561(ah)) { |
839 | regval = (regval & 0x01c00fff) | | 841 | regval = (regval & 0x01c00fff) | |
840 | (0x1 << 31) | | 842 | (0x1 << 31) | |
841 | (0x2 << 29) | | 843 | (0x2 << 29) | |
842 | (0xa << 25) | | 844 | (0xa << 25) | |
843 | (0x1 << 19) | | 845 | (0x1 << 19); |
844 | (0x6 << 12); | 846 | |
845 | else | 847 | if (AR_SREV_9531(ah)) |
848 | regval |= (0x6 << 12); | ||
849 | } else | ||
846 | regval = (regval & 0x80071fff) | | 850 | regval = (regval & 0x80071fff) | |
847 | (0x3 << 30) | | 851 | (0x3 << 30) | |
848 | (0x1 << 13) | | 852 | (0x1 << 13) | |
@@ -850,7 +854,7 @@ static void ath9k_hw_init_pll(struct ath_hw *ah, | |||
850 | (0x60 << 19); | 854 | (0x60 << 19); |
851 | REG_WRITE(ah, AR_PHY_PLL_MODE, regval); | 855 | REG_WRITE(ah, AR_PHY_PLL_MODE, regval); |
852 | 856 | ||
853 | if (AR_SREV_9531(ah)) | 857 | if (AR_SREV_9531(ah) || AR_SREV_9561(ah)) |
854 | REG_WRITE(ah, AR_PHY_PLL_MODE, | 858 | REG_WRITE(ah, AR_PHY_PLL_MODE, |
855 | REG_READ(ah, AR_PHY_PLL_MODE) & 0xffbfffff); | 859 | REG_READ(ah, AR_PHY_PLL_MODE) & 0xffbfffff); |
856 | else | 860 | else |
@@ -889,7 +893,8 @@ static void ath9k_hw_init_interrupt_masks(struct ath_hw *ah, | |||
889 | AR_IMR_RXORN | | 893 | AR_IMR_RXORN | |
890 | AR_IMR_BCNMISC; | 894 | AR_IMR_BCNMISC; |
891 | 895 | ||
892 | if (AR_SREV_9340(ah) || AR_SREV_9550(ah) || AR_SREV_9531(ah)) | 896 | if (AR_SREV_9340(ah) || AR_SREV_9550(ah) || AR_SREV_9531(ah) || |
897 | AR_SREV_9561(ah)) | ||
893 | sync_default &= ~AR_INTR_SYNC_HOST1_FATAL; | 898 | sync_default &= ~AR_INTR_SYNC_HOST1_FATAL; |
894 | 899 | ||
895 | if (AR_SREV_9300_20_OR_LATER(ah)) { | 900 | if (AR_SREV_9300_20_OR_LATER(ah)) { |
@@ -1678,7 +1683,8 @@ static void ath9k_hw_init_desc(struct ath_hw *ah) | |||
1678 | } | 1683 | } |
1679 | #ifdef __BIG_ENDIAN | 1684 | #ifdef __BIG_ENDIAN |
1680 | else if (AR_SREV_9330(ah) || AR_SREV_9340(ah) || | 1685 | else if (AR_SREV_9330(ah) || AR_SREV_9340(ah) || |
1681 | AR_SREV_9550(ah) || AR_SREV_9531(ah)) | 1686 | AR_SREV_9550(ah) || AR_SREV_9531(ah) || |
1687 | AR_SREV_9561(ah)) | ||
1682 | REG_RMW(ah, AR_CFG, AR_CFG_SWRB | AR_CFG_SWTB, 0); | 1688 | REG_RMW(ah, AR_CFG, AR_CFG_SWRB | AR_CFG_SWTB, 0); |
1683 | else | 1689 | else |
1684 | REG_WRITE(ah, AR_CFG, AR_CFG_SWTD | AR_CFG_SWRD); | 1690 | REG_WRITE(ah, AR_CFG, AR_CFG_SWTD | AR_CFG_SWRD); |
@@ -2466,7 +2472,8 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah) | |||
2466 | 2472 | ||
2467 | if (AR_SREV_9300_20_OR_LATER(ah)) { | 2473 | if (AR_SREV_9300_20_OR_LATER(ah)) { |
2468 | pCap->hw_caps |= ATH9K_HW_CAP_EDMA | ATH9K_HW_CAP_FASTCLOCK; | 2474 | pCap->hw_caps |= ATH9K_HW_CAP_EDMA | ATH9K_HW_CAP_FASTCLOCK; |
2469 | if (!AR_SREV_9330(ah) && !AR_SREV_9485(ah) && !AR_SREV_9565(ah)) | 2475 | if (!AR_SREV_9330(ah) && !AR_SREV_9485(ah) && |
2476 | !AR_SREV_9561(ah) && !AR_SREV_9565(ah)) | ||
2470 | pCap->hw_caps |= ATH9K_HW_CAP_LDPC; | 2477 | pCap->hw_caps |= ATH9K_HW_CAP_LDPC; |
2471 | 2478 | ||
2472 | pCap->rx_hp_qdepth = ATH9K_HW_RX_HP_QDEPTH; | 2479 | pCap->rx_hp_qdepth = ATH9K_HW_RX_HP_QDEPTH; |
@@ -2483,7 +2490,9 @@ int ath9k_hw_fill_cap_info(struct ath_hw *ah) | |||
2483 | if (AR_SREV_9300_20_OR_LATER(ah)) | 2490 | if (AR_SREV_9300_20_OR_LATER(ah)) |
2484 | pCap->hw_caps |= ATH9K_HW_CAP_RAC_SUPPORTED; | 2491 | pCap->hw_caps |= ATH9K_HW_CAP_RAC_SUPPORTED; |
2485 | 2492 | ||
2486 | if (AR_SREV_9300_20_OR_LATER(ah)) | 2493 | if (AR_SREV_9561(ah)) |
2494 | ah->ent_mode = 0x3BDA000; | ||
2495 | else if (AR_SREV_9300_20_OR_LATER(ah)) | ||
2487 | ah->ent_mode = REG_READ(ah, AR_ENT_OTP); | 2496 | ah->ent_mode = REG_READ(ah, AR_ENT_OTP); |
2488 | 2497 | ||
2489 | if (AR_SREV_9287_11_OR_LATER(ah) || AR_SREV_9271(ah)) | 2498 | if (AR_SREV_9287_11_OR_LATER(ah) || AR_SREV_9271(ah)) |
diff --git a/drivers/net/wireless/ath/ath9k/mac.c b/drivers/net/wireless/ath/ath9k/mac.c index 3e58bfa0c1fd..bba85d1a6cd1 100644 --- a/drivers/net/wireless/ath/ath9k/mac.c +++ b/drivers/net/wireless/ath/ath9k/mac.c | |||
@@ -820,7 +820,8 @@ void ath9k_hw_enable_interrupts(struct ath_hw *ah) | |||
820 | return; | 820 | return; |
821 | } | 821 | } |
822 | 822 | ||
823 | if (AR_SREV_9340(ah) || AR_SREV_9550(ah) || AR_SREV_9531(ah)) | 823 | if (AR_SREV_9340(ah) || AR_SREV_9550(ah) || AR_SREV_9531(ah) || |
824 | AR_SREV_9561(ah)) | ||
824 | sync_default &= ~AR_INTR_SYNC_HOST1_FATAL; | 825 | sync_default &= ~AR_INTR_SYNC_HOST1_FATAL; |
825 | 826 | ||
826 | async_mask = AR_INTR_MAC_IRQ; | 827 | async_mask = AR_INTR_MAC_IRQ; |
diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c index 7395afbc5124..6fb40ef86fd6 100644 --- a/drivers/net/wireless/ath/ath9k/recv.c +++ b/drivers/net/wireless/ath/ath9k/recv.c | |||
@@ -425,7 +425,8 @@ u32 ath_calcrxfilter(struct ath_softc *sc) | |||
425 | rfilt |= ATH9K_RX_FILTER_MCAST_BCAST_ALL; | 425 | rfilt |= ATH9K_RX_FILTER_MCAST_BCAST_ALL; |
426 | } | 426 | } |
427 | 427 | ||
428 | if (AR_SREV_9550(sc->sc_ah) || AR_SREV_9531(sc->sc_ah)) | 428 | if (AR_SREV_9550(sc->sc_ah) || AR_SREV_9531(sc->sc_ah) || |
429 | AR_SREV_9561(sc->sc_ah)) | ||
429 | rfilt |= ATH9K_RX_FILTER_4ADDRESS; | 430 | rfilt |= ATH9K_RX_FILTER_4ADDRESS; |
430 | 431 | ||
431 | if (ath9k_is_chanctx_enabled() && | 432 | if (ath9k_is_chanctx_enabled() && |