Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2667505lqp; Mon, 25 Mar 2024 06:11:36 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWUgCsArgnTVa46uI3wpT1594fpwE/61wejraEGF+BzAFj1dUBT/MR1FcI49Fyyy08rTIbzVavAdUJMHSfSLQwu3rK0MYFvRttedOJB3Q== X-Google-Smtp-Source: AGHT+IEmu9JMdhy3n041lOPmkphGW8D6RsfuBb3SGovsWzkZ2JiLTd4yZQJ9EUUYK6a7388GGt8V X-Received: by 2002:a17:906:fad6:b0:a46:da87:26e9 with SMTP id lu22-20020a170906fad600b00a46da8726e9mr3862707ejb.77.1711372295881; Mon, 25 Mar 2024 06:11:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711372295; cv=pass; d=google.com; s=arc-20160816; b=wvHLdsWfRNYqv3SlYmvxyG1iLRSzI8ZsxstDhxSbKheDAQM9dP20nQMTYdiyDOUIbY 35QD5pSQ6rYDAIUMOISpODDv7a4pfHsYA5ANAHYBEEqgvxsmn8IdeVf+HKYZ03Gu4wqC mo11f+WODM4a4IJeIoejUW1d7lcNc6h9Lrdr3gVFCFiCTKAzhlnJmSI2envvtQXw7gGj 2tzJnWP3QnEkCau+om4z0Wtz1h9wA15GFE9GhpDD+jrXwBrFc0kQk62X7C0b7PuynEAs um+8XIHsgMJbPR1DS/dftC+2YB+WBnCDT5szhAIU0LAM0HqHJfOMUpB7FlvF8fRjihJB W/2A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=5cMiNuyryl0SUIFV9J+0wRHL/zrK+zbRKl/GA3LLypI=; fh=Yq9pTZcfK+NqYz0VmPJ83nJ7o0CwDlSayUr/Cvn/Z8A=; b=mnDLPYIiB0z+jquTkc71h/h5LVLvD6yf2gpbSyWxVDUF0xH2nOUJE85NdipDGTxiLS FfUR/j22VuzHSZ0TfstjTNIyDJjthGqbLZggbsWQ+fLaXivYiey3/nP7ha+Edr2Kxiuh tp6CRgqoehIHZYgEhRrB8t2kmXTVEbueZ5b0NRqaxrJZUEc9SO1wuDndwqha/JnvUHdF tXu1QsODwHv0cJZYQrLhRSZ4Wos2BPQo4u4QLtR/ECI1fVHGGM5zodZQLtHYmih6al+N KQVXQjCQv1MDO09wPRbIVvw2+I8fCIw1US+3Ozg5nDfVnFt2wwrCZKv0PAQ4so1gm/LD RfEA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eWybTXkQ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-116320-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116320-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id sh32-20020a1709076ea000b00a474d14000csi1725620ejc.946.2024.03.25.06.11.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 06:11:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-116320-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eWybTXkQ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-116320-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-116320-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 9A32E1F39B27 for ; Mon, 25 Mar 2024 13:11:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9CF6C292283; Mon, 25 Mar 2024 03:40:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="eWybTXkQ" 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 E76C818442E; Sun, 24 Mar 2024 23:51:13 +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=1711324275; cv=none; b=i3ucFLlYNvdqdmxsAuxhCdq7+5S9VMdLdCk83ZFcROuWak89KEXeSOy+yC9AFEgjAa7aX60LDJW/X8FX75e7Xd7gep+gifMy340W7w/MMmCoUiIRobcyo6E+6SurhYyO2vX/V8g+sAcs+QfEB1SjnLI2bI0K/rbVP9tDsYAqL+U= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711324275; c=relaxed/simple; bh=KqsAUPQeP4Ko1impn9N/u7BwalSitQSSqAyxjHQ428A=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Su2BP/gmZnkgy5o+OuIGmOinsTJE/6fHxEOAS39oPHAi+To2dGWkkKd7RAdB4nucWj10GH8AOfrdqXrqJbW5H37lIBstZu6yV1DEOg4Iw/KSdNj4u0bGQKTVbWyWHMP3EqiGsnqknYe4oz383GOmEXd3wc+upp6G993DQHNQX2Q= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=eWybTXkQ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D6880C43390; Sun, 24 Mar 2024 23:51:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711324273; bh=KqsAUPQeP4Ko1impn9N/u7BwalSitQSSqAyxjHQ428A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eWybTXkQKMBQ4FvM/t4+D7+NTzmDE9usaD7XyMyAAqx4r8Li5M3RlQfGDsnld3a0i qsK4Mqr3TIL2d94uAmaaVJ5jC/LqwnQJV54ISSWxwdQ85OlQHRDgBohqAQkUIh9EHO 6dHoHrPpK6LvhgN6p3eJptr3gDuw6uJE7VGuIy+i/irT0y7jQFhqu0BiEV1mA/KrOn 8Z33nLh/URZ4JgzH8HRDVjqjdRbhULIvCOWjY0DM8zeZpC0uI2wNnj3X1A6jwM/OoN ksA1MIIh2sdvsXufprJEGFNBFEGyM3paD1j/VdXMzyeASJBXGUp7EAibsJkW30kt/q 3d12zqHdBrwrQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: =?UTF-8?q?Jonas=20Dre=C3=9Fler?= , Luiz Augusto von Dentz , Sasha Levin Subject: [PATCH 4.19 052/148] Bluetooth: Remove superfluous call to hci_conn_check_pending() Date: Sun, 24 Mar 2024 19:48:36 -0400 Message-ID: <20240324235012.1356413-53-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324235012.1356413-1-sashal@kernel.org> References: <20240324235012.1356413-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit From: Jonas Dreßler [ Upstream commit 78e3639fc8031275010c3287ac548c0bc8de83b1 ] The "pending connections" feature was originally introduced with commit 4c67bc74f016 ("[Bluetooth] Support concurrent connect requests") and 6bd57416127e ("[Bluetooth] Handling pending connect attempts after inquiry") to handle controllers supporting only a single connection request at a time. Later things were extended to also cancel ongoing inquiries on connect() with commit 89e65975fea5 ("Bluetooth: Cancel Inquiry before Create Connection"). With commit a9de9248064b ("[Bluetooth] Switch from OGF+OCF to using only opcodes"), hci_conn_check_pending() was introduced as a helper to consolidate a few places where we check for pending connections (indicated by the BT_CONNECT2 flag) and then try to connect. This refactoring commit also snuck in two more calls to hci_conn_check_pending(): - One is in the failure callback of hci_cs_inquiry(), this one probably makes sense: If we send an "HCI Inquiry" command and then immediately after a "Create Connection" command, the "Create Connection" command might fail before the "HCI Inquiry" command, and then we want to retry the "Create Connection" on failure of the "HCI Inquiry". - The other added call to hci_conn_check_pending() is in the event handler for the "Remote Name" event, this seems unrelated and is possibly a copy-paste error, so remove that one. Fixes: a9de9248064b ("[Bluetooth] Switch from OGF+OCF to using only opcodes") Signed-off-by: Jonas Dreßler Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin --- net/bluetooth/hci_event.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 4811855259267..0e9325057b3a9 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -2777,8 +2777,6 @@ static void hci_remote_name_evt(struct hci_dev *hdev, struct sk_buff *skb) BT_DBG("%s", hdev->name); - hci_conn_check_pending(hdev); - hci_dev_lock(hdev); conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); -- 2.43.0