Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1796567rdb; Thu, 25 Jan 2024 06:29:55 -0800 (PST) X-Google-Smtp-Source: AGHT+IG5ZEM5ccb8JcnVp2voOoKpVl8+KwLsEGZ/NfBk+gEkS0CqDAoYEIXFKo9TPKXex9nPGDGz X-Received: by 2002:ae9:e64b:0:b0:783:a5de:21c9 with SMTP id x11-20020ae9e64b000000b00783a5de21c9mr1364755qkl.96.1706192995063; Thu, 25 Jan 2024 06:29:55 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706192995; cv=pass; d=google.com; s=arc-20160816; b=Th9VTCWyuM0hQNHlBNxvU8TEcQX2d/mQnmGugi3tMNAgwJ1Mo89DTHPiaDIpbaau8C VF5rD1jwRaDjBXi+RQt1KTpSZwCrMdc8aoIOF7VqUk/I6ImPv1axQhyKf4OrDf0mwtAm tIhE9Zi0utIfK+AmRuXR3q0wTHJ/7W5FtyGH6G8Zow5pU4Au7PYujs2GzP5TQK3O2MHN gInDWd3U7H5yz5nOjsM1fDeI85hWkYUxcQ2wBSGFxyLsYWuZ89rnjQWed2MRzibjsgYl wxvDdfZUpgTMQE8a+ltkDJy0y3jVHEwN7aDyfLajxR2LZuKU1UzSW47dp6iKNMJ8Nv4/ sjBA== 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=dklMvlN+hkfw7f1s4bwiZ+J+3zXS8Ln0cXYFoGxDekw=; fh=4lGQI6056MBa4/oovMyIYaKLn+Wz/24RGvUivMmQP8E=; b=uufeno8aVwMK09LUdLnKRJWj6FjZ8zHfS4xg+5SRPViqCA9JcE6ebMqSWieCxg9+0Z AgwqRPxQ4RldtcK6VtlqxdUdlQ6asU3owIxg5cjQMa53O3b0lfHR6bFQpvIJCzTEAGoB zay73SaaOA9b+OJ6kf5B9FRqZeY0UbgyB0N/8HFQhzPs5GeYbIr1TnQRyEqdZh58HvNJ 9w0m5NZ5BJLyb+XjSmPY5rLGJSKbC8jGAAr5Ec1MMbC54nFxBwvtxTPer5F30U0W7cDn s0y+OcGXY5Tr9W3AY7bxQbbvUWvRzd9RPu/sTl2zCzX2kDvdBYY3Vl+llVoDHRiIZuk9 uEkg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="LgoMee/U"; 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-1369-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-1369-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id f14-20020a05620a408e00b0078396013dcasi12922180qko.374.2024.01.25.06.29.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 06:29:55 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-1369-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="LgoMee/U"; 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-1369-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-1369-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id CE6F81C21F3F for ; Thu, 25 Jan 2024 14:29:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E19B6634F0; Thu, 25 Jan 2024 14:29:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="LgoMee/U" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-pf1-f175.google.com (mail-pf1-f175.google.com [209.85.210.175]) (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 6FBC9634E0 for ; Thu, 25 Jan 2024 14:29:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706192988; cv=none; b=eiaXex5gaQ2+Xn+NeCEuW4o9u5gmpCfPUZT3OrjbJqX6Ox1fmqxeipJhunSKuC6tca6J9l0FnOE/P+NsOu9XOfXmEe5GZCKSPCA5I46KN2ihAZkzi0F7raEC5PxIIFtHkXPcvv2bB9ngM/4qUJSetRQ7voou10to4yOftr/pClI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706192988; c=relaxed/simple; bh=JUfr0p07h+Ewp/sLbyEq7IYa0JlWiyZ8irZXMLhZqqs=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bTp6DzeBMSMh5sWOTC/sL/PUbu/a0O5NlPRW7kXxrv5gPX+FiKiLAEVkiOBmnkiZuGbO0nmKglEx0Ny7YTpXuusa7M/T6CXKcOopEw1vCp4Tm6l/TMJ49UTtfD3MJllug8gghgQG7vD04bxSHGGPmwicVTuwjLUUoAkgqGntjAc= 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=LgoMee/U; arc=none smtp.client-ip=209.85.210.175 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-pf1-f175.google.com with SMTP id d2e1a72fcca58-6ddd1fc67d2so397810b3a.2 for ; Thu, 25 Jan 2024 06:29:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706192985; x=1706797785; 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=dklMvlN+hkfw7f1s4bwiZ+J+3zXS8Ln0cXYFoGxDekw=; b=LgoMee/UjiGwD3bQGs/q9sMlfmR2qgHBm6qKXdmcVra7I8lPFTWxOgEDhjXvFAiMnf CZMR1GPiHY/zqGCkO/O3W4bvnTPDEZQ45PsEM128DrL9LyToSLgIpJdP7EommNlI8KmR af+imNQSFCsLAzwzF18MvnMze4Oi9zyntvKRUnDrRKCeaawngR3xfma+WIsNhxw+bscL W2J2OiW1hkHrv0s5ZS67B1Lr2qD+7Umjtmx4Yv0Nm9ZLCc1RoXRVNNmaZ6k08tDbQTDp FXUhCwlyLJ8pBZ8UCydEMlGWqSPZ+GElwY4Gvs49P5KOMta9byQ4wITYG3qiDmT5zvL+ KF6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706192985; x=1706797785; 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=dklMvlN+hkfw7f1s4bwiZ+J+3zXS8Ln0cXYFoGxDekw=; b=mp2BdoC6myKFA4LzAjPjEdWwMbxIOVDWfciG0WNvpTRWKrmg86yIenzq652xv0LIpU D7/DnT5f7/wPgd67cJSrDYM9JGkPsw6E43TnD+6jxJtuHXb3eSlNXDHTtuVsIHZJggVm jDsaHHWpj1XVVs0We0KfEZHfo6F7Fw2oIOp1LMxiGsHm/BaNKkDWyC81D/if2h0gZ4bu MLhEWrUjFAYTXiinW3xejFJBY+wWWAR/c5o1htK63QwN052BXnwpjq5lvalzWdImIF4M UztNl41YgKPagwBVICYl1EXEemtozUnIVU0zfgixKSK4KreqvDkUrc+kBN+XY5Q15Oe9 gdVA== X-Gm-Message-State: AOJu0YxbLkP9KDvCU+S+x7WzSC7oWKJjMHpWpYSLApro9EsHY2FlnvCg MG620oZEUnDvNtm8pfmqzvyWRxBU15fvsVwtf1X3UCqOHnVpbfReijGt4GSb X-Received: by 2002:a62:cdcd:0:b0:6d9:b5ba:3ddb with SMTP id o196-20020a62cdcd000000b006d9b5ba3ddbmr741211pfg.11.1706192984724; Thu, 25 Jan 2024 06:29:44 -0800 (PST) Received: from lvondent-mobl4.. (071-047-239-151.res.spectrum.com. [71.47.239.151]) by smtp.gmail.com with ESMTPSA id x33-20020a631721000000b005ceac534e47sm13646143pgl.51.2024.01.25.06.29.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 06:29:43 -0800 (PST) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ v1 3/3] bap: Mark device as connectable if a broadcast Endpoint is found Date: Thu, 25 Jan 2024 09:29:36 -0500 Message-ID: <20240125142936.3373953-3-luiz.dentz@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240125142936.3373953-1-luiz.dentz@gmail.com> References: <20240125142936.3373953-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 If a broadcast Endpoint is found this uses btd_device_set_connectable to make it as connectable since the Endpoint can be used to setup a broadcast stream which requires the device object. --- profiles/audio/bap.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/profiles/audio/bap.c b/profiles/audio/bap.c index a4036bbbdfa8..864761dfd919 100644 --- a/profiles/audio/bap.c +++ b/profiles/audio/bap.c @@ -1378,6 +1378,7 @@ static bool pac_select(struct bt_bap_pac *lpac, struct bt_bap_pac *rpac, static bool pac_found_bcast(struct bt_bap_pac *lpac, struct bt_bap_pac *rpac, void *user_data) { + struct bap_data *data = user_data; struct bap_ep *ep; DBG("lpac %p rpac %p", lpac, rpac); @@ -1388,6 +1389,9 @@ static bool pac_found_bcast(struct bt_bap_pac *lpac, struct bt_bap_pac *rpac, return true; } + /* Mark the device as connetable if an Endpoint is registered */ + btd_device_set_connectable(data->device, true); + return true; } @@ -2456,6 +2460,8 @@ static void bap_bcast_remove(struct btd_service *service) error("BAP service not handled by profile"); return; } + + bap_data_remove(data); } static int bap_probe(struct btd_service *service) -- 2.43.0