public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH BlueZ v1] input: Fix checking LE bonding on HIDP
@ 2026-04-21 20:22 Luiz Augusto von Dentz
  2026-04-22  8:01 ` Bastien Nocera
  0 siblings, 1 reply; 6+ messages in thread
From: Luiz Augusto von Dentz @ 2026-04-21 20:22 UTC (permalink / raw)
  To: linux-bluetooth

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

HIDP is classic only, LE uses HOG, so there is no point in checking the
bonding with the address type which in case the device supports
dual-mode will map to LE random/public address.

Fixes: https://github.com/bluez/bluez/issues/2034
---
 profiles/input/device.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/profiles/input/device.c b/profiles/input/device.c
index 6bdc5ee3aaf3..0ee6988c4e90 100644
--- a/profiles/input/device.c
+++ b/profiles/input/device.c
@@ -127,8 +127,7 @@ static int connection_disconnect(struct input_device *idev, uint32_t flags);
 
 static bool input_device_bonded(struct input_device *idev)
 {
-	return device_is_bonded(idev->device,
-				btd_device_get_bdaddr_type(idev->device));
+	return device_is_bonded(idev->device, BDADDR_BREDR);
 }
 
 static void input_device_free(struct input_device *idev)
-- 
2.53.0


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

* Re: [PATCH BlueZ v1] input: Fix checking LE bonding on HIDP
  2026-04-21 20:22 Luiz Augusto von Dentz
@ 2026-04-22  8:01 ` Bastien Nocera
  2026-04-22 14:58   ` Luiz Augusto von Dentz
  0 siblings, 1 reply; 6+ messages in thread
From: Bastien Nocera @ 2026-04-22  8:01 UTC (permalink / raw)
  To: Luiz Augusto von Dentz, linux-bluetooth

On Tue, 2026-04-21 at 16:22 -0400, Luiz Augusto von Dentz wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> HIDP is classic only, LE uses HOG, so there is no point in checking
> the
> bonding with the address type which in case the device supports
> dual-mode will map to LE random/public address.
> 
> Fixes: https://github.com/bluez/bluez/issues/2034
> ---
>  profiles/input/device.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/profiles/input/device.c b/profiles/input/device.c
> index 6bdc5ee3aaf3..0ee6988c4e90 100644
> --- a/profiles/input/device.c
> +++ b/profiles/input/device.c
> @@ -127,8 +127,7 @@ static int connection_disconnect(struct
> input_device *idev, uint32_t flags);
>  
>  static bool input_device_bonded(struct input_device *idev)
>  {
> -	return device_is_bonded(idev->device,
> -				btd_device_get_bdaddr_type(idev-
> >device));
> +	return device_is_bonded(idev->device, BDADDR_BREDR);

Do we want to do the same in virtual_cable_unplug() in that same file?

Do we also want to apply this to hog_accept() with BDADDR_LE in
profiles/input/hog.c ?

>  }
>  
>  static void input_device_free(struct input_device *idev)

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

* Re: [PATCH BlueZ v1] input: Fix checking LE bonding on HIDP
  2026-04-22  8:01 ` Bastien Nocera
@ 2026-04-22 14:58   ` Luiz Augusto von Dentz
  0 siblings, 0 replies; 6+ messages in thread
From: Luiz Augusto von Dentz @ 2026-04-22 14:58 UTC (permalink / raw)
  To: Bastien Nocera; +Cc: linux-bluetooth

Hi Bastien,

On Wed, Apr 22, 2026 at 4:01 AM Bastien Nocera <hadess@hadess.net> wrote:
>
> On Tue, 2026-04-21 at 16:22 -0400, Luiz Augusto von Dentz wrote:
> > From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> >
> > HIDP is classic only, LE uses HOG, so there is no point in checking
> > the
> > bonding with the address type which in case the device supports
> > dual-mode will map to LE random/public address.
> >
> > Fixes: https://github.com/bluez/bluez/issues/2034
> > ---
> >  profiles/input/device.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/profiles/input/device.c b/profiles/input/device.c
> > index 6bdc5ee3aaf3..0ee6988c4e90 100644
> > --- a/profiles/input/device.c
> > +++ b/profiles/input/device.c
> > @@ -127,8 +127,7 @@ static int connection_disconnect(struct
> > input_device *idev, uint32_t flags);
> >
> >  static bool input_device_bonded(struct input_device *idev)
> >  {
> > -     return device_is_bonded(idev->device,
> > -                             btd_device_get_bdaddr_type(idev-
> > >device));
> > +     return device_is_bonded(idev->device, BDADDR_BREDR);
>
> Do we want to do the same in virtual_cable_unplug() in that same file?

Yep.

> Do we also want to apply this to hog_accept() with BDADDR_LE in
> profiles/input/hog.c ?

Not really. In the case of LE you really need to specify the address
type since there are multiple options: random versus public.

> >  }
> >
> >  static void input_device_free(struct input_device *idev)



-- 
Luiz Augusto von Dentz

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

* [PATCH BlueZ v1] input: Fix checking LE bonding on HIDP
@ 2026-04-22 15:03 Luiz Augusto von Dentz
  2026-04-22 16:40 ` [BlueZ,v1] " bluez.test.bot
  2026-04-23 16:40 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth
  0 siblings, 2 replies; 6+ messages in thread
From: Luiz Augusto von Dentz @ 2026-04-22 15:03 UTC (permalink / raw)
  To: linux-bluetooth

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

HIDP is classic only, LE uses HOG, so there is no point in checking the
bonding with the address type which in case the device supports
dual-mode will map to LE random/public address.

Fixes: https://github.com/bluez/bluez/issues/2034
---
 profiles/input/device.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/profiles/input/device.c b/profiles/input/device.c
index 6bdc5ee3aaf3..5b1be2b169f3 100644
--- a/profiles/input/device.c
+++ b/profiles/input/device.c
@@ -127,8 +127,8 @@ static int connection_disconnect(struct input_device *idev, uint32_t flags);
 
 static bool input_device_bonded(struct input_device *idev)
 {
-	return device_is_bonded(idev->device,
-				btd_device_get_bdaddr_type(idev->device));
+	/* HIDP is classic only; so consider it bonded if BDADDR_BREDR is */
+	return device_is_bonded(idev->device, BDADDR_BREDR);
 }
 
 static void input_device_free(struct input_device *idev)
@@ -172,8 +172,8 @@ static void input_device_free(struct input_device *idev)
 
 static void virtual_cable_unplug(struct input_device *idev)
 {
-	device_remove_bonding(idev->device,
-				btd_device_get_bdaddr_type(idev->device));
+	/* HIDP is classic only; so only remove BDADDR_BREDR bonding */
+	device_remove_bonding(idev->device, BDADDR_BREDR);
 
 	idev->virtual_cable_unplug = false;
 }
-- 
2.53.0


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

* RE: [BlueZ,v1] input: Fix checking LE bonding on HIDP
  2026-04-22 15:03 [PATCH BlueZ v1] input: Fix checking LE bonding on HIDP Luiz Augusto von Dentz
@ 2026-04-22 16:40 ` bluez.test.bot
  2026-04-23 16:40 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth
  1 sibling, 0 replies; 6+ messages in thread
From: bluez.test.bot @ 2026-04-22 16:40 UTC (permalink / raw)
  To: linux-bluetooth, luiz.dentz

[-- Attachment #1: Type: text/plain, Size: 989 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=1084336

---Test result---

Test Summary:
CheckPatch                    PASS      0.34 seconds
GitLint                       PASS      0.24 seconds
BuildEll                      PASS      20.31 seconds
BluezMake                     PASS      644.74 seconds
MakeCheck                     PASS      0.92 seconds
MakeDistcheck                 PASS      246.53 seconds
CheckValgrind                 PASS      221.43 seconds
CheckSmatch                   PASS      350.33 seconds
bluezmakeextell               PASS      181.69 seconds
IncrementalBuild              PASS      646.76 seconds
ScanBuild                     PASS      1025.97 seconds



https://github.com/bluez/bluez/pull/2062

---
Regards,
Linux Bluetooth


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

* Re: [PATCH BlueZ v1] input: Fix checking LE bonding on HIDP
  2026-04-22 15:03 [PATCH BlueZ v1] input: Fix checking LE bonding on HIDP Luiz Augusto von Dentz
  2026-04-22 16:40 ` [BlueZ,v1] " bluez.test.bot
@ 2026-04-23 16:40 ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 6+ messages in thread
From: patchwork-bot+bluetooth @ 2026-04-23 16:40 UTC (permalink / raw)
  To: Luiz Augusto von Dentz; +Cc: linux-bluetooth

Hello:

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

On Wed, 22 Apr 2026 11:03:28 -0400 you wrote:
> From: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
> 
> HIDP is classic only, LE uses HOG, so there is no point in checking the
> bonding with the address type which in case the device supports
> dual-mode will map to LE random/public address.
> 
> Fixes: https://github.com/bluez/bluez/issues/2034
> 
> [...]

Here is the summary with links:
  - [BlueZ,v1] input: Fix checking LE bonding on HIDP
    https://git.kernel.org/pub/scm/bluetooth/bluez.git/?id=928f2b28c1c7

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] 6+ messages in thread

end of thread, other threads:[~2026-04-23 16:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-22 15:03 [PATCH BlueZ v1] input: Fix checking LE bonding on HIDP Luiz Augusto von Dentz
2026-04-22 16:40 ` [BlueZ,v1] " bluez.test.bot
2026-04-23 16:40 ` [PATCH BlueZ v1] " patchwork-bot+bluetooth
  -- strict thread matches above, loose matches on Subject: below --
2026-04-21 20:22 Luiz Augusto von Dentz
2026-04-22  8:01 ` Bastien Nocera
2026-04-22 14:58   ` Luiz Augusto von Dentz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox