From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 69E0F3B27E9; Thu, 30 Jul 2026 15:54:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785426874; cv=none; b=Hj/Db+TZFRqpwVyKSjNR5FvzGfiTCcPtJN8HE65gTa8MWkCJ9SOrQHftewuGEyy2Fn8J2sa2T+Vj12OPzz+r66MqE6xiUtYrC5DlU2nV5Qa3dJQVTWrQeYbvJoAysN1ousp0SjDoE965fForwMd1uFEatf1uv6LQLAZ3sb4PGlY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785426874; c=relaxed/simple; bh=wwDdS+lBDzbeJCQ1tiWAUbtjf5tOajpX6DBzQPnjL1Y=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aditeEKJUzTy9d+kvAAEyWA0e/8ZBra+tv0WRbUnC0x7v6CNSiSnu89+R7M77A6nvvUe4pJ7kfbeJZf8jwZcfYeSMc1Jt2DBXKbsI6y9hySEI9NWRFiSEPmF6wQDiVViUpxlNHmDR7n8atV55dgx/TJCWNCPKFG/MF7T538s2Sw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=NefxunKS; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="NefxunKS" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BE8B71F000E9; Thu, 30 Jul 2026 15:54:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1785426873; bh=PSpo3wH6+WRVEmeBgL84ndOtNB+LfxDw883EAYI1KUY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=NefxunKSmnUWQG12qaWF4ouIrNHAR98WbHw/QSemmRXAmLulkPUx++AraWjwXS8P1 U27GALUvW0nwG884v7Z54iuHxEhCJvhD9C8WsalOcuYfXd4gUt4Sq2wCwXganXe7iF Wz8S4ItbM+gcEagiojXYqTmco0zNkFmxIt3t23M8= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Luiz Augusto von Dentz , Sasha Levin Subject: [PATCH 6.12 573/602] Bluetooth: hci_core: Fix not accounting for BIS/CIS/PA links separately Date: Thu, 30 Jul 2026 16:16:05 +0200 Message-ID: <20260730141448.089603126@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260730141435.976815864@linuxfoundation.org> References: <20260730141435.976815864@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Luiz Augusto von Dentz [ Upstream commit 9d4b01a0bf8d2163ae129c9c537cb0753ad5a2aa ] This fixes the likes of hci_conn_num(CIS_LINK) returning the total of ISO connection which includes BIS_LINK as well, so this splits the iso_num into each link type and introduces hci_iso_num that can be used in places where the total number of ISO connection still needs to be used. Fixes: 23205562ffc8 ("Bluetooth: separate CIS_LINK and BIS_LINK link types") Fixes: a7bcffc673de ("Bluetooth: Add PA_LINK to distinguish BIG sync and PA sync connections") Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- include/net/bluetooth/hci_core.h | 30 +++++++++++++++++++++++++----- 1 file changed, 25 insertions(+), 5 deletions(-) --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h @@ -128,7 +128,9 @@ struct hci_conn_hash { struct list_head list; unsigned int acl_num; unsigned int sco_num; - unsigned int iso_num; + unsigned int cis_num; + unsigned int bis_num; + unsigned int pa_num; unsigned int le_num; unsigned int le_num_peripheral; }; @@ -1000,9 +1002,13 @@ static inline void hci_conn_hash_add(str h->sco_num++; break; case CIS_LINK: + h->cis_num++; + break; case BIS_LINK: + h->bis_num++; + break; case PA_LINK: - h->iso_num++; + h->pa_num++; break; } } @@ -1028,9 +1034,13 @@ static inline void hci_conn_hash_del(str h->sco_num--; break; case CIS_LINK: + h->cis_num--; + break; case BIS_LINK: + h->bis_num--; + break; case PA_LINK: - h->iso_num--; + h->pa_num--; break; } } @@ -1047,9 +1057,11 @@ static inline unsigned int hci_conn_num( case ESCO_LINK: return h->sco_num; case CIS_LINK: + return h->cis_num; case BIS_LINK: + return h->bis_num; case PA_LINK: - return h->iso_num; + return h->pa_num; default: return 0; } @@ -1059,7 +1071,15 @@ static inline unsigned int hci_conn_coun { struct hci_conn_hash *c = &hdev->conn_hash; - return c->acl_num + c->sco_num + c->le_num + c->iso_num; + return c->acl_num + c->sco_num + c->le_num + c->cis_num + c->bis_num + + c->pa_num; +} + +static inline unsigned int hci_iso_count(struct hci_dev *hdev) +{ + struct hci_conn_hash *c = &hdev->conn_hash; + + return c->cis_num + c->bis_num; } static inline bool hci_conn_valid(struct hci_dev *hdev, struct hci_conn *conn)