diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2014-12-05 13:03:34 +0100 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2014-12-05 14:14:26 +0200 |
commit | efb2513fd6278d97d2114ab87f019f4fed01c037 (patch) | |
tree | 1c72ebae48237246efa072a32a897f3451ffb9f9 /net/bluetooth/hci_event.c | |
parent | 189f6ad21faf73da26a4944a1893be871c079733 (diff) | |
download | lwn-efb2513fd6278d97d2114ab87f019f4fed01c037.tar.gz lwn-efb2513fd6278d97d2114ab87f019f4fed01c037.zip |
Bluetooth: Fix discovery filter when no RSSI is available
When no RSSI value is available then make sure that the result is
filtered out when the RSSI threshold filter is active.
This means that all Bluetooth 1.1 or earlier devices will not
report any results when using a RSSI threshold filter.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r-- | net/bluetooth/hci_event.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index f4e2a61bb6aa..527dfdc9d8c8 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -2043,13 +2043,14 @@ static void hci_inquiry_result_evt(struct hci_dev *hdev, struct sk_buff *skb) data.pscan_mode = info->pscan_mode; memcpy(data.dev_class, info->dev_class, 3); data.clock_offset = info->clock_offset; - data.rssi = 0x00; + data.rssi = HCI_RSSI_INVALID; data.ssp_mode = 0x00; flags = hci_inquiry_cache_update(hdev, &data, false); mgmt_device_found(hdev, &info->bdaddr, ACL_LINK, 0x00, - info->dev_class, 0, flags, NULL, 0, NULL, 0); + info->dev_class, HCI_RSSI_INVALID, + flags, NULL, 0, NULL, 0); } hci_dev_unlock(hdev); |