Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp1008482rwb; Sat, 5 Aug 2023 05:44:49 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG+tzzRXld0i3k5qMuvBof98OhHKTJz9CNizjLRYYY9xfGM3dgCrxTPCVA/07zXMVHFAn6w X-Received: by 2002:a17:907:77d6:b0:993:6382:6e34 with SMTP id kz22-20020a17090777d600b0099363826e34mr3951160ejc.72.1691239489104; Sat, 05 Aug 2023 05:44:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1691239489; cv=pass; d=google.com; s=arc-20160816; b=XnDtJYMJ3CBU7b9deh67RbNePyoCqXJZ5rNMEChIFKPA+kt7HFD+5sAY8jQlXm3VBF dcweyGoTXmSX0rakDSY8GNtfBWyddtbaJl5Csn6/Q4s6+kZtitj9ef7ZAj3P+/7bvy1/ 3Cw9rOtMWK5V7qFKZ0S0OWyxq2rz0ms9UCgQNTndvUiLHOIXwXDqwkhSAfXs1BbaAN82 NnIHyrYgtrLjhepJQdCX7re1ojm+UMUC9rLb3MEooSRxKNsCkmX0vvLP2fgBoDag7Liv 6y+y2NGHO0VdWayM54B2P51uKzAdoMpZnkZPHy2215X1ggZ2B8oBXT4YkNtL8ZWpfYYJ rf1g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=L2rw73kLroKoM/0YJSlR8IioJr3KPJjTt7OYh30MAjk=; fh=raBgKoRsHCwQLc6ReOhmOoEQ+DtSaNc74fugaHBwryI=; b=m5bo8qMk7+YRc7pew84nwUQQeER1MRU1oHbM9CB7SKhYbQDWR8iB7KMc8JI1A/mLNw ahJ90uuVUcIB/RxW6GAxpKv9Q5vNl3Q2cNfoTyv/TuzNvgbEgU1/2hC2W4FUe0fw5vWw E++z9TWgV53k9gaC6yW7Daj1i7kDFme3nep3sYvDBBtPv0spqEoILfpZ28E8z57KVKhv uxJQV187RmLiaZsZgcAVHBC7268NcsRKfQpHyUYkCSD2eSzdeLzp8p0JJpllvjfp+pup QGuTgZmyasV/zHGCFiIgkTCTFexpjQtqgl/mE6BSJ9bmQyajaMfKi6gVryZt/mNIwcze Cvpg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@iki.fi header.s=lahtoruutu header.b=VXW3nR4N; arc=pass (i=1); 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 kj6-20020a170907764600b00992f45c9342si2556291ejc.1020.2023.08.05.05.44.13; Sat, 05 Aug 2023 05:44: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; dkim=pass header.i=@iki.fi header.s=lahtoruutu header.b=VXW3nR4N; arc=pass (i=1); 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 S229763AbjHEM3P (ORCPT + 99 others); Sat, 5 Aug 2023 08:29:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33558 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229469AbjHEM3O (ORCPT ); Sat, 5 Aug 2023 08:29:14 -0400 Received: from lahtoruutu.iki.fi (lahtoruutu.iki.fi [185.185.170.37]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B6C144BD for ; Sat, 5 Aug 2023 05:29:13 -0700 (PDT) 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 lahtoruutu.iki.fi (Postfix) with ESMTPSA id 4RJ22H0vgfz49QDB; Sat, 5 Aug 2023 15:29:10 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1691238551; 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; bh=L2rw73kLroKoM/0YJSlR8IioJr3KPJjTt7OYh30MAjk=; b=VXW3nR4N1YUiUjhfHmhl02GPpAUCAORLTPV2mEoYmImrtbhgjD7aIlhVYPp2L+YMqVNKo8 qpOFV8wyiSu8RnU9lK0VMbxlVzzZCet8ZCBW3JZx3407c9MXVy2aAXfnfbq9yOGBMZ9NEj kW/e6gtmFpXCf9LHV3n2ITvRih5r31Aa6q70nmtnQWnTKwQIKAnbl5l2LT6713Xu7oEZsu vj8raaG/Ifhi1gqpkS5WAxB/e1Yo3Tl/Zyio4LWofjLfJz2bOaFbDjk8nNHzv3fSqRysZQ oQHMfwkdKGE3dS6rzX/ertWVBF+dy16rA/+UzNquJTe6n0bAw0Wzgy578IzQww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1691238551; 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; bh=L2rw73kLroKoM/0YJSlR8IioJr3KPJjTt7OYh30MAjk=; b=reitWZ69k2qjlOMW9kS2El0F3yE34d2cEi5o97100fb8g7PFyQhRC7fHFc0rdXlob0M2Fz nps+mxLphrQecNBqnqVKTtSUwXO5XgZTlbn7bGzjLTyNpjLG85x2aAaEzIKJqZdZkCHAud lJ/xqtVs0fCn8lb/j2IP/5q7+d8RFN0S8loLapKCVQC+hYRaSLO/nhxNp4+WdqiKh79zch qSwLBa/wPMZXwOoCpcyGAQ/8GSHOUoLIp6oeolhqi0o3dAx6msePVa6wVmry493yvyxcfW jHNRHY26OxmgS4rqP1m/iJfyB2R+mxS6aqA8pIVXEzIFyQQnkGsjgq7XAZy3yA== ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=pav smtp.mailfrom=pav@iki.fi ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1691238551; a=rsa-sha256; cv=none; b=iUzZCz2JgVMvEFqqYmMEL9Qpe20uguU3g9xn7hXxZUkcyOG7ajZm60D38cXPww8l/U85Aj vwnhNr9NBt6iMAyWDlGZrd/VOzDt1Q5n0DmIWEzsUqIjNMExgbPn4/8WoYGMXpDK9E+zJr npp4PGRJZEw2BHuJ+SjPfblwg+Rux0HCgN1wuvIgcQi0S5dSo4sPhX7umbi2958T2ShCSz OE0oHZueg1G606A0tKZuFQXAinu5YFB87uIs1oMuuatT2iHn36KA8yW8tqwSthKl3o+NAl oc65tyNoS7FTHDCoSjGXHV2/yOJQaNDbxGkTk0cR6Ot1TBjXvon/g1myR9uFig== From: Pauli Virtanen To: linux-bluetooth@vger.kernel.org Cc: Pauli Virtanen Subject: [PATCH BlueZ 1/2] btdev: fix CIG ID on Set CIG Parameters error response Date: Sat, 5 Aug 2023 15:29:06 +0300 Message-ID: <570f7e0427b35925c741118d397eb8bcbcb51efe.1691238245.git.pav@iki.fi> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS 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 Set CIG Parameters shall return correct CIG ID in Command_Complete also when it errors. --- emulator/btdev.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/emulator/btdev.c b/emulator/btdev.c index 38dcb189e..58414bd74 100644 --- a/emulator/btdev.c +++ b/emulator/btdev.c @@ -5872,6 +5872,8 @@ static int cmd_set_cig_params(struct btdev *dev, const void *data, memset(&rsp, 0, sizeof(rsp)); + rsp.params.cig_id = cmd->cig_id; + if (cmd->num_cis > ARRAY_SIZE(dev->le_cig[0].cis)) { rsp.params.status = BT_HCI_ERR_MEM_CAPACITY_EXCEEDED; goto done; @@ -5942,7 +5944,6 @@ static int cmd_set_cig_params(struct btdev *dev, const void *data, } rsp.params.status = BT_HCI_ERR_SUCCESS; - rsp.params.cig_id = cmd->cig_id; for (i = 0; i < cmd->num_cis; i++) { rsp.params.num_handles++; -- 2.41.0