All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ 1/2] device: Don't attempt to set auto_connect for devices using RPAs
@ 2023-08-17 22:41 Luiz Augusto von Dentz
  2023-08-17 22:41 ` [PATCH BlueZ 2/2] device: Restart temporary timer while connecting Luiz Augusto von Dentz
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2023-08-17 22:41 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

Device using private address cannot be programmed into the auto_connect
list without them being paired and its IRK being distributed otherwise
there is no way to resolve it address and the command will fail.
---
 src/device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/device.c b/src/device.c
index e0ff0b1c1543..f6b0167bf55b 100644
--- a/src/device.c
+++ b/src/device.c
@@ -2006,7 +2006,7 @@ static void device_set_auto_connect(struct btd_device *device, gboolean enable)
 {
 	char addr[18];
 
-	if (!device || !device->le)
+	if (!device || !device->le || device_address_is_private(device))
 		return;
 
 	ba2str(&device->bdaddr, addr);
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH BlueZ 2/2] device: Restart temporary timer while connecting
  2023-08-17 22:41 [PATCH BlueZ 1/2] device: Don't attempt to set auto_connect for devices using RPAs Luiz Augusto von Dentz
@ 2023-08-17 22:41 ` Luiz Augusto von Dentz
  2023-08-18  0:35 ` [BlueZ,1/2] device: Don't attempt to set auto_connect for devices using RPAs bluez.test.bot
  2023-08-18 20:50 ` [PATCH BlueZ 1/2] " patchwork-bot+bluetooth
  2 siblings, 0 replies; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2023-08-17 22:41 UTC (permalink / raw)
  To: linux-bluetooth

From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

If the device is temporary restart its timer when attempt to connect to
it since it can interrupt the connection attempt prematurely while it
still scanning, etc.
---
 src/device.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/device.c b/src/device.c
index f6b0167bf55b..9b58e0c4e6c5 100644
--- a/src/device.c
+++ b/src/device.c
@@ -5754,6 +5754,10 @@ int device_connect_le(struct btd_device *dev)
 	/* Keep this, so we can cancel the connection */
 	dev->att_io = io;
 
+	/* Restart temporary timer to give it time to connect/pair, etc. */
+	if (dev->temporary)
+		set_temporary_timer(dev, btd_opts.tmpto);
+
 	return 0;
 }
 
-- 
2.41.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* RE: [BlueZ,1/2] device: Don't attempt to set auto_connect for devices using RPAs
  2023-08-17 22:41 [PATCH BlueZ 1/2] device: Don't attempt to set auto_connect for devices using RPAs Luiz Augusto von Dentz
  2023-08-17 22:41 ` [PATCH BlueZ 2/2] device: Restart temporary timer while connecting Luiz Augusto von Dentz
@ 2023-08-18  0:35 ` bluez.test.bot
  2023-08-18 20:50 ` [PATCH BlueZ 1/2] " patchwork-bot+bluetooth
  2 siblings, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2023-08-18  0:35 UTC (permalink / raw)
  To: linux-bluetooth, luiz.dentz

[-- Attachment #1: Type: text/plain, Size: 949 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=777197

---Test result---

Test Summary:
CheckPatch                    PASS      0.95 seconds
GitLint                       PASS      0.63 seconds
BuildEll                      PASS      32.45 seconds
BluezMake                     PASS      1002.94 seconds
MakeCheck                     PASS      13.71 seconds
MakeDistcheck                 PASS      186.14 seconds
CheckValgrind                 PASS      305.56 seconds
CheckSmatch                   PASS      405.99 seconds
bluezmakeextell               PASS      123.37 seconds
IncrementalBuild              PASS      1634.12 seconds
ScanBuild                     PASS      1250.37 seconds



---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH BlueZ 1/2] device: Don't attempt to set auto_connect for devices using RPAs
  2023-08-17 22:41 [PATCH BlueZ 1/2] device: Don't attempt to set auto_connect for devices using RPAs Luiz Augusto von Dentz
  2023-08-17 22:41 ` [PATCH BlueZ 2/2] device: Restart temporary timer while connecting Luiz Augusto von Dentz
  2023-08-18  0:35 ` [BlueZ,1/2] device: Don't attempt to set auto_connect for devices using RPAs bluez.test.bot
@ 2023-08-18 20:50 ` patchwork-bot+bluetooth
  2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+bluetooth @ 2023-08-18 20:50 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

Hello:

This series was applied to bluetooth/bluez.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Thu, 17 Aug 2023 15:41:02 -0700 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> Device using private address cannot be programmed into the auto_connect
> list without them being paired and its IRK being distributed otherwise
> there is no way to resolve it address and the command will fail.
> ---
>  src/device.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Here is the summary with links:
  - [BlueZ,1/2] device: Don't attempt to set auto_connect for devices using RPAs
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=cc7dbadb7236
  - [BlueZ,2/2] device: Restart temporary timer while connecting
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=0004eb06d5d9

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-08-18 20:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-17 22:41 [PATCH BlueZ 1/2] device: Don't attempt to set auto_connect for devices using RPAs Luiz Augusto von Dentz
2023-08-17 22:41 ` [PATCH BlueZ 2/2] device: Restart temporary timer while connecting Luiz Augusto von Dentz
2023-08-18  0:35 ` [BlueZ,1/2] device: Don't attempt to set auto_connect for devices using RPAs bluez.test.bot
2023-08-18 20:50 ` [PATCH BlueZ 1/2] " patchwork-bot+bluetooth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.