aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/bluetooth/hci_core.h
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2012-01-04 08:44:20 -0500
committerJohan Hedberg <johan.hedberg@intel.com>2012-02-13 10:01:20 -0500
commit30dc78e1a2bcbe2a0fca7aa44dfded4bb0db6148 (patch)
treee84a8d690192e75d14212d690e772575eebf68e8 /include/net/bluetooth/hci_core.h
parentff9ef5787046c3fd20cf9f7ca1cd70260c1eedb9 (diff)
Bluetooth: Add name resolving support for mgmt based discovery
This patch adds the necessary logic to perform name lookups after inquiry completes. This is done by checking for entries in the resolve list after each inquiry complete and remote name complete HCI event. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'include/net/bluetooth/hci_core.h')
-rw-r--r--include/net/bluetooth/hci_core.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 2f19de4770b6..a8680da7f400 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -60,7 +60,8 @@ struct discovery_state {
60 enum { 60 enum {
61 DISCOVERY_STOPPED, 61 DISCOVERY_STOPPED,
62 DISCOVERY_STARTING, 62 DISCOVERY_STARTING,
63 DISCOVERY_ACTIVE, 63 DISCOVERY_INQUIRY,
64 DISCOVERY_RESOLVING,
64 DISCOVERY_STOPPING, 65 DISCOVERY_STOPPING,
65 } state; 66 } state;
66 struct list_head all; /* All devices found during inquiry */ 67 struct list_head all; /* All devices found during inquiry */
@@ -371,6 +372,8 @@ static inline void discovery_init(struct hci_dev *hdev)
371 INIT_LIST_HEAD(&hdev->discovery.resolve); 372 INIT_LIST_HEAD(&hdev->discovery.resolve);
372} 373}
373 374
375bool hci_discovery_active(struct hci_dev *hdev);
376
374void hci_discovery_set_state(struct hci_dev *hdev, int state); 377void hci_discovery_set_state(struct hci_dev *hdev, int state);
375 378
376static inline int inquiry_cache_empty(struct hci_dev *hdev) 379static inline int inquiry_cache_empty(struct hci_dev *hdev)
@@ -393,6 +396,9 @@ struct inquiry_entry *hci_inquiry_cache_lookup(struct hci_dev *hdev,
393 bdaddr_t *bdaddr); 396 bdaddr_t *bdaddr);
394struct inquiry_entry *hci_inquiry_cache_lookup_unknown(struct hci_dev *hdev, 397struct inquiry_entry *hci_inquiry_cache_lookup_unknown(struct hci_dev *hdev,
395 bdaddr_t *bdaddr); 398 bdaddr_t *bdaddr);
399struct inquiry_entry *hci_inquiry_cache_lookup_resolve(struct hci_dev *hdev,
400 bdaddr_t *bdaddr,
401 int state);
396bool hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data, 402bool hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data,
397 bool name_known); 403 bool name_known);
398 404