Commit 1f64252d authored by Miaoqing Pan's avatar Miaoqing Pan Committed by Kalle Valo

ath9k: set correct peak detect threshold

Set QCA9561 peak detect threshold to 11.
Signed-off-by: default avatarMiaoqing Pan <miaoqing@codeaurora.org>
Signed-off-by: default avatarKalle Valo <kvalo@qca.qualcomm.com>
parent 9c8ec995
...@@ -1203,12 +1203,12 @@ static void ar9003_hw_tx_iq_cal_reload(struct ath_hw *ah) ...@@ -1203,12 +1203,12 @@ static void ar9003_hw_tx_iq_cal_reload(struct ath_hw *ah)
static void ar9003_hw_manual_peak_cal(struct ath_hw *ah, u8 chain, bool is_2g) static void ar9003_hw_manual_peak_cal(struct ath_hw *ah, u8 chain, bool is_2g)
{ {
int offset[8] = {0}, total = 0, test; int offset[8] = {0}, total = 0, test;
int agc_out, i, peak_detect_threshold; int agc_out, i, peak_detect_threshold = 0;
if (AR_SREV_9550(ah) || AR_SREV_9531(ah)) if (AR_SREV_9550(ah) || AR_SREV_9531(ah))
peak_detect_threshold = 8; peak_detect_threshold = 8;
else else if (AR_SREV_9561(ah))
peak_detect_threshold = 0; peak_detect_threshold = 11;
/* /*
* Turn off LNA/SW. * Turn off LNA/SW.
...@@ -1249,17 +1249,14 @@ static void ar9003_hw_manual_peak_cal(struct ath_hw *ah, u8 chain, bool is_2g) ...@@ -1249,17 +1249,14 @@ static void ar9003_hw_manual_peak_cal(struct ath_hw *ah, u8 chain, bool is_2g)
REG_RMW_FIELD(ah, AR_PHY_65NM_RXRF_AGC(chain), REG_RMW_FIELD(ah, AR_PHY_65NM_RXRF_AGC(chain),
AR_PHY_65NM_RXRF_AGC_AGC2G_CALDAC_OVR, 0x0); AR_PHY_65NM_RXRF_AGC_AGC2G_CALDAC_OVR, 0x0);
if (AR_SREV_9003_PCOEM(ah) || AR_SREV_9550(ah) || AR_SREV_9531(ah) || if (is_2g)
AR_SREV_9561(ah)) { REG_RMW_FIELD(ah, AR_PHY_65NM_RXRF_AGC(chain),
if (is_2g) AR_PHY_65NM_RXRF_AGC_AGC2G_DBDAC_OVR,
REG_RMW_FIELD(ah, AR_PHY_65NM_RXRF_AGC(chain), peak_detect_threshold);
AR_PHY_65NM_RXRF_AGC_AGC2G_DBDAC_OVR, else
peak_detect_threshold); REG_RMW_FIELD(ah, AR_PHY_65NM_RXRF_AGC(chain),
else AR_PHY_65NM_RXRF_AGC_AGC5G_DBDAC_OVR,
REG_RMW_FIELD(ah, AR_PHY_65NM_RXRF_AGC(chain), peak_detect_threshold);
AR_PHY_65NM_RXRF_AGC_AGC5G_DBDAC_OVR,
peak_detect_threshold);
}
for (i = 6; i > 0; i--) { for (i = 6; i > 0; i--) {
offset[i] = BIT(i - 1); offset[i] = BIT(i - 1);
......
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