Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2770969rwd; Fri, 2 Jun 2023 14:38:16 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ78RQJow+drRPj+TuMMWLdos80D5dJxJncfWgx9eLgMQ176goXuldHo+F7nbQb2481l5Y+8 X-Received: by 2002:a9d:7848:0:b0:6af:7db6:57d3 with SMTP id c8-20020a9d7848000000b006af7db657d3mr3428830otm.17.1685741895768; Fri, 02 Jun 2023 14:38:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1685741895; cv=pass; d=google.com; s=arc-20160816; b=ytzsQC2ZC1M/HVoPk990wBJuMy5cqw4WUiom8UMLOMjGL7PgnK9AnP8lLHuKWkOmUu ebldLCMoHGWJvZBpX3CAaPocUhT/GbFPKhYYiY9EV7kaU/THBsah4G0jsULuYCP7kLSV x3mZzt0i3+ChkxKSwxWGhEqaGEGMaLPIKDCorZiPr3Yn/ckhpJ5EGGJFyUnOv452ggfL cAOTZhopgrvFehILqlID/AgwZbOmaV98yD+LsQtVxqeDxsjvXdpg4XTxOoBjTfe4rLzF YzV6ieu0qqQRO8EwlkPrJI6Xzkx0foZ3jsc194ltzAKYRdKe3s6v1XnjDAxBQgrtpL9Y p9Zw== 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=Y2aMQk9/QNXTcmFiAfcbnLBpS52wbiaF3IWkyoi19Ek=; b=FS1kYdNlmOZ1fR5/RqFEL85vkXQiY+KWAW5D4irOxrhTb5yxuugzTzwzJ50icjmsnj oaf+GFquetL9y3+a5p+tl8NtYiG7tnZnBWANPYAJhOBHfZ6jaofPHTf9ixso+ILNDZuM lg6OZ1rOs0cv/yZnZi/fhMe75wj4v7LaghZO1ULBD2W+GXvQCh3uT12nZgcVjAOq8DbJ 2iSTHrVtrpm5yDnY0Hyoyq2uRwjRPKIItfiHSP17CX3PiYdur9rAlLaX+IXhQbbaAsNa GcKR1oB+g3EKMiU7H3Els07KDbTJAbH3P62ep1gmWie+hnkJBykRKvs9KN+FDKT1MKWg VYFA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@iki.fi header.s=meesny header.b=azqByHb2; 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 y20-20020a626414000000b0064d545c8466si1294497pfb.287.2023.06.02.14.37.52; Fri, 02 Jun 2023 14:38:15 -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=meesny header.b=azqByHb2; 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 S234860AbjFBV36 (ORCPT + 99 others); Fri, 2 Jun 2023 17:29:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236470AbjFBV35 (ORCPT ); Fri, 2 Jun 2023 17:29:57 -0400 X-Greylist: delayed 140081 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 02 Jun 2023 14:29:56 PDT Received: from meesny.iki.fi (meesny.iki.fi [195.140.195.201]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12550E48 for ; Fri, 2 Jun 2023 14:29:55 -0700 (PDT) Received: from monolith.lan (91-152-120-101.elisa-laajakaista.fi [91.152.120.101]) (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 meesny.iki.fi (Postfix) with ESMTPSA id 4QXx3h4NDJzyWK; Sat, 3 Jun 2023 00:29:51 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1685741392; 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=Y2aMQk9/QNXTcmFiAfcbnLBpS52wbiaF3IWkyoi19Ek=; b=azqByHb2nBUAxoFNa84DhWut6wqROM6LldC78mokA4+ypDtEocU7n6psyMU/ttz8qHG3lV ZNvT52Ax2eneP9Ap00C+2FR4NeGXJpVQDXbvsNFJvcDQFKVVxRwVKyZ7Dh55a4bF9y7U37 PNVWo/09tvmrX0zqY7wmnnomsPdLW48= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1685741392; 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=Y2aMQk9/QNXTcmFiAfcbnLBpS52wbiaF3IWkyoi19Ek=; b=o8IHqT3KIqi7bD97pZBkCyjv7fKwBDNrfODDtgg+CI0Fu82nbg6E+qv5qc18KXQpaU0F/D QWU7hx9nvoGErcnvq0Yz3ahhZuVOX7MiHumTWQhwMmUKpmo0MSmMnxkNZLkF5szB1Ti44+ iBJ4sS8e4IcA7e+hb8iYi1dFzzUfP5s= ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=pav smtp.mailfrom=pav@iki.fi ARC-Seal: i=1; s=meesny; d=iki.fi; t=1685741392; a=rsa-sha256; cv=none; b=yNPkAidpPLauzVDqYfd+Dl6x8RuJyseKDEO1psobqEGAhi4e+CCyKKkzbZ05vQnOXjo4bq Y4ZrsVummZxVPSqe53GO31ZI7eFNhdR0MzmhhsC+ptqlbUtL8XUSZ8qsmyN3mW41/kjXfM z4tnXJcrSBI1XG9/nj5X2uLsDp17TKs= From: Pauli Virtanen To: linux-bluetooth@vger.kernel.org Cc: luiz.dentz@gmail.com, Pauli Virtanen Subject: [PATCH] Bluetooth: hci_event: fix Set CIG Parameters error status handling Date: Sat, 3 Jun 2023 00:28:12 +0300 Message-Id: X-Mailer: git-send-email 2.40.1 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,SPF_HELO_NONE,SPF_PASS, 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 If the event has error status, return right error code and don't show incorrect "response malformed" messages. Signed-off-by: Pauli Virtanen --- Notes: Correction to "Bluetooth: ISO: use correct CIS order in Set CIG Parameters event" net/bluetooth/hci_event.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index b3825b3f06d9..7c199f7361f7 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -3813,7 +3813,8 @@ static u8 hci_cc_le_set_cig_params(struct hci_dev *hdev, void *data, bt_dev_dbg(hdev, "status 0x%2.2x", rp->status); cp = hci_sent_cmd_data(hdev, HCI_OP_LE_SET_CIG_PARAMS); - if (!cp || rp->num_handles != cp->num_cis || rp->cig_id != cp->cig_id) { + if (!rp->status && (!cp || rp->num_handles != cp->num_cis || + rp->cig_id != cp->cig_id)) { bt_dev_err(hdev, "unexpected Set CIG Parameters response data"); status = HCI_ERROR_UNSPECIFIED; } -- 2.40.1