diff options
-rw-r--r-- | net/bluetooth/mgmt.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 06c2e652e4b6..693ce8bcd06e 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c | |||
@@ -7081,13 +7081,15 @@ void mgmt_device_found(struct hci_dev *hdev, bdaddr_t *bdaddr, u8 link_type, | |||
7081 | * kept and checking possible scan response data | 7081 | * kept and checking possible scan response data |
7082 | * will be skipped. | 7082 | * will be skipped. |
7083 | */ | 7083 | */ |
7084 | if (hdev->discovery.uuid_count > 0) { | 7084 | if (hdev->discovery.uuid_count > 0) |
7085 | match = eir_has_uuids(eir, eir_len, | 7085 | match = eir_has_uuids(eir, eir_len, |
7086 | hdev->discovery.uuid_count, | 7086 | hdev->discovery.uuid_count, |
7087 | hdev->discovery.uuids); | 7087 | hdev->discovery.uuids); |
7088 | if (!match) | 7088 | else |
7089 | return; | 7089 | match = true; |
7090 | } | 7090 | |
7091 | if (!match && !scan_rsp_len) | ||
7092 | return; | ||
7091 | 7093 | ||
7092 | /* Copy EIR or advertising data into event */ | 7094 | /* Copy EIR or advertising data into event */ |
7093 | memcpy(ev->eir, eir, eir_len); | 7095 | 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 | * provided, results with empty EIR or advertising data | 7098 | * provided, results with empty EIR or advertising data |
7097 | * should be dropped since they do not match any UUID. | 7099 | * should be dropped since they do not match any UUID. |
7098 | */ | 7100 | */ |
7099 | if (hdev->discovery.uuid_count > 0) | 7101 | if (hdev->discovery.uuid_count > 0 && !scan_rsp_len) |
7100 | return; | 7102 | return; |
7103 | |||
7104 | match = false; | ||
7101 | } | 7105 | } |
7102 | 7106 | ||
7103 | if (dev_class && !eir_has_data_type(ev->eir, eir_len, EIR_CLASS_OF_DEV)) | 7107 | if (dev_class && !eir_has_data_type(ev->eir, eir_len, EIR_CLASS_OF_DEV)) |