Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp1796535rdb; Thu, 25 Jan 2024 06:29:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IEeUzy7rD6k63HJwOB+hJ0wV5RLb46NXbeGl9SNR4jvddCJ1pUjL8QofTkJ+lpWk5jqdK3e X-Received: by 2002:a17:90b:2392:b0:28d:afe2:1013 with SMTP id mr18-20020a17090b239200b0028dafe21013mr1217141pjb.34.1706192992449; Thu, 25 Jan 2024 06:29:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706192992; cv=pass; d=google.com; s=arc-20160816; b=ru4SOpS3RcDCgLer09UZpm0a8RPGhsTrRDJiOL5uAQZnI0OvxPx09o4XYU8h+6VAmi Hgsq4Ai2EaloOLgtP2v+QipfUFlj0nD4gh8eIYttTpZ1W/cG/gh7V22RrQqITCL9G4JF M3mqoK6wGFm02HanK/6GPErIRlkV0AZMew+kHeNIe/C3CIV/IHg4KXXbfrS6lEqLp14E cJkdQrXz0JWoYEClDhXvZekiXLjOx1JVFj5xcNzJhc7KNrhNh13RagqK4TMy0pfk9rtk ErPXnWbsi83gPURBgeZ5Qd0QuwRiRWhi8IYlTNycQVZW48dQWmRKXKMIKJUfgyQU36sU YpLA== 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=iMsr4C6WqfvlF846yaoxqKRE+wO5gFKn3y/R17Su3B4=; fh=4lGQI6056MBa4/oovMyIYaKLn+Wz/24RGvUivMmQP8E=; b=Ol6cHQDBGlH7etBqrWQ7+/Pvxv1mO+ccMkQAKS53Z5f8aFF4OGCl6lFxXJSxZQbgtR x3RbQ0W1/kp1jZHAKaki94huniWzZEcSNSPTTtcikmuYqj6zavZ1AAct+CRt87VLSDvJ 31lK46VbRp23a3eYg4oqA+hJoeoM24CxbxGAVvwWfV3CZ5g211/BirtVoH3qJBsfRN6O z9uhve2OJnQeC2dJGBcBmP9iYk4SRiWq+ZGpfv13PMiARaDesYludkUA9vKZ5/EqT4zN JhcQzZU+Uuf2XSUh4wrJdMwByr1SFd5TZIdSYRhFcKg9ll/hAR8DN4uhGicRgj0Cg3L1 x2hw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=KDhRXGo9; 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-1368-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-1368-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 ds6-20020a17090b08c600b0028e7a1782b7si1401203pjb.97.2024.01.25.06.29.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 06:29:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-1368-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=KDhRXGo9; 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-1368-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-1368-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 A720F28F42A for ; Thu, 25 Jan 2024 14:29:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 06984634EA; Thu, 25 Jan 2024 14:29:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KDhRXGo9" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) (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 2D3AE634E0 for ; Thu, 25 Jan 2024 14:29:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706192985; cv=none; b=maIjsP2FKdn7kMNDefgAwZW3sKM8G0MQ62dafjhAGAiv4Pw9ACf/XrVSv4KOHiKuKmoYYyAIfEGP0uJJO+Hch4UzluDd5Yz4o5zifJrnUcDW9JjaMibWuEV3MtYoQADAYMF6sfhl3Io+cnd1CSgzjZhWhaCmS4f+mSZoX+Fa2VE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706192985; c=relaxed/simple; bh=aGcQl5YucAS7cfUthUZs2NS4a4pZSD8txWtQLm5FBK8=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HiH/n1MqPNyuWeycv7COx0VreU4EoVom7QLsgtqEVgmoiPDAc2wwj3q/AycZItJyG5pPIQl8PwqC77/Qgh2OQ1tKwTbgqPCkQuMCN+1z1jvb5quJAylUfCS7MwFgsaBaiZSWaBU/r3FVdRpJeqKonh2jBGlesHjnbyyiNwA7rQ8= 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=KDhRXGo9; arc=none smtp.client-ip=209.85.215.171 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-pg1-f171.google.com with SMTP id 41be03b00d2f7-5ce74ea4bf2so555517a12.0 for ; Thu, 25 Jan 2024 06:29:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706192983; x=1706797783; 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=iMsr4C6WqfvlF846yaoxqKRE+wO5gFKn3y/R17Su3B4=; b=KDhRXGo9q6ql8XFFumwg7eh35q2qAX1RBsvPAo/7zOm7HCOClEuPuTZWTgao8fn5t3 TqlTQE1zENdpKjnGbMji+OluNImTTr5x1O1uIOMxoqUlaOd2b7Xlxg/NlhM10cdM+2Pt e7z/fQdudv9XuGVZcf+UqBzBsXroFRJPMYgEFvl7wF6PhEblq9LXJwpolTW+d4TT78za Sv/uWY+3tZNoHgT/Vp3AkX+HGSEhqAj9Fm5T3aBPZrjwBRnZ+BlU7Mqw2PFHmkkWFg69 l66LzgqUKA7fU2OmECt0cc1oWqc0fOiZdCzpcSaQ3SgiDEAMA+NN7Pz1uNQrUqJ/O2K6 lpog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706192983; x=1706797783; 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=iMsr4C6WqfvlF846yaoxqKRE+wO5gFKn3y/R17Su3B4=; b=SSluDLPIlOnGx9O9ScQcghWR3wiBhDduLudZJh7UGpkwEp8rRVVB6uJDGj2CII2prD jEbkdFu4w45P5/Iug9cZNKgx2JsSIca+jX0fxKH0ZZOUBa/0HR7g9jABA+OcjaLCLU2L GtkZTzVS/r1ZbV896G7yl9dT/K5xfybiG2ETjSPYNl6Dmf8MlFjLAhPOEG/BIWmFaCvc g1OXdIw0KA5M60R9zGIiPM/jtVuPlyyylvWK30EZB28MHUCim6q/Y/ujCSRXq57NkChY fP74p9Wv6vxPg5msSK+VW96nsHS1IJuJonFeephZKZzfW5AkmIjV72796Lk2EbH37KuW y7Sw== X-Gm-Message-State: AOJu0YwIEBGVmCfCxN6H4EGcMKoMmMfnEqKTbQ/tPAljqN3b661MCFEd Imc7PkRlzwpg1Z26pPoiFbsBU10VHogOqoPrWS0WzKPZHt6UMKEEJvw+FSmj X-Received: by 2002:a05:6a20:9585:b0:19c:75e6:c095 with SMTP id iu5-20020a056a20958500b0019c75e6c095mr1429071pzb.62.1706192982648; Thu, 25 Jan 2024 06:29:42 -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.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jan 2024 06:29:40 -0800 (PST) From: Luiz Augusto von Dentz To: linux-bluetooth@vger.kernel.org Subject: [PATCH BlueZ v1 2/3] device: Add btd_device_set_connectable Date: Thu, 25 Jan 2024 09:29:35 -0500 Message-ID: <20240125142936.3373953-2-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 In case of devices advertising BCAA, aka. Broadcast Source, it shall be possible to connect to them using something LE Audio Broadcast procedures so this introduces btd_device_set_connectable so driver can inform the core when the device is connectable even when it is advertising using GAP broadcaster role for example. --- src/device.c | 5 +++++ src/device.h | 1 + 2 files changed, 6 insertions(+) diff --git a/src/device.c b/src/device.c index 17bcfbc499aa..afd073c6c2a5 100644 --- a/src/device.c +++ b/src/device.c @@ -4495,6 +4495,11 @@ void device_update_last_seen(struct btd_device *device, uint8_t bdaddr_type, set_temporary_timer(device, btd_opts.tmpto); } +void btd_device_set_connectable(struct btd_device *device, bool connectable) +{ + device_update_last_seen(device, device->bdaddr_type, connectable); +} + /* It is possible that we have two device objects for the same device in * case it has first been discovered over BR/EDR and has a private * address when discovered over LE for the first time. In such a case we diff --git a/src/device.h b/src/device.h index 8bb38669d457..96f41d47971d 100644 --- a/src/device.h +++ b/src/device.h @@ -95,6 +95,7 @@ void device_set_paired(struct btd_device *dev, uint8_t bdaddr_type); void device_set_unpaired(struct btd_device *dev, uint8_t bdaddr_type); void btd_device_set_temporary(struct btd_device *device, bool temporary); void btd_device_set_trusted(struct btd_device *device, gboolean trusted); +void btd_device_set_connectable(struct btd_device *device, bool connectable); void device_set_bonded(struct btd_device *device, uint8_t bdaddr_type); void device_set_legacy(struct btd_device *device, bool legacy); void device_set_rssi_with_delta(struct btd_device *device, int8_t rssi, -- 2.43.0