linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Cc: CrosBT Upstreaming <chromeos-bluetooth-upstreaming@chromium.org>,
	linux-bluetooth <linux-bluetooth@vger.kernel.org>,
	Daniel Winkler <danielwinkler@google.com>,
	"David S. Miller" <davem@davemloft.net>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Jakub Kicinski <kuba@kernel.org>
Subject: Re: [RESEND PATCH] bluetooth: Set ext scan response only when it exists
Date: Sun, 13 Sep 2020 09:48:28 +0200	[thread overview]
Message-ID: <A3FDD177-8552-4BDD-941A-0BD8FF495AFE@holtmann.org> (raw)
In-Reply-To: <20200911153141.RESEND.1.Ib022565452fde0c02fbcf619950ef868715dd243@changeid>

Hi Abhishek,

> Only set extended scan response only when it exists. Otherwise, clear
> the scan response data.
> 
> Per the core spec v5.2, Vol 4, Part E, 7.8.55
> 
> If the advertising set is non-scannable and the Host uses this command
> other than to discard existing data, the Controller shall return the
> error code Invalid HCI Command Parameters (0x12).
> 
> On WCN3991, the controller correctly responds with Invalid Parameters
> when this is sent.  That error causes __hci_req_hci_power_on to fail
> with -EINVAL and LE devices can't connect because background scanning
> isn't configured.
> 
> Here is an hci trace of where this issue occurs during power on:
> 
> < HCI Command: LE Set Extended Advertising Parameters (0x08|0x0036) plen 25
>        Handle: 0x00
>        Properties: 0x0010
>          Use legacy advertising PDUs: ADV_NONCONN_IND
>        Min advertising interval: 181.250 msec (0x0122)
>        Max advertising interval: 181.250 msec (0x0122)
>        Channel map: 37, 38, 39 (0x07)
>        Own address type: Random (0x01)
>        Peer address type: Public (0x00)
>        Peer address: 00:00:00:00:00:00 (OUI 00-00-00)
>        Filter policy: Allow Scan Request from Any, Allow Connect...
>        TX power: 127 dbm (0x7f)
>        Primary PHY: LE 1M (0x01)
>        Secondary max skip: 0x00
>        Secondary PHY: LE 1M (0x01)
>        SID: 0x00
>        Scan request notifications: Disabled (0x00)
>> HCI Event: Command Complete (0x0e) plen 5
>      LE Set Extended Advertising Parameters (0x08|0x0036) ncmd 1
>        Status: Success (0x00)
>        TX power (selected): 9 dbm (0x09)
> < HCI Command: LE Set Advertising Set Random Address (0x08|0x0035) plen 7
>        Advertising handle: 0x00
>        Advertising random address: 08:FD:55:ED:22:28 (OUI 08-FD-55)
>> HCI Event: Command Complete (0x0e) plen 4
>      LE Set Advertising Set Random Address (0x08|0x0035) ncmd
>        Status: Success (0x00)
> < HCI Command: LE Set Extended Scan Response Data (0x08|0x0038) plen 35
>        Handle: 0x00
>        Operation: Complete scan response data (0x03)
>        Fragment preference: Minimize fragmentation (0x01)
>        Data length: 0x0d
>        Name (short): Chromebook
>> HCI Event: Command Complete (0x0e) plen 4
>      LE Set Extended Scan Response Data (0x08|0x0038) ncmd 1
>        Status: Invalid HCI Command Parameters (0x12)
> 
> Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
> Reviewed-by: Daniel Winkler <danielwinkler@google.com>
> ---
> 
> net/bluetooth/hci_request.c | 7 +++++--
> 1 file changed, 5 insertions(+), 2 deletions(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel


  reply	other threads:[~2020-09-13  7:48 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-11 22:32 [RESEND PATCH] bluetooth: Set ext scan response only when it exists Abhishek Pandit-Subedi
2020-09-13  7:48 ` Marcel Holtmann [this message]
2020-11-13 22:44   ` Luiz Augusto von Dentz

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=A3FDD177-8552-4BDD-941A-0BD8FF495AFE@holtmann.org \
    --to=marcel@holtmann.org \
    --cc=abhishekpandit@chromium.org \
    --cc=chromeos-bluetooth-upstreaming@chromium.org \
    --cc=danielwinkler@google.com \
    --cc=davem@davemloft.net \
    --cc=johan.hedberg@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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).