Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2638707rdb; Fri, 8 Dec 2023 14:28:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IFFM/xZ+Bcb79adl28EOII9yaskZ9wZhp3oNBOxAdYwf+M7FvYIPbHpuX+0/VTKC9tp46Da X-Received: by 2002:a05:6870:332b:b0:1fa:fd1e:75ce with SMTP id x43-20020a056870332b00b001fafd1e75cemr906475oae.6.1702074536675; Fri, 08 Dec 2023 14:28:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702074536; cv=none; d=google.com; s=arc-20160816; b=TC2n9gDWaNJilhuW8LCdEolw/7th5CKoRNSYzBynhf6MQu6TGvn+jt19NpgFgK+eE9 O6Al/LkBF4DgG5Rxa3A+jLhbhojYkgbT3yWSpdmSAvfVFuZBQjb/ZXG+kUMHsqQ8bzr3 /yOYWvzGFgc434Z1/Gh6bnb5Qwf3OJ0JdwpPSJ0/gJxDat/ZE+mjOcWQSxq+kN6Eusgm exCAyunVKtc/+OxJk6w/SKOqlqkrNnQVetLGjOwbftDJJx4rr/wUQPWwtybZAdgSPIcB FBhANDuCnnK4daGVm0pourk811ehQTl+3D0Jr16hb112vPrIdOoeY4pW/qkveJWMlqSp tZmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:to:from :dkim-signature; bh=hEyd8Ha/SX5TZcvP6e9MacgWygLSC9m/CuLfXZ3upD4=; fh=4lGQI6056MBa4/oovMyIYaKLn+Wz/24RGvUivMmQP8E=; b=gwfVMRYGq1CWu4q79cXJlcBVLemkFJl861Owj238sHP8NV86E1V1/WgbstZfIi8b7T HSEycb4rptBYDGAfrECXCDKjC6V8o1YvnmhQYYIcc+xmlnj376DOG77aRFVBgHOwVr1m tM3YicMRG8CDNJm13vvoP1MAMx1VIHgDfTsxJCetK9kV6nJEvN9eeVKHTH+xuHgSPw1G Yy5g5c5fh65OaZ9fJbaQJ97MyQgu5bPTm4nEXa6Xd62LCbv4q4SwRPPjrjc2tklHWB8t NKnpS4ltz8wkEp7+DQq/SeB60USN5gKYNT2ToEmCiE8kHGAsfvDvYKyqk0rlhBK9onpP 3E7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=QoK14Qm4; spf=pass (google.com: domain of linux-bluetooth+bounces-497-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-497-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id a17-20020a056a000c9100b006cdd1393a2fsi2204522pfv.96.2023.12.08.14.28.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 14:28:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-497-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=QoK14Qm4; spf=pass (google.com: domain of linux-bluetooth+bounces-497-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-497-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 50DEC28157C for ; Fri, 8 Dec 2023 22:28:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 807C259B77; Fri, 8 Dec 2023 22:28:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QoK14Qm4" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-yw1-x1131.google.com (mail-yw1-x1131.google.com [IPv6:2607:f8b0:4864:20::1131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 995FA171F for ; Fri, 8 Dec 2023 14:28:47 -0800 (PST) Received: by mail-yw1-x1131.google.com with SMTP id 00721157ae682-5de93b677f4so10317317b3.2 for ; Fri, 08 Dec 2023 14:28:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702074526; x=1702679326; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=hEyd8Ha/SX5TZcvP6e9MacgWygLSC9m/CuLfXZ3upD4=; b=QoK14Qm4S5gtobowvH/Magx5PPML4DV6FyJglotbaPAek6Ci53p4Vty3e51Ttt1tMq oapFybonKpiBDu8FqricPxVptiWHl+Zn8svQ74+2oe4Bd+PwPEtDUPj8ttxhdmeud3s/ 1/LgMgzqxXLcUTs90sLLx6jJoKB049QJW/FXaa0ktJfWqH2TYYtwYEjW78TK/fP0hwdo EFrX3StuaN18EZR6ycfSVTck5x8P1jYi6oawHn3SmXTRY50p+k1W495BAOI6MNJbig5H cw/KGo/IaX9sC1DLfeRB94fJ2nbL+iZfy/GKYB5wr0YK89pZv6o0uAWxThAa+vgRXa/Z XXEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702074526; x=1702679326; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=hEyd8Ha/SX5TZcvP6e9MacgWygLSC9m/CuLfXZ3upD4=; b=gHZJ6/p99MfWz4qtp3YfXzRx4qEotF3pY5hAjnC64mdiI7DdKJPZscm6gUrB8l0lCJ TT4P4Zsz2yxyIXVmKw1WUxh8SWLin0BrVXL6M65a3i9/OwN+skUz1Su1Rod/j2dtNRqz F+XW4o/an34bQNm/TeYebCcBIR8pHU5tE8/DFYvRwrJFBd6aKE+4BvwzeVzTkmCLSRXa LFRdDHZHh2QbkL8goJhM43Mw4JqwO87352buO+cvi+I+j/HM+BG0xrTxvLr1rwIYtn2H AfV5Y+7Bq2EEvvWSSgWyn+jCEBbajBkvMW+XswrKEbyYiINUKjHkwDBgwXoMut+Q5zit Jw1Q== X-Gm-Message-State: AOJu0Ywk4FvCRwhFONHmW7txDBhXfr4gsEi0Hbh9qE6Yl4AIDNIZpn8e uo9sganutI4JUcHkMlGJvfuoo2wA4n4= X-Received: by 2002:a81:7b05:0:b0:5d7:1940:7d87 with SMTP id w5-20020a817b05000000b005d719407d87mr606045ywc.94.1702074525637; Fri, 08 Dec 2023 14:28:45 -0800 (PST) Received: from lvondent-mobl4.. (071-047-239-151.res.spectrum.com. [71.47.239.151]) by smtp.gmail.com with ESMTPSA id m9-20020a81d249000000b005d72c7c1241sm964145ywl.112.2023.12.08.14.28.44 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 14:28:44 -0800 (PST) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH v1] Bluetooth: hci_core: Fix hci_conn_hash_lookup_cis Date: Fri, 8 Dec 2023 17:28:43 -0500 Message-ID: <20231208222843.70028-1-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Luiz Augusto von Dentz hci_conn_hash_lookup_cis shall always match the requested CIG and CIS ids even when they are unset as otherwise it result in not being able to bind/connect different sockets to the same address as that would result in having multiple sockets mapping to the same hci_conn which doesn't really work and prevents BAP audio configuration such as AC 6(i) when CIG and CIS are left unset. Fixes: c14516faede3 ("Bluetooth: hci_conn: Fix not matching by CIS ID") Signed-off-by: Luiz Augusto von Dentz --- include/net/bluetooth/hci_core.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h index 0c1754f416bd..59105a3eaa16 100644 --- a/include/net/bluetooth/hci_core.h +++ b/include/net/bluetooth/hci_core.h @@ -1225,11 +1225,11 @@ static inline struct hci_conn *hci_conn_hash_lookup_cis(struct hci_dev *hdev, continue; /* Match CIG ID if set */ - if (cig != BT_ISO_QOS_CIG_UNSET && cig != c->iso_qos.ucast.cig) + if (cig != c->iso_qos.ucast.cig) continue; /* Match CIS ID if set */ - if (id != BT_ISO_QOS_CIS_UNSET && id != c->iso_qos.ucast.cis) + if (id != c->iso_qos.ucast.cis) continue; /* Match destination address if set */ -- 2.43.0