From: Chris Chiu <chiu@endlessm.com>
To: Jes Sorensen <jes.sorensen@gmail.com>
Cc: Kalle Valo <kvalo@codeaurora.org>,
David Miller <davem@davemloft.net>,
linux-wireless <linux-wireless@vger.kernel.org>,
netdev <netdev@vger.kernel.org>,
Linux Kernel <linux-kernel@vger.kernel.org>,
Linux Upstreaming Team <linux@endlessm.com>
Subject: Re: [PATCH v2] rtl8xxxu: add bluetooth co-existence support for single antenna
Date: Thu, 3 Oct 2019 09:19:15 +0800 [thread overview]
Message-ID: <CAB4CAweXfhLc8ATWg87ydadCKVqj3SnG37O5Hyz8uP8EkPrg9w@mail.gmail.com> (raw)
In-Reply-To: <0c049f46-fb15-693e-affe-a84ea759b5d7@gmail.com>
On Wed, Oct 2, 2019 at 11:04 PM Jes Sorensen <jes.sorensen@gmail.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.
Chris
next prev parent reply other threads:[~2019-10-03 1:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-11 2:50 [PATCH v2] rtl8xxxu: add bluetooth co-existence support for single antenna Chris Chiu
2019-09-19 1:44 ` Chris Chiu
2019-10-01 9:32 ` Chris Chiu
2019-10-02 4:21 ` Kalle Valo
2019-10-02 4:29 ` Kalle Valo
[not found] ` <20191002042911.2E755611BF@smtp.codeaurora.org>
2019-10-02 12:38 ` Chris Chiu
2019-10-02 16:37 ` Kalle Valo
2019-10-02 15:03 ` Jes Sorensen
2019-10-03 1:19 ` Chris Chiu [this message]
2019-10-04 15:11 ` Jes Sorensen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAB4CAweXfhLc8ATWg87ydadCKVqj3SnG37O5Hyz8uP8EkPrg9w@mail.gmail.com \
--to=chiu@endlessm.com \
--cc=davem@davemloft.net \
--cc=jes.sorensen@gmail.com \
--cc=kvalo@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linux@endlessm.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).