All of lore.kernel.org
 help / color / mirror / Atom feed
* 2.6.29 ath9k calibration
@ 2009-03-29 21:12 Howard Chu
  0 siblings, 0 replies; only message in thread
From: Howard Chu @ 2009-03-29 21:12 UTC (permalink / raw)
  To: linux-wireless

I noticed while running powertop that I was always seeing wakeups due to ath9k 
like so:

    2.7% ( 10.0)              phy4 : ath9k_bss_info_changed (ath_ani_calibrate)

It struck me as odd that this calibration never completed. This is on an HP 
dv5z, the driver reports

[   12.343107] phy0: Atheros AR9280 MAC/BB Rev:2 AR5133 RF Rev:d0: 
mem=0xffffc20005460000, irq=17

I recompiled the module with debugging enabled to see what it was doing, and used

insmod ath9k.ko debug=0x0110

(ANI and CALIBRATION)

It basically looks like short calibration never completes. I added a few more 
debug messages as well:

[ 3230.147303] ath9k: Writing ofdmbase=12582412   cckbase=12582712
[ 3230.747582] ath9k: Writing ofdmbase=12582412   cckbase=12582712
[ 3230.946444] ath9k: shortcal @4295846580
[ 3230.946509] ath9k: ah_calSamples: 0, calNumSamples 1
[ 3230.946539] ath9k: ath9k_hw_per_cal: isCalDone: 0
[ 3230.946556] ath9k: calibrate chan 2447/500e0 nf: -115
[ 3231.347291] ath9k: Writing ofdmbase=12582412   cckbase=12582712
[ 3231.946418] ath9k: shortcal @4295846880
[ 3231.946475] ath9k: Writing ofdmbase=12582412   cckbase=12582712
[ 3231.946519] ath9k: ah_calSamples: 0, calNumSamples 1
[ 3231.946542] ath9k: ath9k_hw_per_cal: isCalDone: 0
[ 3231.946557] ath9k: calibrate chan 2447/500e0 nf: -115
[ 3232.546444] ath9k: Writing ofdmbase=12582412   cckbase=12582712
[ 3232.946425] ath9k: shortcal @4295847180
[ 3232.946496] ath9k: ah_calSamples: 0, calNumSamples 1
[ 3232.946519] ath9k: ath9k_hw_per_cal: isCalDone: 0
[ 3232.946535] ath9k: calibrate chan 2447/500e0 nf: -115
[ 3233.146461] ath9k: Writing ofdmbase=12582412   cckbase=12582712
[ 3233.746450] ath9k: Writing ofdmbase=12582412   cckbase=12582712
[ 3233.947255] ath9k: shortcal @4295847480

It seems that in calib.c ath9k_hw_per_calibration() this REG_READ test always 
fails:
 >>>
         *isCalDone = false;

         if (currCal->calState == CAL_RUNNING) {
                 DPRINTF(ah->ah_sc, ATH_DBG_CALIBRATE,
                         "ah_calSamples: %d, calNumSamples %d\n",
                         ahp->ah_CalSamples, currCal->calData->calNumSamples);
                 if (!(REG_READ(ah, AR_PHY_TIMING_CTRL4(0)) &
                       AR_PHY_TIMING_CTRL4_DO_CAL)) {

                         currCal->calData->calCollect(ah);
                         ahp->ah_CalSamples++;
<<<

(I added the DPRINTF there)

How is this intended to work, and why isn't it getting what it wants?

-- 
   -- Howard Chu
   CTO, Symas Corp.           http://www.symas.com
   Director, Highland Sun     http://highlandsun.com/hyc/
   Chief Architect, OpenLDAP  http://www.openldap.org/project/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-03-29 21:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-29 21:12 2.6.29 ath9k calibration Howard Chu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.