lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <5dad1fd1-ef0b-b5d9-02ea-7fc3bf7f8576@gmail.com>
Date:   Fri, 4 Oct 2019 11:11:12 -0400
From:   Jes Sorensen <jes.sorensen@...il.com>
To:     Chris Chiu <chiu@...lessm.com>
Cc:     Kalle Valo <kvalo@...eaurora.org>,
        David Miller <davem@...emloft.net>,
        linux-wireless <linux-wireless@...r.kernel.org>,
        netdev <netdev@...r.kernel.org>,
        Linux Kernel <linux-kernel@...r.kernel.org>,
        Linux Upstreaming Team <linux@...lessm.com>
Subject: Re: [PATCH v2] rtl8xxxu: add bluetooth co-existence support for
 single antenna

On 10/2/19 9:19 PM, Chris Chiu wrote:
> On Wed, Oct 2, 2019 at 11:04 PM Jes Sorensen <jes.sorensen@...il.com> wrote:
>>
>>
>> In general I think it looks good! One nit below:
>>
>> Sorry I have been traveling for the last three weeks, so just catching up.
>>
>>
>>> +void rtl8723bu_set_coex_with_type(struct rtl8xxxu_priv *priv, u8 type)
>>> +{
>>> +     switch (type) {
>>> +     case 0:
>>> +             rtl8xxxu_write32(priv, REG_BT_COEX_TABLE1, 0x55555555);
>>> +             rtl8xxxu_write32(priv, REG_BT_COEX_TABLE2, 0x55555555);
>>> +             rtl8xxxu_write32(priv, REG_BT_COEX_TABLE3, 0x00ffffff);
>>> +             rtl8xxxu_write8(priv, REG_BT_COEX_TABLE4, 0x03);
>>> +             break;
>>> +     case 1:
>>> +     case 3:
>>
>> The one item here, I would prefer introducing some defined types to
>> avoid the hard coded type numbers. It's much easier to read and debug
>> when named.
>>
> Honestly, I also thought of that but there's no meaningful description for these
> numbers in the vendor driver. Even based on where they're invoked, I can merely
> give a rough definition on 0. So I left it as it is for the covenience
> if I have to do
> cross-comparison with vendor driver in the future for some possible
> unknown bugs.
> 
>> If you shortened the name of the function to rtl8723bu_set_coex() you
>> won't have problems with line lengths at the calling point.
>>
> I think the rtl8723bu_set_ps_tdma() function would cause the line length problem
> more than rtl8723bu_set_coex_with_type() at the calling point. But as the same
> debug reason as mentioned, I may like to keep it because I don't know how to
> categorize the 5 magic parameters. I also reference the latest rtw88
> driver code,
> it seems no better solution so far. I'll keep watching if there's any
> better idea.

Personally I would still prefer to name it COEX_TYPE_1 etc. but I can 
live with this. Would you mind at least adding some comments in the code 
about it?

Cheers,
Jes


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ