Received: by 2002:ab2:6857:0:b0:1ef:ffd0:ce49 with SMTP id l23csp2526574lqp; Mon, 25 Mar 2024 01:10:31 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW1+91ewoXU+wyRJDtf5jlW29yQknNhHRnRDoSIdHF0BVG2yvQ5FYXzgad+QPpGc8KBLsgrbkC5jadAN+YFUkvXGtoin1KcaSpJEHtaqQ== X-Google-Smtp-Source: AGHT+IG7SdBxKq8nCMcRCoWCJiiRK8WuqPimP05ePv7lMKBPyeJUisBYclhNNlSTB0Jq7tZBR+8q X-Received: by 2002:a17:902:ce87:b0:1e0:b045:dcc6 with SMTP id f7-20020a170902ce8700b001e0b045dcc6mr6393531plg.9.1711354231389; Mon, 25 Mar 2024 01:10:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711354231; cv=pass; d=google.com; s=arc-20160816; b=X1fKjatBEH+6XpITb55fWZMrN03A+YDEfLmGdtUC0SMZdiwTcJwd/K3oLU+qnO0ffY rfqmEcUdPxK4j5CEhXu5fVdHKcMqWL0XDgLW8cbKI3Tb8ab7ziUIK9zo3qY9OBnea24Y uBw+6q5w3tSo2JasCLFHyAusr4CzpuVKyB6HFA8hJ9kl3YfSe9vpG1sxL6thYXORqkb1 WGeC6gdqqZuHoPA4zIIVR2ru5ciyVk/2rF2/IJOlqzZtwPuao1apeAQ+fq/ck0R/PHCU b4EM7ILuhvCsTaSvAwx9EqaSH79f3t5njvLsh7oXYiKak4vA1fiwbuLpAAuFEVc8/38A dbZg== 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=BZgqF8JkSug6MyAz3CG2AUEzzq6uaX7p6HYxoVWOiFk=; fh=Yq9pTZcfK+NqYz0VmPJ83nJ7o0CwDlSayUr/Cvn/Z8A=; b=EUOkeWfaaOpSLY+dZy4nsw14caZo+BDpOe6nM/gudKIHrUcOTN35EPlp1NjqEU+I6u +0R1rPMwvlgB8p+qzCK/DOVn0QtjRqA7C+3dHMcE5rNzAF7XNqUg8fCSwCHxWEKYWbq8 a1PciNjQIH08zdMqHYfuiFZv8CwPrBWSU20R/hers7/NHGUnkpHluRQ9LVIBM0Dh0q9+ GMPJuVXDY4snLdb/RHvscfTU3ZZzYIj3cDeqZfbkDKCOtDMHk/rcO/oSJmqMTd71Getn AeufTVzTuMfWbEqapGtvoZK6uUAqFGylbDKMTXuj8N9BnENbgPRyVE7thd6JJ4Xlij0D H2qw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z4ADvN4J; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115922-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115922-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id f11-20020a170902ce8b00b001e0bc38ff7csi1831576plg.44.2024.03.25.01.10.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Mar 2024 01:10:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-115922-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Z4ADvN4J; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-115922-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-115922-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 198F7296673 for ; Mon, 25 Mar 2024 08:10:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 673E32666C5; Mon, 25 Mar 2024 03:03:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Z4ADvN4J" 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 71033227E0E; Sun, 24 Mar 2024 23:15:21 +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=1711322122; cv=none; b=o136o7oZGnQKr0pXQC2CTrNO/CkmQlalGZvVCTozRDTlBLaxsYEJC3EBJXGlzYeBu4gXdSnmGziJ3Usnq0R/j3vKS8EnQFLoNCK8ARrYdshW+RJlNENxbAMKQj16nt5UkUBSG46z0WC+gVSdg5W+5XQ7sPxEv8ds3bvk94CYIC4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711322122; c=relaxed/simple; bh=FMBIVLUImQuclpTP1MRxQVmY+Su/qzutzl+hDYcOGpE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=q5K53+GJ0t3W1tjmVWRpj548KP4SscEVG1hOf/yWZ+Iu9YG5twd1xxdnVakJiAi7SX0a35GfgOUMZtVlgdV34TJXDJVWSNlE4uJPd7vi1lk2mNTgVZ6gjQFWWX6V08SKFd5LNYNlNUMbDhOuIkfitLgjl1L0fpLsW3VBhLur5AU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Z4ADvN4J; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id ADBC8C433C7; Sun, 24 Mar 2024 23:15:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711322121; bh=FMBIVLUImQuclpTP1MRxQVmY+Su/qzutzl+hDYcOGpE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z4ADvN4J05oVw2dBoolHMie/2NaIzWmZcNuKF5z7CHrmcFG6X1pv8etAH0QU/kc3W DIv7WuNA8reHH1VzedzjrqBTXUyx0A0Imad+UuEr23Z5ayicQtI1LZh0cK5BA5eS4R YBA93q0zgvYKcJsZ+0RbDPb7LFIOUfwK6Rz0QfwWV8WkfYhm7w4iWFatT5zitoWx+v WcAz0Z7mkbUfOKAJtafrs5D90YtOirXVUqASCu1V9PyPZ0ne+A9HfBWslFbHPkZezH hxU8uZ0UJVi+Mrlr8cSb4O3SmlQb3oqDqyAV9uxsgXm7SLPTtUshGaCtu7FMv/F3d8 qt95+tBrxlphQ== 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 6.1 196/451] Bluetooth: Remove superfluous call to hci_conn_check_pending() Date: Sun, 24 Mar 2024 19:07:52 -0400 Message-ID: <20240324231207.1351418-197-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240324231207.1351418-1-sashal@kernel.org> References: <20240324231207.1351418-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 452d839c152fc..0cd093ec6486c 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -3567,8 +3567,6 @@ static void hci_remote_name_evt(struct hci_dev *hdev, void *data, bt_dev_dbg(hdev, "status 0x%2.2x", ev->status); - hci_conn_check_pending(hdev); - hci_dev_lock(hdev); conn = hci_conn_hash_lookup_ba(hdev, ACL_LINK, &ev->bdaddr); -- 2.43.0