[PATCH 2/2] b43: N-PHY: support setting custom TX power

Rafał Miłecki zajec5 at gmail.com
Sun Jul 20 04:53:56 PDT 2014


On 20 July 2014 13:49, Jonas Gorski <jogo at openwrt.org> wrote:
> On Sun, Jul 20, 2014 at 1:00 PM, Rafał Miłecki <zajec5 at gmail.com> wrote:
>> diff --git a/drivers/net/wireless/b43/phy_n.h b/drivers/net/wireless/b43/phy_n.h
>> index 30bec81..252d843 100644
>> --- a/drivers/net/wireless/b43/phy_n.h
>> +++ b/drivers/net/wireless/b43/phy_n.h
>> @@ -967,6 +967,9 @@ struct b43_phy_n {
>>         struct b43_phy_n_txpwrindex txpwrindex[2];
>>         struct b43_phy_n_pwr_ctl_info pwr_ctl_info[2];
>>         struct b43_chanspec txiqlocal_chanspec;
>> +       struct b43_ppr *tx_pwr_max_ppr;
>
> Why not just make this a struct member? As far as I can tell, it will
> always be allocated, and you would lose one alloc/free call, and
> probably one pointer dereference.

My idea was to prevent driver parts from knowing PPR implementation
details. Just to don't mess with its internals and allow redesigning
in the future. That is why I put "struct b43_ppr_rates" in .c file and
all other driver parts use a pointer only.

Seriously, I doubt in the sense of posting RFCs :P

-- 
Rafał



More information about the b43-dev mailing list