Skip to content

Commit

Permalink
ath5k: Do ADC test during reset
Browse files Browse the repository at this point in the history
 * Do an ADC test during reset to match recent regdumps

Changes-licensed-under: ISC
Signed-off-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Nick Kossifidis authored and John W. Linville committed Aug 1, 2008
1 parent 2203d6b commit e2a0cce
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions drivers/net/wireless/ath5k/hw.c
Original file line number Diff line number Diff line change
Expand Up @@ -1078,6 +1078,19 @@ int ath5k_hw_reset(struct ath5k_hw *ah, enum ieee80211_if_types op_mode,
mdelay(1);
}

/*
* Perform ADC test (?)
*/
data = ath5k_hw_reg_read(ah, AR5K_PHY_TST1);
ath5k_hw_reg_write(ah, AR5K_PHY_TST1_TXHOLD, AR5K_PHY_TST1);
for (i = 0; i <= 20; i++) {
if (!(ath5k_hw_reg_read(ah, AR5K_PHY_ADC_TEST) & 0x10))
break;
udelay(200);
}
ath5k_hw_reg_write(ah, data, AR5K_PHY_TST1);
data = 0;

/*
* Enable calibration and wait until completion
*/
Expand Down

0 comments on commit e2a0cce

Please sign in to comment.