Commit 7dce675b authored by David S. Miller's avatar David S. Miller

Merge branch 'for-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth

Johan Hedberg says:

====================
pull request: bluetooth 2014-12-17

Here's the first direct (i.e. skipping the wireless tree) bluetooth pull
request for you, intended for 3.19. It's just one patch: a fix from
Marcel for for remote service discovery filtering which also fixes a
'used uninitialized' compiler warning.

Please let me know if there are any issues pulling. Thanks.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents ac9a3d84 ea8ae251
...@@ -7081,13 +7081,15 @@ void mgmt_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, ...@@ -7081,13 +7081,15 @@ void mgmt_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type,
* kept and checking possible scan response data * kept and checking possible scan response data
* will be skipped. * will be skipped.
*/ */
if (hdev->discovery.uuid_count > 0) { if (hdev->discovery.uuid_count > 0)
match = eir_has_uuids(eir, eir_len, match = eir_has_uuids(eir, eir_len,
hdev->discovery.uuid_count, hdev->discovery.uuid_count,
hdev->discovery.uuids); hdev->discovery.uuids);
if (!match) else
match = true;
if (!match && !scan_rsp_len)
return; return;
}
/* Copy EIR or advertising data into event */ /* Copy EIR or advertising data into event */
memcpy(ev->eir, eir, eir_len); memcpy(ev->eir, eir, eir_len);
...@@ -7096,8 +7098,10 @@ void mgmt_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, ...@@ -7096,8 +7098,10 @@ void mgmt_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type,
* provided, results with empty EIR or advertising data * provided, results with empty EIR or advertising data
* should be dropped since they do not match any UUID. * should be dropped since they do not match any UUID.
*/ */
if (hdev->discovery.uuid_count > 0) if (hdev->discovery.uuid_count > 0 && !scan_rsp_len)
return; return;
match = false;
} }
if (dev_class && !eir_has_data_type(ev->eir, eir_len, EIR_CLASS_OF_DEV)) if (dev_class && !eir_has_data_type(ev->eir, eir_len, EIR_CLASS_OF_DEV))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment