Commit 93c1cfbe authored by Sujith Manoharan's avatar Sujith Manoharan Committed by John W. Linville

ath9k: Fix QuickDrop usage

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.

Cc: stable@vger.kernel.org
Signed-off-by: default avatarSujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 041b499b
...@@ -3984,18 +3984,20 @@ static void ar9003_hw_quick_drop_apply(struct ath_hw *ah, u16 freq) ...@@ -3984,18 +3984,20 @@ static void ar9003_hw_quick_drop_apply(struct ath_hw *ah, u16 freq)
int quick_drop; int quick_drop;
s32 t[3], f[3] = {5180, 5500, 5785}; s32 t[3], f[3] = {5180, 5500, 5785};
if (!(pBase->miscConfiguration & BIT(1))) if (!(pBase->miscConfiguration & BIT(4)))
return; return;
if (freq < 4000) if (AR_SREV_9300(ah) || AR_SREV_9580(ah) || AR_SREV_9340(ah)) {
quick_drop = eep->modalHeader2G.quick_drop; if (freq < 4000) {
else { quick_drop = eep->modalHeader2G.quick_drop;
t[0] = eep->base_ext1.quick_drop_low; } else {
t[1] = eep->modalHeader5G.quick_drop; t[0] = eep->base_ext1.quick_drop_low;
t[2] = eep->base_ext1.quick_drop_high; t[1] = eep->modalHeader5G.quick_drop;
quick_drop = ar9003_hw_power_interpolate(freq, f, t, 3); t[2] = eep->base_ext1.quick_drop_high;
quick_drop = ar9003_hw_power_interpolate(freq, f, t, 3);
}
REG_RMW_FIELD(ah, AR_PHY_AGC, AR_PHY_AGC_QUICK_DROP, quick_drop);
} }
REG_RMW_FIELD(ah, AR_PHY_AGC, AR_PHY_AGC_QUICK_DROP, quick_drop);
} }
static void ar9003_hw_txend_to_xpa_off_apply(struct ath_hw *ah, bool is2ghz) static void ar9003_hw_txend_to_xpa_off_apply(struct ath_hw *ah, bool is2ghz)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment