• J
    Bluetooth: fix service discovery behaviour for empty uuids filter · 82f8b651
    Jakub Pawlowski 提交于
    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: NJakub Pawlowski <jpawlowski@google.com>
    Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
    82f8b651
mgmt.c 178.1 KB