Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp398575rdb; Thu, 1 Feb 2024 11:37:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IFpLnJvTkS4hYUN2j6Vo4+3BBeORP4J5W6ltE45aupLwKQ2RYqNKjql916D1Ex40yapJdua X-Received: by 2002:a05:6358:6e83:b0:178:67dc:aba8 with SMTP id q3-20020a0563586e8300b0017867dcaba8mr4356822rwm.17.1706816262837; Thu, 01 Feb 2024 11:37:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706816262; cv=pass; d=google.com; s=arc-20160816; b=g6GxDGzcjA8X1QpcVdL8txaNIltanwss2kKU9K/CqoI3Cx/TW8ZMIfUFECPKNdcsid vPaXIV2jClM2AdvGYAT+7e5IyarkFNmTZMUWlLpf6OHde119B+PhDYXbul9sKqln3YJ0 a5rstSOoEFVrhZgtMnHBP6I4OIVS3aSwT1miFpGETTZstjCiDSp2ikcWXy4BkCr2als6 89wygGKXHRjLdd+YsWxzdHg/sKYBGF8xIx6jzjguYzTORHWswLrZTEJLcnJ+9m6Bu96o o6P35nnyqPYMf+5RfEhkRr71vmYVlEe6E/c0vdyI5JeIs+sd174MZacT5ItpopeN0TQw mVLg== ARC-Message-Signature: i=2; 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:references:in-reply-to:message-id :date:subject:to:from:dkim-signature; bh=NfocMJ4OgAO3HX5ciQuRwEHA66Qb0abBxdrZu7QgJK8=; fh=+S+KMwQMsb9cZVG9jTz/im0uXSOOUxsVGqz56hviFq4=; b=Q4ovnbcIGqthB309f4qg/SLjal4vqgqW9lCSWVq96mlBPz7+29GdzkpYY6IDTOto1/ sXtn7cgxhnZvQSbWkb30h5sXvSJD54In+o6tZSXOGWDM8MjkIkBZb/UTmfRVkwbRGN6i fbD0KjoTe+USRmLiS5Vq3ylhCHDkrobfPQpQSa8bLMZi/VoyqmugsnprFgoNxbYqaCsK r69CJ0doZshjLojwtdVKXbej7FxR2XSMNfFohhPaY68ttLEXBw0emEH16x8wl2bKCIw+ eN1+y0CFYqrYF/cGRr9m4v0uoEzNk2JV/+PWoSTGACD/RpMCW76NXlWdHA/uObujsScq JQwQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Ke3Wxw+x; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-bluetooth+bounces-1543-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-1543-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com X-Forwarded-Encrypted: i=1; AJvYcCVQzbuAvYj6gk2r72MBG5HlfadTgFHPXJ8vwPkNyPe+7lOk97B4g3mEmE++xZXYa5OMVHRW6Pf2nM57MWeCnMB+EqASlTCqiKJ5FKVCrw== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id v129-20020a632f87000000b005d8e22b5258si194126pgv.879.2024.02.01.11.37.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 11:37:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-1543-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=Ke3Wxw+x; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-bluetooth+bounces-1543-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-1543-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 55575B276F9 for ; Thu, 1 Feb 2024 19:10:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7DD9E85292; Thu, 1 Feb 2024 19:10:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Ke3Wxw+x" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-oo1-f41.google.com (mail-oo1-f41.google.com [209.85.161.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8CBEB8529A for ; Thu, 1 Feb 2024 19:10:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.161.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706814627; cv=none; b=pCAAG8Rxn6T5YNucMiAuITD6PYgmD42NkTqyTDsB57USHYIhfUV7mMZafxEoG5woRQ683hfTiqaNU6X8E7esumkNTKQWf9KQ+6vgKwcmf2GnTpqR/EnCh4VgQERl5/J8V74ZWPws7Jd1KNZqgU/P8WatXkWb9C5gyPStv1737gg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706814627; c=relaxed/simple; bh=gyuyQ/aK4rZwWgwe0gruyYcDUQyzIfPAlXAzVb6Vozg=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ObGy5PEi1SiU+Pwdiy7HprnbyA79XuAN0VYFi8Xy+FZoBUxPykJ4Ko2tUXtLiBJ4jbfpbwFMoFBDt3b+4PP7EfsIT6mJ7cn4ed0dkLBUs40c/PYhKDXd4X7eY9jnf1VtQx4elYfJku9fU90QY5TW0GP8UgOM4kL4okcYCc5qBxY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Ke3Wxw+x; arc=none smtp.client-ip=209.85.161.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oo1-f41.google.com with SMTP id 006d021491bc7-59a7682486aso544103eaf.2 for ; Thu, 01 Feb 2024 11:10:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706814624; x=1707419424; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=NfocMJ4OgAO3HX5ciQuRwEHA66Qb0abBxdrZu7QgJK8=; b=Ke3Wxw+x1A0YaqZmGxC5ie1Zk7kAL6noDc0t/aCJEX94FUrVGTJYSlaqIcvX1EFz3d JvEMvnPu+IqFhwvljb1bkP58pZKt9jrwTLIUx8ppTlyWbo7UpOTFaDpLkORTu2GJHgVZ +52yY8saXRlAvt1JgVhzeGWmBozfrVxvDwSV3jB4FK18U2XwXDlu7jb5wE5O4FyfTw2z p6CNJyOjouzcaySfiKNdgnqMa9mC8hfH7HnYeA9A8bAl4joewsbHt5B7OGaDAwMPAW9d JFouGrnj/xDeBpdqMBEO8xkX1ldtIQwlh+ixOB86LvSQ5yumXK4EHkMjm8lGV0dyRO6d xq5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706814624; x=1707419424; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NfocMJ4OgAO3HX5ciQuRwEHA66Qb0abBxdrZu7QgJK8=; b=nJtVgQVrOWAc9eYWnMbNVbQpb0Lkg7Fomo7I9qpyB9fIHCDFd010TvOBn7d3fyNsH2 pADUsie4COW/UloRYWabiPwEfT8c1JkUs+T0JH9FPAjHYsi5fl2thWALFu3qYmfQQfxp yHJW+dRhsDp06FOR2N9McI3G9wJmGtQQWLFJTYNBI4w3drUqtWH1rfFx8GzArLE1elDV VjFhuCQ2RuYmXiuuV/uLXDp0zOmQKow/hlG93qOltfkGYlsSWCiS0VXidz60wqx4auhd tRLli8pgxCkQAXyDZmk/z/WGlsuLO5U6/m3nWrsgJBuYVcrSP1/nOHt9A1KaZiTVr01t KLUA== X-Gm-Message-State: AOJu0Ywh+hlxTHqRRvkA2vY57+UMUrVi/AT9IBCQbpRqdH/4B4J1uuFv KvFLns/1tvs1piOU82fOcXFQTxbztTlVIxINwuy9xB5lm5D0GkgnmR6pafNy X-Received: by 2002:a4a:b249:0:b0:599:e74c:ce3a with SMTP id i9-20020a4ab249000000b00599e74cce3amr3120505ooo.7.1706814623989; Thu, 01 Feb 2024 11:10:23 -0800 (PST) Received: from lvondent-mobl4.. (071-047-239-151.res.spectrum.com. [71.47.239.151]) by smtp.gmail.com with ESMTPSA id db16-20020a056130239000b007d2e2f14bd4sm35912uab.29.2024.02.01.11.10.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 11:10:22 -0800 (PST) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ v2 4/8] shared/bap: Allow using bt_bap_attach for broadcast Date: Thu, 1 Feb 2024 14:10:12 -0500 Message-ID: <20240201191016.1122194-4-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240201191016.1122194-1-luiz.dentz@gmail.com> References: <20240201191016.1122194-1-luiz.dentz@gmail.com> 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 This enables use of bt_bap_attach for broadcast by checking if there is a client or ATT instance. --- src/shared/bap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shared/bap.c b/src/shared/bap.c index 851d6a5facc3..ce8d35f86af3 100644 --- a/src/shared/bap.c +++ b/src/shared/bap.c @@ -4156,7 +4156,8 @@ bool bt_bap_attach(struct bt_bap *bap, struct bt_gatt_client *client) queue_foreach(bap_cbs, bap_attached, bap); if (!client) { - bap_attach_att(bap, bap->att); + if (bap->att) + bap_attach_att(bap, bap->att); return true; } -- 2.43.0