Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2475081rwd; Sun, 28 May 2023 16:58:57 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4PholqsFE1jbOYtFi0kb3v1rdjqRMnKLmzA39WTKNtLdTOx5H/GvbC+928xYJX9QO5qUsY X-Received: by 2002:a05:6a21:6d87:b0:10b:2214:7ab1 with SMTP id wl7-20020a056a216d8700b0010b22147ab1mr8414496pzb.18.1685318337375; Sun, 28 May 2023 16:58:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685318337; cv=none; d=google.com; s=arc-20160816; b=CuCQ2OtAhjLoGhvL7bcqVZpYqEAbmlQD/ggPlwBMZcHn/X2joLN6guqOb2qZUoWjxn dez5hI7+4E93I8XpRraOLiALCStXjbdarV63haOsm61eIeXe7oCtu79PWIWwvxb5tzlp yNVI2uvFRzTQ2H6sXQOz5Yv4LjjiIbDKMuXV2EFuMxzkOsWG8jIK0EW5Wc5lFbG/gsZ1 kB/CnN419m0DaBwQyVV1N5GXFJjNg1y0eN6Mg0VSikLU/3UXHCcUbhLvhMa8RdmeGHgG W6+g/4L/NaqJ1brlZcQ/LVqgxROm6N2WvypywHnNJ3Zu2wRkiL2CVgaP94gYiBqNFYro vftA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:date:to:from:subject:message-id; bh=QBakYafVNUcKlkTjOAAgXwAy1QMJ9ABDLmAPY150DnY=; b=SheP6reKBdCrtdDGJht57zK9P+O0eIaGgSGI221+ZwgMEEkbe5w5Z6cogDVdaYpgvB ciGxABGALhzCcMiDFuq2iyybNasA0mbdoFoJCJabAd2C4D3gaKWEvDkop3cI1aXFw2bq 2xtaJUKu2hwGtDgFwWCJYHWGpXciAxyTC2GX5Q1LJvjjp0YT1rfiMWxKg3zpwO6jLCkX OBXw+vt6ayUmdQukahXTB2s4LiIoSpMrBhdQYdLdjoijla/lvTkJiZw9pU21BakSjrpC c4hvzJFkw+ncBvhUcICekdcn1BCa3sMNiqKDRBfsrCNxXDAw1PG2vQ/wWdTJalgaSPSr d+JQ== 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 x71-20020a63864a000000b00513973cb8b8si1953316pgd.202.2023.05.28.16.58.27; Sun, 28 May 2023 16:58:57 -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 S229527AbjE1XXn convert rfc822-to-8bit (ORCPT + 99 others); Sun, 28 May 2023 19:23:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55972 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229453AbjE1XXm (ORCPT ); Sun, 28 May 2023 19:23:42 -0400 Received: from mout02.posteo.de (mout02.posteo.de [185.67.36.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CCF04B9 for ; Sun, 28 May 2023 16:23:40 -0700 (PDT) Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 45B53240101 for ; Mon, 29 May 2023 01:23:38 +0200 (CEST) Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4QTvqF3tvfz9rxF for ; Mon, 29 May 2023 01:23:37 +0200 (CEST) Message-ID: <8eacbb0919470938a9ea10fc507d684b6a6d169f.camel@iki.fi> Subject: Re: [PATCH 1/6] Bluetooth: ISO: fix maximum number of CIS in Set CIG Parameters From: Pauli Virtanen To: linux-bluetooth@vger.kernel.org Date: Sun, 28 May 2023 23:23:36 +0000 In-Reply-To: <46eefccceb45556120a0d1fa95cf27c576e9649a.1685294131.git.pav@iki.fi> References: <46eefccceb45556120a0d1fa95cf27c576e9649a.1685294131.git.pav@iki.fi> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 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 su, 2023-05-28 kello 17:44 +0000, Pauli Virtanen kirjoitti: > 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; > Probably should also have cleaned up this loop while at it, the command takes 0x1f configurations at most, but CIS IDs are <= 0xef. For v2... -- Pauli Virtanen