linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: "Daniel Drake" <drake@endlessm.com>, 陈艳萍 <champion_chen@realsil.com.cn>
Cc: Carlo Caione <carlo@endlessm.com>,
	Linux Bluetooth mailing list <linux-bluetooth@vger.kernel.org>,
	"shaofu@realtek.com >> shaofu" <shaofu@realtek.com>
Subject: Re: Realtek USB bluetooth: no scan results when wifi is connected
Date: Sat, 09 May 2015 16:46:55 -0500	[thread overview]
Message-ID: <554E804F.9090407@lwfinger.net> (raw)
In-Reply-To: <CAD8Lp47=G8rFJtow9fn9WBg6FAyygopvYh7k0FNS0w8FgKXD6A@mail.gmail.com>

On 05/09/2015 03:32 PM, Daniel Drake wrote:
> Hi Champion,
>
> I have a card here which has RTL8723BE wifi and bluetooth combined. 2 antennas.
>
> In linux-next (Linux 4.2) the bluetooth and wifi work fine separately,
> but when using them together, I can sometimes see a problem. This is
> using the btusb driver based on your code (now included in Linux 4.2),
> and the RTL8723B rtlwifi driver, all using the latest firmware in the
> linux-firmware git repo.
>
> To reproduce:
>   - Boot with no wifi connection active
>   - "hcitool scan" and verify that my laptop and phone can be seen
>   - Connect to wifi
>   - Run "hcitool scan" again a few times a minute, within 2-5 minutes
> normally my phone and laptop can no longer be seen
>   - Disconnect from wifi and immediately run "hcitool scan" again, my
> phone and laptop can be seen
>
> 3 interesting observations when the scan results are coming back empty:
>   1. I can still get the names of the remote devices by running
> "hcitool name <addr>"
>   2. I can still query the remote devices by running "hcitool info
> <addr>". After this, the scan suddenly starts working again!
>   3. Even though both of my local bluetooth devices no longer appear in
> scan results, I can sometimes see my neighbour's phone coming up as a
> scan result at this time.
>
> Anyway, disabling btcoexist avoids the issue, so I dug through that
> code, and found the exact line of code that seems to (sometimes) make
> us enter this strange mode.
>
> Call chain inside drivers/net/wireless/rtlwifi/btcoexist/halbtc8723b2ant.c:
> ex_btc8723b2ant_bt_info_notify (called when starting and finishing a BT scan)
> btc8723b2ant_run_coexist_mechanism
> btc8723b2ant_action_bt_inquiry
>
> As wifi is connected, we now call:
>          btc8723b2ant_ps_tdma(btcoexist, NORMAL_EXEC, true, 3);
>
> This is the function call that sometimes puts us into the mode where
> there are no scan results. Inside this function, if I comment out
> these lines in the turn_on section, the bug is avoided:
>
>          case 3:
>              //btc8723b2ant_set_fw_ps_tdma(btcoexist, 0xe3, 0x1c,
>              //                0x3, 0xf1, 0x90);
>              break;
>
> Any idea what is happening here? Can you help me find a better fix?

Daniel,

Do you see any adverse side effects when you comment out the "case 3" code?

As there has not been a lot of testing of wifi and BT with Realtek devices in 
the field, I expect to see a number of bugs like this.

I added Shao Fu (aka Rock) to the Cc list. He is the Realtek engineer 
responsible for the wifi driver.

Larry


  reply	other threads:[~2015-05-09 21:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-09 20:32 Realtek USB bluetooth: no scan results when wifi is connected Daniel Drake
2015-05-09 21:46 ` Larry Finger [this message]
2015-05-11 13:36   ` Daniel Drake
2015-05-11 15:38     ` Larry Finger
2015-05-12  2:54   ` 答复: " 陈艳萍
2015-05-12 12:53     ` Daniel Drake
2015-05-13  2:36       ` 答复: " 陈艳萍
2015-05-21 13:29         ` Daniel Drake
2015-05-28 10:02           ` 答复: " 陈艳萍
2015-05-28 14:23             ` Marcel Holtmann
2015-05-28 14:48               ` Daniel Drake
2015-05-28 15:13                 ` Marcel Holtmann
2015-05-28 15:58                   ` Larry Finger
2015-05-29  8:17                     ` Shaofu
2015-06-06  5:07                       ` Marcel Holtmann
2015-06-06  5:08                     ` Marcel Holtmann
2015-05-13  7:51       ` 答复: 答复: " 陈艳萍

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=554E804F.9090407@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=carlo@endlessm.com \
    --cc=champion_chen@realsil.com.cn \
    --cc=drake@endlessm.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=shaofu@realtek.com \
    /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).