Search Linux Wireless

Re: [PATCH 3/3] ath5k: Add tx power calibration support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2009/3/30 Fabio Rossi <rossi.f@xxxxxxxxx>:
> On Sunday 29 March 2009, Nick Kossifidis wrote:
>
>> This patch introduces a function (and some helpers) to set 2 tables on
>> hardware, it doesn't mess with the rest of the driver. I've tested it
>> both on sta and ap scenarios with all the cards i have available and
>> it worked fine. If you want to make more tests just disable parts of
>> hw_txpower on phy.c, you can start by commenting out everything  below
>>
>> ath5k_setup_rate_powertable(ah, txpower, &rate_info, ee_mode);
>>
>> to skip the setting of tx power, if you comment out the whole function
>> you'll disable the functionality that this patch adds.
>
> I have discovered the problem. Inside ath5k_hx_txpower() it's called
> ath5k_setup_channel_powertable() where the gain curves of frequency
> piers are scanned (if I have understood correctly) to extract the data for
> the calibration of the current channel.
>
> In particular, for the 5180MHz channel (the first of the A band), the function
> ath5k_get_linear_pcdac_min() is called with some critical data which generate
> an endless while loop.
>
> Here are the bad numbers passed to ath5k_get_linear_pcdac_min():
> * pwrL[0] = 4
> * pwrL[1] = 4
> * stepL[0] = 20
> * stepL[1] = 35
> and with this configuration the variable 'tmp' is never decremented inside the
> first while loop.
>
> I suppose the data comes from the EEPROM. Is there an easy way to read the
> contents of the EEPROM regarding the calibration data for all the channels?
>
> Fabio
>

Nice catch ;-)

It's weird that your EEPROM contains a value twice, both pwrL[0] and
pwrL[1] are 4 so interpolation always returns 4 and tmp is always > 1
so you have an endless loop. This is not what we expect to have on
EEPROM (we are supposed to have a monotonicaly increasing curve and in
your case it should be almost linear). Anyway since we have such cards
we just need to put a check there and where pwrL[0] == pwrL[1], we set
tmp = stepL[0] or if pwrR[0] == pwrR[1], we set tmp = stepR[0]. Try
this out and see how it goes...


-- 
GPG ID: 0xD21DB2DB
As you read this post global entropy rises. Have Fun ;-)
Nick
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux