All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Sonny Sasaka <sonnysasaka@chromium.org>
Cc: linux-bluetooth@vger.kernel.org,
	Abhishek Pandit-Subedi <abhishekpandit@chromium.org>,
	Alain Michaud <alainm@chromium.org>
Subject: Re: [PATCH v2] Bluetooth: Cancel Inquiry before Create Connection
Date: Fri, 18 Dec 2020 22:47:26 +0100	[thread overview]
Message-ID: <C2BEF64A-EA11-422A-8F80-AADF160EC586@holtmann.org> (raw)
In-Reply-To: <20201209213514.99326-1-sonnysasaka@chromium.org>

Hi Sonny,

> Many controllers do not allow HCI Create Connection while it is doing
> Inquiry. This patch adds Inquiry Cancel before Create Connection in this
> case to allow the controller to do Create Connection. User space will be
> aware of this Inquiry cancellation and they may issue another discovery
> request afterwards.
> 
> Sample Command Disallowed response of HCI Create Connection:
> < HCI Command: Inquiry (0x01|0x0001) plen 5
>        Access code: 0x9e8b33 (General Inquiry)
>        Length: 10.24s (0x08)
>        Num responses: 0
>> HCI Event: Command Status (0x0f) plen 4
>      Inquiry (0x01|0x0001) ncmd 2
>        Status: Success (0x00)
> < HCI Command: Create Connection (0x01|0x0005) plen 13
>        Address: XX:XX:XX:XX:XX:XX
>        Packet type: 0xcc18
>        Page scan repetition mode: R2 (0x02)
>        Page scan mode: Mandatory (0x00)
>        Clock offset: 0x0000
>        Role switch: Allow slave (0x01)
>> HCI Event: Command Status (0x0f) plen 4
>      Create Connection (0x01|0x0005) ncmd 1
>        Status: Success (0x00)
>> HCI Event: Connect Complete (0x03) plen 11
>        Status: Command Disallowed (0x0c)
>        Handle: 65535
>        Address: XX:XX:XX:XX:XX:XX
>        Link type: ACL (0x01)
>        Encryption: Disabled (0x00)
> 
> Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
> Reviewed-by: Alain Michaud <alainm@chromium.org>
> Signed-off-by: Sonny Sasaka <sonnysasaka@chromium.org>
> 
> ---
> net/bluetooth/hci_conn.c | 17 +++++++++++++++++
> 1 file changed, 17 insertions(+)

patch has been applied to bluetooth-next tree.

Regards

Marcel


      parent reply	other threads:[~2020-12-18 21:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-09 21:35 [PATCH v2] Bluetooth: Cancel Inquiry before Create Connection Sonny Sasaka
2020-12-09 22:01 ` [v2] " bluez.test.bot
2020-12-18 21:47 ` Marcel Holtmann [this message]

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=C2BEF64A-EA11-422A-8F80-AADF160EC586@holtmann.org \
    --to=marcel@holtmann.org \
    --cc=abhishekpandit@chromium.org \
    --cc=alainm@chromium.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=sonnysasaka@chromium.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.