aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSujith Manoharan <c_manoha@qca.qualcomm.com>2013-11-25 20:51:08 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-20 10:45:09 -0500
commit464f44b6e46f257d24a560d0103298865ca67173 (patch)
treea0ef65918f846929a5a938b925964234c411fe6b
parenta07e39486b2d0a6e15e134501f7e38b1bcfac07c (diff)
ath9k: Fix QuickDrop usage
commit 93c1cfbe598f72cfa7be49e4a7d2a1d482e15119 upstream. Bit 5 in the miscConfiguration field of the base EEPROM header denotes whether QuickDrop is enabled or not. Fix the incorrect usage of BIT(1) and also make sure that this is done only for the required chips. Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_eeprom.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
index 25b8bbbe74fe..e71413c8e0c6 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
@@ -3937,18 +3937,20 @@ static void ar9003_hw_quick_drop_apply(struct ath_hw *ah, u16 freq)
3937 int quick_drop; 3937 int quick_drop;
3938 s32 t[3], f[3] = {5180, 5500, 5785}; 3938 s32 t[3], f[3] = {5180, 5500, 5785};
3939 3939
3940 if (!(pBase->miscConfiguration & BIT(1))) 3940 if (!(pBase->miscConfiguration & BIT(4)))
3941 return; 3941 return;
3942 3942
3943 if (freq < 4000) 3943 if (AR_SREV_9300(ah) || AR_SREV_9580(ah) || AR_SREV_9340(ah)) {
3944 quick_drop = eep->modalHeader2G.quick_drop; 3944 if (freq < 4000) {
3945 else { 3945 quick_drop = eep->modalHeader2G.quick_drop;
3946 t[0] = eep->base_ext1.quick_drop_low; 3946 } else {
3947 t[1] = eep->modalHeader5G.quick_drop; 3947 t[0] = eep->base_ext1.quick_drop_low;
3948 t[2] = eep->base_ext1.quick_drop_high; 3948 t[1] = eep->modalHeader5G.quick_drop;
3949 quick_drop = ar9003_hw_power_interpolate(freq, f, t, 3); 3949 t[2] = eep->base_ext1.quick_drop_high;
3950 quick_drop = ar9003_hw_power_interpolate(freq, f, t, 3);
3951 }
3952 REG_RMW_FIELD(ah, AR_PHY_AGC, AR_PHY_AGC_QUICK_DROP, quick_drop);
3950 } 3953 }
3951 REG_RMW_FIELD(ah, AR_PHY_AGC, AR_PHY_AGC_QUICK_DROP, quick_drop);
3952} 3954}
3953 3955
3954static void ar9003_hw_txend_to_xpa_off_apply(struct ath_hw *ah, bool is2ghz) 3956static void ar9003_hw_txend_to_xpa_off_apply(struct ath_hw *ah, bool is2ghz)