diff options
author | Archie Pusaka <apusaka@chromium.org> | 2021-11-25 15:04:36 +0800 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2021-11-25 21:08:19 +0100 |
commit | ea13aed5e5dfbabd166759aaf9f4af3cb804875a (patch) | |
tree | db46868297e36a99eade39f8ea551ea548db3bdf /net/bluetooth/hci_event.c | |
parent | 7978656caf2ad3963fb63797128ec8d71caa2798 (diff) |
Bluetooth: Send device found event on name resolve failure
Introducing NAME_REQUEST_FAILED flag that will be sent together with
device found event on name resolve failure. This will provide the
userspace with an information so it can decide not to resolve the
name for these devices in the future.
Signed-off-by: Archie Pusaka <apusaka@chromium.org>
Reviewed-by: Miao-chen Chou <mcchou@chromium.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r-- | net/bluetooth/hci_event.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c index 394d676c9baa..324d376f97d4 100644 --- a/net/bluetooth/hci_event.c +++ b/net/bluetooth/hci_event.c @@ -2175,13 +2175,10 @@ static void hci_check_pending_name(struct hci_dev *hdev, struct hci_conn *conn, return; list_del(&e->list); - if (name) { - e->name_state = NAME_KNOWN; - mgmt_remote_name(hdev, bdaddr, ACL_LINK, 0x00, - e->data.rssi, name, name_len); - } else { - e->name_state = NAME_NOT_KNOWN; - } + + e->name_state = name ? NAME_KNOWN : NAME_NOT_KNOWN; + mgmt_remote_name(hdev, bdaddr, ACL_LINK, 0x00, e->data.rssi, + name, name_len); if (hci_resolve_next_name(hdev)) return; |