]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: fix service discovery behaviour for empty uuids filter
authorJakub Pawlowski <jpawlowski@google.com>
Thu, 5 Mar 2015 00:24:26 +0000 (16:24 -0800)
committerJohan Hedberg <johan.hedberg@intel.com>
Thu, 5 Mar 2015 07:50:50 +0000 (09:50 +0200)
commit41e7175167e88b9894ea52ab51920c85d4f736e2
tree8f18cc6e68060a709189c5af747c55e740a7469b
parent7c40dc624bf9c24d123dfa8895be0de6b7b96b6a
Bluetooth: fix service discovery behaviour for empty uuids filter

This patch fixes service discovery behaviour, when provided uuid filter
is empty and HCI_QUIRK_STRICT_DUPLICATE_FILTER is set. Before this
patch, empty uuid filter was unable to trigger scan restart, and that
caused inconsistent behaviour in applications.

Example: two DBus clients call BlueZ, one to find all devices with
service abcd, second to find all devices with rssi smaller than -90.
Sum of those filters, that is passed to mgmt_service_scan is empty
filter, with no rssi or uuids set.
That caused kernel not to restart scan when quirk was set.
That was inconsistent with what happen when there's only one of those
two filters set (scan is restarted and reports devices).

To fix that, new variable hdev->discovery.result_filtering was
introduced. It can indicate that filtered scan is running, no matter
what uuid or rssi filter is set.

Signed-off-by: Jakub Pawlowski <jpawlowski@google.com>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
include/net/bluetooth/hci_core.h
net/bluetooth/mgmt.c