device: Don't browse SDP if HIDSDPDisable is set
authorArchie Pusaka <apusaka@chromium.org>
Tue, 18 Aug 2020 07:34:09 +0000 (15:34 +0800)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 12 Apr 2021 09:00:50 +0000 (14:30 +0530)
commit74f0a540765d55eefdc53c6d8e262ac01809110c
treed73272070d77fa0debdb8be99d505f267dd90698
parent5bf4d7844fc8da92008f6319d7c5a395de86cabe
device: Don't browse SDP if HIDSDPDisable is set

According to the HID1.1 spec, part 5.3.4.9:
The HIDSDPDisable attribute is a Boolean value, which indicates
whether connection to the SDP channel and Control or Interrupt
channels are mutually exclusive. This feature supports Bluetooth
HID devices that have minimal resources, and multiplex those
resources between servicing the initialization (SDP) and runtime
(Control and Interrupt) channels.

However, Bluez still tries to connect SDP upon HID connection,
regardless of the existence of the HIDSDPDisable attribute.

This patch prevents the connection of SDP after HID has been
established, if the device has HIDSDPDisable attribute.

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
profiles/input/device.c
src/device.c
src/device.h