Search Linux Wireless

Re: [PATCH 3/3] b43: LCN-PHY: load TX gain table on init

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

 



W dniu 3 września 2011 22:21 użytkownik Joe Perches <joe@xxxxxxxxxxx> napisał:
> On Sat, 2011-09-03 at 21:01 +0200, Rafał Miłecki wrote:
>> Values and ops were taken from MMIO dump of wl. struct was copied from
>> brcmsmac.
> []
>> diff --git a/drivers/net/wireless/b43/tables_phy_lcn.c b/drivers/net/wireless/b43/tables_phy_lcn.c
> []
>> +const struct b43_lcntab_tx_gain_tbl_entry
>> +             b43_lcntab_tx_gain_tbl_2ghz_ext_pa_rev0[] = {
>
> 128 entries follow...

OK, I'll fix that.


>> +     { 0x03, 0x00, 0x1f, 0x0, 0x48 },
> [etc]
>> +     { 0x03, 0x00, 0x01, 0x0, 0x39 },
>> +};
>
>> +void b43_phy_lcn_load_tx_gain_tab(struct b43_wldev *dev,
>> +                     const struct b43_lcntab_tx_gain_tbl_entry *gain_table)
>
> Are there multiple gain tables?

Yes, please check for the condition where we call
b43_phy_lcn_load_tx_gain_tab, and the table name. Different hardware
will need different table.


>> +{
>> +     u32 i;
>> +     u32 val;
>> +
>> +     u16 pa_gain = 0x70;
>> +     if (dev->dev->bus_sprom->boardflags_lo & B43_BFL_FEM)
>> +             pa_gain = 0x10;
>> +
>> +     for (i = 0; i < 128; i++) {
>
> Can this be a fixed table and ARRAY_SIZE?

Not trivial, as we accept multiple tables here. I could do
BUG_BUILD_ON(ARRAY_SIZE(tab1) != ARRAY_SIZE(tab2);
and then use ARRAY_SIZE(tab1)
Or maybe I'll just use a define... Probably a better idea.

-- 
Rafał
--
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