From patchwork Thu Nov 28 16:01:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iulia Tanasescu X-Patchwork-Id: 846174 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2070.outbound.protection.outlook.com [40.107.104.70]) (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 54DED1BBBFC for ; Thu, 28 Nov 2024 16:01:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.104.70 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732809687; cv=fail; b=A7UgidqXURN0uNiL6wXPIPElHO8ARJp6/kl96Vk8KeX2PsEme8HYMkA7BTf9pwJh0xJl7esGmtqEYjT+pOpnE1WIs5CVtwft/r/YXmPnFoflnfDx5+2mXPBl1e60zEFMDXXJ5gLRKeBCyot7Dopwb5AFmESdMpJl4vyfXb1AUPE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732809687; c=relaxed/simple; bh=8WAgU+1wp8MTWmz93PXZWyOF9hd5WM70Ev+wRT2gdl8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=o9sMiSL0Eg+vCErMdCFkYz5tojw3jSwCgH+1lJ88ec/veNUiEREs0xex6nVGQZKGTeAbs7UOYQ3UDxpHlC35+M+3n3s+B76L9GdygrD247tMCXiNdNEgMWERiiE2uJ5HNLAnFvKlcOJ58h//mFAW5G3T4RL7elodMH69Zk3iTmo= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=fbx84JiP; arc=fail smtp.client-ip=40.107.104.70 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="fbx84JiP" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Q4LqL7Ao+JTMpj/n45TVOmk7nAiQlnXRsxkiRaAgEm+V6ZVX9N5jlId8E6mJy1jLjLzXRik2Tx4AG8sTxE2lg/0mDA/F1+RjWgpmTyPGIHwo6VQJc5fhGr0mwp9MaxUkIajalawQaSf7IBUYFtnSGIvHScrkhwq2jJiQjNPQk0MZrqQX6cVv9gI10YK1R2/wADn64EiM+Xu2GvNHt9Ybvj7+WJaz3O2MgGkZiBy9wzYHEN8TClVoT9EcKXsoImjTsOUvtUPXTlfPyj5o6d1L9SyGeetnV5G0rE7OxJcPKTDZkI4Ptf8qtl2axWAlu1jiksb8orzvMfCzaiLC+gHyDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=nZXNggogADe6BhYQz1XU0g396QUSFYw2Kdn5IRdaVsM=; b=YA9fx9z9aa775wFN58Qh2s14MNZH5tlFwEM+cahGtrx/CKWr4w2Pm8q9heyDmrY+CrAALPseDg+92xX2IgbGymLZ4g2KyaNMYsOCPzo6pxFW4oIqeLmbgPgmENQTx9wUKJu7g5AW6mE0854UNotIf30aPdgNdjbvTncQknvRWb26BdutmU+pJc5Rno7edthvTlFAsc6AcYa+6ag5H2kZIf6EhSEHdkvx+NGQYh/vvdg7HUw9pmX1MuO67VMRecr1eFcDsh4YPZdqC3Ii80B2o+9AviG6zssLwhiPmepu1PVk+yBFgZoP6etXQHoSM9pUfHKwd0e+eU9jtPjuvEDl1w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nZXNggogADe6BhYQz1XU0g396QUSFYw2Kdn5IRdaVsM=; b=fbx84JiPqSQoAsez8YCB0GLv4InYR+2MlndWeJT2wrrPh58DhkLLfJ+JmVlgFmz/iT58DfgiHbvkoek8+yheAP90IVzCMeNjBvsxFTaNbeVzg0BB+PyruPIx+Gq17Qd+vtJLKmjlhZepDVU5KdDBXytupwhKjVTJGWx8115T9yWTvfROk7wXg1PWkvdlCKy2eaFowKtUrrxopTwCk/pr3/bNzvupOeZJddLkvaU45z3BA5IkqDPCzx/DQomh37BbcUAK3+W99LC8Y+XVAnfqNVdn5gteF/+/gzI4ST+BNUjfKA2FliIwI/VpcKFK06nou2YGL6CX/SRZYwZsFrstdA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8PR04MB8898.eurprd04.prod.outlook.com (2603:10a6:20b:42d::15) by AM7PR04MB7191.eurprd04.prod.outlook.com (2603:10a6:20b:11c::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.19; Thu, 28 Nov 2024 16:01:23 +0000 Received: from AS8PR04MB8898.eurprd04.prod.outlook.com ([fe80::5e22:869c:33c:9654]) by AS8PR04MB8898.eurprd04.prod.outlook.com ([fe80::5e22:869c:33c:9654%4]) with mapi id 15.20.8207.010; Thu, 28 Nov 2024 16:01:23 +0000 From: Iulia Tanasescu To: linux-bluetooth@vger.kernel.org Cc: claudia.rosu@nxp.com, mihai-octavian.urzica@nxp.com, andrei.istodorescu@nxp.com, luiz.dentz@gmail.com, Iulia Tanasescu Subject: [PATCH BlueZ 1/2] btdev: Unlink local BIS before removing Date: Thu, 28 Nov 2024 18:01:00 +0200 Message-ID: <20241128160101.15187-2-iulia.tanasescu@nxp.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241128160101.15187-1-iulia.tanasescu@nxp.com> References: <20241128160101.15187-1-iulia.tanasescu@nxp.com> X-ClientProxiedBy: AM8P189CA0007.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:218::12) To AS8PR04MB8898.eurprd04.prod.outlook.com (2603:10a6:20b:42d::15) Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8898:EE_|AM7PR04MB7191:EE_ X-MS-Office365-Filtering-Correlation-Id: fbf6b49c-4c4a-43e8-ea3a-08dd0fc5e7fc X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: bu0A+LJKhcD736jevyhknV2h99kIq7GEGdcBSeNIiafywglC3XXT5KoyMJJBeAxPLGa4pu3z2ZETPfavIgIUpAnVWGP4oc2UkVX1sGWWe5o7TqVz7Z8cKnfW5MhOGFNNfckbk9EFL3gnBGPdIIgAhaCL+AS22m9iCKTvEdidOo8R3V5lWqM7xqbpSayNfg6QIGMXyqk9MBvI1XHAO4hyFRmcMjekg13O7frqCkqMRKg8z3GwXZppk/oSAaK6bWOeovnTITeYFsNDL0dF0yzdM8YaUgu0nGn3XVmHzsRpDl/Qwq1nQybKI7snD1ANO4OiuTx6tlbbxfWrLiS3c8383ymfX+YoJIHIGvglDkuvgyZP5thH/L6OW8Tv6PBESGBEPj+2qy5v/q9RihAGrETDaRXqmUzV/aSJ2fiwI71Js1D53D7kFLSbbLiUsY96RaPpIwxRRjioDJzGVaryFPOZQz7cgogWjWaE63P0L1z75sAI6/R9T6cNaTJfOZ7il6JSFKztKU56+nonEO1Ly2EdOZZ6xkjqrc8YjWIIATMK8Ug/4CsHbz8iCQHLRGPNraV8JZLhFlOVryqdoS++Tz4qGuQa5Vw8QPxJDC888FZ8uYVp6lmUJlfrLOysyW/khjGU8l5anJnhFJx29x/ExMafGeEDAqqDl2wxqdYW1cqpf09LPacIOfjpknAh797vmZMFxBopslAL1Y6mMklJmeoZZB1goOl3ktf7QVytJYqrcF7W2G/7nzgJYv2ncKCo+LmIB3U5zm02YSo4qyqoBgJ3ybPkyVlB7IEqqWFsL9mURZbbWGRkiQ8vUDPtCHPpC56FOkA/hMU6skFUp6JxgCNq+4TJPNSE7AkM0drxtNY7lAf0tkWbpEZA37nEh0RA0oeteiOr3A8yV7U9WY6wqK/tSjoHNxko5b4FqzfUGHg7yiHKJvh7Gz5IR/fkelj/HVRQ2bpnGOXzauNtGK+gE7YuSfkybwnECs2kLe43T68wbRRQbIJO4S44p2VESPlbHCtEmMuv1Ks+D0PbOmZ2FBYb92co9amw7gxvbae8m7ScOZHkp39gFl0adTvyKTOPMLf+CEPWtQ/TF+309CAyg8Ih1yDraxbOurNxjMNHHxIwL0EhDSivIZDDCE+VT6R2pemUGu4UyCUmqEDtTuM5YEIzmX0nytxS6219eZaXK0sgmzu2cpUQv0Y4zCFDgtMASHQujUHSKn9Vxe1rxTvyR4JC+WlQWlXH3hdQnM25w3CI6wX58aVYcI5BOed+/ZDUsP5JQvcfeDSEqVCDLoI+EI/XU/ANrDyViKz4css2QeLvBC5jqS+FiANd0ixPl4j+nMr/J1rA0G3BnvzXewzWEySTJg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR04MB8898.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-Ant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dpErKjKCC5sHWzoUkoVpPRFkn5tBqvCOm4Vl+1RpOt/ypUykAunf5VsfVrU7QfNutt0se9PQfSYgapN56VXSg/5Qozg6ciYgAtBlfeYOeJv8UtrA62Jv73kNl13CxyhjgQwgK3Kh2AMUpDZAndoOfiP1xz4exPAeNL77X1GPnVkjurA1ttxKPWzi4++pytphKrmJbhf1XdnW3+dMODkpCHsQhYYzMPdB7Oihx9A8BSqLvIj/sLp1w/0RjMnTTZhZWPaM4G2HxDiemXCBbTXg/GycEFUxNZKoq3okXaY+hFYQIRyvSWXZk/JCis6emx754WCGnr17OdcKuhFrukGombMhyaf+LowpYLg0BLFTdiHm8gsPvd5u/2LlHYQjhs2VeJoBPTiAn6VQqVpCAg3A89oOra7Eml0BVxyjq2AMT0Qhq1Suy8vGPpbI2/NJUNpeK9euByUnUNzvRcTP04VHt0/VCK+gtQ7WgiJW5AUTp51bPJTxBrsH2zHCePRQMPCHM/kndt2XeZnIJXVfgS8zxfM2j+HkpqB/V0dh0ipyvw5TUc3rhfMq2Q9vjvR9wKRcg3Krqouj7g9oA== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: fbf6b49c-4c4a-43e8-ea3a-08dd0fc5e7fc X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8898.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Nov 2024 16:01:23.3728 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: v2Bwe/YrivyxzHWLrb2p/0a2dW3YxtGObAky6igq93AH2SOc5qewb2vIj3lBpCSCLSr6IxHqebiKP+rdqH6mpg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR04MB7191 This unlinks the local BISes from the remote ones before removing them in the handler for the LE BIG Terminate Sync command, because, otherwise, the remote BISes will also be removed. --- emulator/btdev.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/emulator/btdev.c b/emulator/btdev.c index 08af873a2..70229d9ee 100644 --- a/emulator/btdev.c +++ b/emulator/btdev.c @@ -6604,6 +6604,9 @@ static int cmd_big_term_sync(struct btdev *dev, const void *data, uint8_t len) /* Cleanup existing connections */ while ((conn = queue_pop_head(big->bis))) { rsp.status = BT_HCI_ERR_SUCCESS; + + /* Unlink conn from remote BIS */ + conn_unlink(conn, conn->link); conn_remove(conn); } From patchwork Thu Nov 28 16:01:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iulia Tanasescu X-Patchwork-Id: 846034 Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2081.outbound.protection.outlook.com [40.107.104.81]) (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 000AD1BBBFC for ; Thu, 28 Nov 2024 16:01:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.104.81 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732809690; cv=fail; b=t7PUSlCKotQQJ5SVz1QUwCcwu1S5iB5E49STB6ML7Q3ycF+Owq9rhidD8bPd2R2BKlUJczypeACsWmfh2FsBNtuXeIq1mShm8/OtJKVWEDwRllhptJRRAmcfw5oMWETkP/MBx+QrTgVMsD92OUMtq0fF9J3QwqZuBF+TAljb2Go= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732809690; c=relaxed/simple; bh=aXyHDjj2yHVMDPwt2bb3kqE5NAjLfeMmOZWJiFYLOq0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=naWgZJViAQ/KK2Ujgts2Futysp1aMa2RfOF5OK7cJYLq9BCbFErCKo7uAw7cRjk8zzQacp1kCwuWIELhMEEYc79IC/BvzjFtmgwzud8s8ODlt7fDivrRSJnaDsjJak6xoaEZ/Gv79EqhyK5aNF4z3hmV5KT/YH/VZ5+GiY3dcMw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=hYMR5TIl; arc=fail smtp.client-ip=40.107.104.81 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="hYMR5TIl" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ANER0f009jrlF98WfKq3kXFmWAlAWrsCGRvG7Z+yzQ+j6KCJXdxcrcq48uHyhbqs+BgYx2N+dCJUxa7gg+qpmWUe2b08DNTz0OqG7Blk2ZDQ5D4Z9xEqY8+zWOSwkWKIT5v5J47AsDBJykvFUKr00h0sKWtXNBePI6/ug697Nr4z/6UK17lBQywIImGVDZ1jsPoSNclUa5j95+1zAgHn8kM4K/prfhWcg1tyVUiT9a6Q4EgorFoZDWsJw8cjiifPEkBIm+IoOhszAWa05hy6H+b0TYF6ZaTnUmVh7cIMLMWh4nGUqpRY1oCwQxt3gmsJaWPuRKlkJeA0N4j8K5gF5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1OdYVl4Yl6GeKI9fiOnJEcnPSQ5wAzf6t5Qkyf0T+U8=; b=QVMNZnfl7p1oJlpaDTMnNBtfUZ1hKCSs4xIyIQvjxtoXOy62NGwrsPcCKlS0xLEL08n0Ia2hV4Zt7XBSvHxqsOHiG29SVeF7gKCECQupt2v++EikiTzSipHwaS+K27M92WqC8g19LC1r1AgYRgM816P83SQlALk8VTNlpCDjINA9cxCq4g3AnBvN2aGVKMAkPujYTpWbFTjWFVceMhaqhgAicAdmh+XlUv0W1ofNfWGI/jz0vDqDgHpjLXwSmawMCRM7Nf2in3XORbJJMpPv/wz1WZF3swQvQhkNfeb4gisDFDGk2HiX4I+f5tpWrlfDtbjYO2sel/TJXUMtB8/yfA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1OdYVl4Yl6GeKI9fiOnJEcnPSQ5wAzf6t5Qkyf0T+U8=; b=hYMR5TIl8n4i0uFRhc1JpjMoGN5oJxTRl3BQB9FVs2MnHB8biB/5ReyMfXoV58LIkIl52TAaLiuW48ljpivQrGE4p70WMg09gtDYEoINgh2XtEuGYiaZb8fB/fpmaJNhymK3B+NzhWVpWBQWjcAk+jua7zFm0IhJGrpV4j2UPOkpkOtmU6Q28HUHjXCt+WLiiS2s3S+QZpi/oXRo0O8WsZJ4lUqEMeN2mekevaDjw+kusl0j2AsuGPHdDhvU/Rlq65f1FhlenaS58mBELUejAlwDCiUGyx66pw55UFg+zVIOAjnW5PuW7NmLyuJP8zD4YrR3EaVlRPgBEUDjpsyezQ== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS8PR04MB8898.eurprd04.prod.outlook.com (2603:10a6:20b:42d::15) by AM7PR04MB7191.eurprd04.prod.outlook.com (2603:10a6:20b:11c::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8182.19; Thu, 28 Nov 2024 16:01:26 +0000 Received: from AS8PR04MB8898.eurprd04.prod.outlook.com ([fe80::5e22:869c:33c:9654]) by AS8PR04MB8898.eurprd04.prod.outlook.com ([fe80::5e22:869c:33c:9654%4]) with mapi id 15.20.8207.010; Thu, 28 Nov 2024 16:01:26 +0000 From: Iulia Tanasescu To: linux-bluetooth@vger.kernel.org Cc: claudia.rosu@nxp.com, mihai-octavian.urzica@nxp.com, andrei.istodorescu@nxp.com, luiz.dentz@gmail.com, Iulia Tanasescu Subject: [PATCH BlueZ 2/2] iso-tester: Add test for ISO Broadcaster Receiver Defer Reconnect Date: Thu, 28 Nov 2024 18:01:01 +0200 Message-ID: <20241128160101.15187-3-iulia.tanasescu@nxp.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241128160101.15187-1-iulia.tanasescu@nxp.com> References: <20241128160101.15187-1-iulia.tanasescu@nxp.com> X-ClientProxiedBy: AM0PR04CA0115.eurprd04.prod.outlook.com (2603:10a6:208:55::20) To AS8PR04MB8898.eurprd04.prod.outlook.com (2603:10a6:20b:42d::15) Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8PR04MB8898:EE_|AM7PR04MB7191:EE_ X-MS-Office365-Filtering-Correlation-Id: 879ced24-290a-4a83-7b41-08dd0fc5e9c5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: pN7NYgzy8mSMtzn3Xaonh/pIj64TealhG6AaURV5oeRNyVlOFaTWNepqfaDkdRTwbCIRshTt1D/N1ZBYNebngcQX0r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Nb27Pvx8GixIqL0/rto5spaOQID9nlX848n9bPgwmn5AqAX3lyLGgJeDeYI9gnc9byZXyefzwi9T5h/k3p7996//M2LV/AvDbVhuDmw1G/WzeOyFwSEDRE+1uI7am5xOYMfnVEW0j9hekrbo0HctHa/JdAcIZ3yX7LJaVbQrC4JLmvgU+vG+O4F0SaMHsMUc5HuQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AS8PR04MB8898.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: PggdtzNi0n8pxR3bqruzyGK/ScSTLCsEQ5FszZd/ktbZfcEDKlMnp2pxIi2VQIjP79N80sKl3G4bZ+ShQhJD/opHfYRQ1wB6TYmWvV4xfEu3iWL+s/hqnJgYgQeJ6CD+iRs0tVg1mGjUZvAbO94+pqFQT4Ko5eZvfocua2h7wLYfBL4lwLerSUS9+6HKN5DiTZlDuqCpgIs5FXIbAM8+tBhfxJ119Rpt/UXQjkGUnaEXc8qD4O/7Z5wyMo851nzZ+sKM10F+AW0hCcXPQtt9R+3gsLTUq4ck5w3Nd14Yh1Ynrx5Or3V9QHNSe6KBQ1InacVsSSTq6Et0LZQiwy/IAZR/HLfjgScexWUNA2p7PqDqyEUvV97qYKiO+QY0iE8gh94S9I9uqrywrYaz0ssZ++Sdxa6DkNYrykRV5CIf65PATPTyouUAudwS8gFz+Klzw9SYXBRnj+rHJ3MXWRbvCJHVZ3QyLw4uoC3seyK0YdveSYNeCytQFO85Pr/CnX+O6uKzA5W9KxKPcerIpL8Pf6VGKaSdSnWbY68dZxnlbl9p/hwjeuBOxNYHDyafdCLNVYOZ79UFO65rZudoox/5uNf4TGgE+GEe5S3GYKVT9rTO8lNXvqen1jKvat/INC++nJBYDwwTC3sjPKIBG1UHj7+KIiceoVpvdcNJPgkLSYc+FqVC+1eG1O/NRqqMPKg5fXaPWWnEzH/Uh8f7/9nyx2y3JL9bQY+QJJ58ocNb2KtXGpTC4zYksBGTNtvI2n5f5L/D+4nFla5oHudQarywLp1vx4chHRN0BPNWn3ALzy5JAelDu1lDkkWm7jOwZ2mv7tcsBwoJ5FGuoaIQ6AQBbIitoWP+RtNxgOKhmjUprjrEFEUlhXD3aEX6pweF6CYoWrpCZlYh4d/LBlRO/7SZ349WjdA0JDr3UdfbI5PyILQtShig932bg0uiHtqhbr8YXyLWPpZBAeyG3DYamqJ6q54E8gU5TSZbCL9NZeLu3Y/05hG2479aKkGbhnGC8rS2U8xdilns/+um8bF5AzcFBZ1NWdcLXXMUhFN1T8RamjMdrzMdlv4vsk7MkjMqLv8DsXMXtZtBph7TktTLatxICY6D+yMIQEDL4PvfPqKmt9kXbmzio6E4MCketb1DXSuRaHbs4fvWI5+kGHfomimlw0nEQ4AMUyKYLzrQPtB5CjefiGRaBw6g46zrMaqrf31RPla+Q05KrFh08xu66jIsB/BPVjUK7qibPtJzA07kb4GDwe9YzogwG8JAzwjQ7KHd8dSMTxJhDedAOGIw/fnAJ0fGo60BlULR/t4aO126Q0jmDLy48Cphgu3vlEnuodmrR99+pcdb0guT8GyatRqd/6pjg66k9yzGM8OXvLN3ZujRhDx8GDMLCflHqkHdxNxjkU42AkmJWeZ8ysE8KF9/PaU8qPWDFVGH9Bl6QQwxxKy+Nq5ryBIupLxbhl2dYAIWM6gCcXGiHZSG7vEw4AS+lVUue2fXOGgRS1rosSX0E3XNBSnC2ZLUu6/VYQvpdAMYlE8aHb5itmSxxyOFH2GmNoxTadeZzi08g6DW70LozlLRLUsp6xmzlrd91Ly1iNUTpApstgbrh42It310Ca7EvA== X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 879ced24-290a-4a83-7b41-08dd0fc5e9c5 X-MS-Exchange-CrossTenant-AuthSource: AS8PR04MB8898.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Nov 2024 16:01:26.2728 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: fXLPAaDyM6gP/o8H3usxzq1gtubbcsGmPefzhyhbBA0YK4wTuyIz/3iKOi5fl7Td2ZX19iVEbe4M2X3yAWn9Kw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR04MB7191 This adds a test for a Broadcast Receiver terminating BIG sync and re-establishing it, while keeping PA sync alive: ISO Broadcaster Receiver Defer Reconnect - Success --- tools/iso-tester.c | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/tools/iso-tester.c b/tools/iso-tester.c index 5ec8634ac..c30c44ce9 100644 --- a/tools/iso-tester.c +++ b/tools/iso-tester.c @@ -1447,6 +1447,17 @@ static const struct iso_client_data bcast_16_2_1_recv_defer = { .big = true, }; +static const struct iso_client_data bcast_16_2_1_recv_defer_reconnect = { + .qos = QOS_IN_16_2_1, + .expect_err = 0, + .defer = true, + .bcast = true, + .server = true, + .pa_bind = true, + .big = true, + .disconnect = true, +}; + static const struct iso_client_data bcast_16_2_1_recv2_defer = { .qos = QOS_IN_16_2_1, .expect_err = 0, @@ -2404,6 +2415,8 @@ static gboolean iso_connect_cb(GIOChannel *io, GIOCondition cond, gpointer user_data); static gboolean iso_accept_cb(GIOChannel *io, GIOCondition cond, gpointer user_data); +static bool iso_defer_accept_bcast(struct test_data *data, GIOChannel *io, + uint8_t num, GIOFunc func); static gboolean iso_disconnected(GIOChannel *io, GIOCondition cond, gpointer user_data) @@ -2421,7 +2434,19 @@ static gboolean iso_disconnected(GIOChannel *io, GIOCondition cond, if (data->reconnect) { data->reconnect = false; - test_connect(data->test_data); + + if (!isodata->server) + test_connect(data->test_data); + else { + GIOChannel *parent = + queue_peek_head(data->io_queue); + + data->step++; + + iso_defer_accept_bcast(data, + parent, 0, iso_accept_cb); + } + return FALSE; } @@ -3405,6 +3430,16 @@ static void test_bcast_recv_defer(const void *test_data) setup_listen(data, 0, iso_accept_cb); } +static void test_bcast_recv_defer_reconnect(const void *test_data) +{ + struct test_data *data = tester_get_data(); + + data->reconnect = true; + data->step = 1; + + setup_listen(data, 0, iso_accept_cb); +} + static void test_bcast_recv2_defer(const void *test_data) { struct test_data *data = tester_get_data(); @@ -3807,6 +3842,10 @@ int main(int argc, char *argv[]) &bcast_16_2_1_recv_defer, setup_powered, test_bcast_recv_defer); + test_iso("ISO Broadcaster Receiver Defer Reconnect - Success", + &bcast_16_2_1_recv_defer_reconnect, + setup_powered, + test_bcast_recv_defer_reconnect); test_iso2("ISO Broadcaster Receiver2 Defer - Success", &bcast_16_2_1_recv2_defer, setup_powered,