Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3566247ybb; Mon, 6 Apr 2020 11:08:58 -0700 (PDT) X-Google-Smtp-Source: APiQypKRopA9AU7/dcl0MisrVuwGlyoXWVp2xXRlI2tRgj5wj+HSSidW68r96zwzu+PygbrZjxNP X-Received: by 2002:a4a:1ec3:: with SMTP id 186mr353128ooq.66.1586196538361; Mon, 06 Apr 2020 11:08:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586196538; cv=none; d=google.com; s=arc-20160816; b=DVG5GQwD/XWbcgCJwBYvY5a5W2KzG5sqD3aRT7RocpIWGPm31nMC8ioroguFjgsAKX YbnOD+yb9A/bFFS7eEAM+hymXowAsJoJj24+f/ypW4/42MWWhorhB+z9glz3epbs8RJm k+n963sBaBFTf+NCadE/OaeVrdfcSvin3lMN4JJSeIZ8B0h/T0/uVea9TgDtvR/r6ENQ Xif2oSlNkEtF0k0LJ02113PffRLZdX5wzEhyfDIQR+H+4Cw6S1HGKEflbB6SGCGpmsyi YzNsofp22BKubCF3cGkk41T8nzGQtCzmwHvYosO6eBDF6pSNAxfFluO26gSfnqhOfx5D Fa0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:references:message-id :content-transfer-encoding:cc:date:in-reply-to:from:subject :mime-version; bh=dhE8eipZIKj3RWSmSSw5/rxMaKEfaV0ZPKexrOoEcLM=; b=Iez83cNuafOXzLAxYTLcTmgBi+TyKTiIieyLepfJ15xBsc5pJJX35fE4wTS0P5Klno CHuwjsluLOCN6srwO7OhGsj4CsrDVujx7ofdhTOKxUth37BEa63660pe0QZ0Wam0wl+W uX/LwSz+Z+BdrwKNjAy4cN6TxZOqXW/o+lbq1spntg7MQGe1AmTfU9sPCj9kcOFFXtLa d9dmVP2Bde6XmVGxhiPygnz894eB69cRBIvIf8rEBZ+wNT7NxxZ50qpoKURCRz+53Jc4 G0cQLnz4AtSQCLL8mdsczJLY+sGlB5Or7oYexQXoEm7aduR6cCfC7waztJYnPpFIGBvQ Q16w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 30si141568oth.68.2020.04.06.11.08.46; Mon, 06 Apr 2020 11:08:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-bluetooth-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726494AbgDFSIm convert rfc822-to-8bit (ORCPT + 99 others); Mon, 6 Apr 2020 14:08:42 -0400 Received: from coyote.holtmann.net ([212.227.132.17]:51929 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726436AbgDFSIm (ORCPT ); Mon, 6 Apr 2020 14:08:42 -0400 Received: from marcel-macbook.fritz.box (p4FEFC5A7.dip0.t-ipconnect.de [79.239.197.167]) by mail.holtmann.org (Postfix) with ESMTPSA id CB4F7CECCA; Mon, 6 Apr 2020 20:18:14 +0200 (CEST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.80.23.2.2\)) Subject: Re: [PATCH v2] bluetooth:Adding driver and quirk defs for multi-role LE From: Marcel Holtmann In-Reply-To: <20200406143529.209076-1-alainm@chromium.org> Date: Mon, 6 Apr 2020 20:08:40 +0200 Cc: Bluez mailing list Content-Transfer-Encoding: 8BIT Message-Id: <5835D8B2-C4B6-432F-B985-CA8D9633951A@holtmann.org> References: <20200406143529.209076-1-alainm@chromium.org> To: Alain Michaud X-Mailer: Apple Mail (2.3608.80.23.2.2) Sender: linux-bluetooth-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Hi Alain, > This change adds the relevant driver and quirk to allow drivers to > report the le_states as being trustworthy. > > This has historically been disabled as controllers did not reliably > support this. In particular, this will be used to relax this condition > for controllers that have been well tested and reliable. > > /* Most controller will fail if we try to create new connections > * while we have an existing one in slave role. > */ > if (hdev->conn_hash.le_num_slave > 0) > return NULL; > > Signed-off-by: Alain Michaud > --- > > drivers/bluetooth/btusb.c | 2 +- > include/net/bluetooth/hci.h | 9 +++++++++ > 2 files changed, 10 insertions(+), 1 deletion(-) > > diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c > index 3bdec42c9612..dd27e28d4601 100644 > --- a/drivers/bluetooth/btusb.c > +++ b/drivers/bluetooth/btusb.c > @@ -58,7 +58,7 @@ static struct usb_driver btusb_driver; > #define BTUSB_CW6622 0x100000 > #define BTUSB_MEDIATEK 0x200000 > #define BTUSB_WIDEBAND_SPEECH 0x400000 > - > +#define BTUSB_VALID_LE_STATES 0x800000 > static const struct usb_device_id btusb_table[] = { > /* Generic Bluetooth USB device */ > { USB_DEVICE_INFO(0xe0, 0x01, 0x01) }, > diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h > index 5f60e135aeb6..25c2e5ee81dc 100644 > --- a/include/net/bluetooth/hci.h > +++ b/include/net/bluetooth/hci.h > @@ -214,6 +214,15 @@ enum { > * This quirk must be set before hci_register_dev is called. > */ > HCI_QUIRK_WIDEBAND_SPEECH_SUPPORTED, > + > + /* When this quirk is set, the controller has validated that > + * LE states reported through the HCI_LE_READ_SUPPORTED_STATES are > + * valid. This mechanism is necessary as many controllers have > + * been seen has having trouble initiating a connectable > + * advertisement despite the state combination being reported as > + * supported. > + */ > + HCI_QUIRK_VALID_LE_STATES, > }; So far so good, but I wait until I see this patch in a broader context that also lifts some of the restrictions and checks the supported LE states. Regards Marcel