On 01/06/2010 03:30 PM, Gábor Stefanik wrote:
> On Wed, Jan 6, 2010 at 10:09 PM, Rafał Miłecki <zaj...@gmail.com> wrote:
>> I've decided to made LP-PHY init code review for compatibility with specs
>> and found some issues.
>>
>> We lack some code for higher PHY revisions (up from 2/3) and for some
>> specific boards. Also I've found little mistake in specs which Larry just
>> corrected.
>>
>> Gábor: could you care for this parts of LP-PHY code?
>>
>> So far I've only checked
>> lpphy_read_band_sprom(dev);
>> and
>> lpphy_baseband_init(dev);
>>
>> I check for all conditions and operations (registers, masks, values). So far
>> didn't notice anything more serious than what's exposed by patch, so good
>> work Gábor :)
>>
>>
>>
>>
>> diff --git a/drivers/net/wireless/b43/phy_lp.c
>> b/drivers/net/wireless/b43/phy_lp.c
>> index 1e318d8..43a9fcc 100644
>> --- a/drivers/net/wireless/b43/phy_lp.c
>> +++ b/drivers/net/wireless/b43/phy_lp.c
>> @@ -198,6 +198,17 @@ static void lpphy_table_init(struct b43_wldev *dev)
>>
>>        lpphy_init_tx_gain_table(dev);
>>
>> +       if (dev->phy.rev >=2) {
>> +               int i;
>> +               for (i = 0; i < 128; ++i) {
> 
> Two style comments:
> 1. Declare i at the beginning of the function.
> 2. The preferred style in b43 is i++.
> 
>> +                       /* TODO
>> +                       Set the table offset to 576 + the loop index
>> +                       Set the table data pointer to a u32 containing 127 -
>> loop index
>> +                       Write the table
>> +                       */
> 
> This can be implemented like this:
> b43_lptab_write(dev, B43_LPTAB32(?, 576 + i), 127 - i);
> 
> Larry, what is the correct value for the "?" (i.e. the table index)?
> Please update the specs, this is missing.

Now fixed. If the PHY Revision is >= 2, the table ID is 7, otherwise it is 0xA.
For the table in question, it should be 7.

Larry

_______________________________________________
Bcm43xx-dev mailing list
Bcm43xx-dev@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/bcm43xx-dev

Reply via email to