Commit 91ae4d02 authored by Rajkumar Manoharan's avatar Rajkumar Manoharan Committed by John W. Linville

ath9k_hw: Fix radio retention for AR9462

IQ calibration during fast channel change sometimes failed
with RTT. And also restoring invalid radio retention readings
during init cal could cause failure to set the channel properly.
This patch counts the valid rtt history readings and clears
rtt mask.
Signed-off-by: default avatarRajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 52d6d4ef
...@@ -908,12 +908,15 @@ static bool ar9003_hw_rtt_restore(struct ath_hw *ah, struct ath9k_channel *chan) ...@@ -908,12 +908,15 @@ static bool ar9003_hw_rtt_restore(struct ath_hw *ah, struct ath9k_channel *chan)
int i; int i;
bool restore; bool restore;
if (!(ah->caps.hw_caps & ATH9K_HW_CAP_RTT) || !ah->caldata) if (!ah->caldata)
return false; return false;
hist = &ah->caldata->rtt_hist; hist = &ah->caldata->rtt_hist;
if (!hist->num_readings)
return false;
ar9003_hw_rtt_enable(ah); ar9003_hw_rtt_enable(ah);
ar9003_hw_rtt_set_mask(ah, 0x10); ar9003_hw_rtt_set_mask(ah, 0x00);
for (i = 0; i < AR9300_MAX_CHAINS; i++) { for (i = 0; i < AR9300_MAX_CHAINS; i++) {
if (!(ah->rxchainmask & (1 << i))) if (!(ah->rxchainmask & (1 << i)))
continue; continue;
...@@ -1070,6 +1073,7 @@ static bool ar9003_hw_init_cal(struct ath_hw *ah, ...@@ -1070,6 +1073,7 @@ static bool ar9003_hw_init_cal(struct ath_hw *ah,
if (is_reusable && (hist->num_readings < RTT_HIST_MAX)) { if (is_reusable && (hist->num_readings < RTT_HIST_MAX)) {
u32 *table; u32 *table;
hist->num_readings++;
for (i = 0; i < AR9300_MAX_CHAINS; i++) { for (i = 0; i < AR9300_MAX_CHAINS; i++) {
if (!(ah->rxchainmask & (1 << i))) if (!(ah->rxchainmask & (1 << i)))
continue; continue;
......
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