From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 81064218594; Thu, 12 Dec 2024 15:46:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734018415; cv=none; b=kQE8WkK5SbyLcmQPneS52dHgjdH3wPRD9gQoRRi2GtKfsrXd1oS4pHv7ZWeKBWcGglwHRtuRY50waTIoe9YxvGDMa9sI2qoc2AFgd9K5pUOBPtqZQ97OJwTgwHB1hGuMwLoouEcLzbngfKlZR+iS8Gpnht4QaMepD90pPO8i/Is= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734018415; c=relaxed/simple; bh=oUfCS8kslf9G11Ak2WH3W7Erjz1hIQvHiy1+k48Wzi0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sWWUNXQmBKWyF/pRbYNzXO2Kx1+Nxx30nFt1oAFA3dgcyCiLKnF5mDcOqJ9IFTFf3sFrfVQJaRcj3O39SaTvlyZzBe6F8KaDbRb198IKFGZ4SNgeT/LHNwRp8xe61H/qMIve9Iv81IF1zhhsYmpcDX7l25OLaTrIbDSX+fb0APM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=M0iGxjWF; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="M0iGxjWF" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB62DC4CECE; Thu, 12 Dec 2024 15:46:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1734018415; bh=oUfCS8kslf9G11Ak2WH3W7Erjz1hIQvHiy1+k48Wzi0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M0iGxjWFBsv0hxWS3jcMjKVCPbji/d5Plj6ZXlrMQ7pExNs1SIu3tgvxMGmCzF+2c IoqIJq2trRuz6DBtt5RBOlj4IW5KXzZGwg/4PehaZ2IIOkBc11IZxWWbWeCOINefFZ Lj2AtMYmMqeUuA5l+jUdWU9mAhGNaPz6HsqTbalQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Danil Pylaev , Luiz Augusto von Dentz , Sasha Levin Subject: [PATCH 6.6 259/356] Bluetooth: Support new quirks for ATS2851 Date: Thu, 12 Dec 2024 15:59:38 +0100 Message-ID: <20241212144254.831499985@linuxfoundation.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20241212144244.601729511@linuxfoundation.org> References: <20241212144244.601729511@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Danil Pylaev [ Upstream commit 5bd3135924b4570dcecc8793f7771cb8d42d8b19 ] This adds support for quirks for broken extended create connection, and write auth payload timeout. Signed-off-by: Danil Pylaev Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin --- net/bluetooth/hci_event.c | 7 +++++++ net/bluetooth/hci_sync.c | 9 ++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index da056cca3edbc..141b4fce55e35 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -3627,6 +3627,13 @@ static void hci_encrypt_change_evt(struct hci_dev *hdev, void *data, goto unlock; } + /* We skip the WRITE_AUTH_PAYLOAD_TIMEOUT for ATS2851 based controllers + * to avoid unexpected SMP command errors when pairing. + */ + if (test_bit(HCI_QUIRK_BROKEN_WRITE_AUTH_PAYLOAD_TIMEOUT, + &hdev->quirks)) + goto notify; + /* Set the default Authenticated Payload Timeout after * an LE Link is established. As per Core Spec v5.0, Vol 2, Part B * Section 3.3, the HCI command WRITE_AUTH_PAYLOAD_TIMEOUT should be diff --git a/net/bluetooth/hci_sync.c b/net/bluetooth/hci_sync.c index c553b637cda7f..d95e2b55badb4 100644 --- a/net/bluetooth/hci_sync.c +++ b/net/bluetooth/hci_sync.c @@ -4853,6 +4853,13 @@ static const struct { HCI_QUIRK_BROKEN(SET_RPA_TIMEOUT, "HCI LE Set Random Private Address Timeout command is " "advertised, but not supported."), + HCI_QUIRK_BROKEN(EXT_CREATE_CONN, + "HCI LE Extended Create Connection command is " + "advertised, but not supported."), + HCI_QUIRK_BROKEN(WRITE_AUTH_PAYLOAD_TIMEOUT, + "HCI WRITE AUTH PAYLOAD TIMEOUT command leads " + "to unexpected SMP errors when pairing " + "and will not be used."), HCI_QUIRK_BROKEN(LE_CODED, "HCI LE Coded PHY feature bit is set, " "but its usage is not supported.") @@ -6485,7 +6492,7 @@ static int hci_le_create_conn_sync(struct hci_dev *hdev, void *data) &own_addr_type); if (err) goto done; - + /* Send command LE Extended Create Connection if supported */ if (use_ext_conn(hdev)) { err = hci_le_ext_create_conn_sync(hdev, conn, own_addr_type); goto done; -- 2.43.0