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>
This commit is contained in:
parent
ff9ef57870
commit
30dc78e1a2
4 changed files with 149 additions and 11 deletions
|
|
@ -60,7 +60,8 @@ struct discovery_state {
|
|||
enum {
|
||||
DISCOVERY_STOPPED,
|
||||
DISCOVERY_STARTING,
|
||||
DISCOVERY_ACTIVE,
|
||||
DISCOVERY_INQUIRY,
|
||||
DISCOVERY_RESOLVING,
|
||||
DISCOVERY_STOPPING,
|
||||
} state;
|
||||
struct list_head all; /* All devices found during inquiry */
|
||||
|
|
@ -371,6 +372,8 @@ static inline void discovery_init(struct hci_dev *hdev)
|
|||
INIT_LIST_HEAD(&hdev->discovery.resolve);
|
||||
}
|
||||
|
||||
bool hci_discovery_active(struct hci_dev *hdev);
|
||||
|
||||
void hci_discovery_set_state(struct hci_dev *hdev, int state);
|
||||
|
||||
static inline int inquiry_cache_empty(struct hci_dev *hdev)
|
||||
|
|
@ -393,6 +396,9 @@ struct inquiry_entry *hci_inquiry_cache_lookup(struct hci_dev *hdev,
|
|||
bdaddr_t *bdaddr);
|
||||
struct inquiry_entry *hci_inquiry_cache_lookup_unknown(struct hci_dev *hdev,
|
||||
bdaddr_t *bdaddr);
|
||||
struct inquiry_entry *hci_inquiry_cache_lookup_resolve(struct hci_dev *hdev,
|
||||
bdaddr_t *bdaddr,
|
||||
int state);
|
||||
bool hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data,
|
||||
bool name_known);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue