Received: by 2002:ab2:68c1:0:b0:1fd:9a81:d0e4 with SMTP id e1csp252870lqp; Sat, 8 Jun 2024 15:02:26 -0700 (PDT) X-Forwarded-Encrypted: i=4; AJvYcCU4Yvcpta7U15F88ay3WRkdfnSJ6nf7kARtdhGzJFCHCSxMztxS3DWWuIdPYNxaFkIMv0glQieOOATllcE/mG6qHUgrXAJvNQZyUh+C0A== X-Google-Smtp-Source: AGHT+IE54fK8bIUUDUV1+4gxAaAS01RjVxEkI3SfB6Oeae8pdxNWQgLkX+rnxM7hVVOhfvRsYyCY X-Received: by 2002:a17:90a:af92:b0:2c2:d28e:cc97 with SMTP id 98e67ed59e1d1-2c2d28ed031mr3038031a91.30.1717884145825; Sat, 08 Jun 2024 15:02:25 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1717884145; cv=pass; d=google.com; s=arc-20160816; b=bq7uFZqTxkv4H7BrdF9DM56vL+MdbSf3u3qDoV+D3l6Nn0HmhJgYu2GAk6ymwYVIzp d3f2c0Z56TuPuCfoo+1F0c0GZSNJBKV+QUaLdZvgmFGNLzXLDSeeo2Ei0ymvDCrUSXaO 2O39kOyErZ3G6mfKceZcrLbgoTIu7ksHaDZb7c3eBjRtom+6y8/81qvrh9XsfCRoOC2v SdvyJ5TkVQLt8RIMCabfgHpiCpwTavoCZAkPI2IK1OzlJrC91u6n4Ez0WAsgqUuYiVop LbJiVrtLya6qhp22DxlUgs0T8JTHS/6zu45Ev2JkMTsiE53aT5RrQvpjgbvpyC5YuAIw lwyQ== ARC-Message-Signature: i=3; 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=VQwo46XW5qDRWfTw7yYSPgYDh6MEenC0f3oCmhIKWKI=; fh=2J45GHuG1vem2cbwEGvfE2MKVAhrf5C3YEHlDvOqE30=; b=hOKUe/7XPTAFy9z3zN9VHKPhphZxzRkICiqdFPW7jI3MCIJY82U789OeA1stItgGzM OSXpLgUXYzgXNoAcU7j/x0Dakn/XKmJVnPQ4jCcWAl/JRcP8APkpy7O2g1Ss/PvEfm9l h+yo5L40lMMHIzKQluAR32blOEvm3mTB7ou0ceKBwkaMUL/iRdnwdHj2xHFa0/emviGL PzCrHLoldbJfqK+WabcS4/yvcv0SYiupg9cS7WDURVOnS/GN1Bi2BbMHADtVFIibGaJw +2SCQxkyjdBnkxEpv75GQDc8wlnZwkrBbf72qepWbmowWUGPRbOnpu6BGoP8xoO40rJc df9Q==; dara=google.com ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@iki.fi header.s=meesny header.b=OG1UyGsY; arc=pass (i=2 spf=pass spfdomain=iki.fi dkim=pass dkdomain=iki.fi); spf=pass (google.com: domain of linux-bluetooth+bounces-5212-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-5212-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c2eba0b9a9si876319a91.114.2024.06.08.15.02.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 08 Jun 2024 15:02:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-5212-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@iki.fi header.s=meesny header.b=OG1UyGsY; arc=pass (i=2 spf=pass spfdomain=iki.fi dkim=pass dkdomain=iki.fi); spf=pass (google.com: domain of linux-bluetooth+bounces-5212-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-5212-linux.lists.archive=gmail.com@vger.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 3A2AC282259 for ; Sat, 8 Jun 2024 22:02:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 64E6228DC3; Sat, 8 Jun 2024 22:02:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=iki.fi header.i=@iki.fi header.b="OG1UyGsY" X-Original-To: linux-bluetooth@vger.kernel.org Received: from meesny.iki.fi (meesny.iki.fi [195.140.195.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 94D632E85A; Sat, 8 Jun 2024 22:02:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=195.140.195.201 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717884138; cv=pass; b=K84daRcY/bwSqC1gEl9oALYvIG3yDyHUA3jcbIbIyjj/QBhk7w4aCAzWTSLkubbdBruTrE9pyfAuBbzvmRx5TQ/9w3kAeRSrIY+Pqrg2se4lmunV1EOMj5hU0VCL5aWvaHS7tU28VbrSBWsNslI+5XoFtV65zuadKcvj5DKPlSI= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717884138; c=relaxed/simple; bh=OYO6fS3hEPlk4kettYB1VkvhuPf9VYvUv/bky0SmkFM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=B5toxsvt5o+1sFL1ihZDRYZlbfd5yv8uKue4BAIaPnZt0qOfpP+BnoMuBAWAD8pstY/6L4fDa+ZD4cATVXSZ/Mb0PI8q1xdsnuC5HUaZG4vVPsTJwpzXAZUfUtzv4dVc3e1TlX+yEqe/YrUwHMomn06il0gB9QoN7fKGapk0VaI= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iki.fi; spf=pass smtp.mailfrom=iki.fi; dkim=pass (1024-bit key) header.d=iki.fi header.i=@iki.fi header.b=OG1UyGsY; arc=pass smtp.client-ip=195.140.195.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iki.fi Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=iki.fi Received: from monolith.lan (unknown [193.138.7.138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: pav) by meesny.iki.fi (Postfix) with ESMTPSA id 4VxX982d0czyNC; Sun, 9 Jun 2024 01:02:03 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1717884126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VQwo46XW5qDRWfTw7yYSPgYDh6MEenC0f3oCmhIKWKI=; b=OG1UyGsYApKnec+qv7/robFGo+0y+arN8eziZOye2zMcGNCoIXss7bySCSJOKp1x3d9sqG kzFflULnNA4Cg9Qhl1o2CcNqqMA13/zvu9XJHl/+XVByFlUgqtfzDMRyD3XhA+B5jeGw/d bh+BrZ3eh3dQ6/upsyhICDPsz1w34es= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1717884126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VQwo46XW5qDRWfTw7yYSPgYDh6MEenC0f3oCmhIKWKI=; b=sLrzaWyWuiIOplHMywyIDgLG+csD8zynkLOwPdEQFhUkwHvWpy2YG7dVi4QLUjU5NxccD2 Ta2wBuGy9yZ4z+7icrDJUUCHHnAWnZI/WAbMmpTfz3Gw9b57xl8ou11nY6YcPGFF6nAEqi QM2rJP5IixceOGvzYmrp3YZdOyOgBC4= ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=pav smtp.mailfrom=pav@iki.fi ARC-Seal: i=1; s=meesny; d=iki.fi; t=1717884126; a=rsa-sha256; cv=none; b=xsZXp9dk+70Lg95JXxAptbj9K6bTBiFRi1P8Uirm/ChzRj1Rg/1HD4OafsMDi1YioDh+Xv z+hanQgoZpy9rgs2BabPFHqqc6iweszPZ1FBlTanoNDI8SBlAUZ8r7axpPduKrwilgoAK9 7SLefs1Y1PuPJp5+QSvKCgcBZLbVcoo= From: Pauli Virtanen To: linux-bluetooth@vger.kernel.org Cc: Pauli Virtanen , stable@vger.kernel.org, luiz.von.dentz@intel.com, der.timosch@gmail.com Subject: [PATCH] Bluetooth: fix connection setup in l2cap_connect Date: Sun, 9 Jun 2024 00:59:43 +0300 Message-ID: X-Mailer: git-send-email 2.45.2 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit The amp_id argument of l2cap_connect() was removed in commit 84a4bb6548a2 ("Bluetooth: HCI: Remove HCI_AMP support") It was always called with amp_id == 0, i.e. AMP_ID_BREDR == 0x00 (ie. non-AMP controller). In the above commit, the code path for amp_id != 0 was preserved, although it should have used the amp_id == 0 one. Restore the previous behavior of the non-AMP code path, to fix problems with L2CAP connections. Fixes: 84a4bb6548a2 ("Bluetooth: HCI: Remove HCI_AMP support") Signed-off-by: Pauli Virtanen --- Notes: Tried proofreading the commit, and this part seemed suspicious. Can you try if this fixes the problem? net/bluetooth/l2cap_core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/bluetooth/l2cap_core.c b/net/bluetooth/l2cap_core.c index c49e0d4b3c0d..fc633feb12a1 100644 --- a/net/bluetooth/l2cap_core.c +++ b/net/bluetooth/l2cap_core.c @@ -4016,8 +4016,8 @@ static void l2cap_connect(struct l2cap_conn *conn, struct l2cap_cmd_hdr *cmd, status = L2CAP_CS_NO_INFO; } } else { - l2cap_state_change(chan, BT_CONNECT2); - result = L2CAP_CR_PEND; + l2cap_state_change(chan, BT_CONFIG); + result = L2CAP_CR_SUCCESS; status = L2CAP_CS_AUTHEN_PEND; } } else { -- 2.45.2