Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2230533rwd; Sun, 28 May 2023 10:47:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6SyzteYdI/akbO5MuIf9wRsnH+aS33X7tpZTfOw9tyW506/3Omm1lD2F5QojsHNToJvLkB X-Received: by 2002:a17:902:e752:b0:1a6:81fc:b585 with SMTP id p18-20020a170902e75200b001a681fcb585mr10100214plf.41.1685296069154; Sun, 28 May 2023 10:47:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685296069; cv=none; d=google.com; s=arc-20160816; b=YmwGhufl7JK1Y5bDOkUNNGGmOw2vG6fnvDD3whaEIpabtUcTXOLZ7ZoVOuvgBCFW0M A3oKmY9gAddrTWWF8u+L/1sKm2RcIbukLMNvBkBRvkWzcoef57LCYMm5jr0S7y7EJocv lSqdnjC9KnhWWXjJRGEaz56br94j/EmKwafIAqxf9UOJauxdidF6VFdNw+j+8IfEN4Hf UEtBjYhrWqu8OdJ4XARL8spwpcXdQ3rlyKZEUitSJWIykhhYOd8ByYNm8WTCqnC9JKn1 vj8vGLOhNNBwyRavxG1SO8ZLqjUzGyLHRo2HKNEhakCBj8UAvI38pmpf0zL/LmS+pBSV fjQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=nblcnJjuWEN+o/AHjGWMy3+qCEMujW1AlmPXVEGrmdM=; b=gu7bebhLnKUyJwpVUgVbtlddE0zax3tfnR71++GCI3wgB3cGi6cimirBMb125GW3s/ DBYB+x/TSLZ6711HUXVDyLi0IV/Sp2ykMhv2uGZx+DuKmaN+dzEUSKtlUku8RtXYeIEz 05rMpI1DfvzbTr9QEUL2esHjlzspluzOTnY40O3jd/q1dJOXadWACNCSdhi1Km/FNRyS NJstuMRXHkjy9rOsm8aMdwyCZEKxuyfHMwEx4BPxzN6eVep7BQ5tOx2Tkr/cQ9x71ZKu 8+WDIJ1m1A2cWmXKN+d2xfzZW0eV66S+LWeY+5coT7HT1E9QuzE8bArD6qx0rngR7ZnL QKzQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k12-20020a170902c40c00b001ab1d1a6802si5970110plk.1.2023.05.28.10.47.35; Sun, 28 May 2023 10:47:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229461AbjE1RoU (ORCPT + 99 others); Sun, 28 May 2023 13:44:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47890 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229484AbjE1RoT (ORCPT ); Sun, 28 May 2023 13:44:19 -0400 Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39201A3 for ; Sun, 28 May 2023 10:44:18 -0700 (PDT) Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id D7354240101 for ; Sun, 28 May 2023 19:44:16 +0200 (CEST) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QTmHh3SbFz6tvv; Sun, 28 May 2023 19:44:16 +0200 (CEST) From: Pauli Virtanen To: linux-bluetooth@vger.kernel.org Cc: Pauli Virtanen Subject: [PATCH 1/6] Bluetooth: ISO: fix maximum number of CIS in Set CIG Parameters Date: Sun, 28 May 2023 17:44:09 +0000 Message-Id: <46eefccceb45556120a0d1fa95cf27c576e9649a.1685294131.git.pav@iki.fi> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.4 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NEUTRAL,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org The maximum CIS_Count is 0x1f (Core v5.3 Vol 4 Part E Sec 7.8.97). Fixes: 26afbd826ee3 ("Bluetooth: Add initial implementation of CIS connections") Signed-off-by: Pauli Virtanen --- net/bluetooth/hci_conn.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/bluetooth/hci_conn.c b/net/bluetooth/hci_conn.c index 1f906f8508bc..7b1a83ec50ae 100644 --- a/net/bluetooth/hci_conn.c +++ b/net/bluetooth/hci_conn.c @@ -788,7 +788,7 @@ struct iso_list_data { int count; struct { struct hci_cp_le_set_cig_params cp; - struct hci_cis_params cis[0x11]; + struct hci_cis_params cis[0x1f]; } pdu; }; @@ -1815,7 +1815,8 @@ static bool hci_le_set_cig_params(struct hci_conn *conn, struct bt_iso_qos *qos) } /* Reprogram all CIS(s) with the same CIG */ - for (data.cig = qos->ucast.cig, data.cis = 0x00; data.cis < 0x11; + for (data.cig = qos->ucast.cig, data.cis = 0x00; + data.cis < ARRAY_SIZE(data.pdu.cis); data.cis++) { data.count = 0; -- 2.40.1