Skip to content

Commit

Permalink
ath9k_hw: Fix radio retention for AR9462
Browse files Browse the repository at this point in the history
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: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Rajkumar Manoharan authored and John W. Linville committed Nov 2, 2011
1 parent 52d6d4e commit 91ae4d0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/net/wireless/ath/ath9k/ar9003_calib.c
Original file line number Diff line number Diff line change
Expand Up @@ -908,12 +908,15 @@ static bool ar9003_hw_rtt_restore(struct ath_hw *ah, struct ath9k_channel *chan)
int i;
bool restore;

if (!(ah->caps.hw_caps & ATH9K_HW_CAP_RTT) || !ah->caldata)
if (!ah->caldata)
return false;

hist = &ah->caldata->rtt_hist;
if (!hist->num_readings)
return false;

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++) {
if (!(ah->rxchainmask & (1 << i)))
continue;
Expand Down Expand Up @@ -1070,6 +1073,7 @@ static bool ar9003_hw_init_cal(struct ath_hw *ah,
if (is_reusable && (hist->num_readings < RTT_HIST_MAX)) {
u32 *table;

hist->num_readings++;
for (i = 0; i < AR9300_MAX_CHAINS; i++) {
if (!(ah->rxchainmask & (1 << i)))
continue;
Expand Down

0 comments on commit 91ae4d0

Please sign in to comment.