aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/bluetooth/hci_core.h16
-rw-r--r--net/bluetooth/hci_core.c12
-rw-r--r--net/bluetooth/hci_sysfs.c2
-rw-r--r--net/bluetooth/mgmt.c2
4 files changed, 16 insertions, 16 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 236f7f0e596e..5a566fd5e2a6 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -56,7 +56,7 @@ struct inquiry_entry {
56 struct inquiry_data data; 56 struct inquiry_data data;
57}; 57};
58 58
59struct inquiry_cache { 59struct discovery_state {
60 struct list_head all; /* All devices found during inquiry */ 60 struct list_head all; /* All devices found during inquiry */
61 struct list_head unknown; /* Name state not known */ 61 struct list_head unknown; /* Name state not known */
62 struct list_head resolve; /* Name needs to be resolved */ 62 struct list_head resolve; /* Name needs to be resolved */
@@ -226,7 +226,7 @@ struct hci_dev {
226 226
227 struct list_head mgmt_pending; 227 struct list_head mgmt_pending;
228 228
229 struct inquiry_cache inq_cache; 229 struct discovery_state discovery;
230 struct hci_conn_hash conn_hash; 230 struct hci_conn_hash conn_hash;
231 struct list_head blacklist; 231 struct list_head blacklist;
232 232
@@ -357,21 +357,21 @@ extern int sco_recv_scodata(struct hci_conn *hcon, struct sk_buff *skb);
357#define INQUIRY_CACHE_AGE_MAX (HZ*30) /* 30 seconds */ 357#define INQUIRY_CACHE_AGE_MAX (HZ*30) /* 30 seconds */
358#define INQUIRY_ENTRY_AGE_MAX (HZ*60) /* 60 seconds */ 358#define INQUIRY_ENTRY_AGE_MAX (HZ*60) /* 60 seconds */
359 359
360static inline void inquiry_cache_init(struct hci_dev *hdev) 360static inline void discovery_init(struct hci_dev *hdev)
361{ 361{
362 INIT_LIST_HEAD(&hdev->inq_cache.all); 362 INIT_LIST_HEAD(&hdev->discovery.all);
363 INIT_LIST_HEAD(&hdev->inq_cache.unknown); 363 INIT_LIST_HEAD(&hdev->discovery.unknown);
364 INIT_LIST_HEAD(&hdev->inq_cache.resolve); 364 INIT_LIST_HEAD(&hdev->discovery.resolve);
365} 365}
366 366
367static inline int inquiry_cache_empty(struct hci_dev *hdev) 367static inline int inquiry_cache_empty(struct hci_dev *hdev)
368{ 368{
369 return list_empty(&hdev->inq_cache.all); 369 return list_empty(&hdev->discovery.all);
370} 370}
371 371
372static inline long inquiry_cache_age(struct hci_dev *hdev) 372static inline long inquiry_cache_age(struct hci_dev *hdev)
373{ 373{
374 struct inquiry_cache *c = &hdev->inq_cache; 374 struct discovery_state *c = &hdev->discovery;
375 return jiffies - c->timestamp; 375 return jiffies - c->timestamp;
376} 376}
377 377
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 5dbfb276edf2..55509b0a810a 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -357,7 +357,7 @@ struct hci_dev *hci_dev_get(int index)
357/* ---- Inquiry support ---- */ 357/* ---- Inquiry support ---- */
358static void inquiry_cache_flush(struct hci_dev *hdev) 358static void inquiry_cache_flush(struct hci_dev *hdev)
359{ 359{
360 struct inquiry_cache *cache = &hdev->inq_cache; 360 struct discovery_state *cache = &hdev->discovery;
361 struct inquiry_entry *p, *n; 361 struct inquiry_entry *p, *n;
362 362
363 list_for_each_entry_safe(p, n, &cache->all, all) { 363 list_for_each_entry_safe(p, n, &cache->all, all) {
@@ -371,7 +371,7 @@ static void inquiry_cache_flush(struct hci_dev *hdev)
371 371
372struct inquiry_entry *hci_inquiry_cache_lookup(struct hci_dev *hdev, bdaddr_t *bdaddr) 372struct inquiry_entry *hci_inquiry_cache_lookup(struct hci_dev *hdev, bdaddr_t *bdaddr)
373{ 373{
374 struct inquiry_cache *cache = &hdev->inq_cache; 374 struct discovery_state *cache = &hdev->discovery;
375 struct inquiry_entry *e; 375 struct inquiry_entry *e;
376 376
377 BT_DBG("cache %p, %s", cache, batostr(bdaddr)); 377 BT_DBG("cache %p, %s", cache, batostr(bdaddr));
@@ -387,7 +387,7 @@ struct inquiry_entry *hci_inquiry_cache_lookup(struct hci_dev *hdev, bdaddr_t *b
387struct inquiry_entry *hci_inquiry_cache_lookup_unknown(struct hci_dev *hdev, 387struct inquiry_entry *hci_inquiry_cache_lookup_unknown(struct hci_dev *hdev,
388 bdaddr_t *bdaddr) 388 bdaddr_t *bdaddr)
389{ 389{
390 struct inquiry_cache *cache = &hdev->inq_cache; 390 struct discovery_state *cache = &hdev->discovery;
391 struct inquiry_entry *e; 391 struct inquiry_entry *e;
392 392
393 BT_DBG("cache %p, %s", cache, batostr(bdaddr)); 393 BT_DBG("cache %p, %s", cache, batostr(bdaddr));
@@ -403,7 +403,7 @@ struct inquiry_entry *hci_inquiry_cache_lookup_unknown(struct hci_dev *hdev,
403bool hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data, 403bool hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data,
404 bool name_known) 404 bool name_known)
405{ 405{
406 struct inquiry_cache *cache = &hdev->inq_cache; 406 struct discovery_state *cache = &hdev->discovery;
407 struct inquiry_entry *ie; 407 struct inquiry_entry *ie;
408 408
409 BT_DBG("cache %p, %s", cache, batostr(&data->bdaddr)); 409 BT_DBG("cache %p, %s", cache, batostr(&data->bdaddr));
@@ -445,7 +445,7 @@ update:
445 445
446static int inquiry_cache_dump(struct hci_dev *hdev, int num, __u8 *buf) 446static int inquiry_cache_dump(struct hci_dev *hdev, int num, __u8 *buf)
447{ 447{
448 struct inquiry_cache *cache = &hdev->inq_cache; 448 struct discovery_state *cache = &hdev->discovery;
449 struct inquiry_info *info = (struct inquiry_info *) buf; 449 struct inquiry_info *info = (struct inquiry_info *) buf;
450 struct inquiry_entry *e; 450 struct inquiry_entry *e;
451 int copied = 0; 451 int copied = 0;
@@ -1546,7 +1546,7 @@ int hci_register_dev(struct hci_dev *hdev)
1546 init_waitqueue_head(&hdev->req_wait_q); 1546 init_waitqueue_head(&hdev->req_wait_q);
1547 mutex_init(&hdev->req_lock); 1547 mutex_init(&hdev->req_lock);
1548 1548
1549 inquiry_cache_init(hdev); 1549 discovery_init(hdev);
1550 1550
1551 hci_conn_hash_init(hdev); 1551 hci_conn_hash_init(hdev);
1552 1552
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c
index 3600d78c2f25..74b49e330a1d 100644
--- a/net/bluetooth/hci_sysfs.c
+++ b/net/bluetooth/hci_sysfs.c
@@ -383,7 +383,7 @@ static struct device_type bt_host = {
383static int inquiry_cache_show(struct seq_file *f, void *p) 383static int inquiry_cache_show(struct seq_file *f, void *p)
384{ 384{
385 struct hci_dev *hdev = f->private; 385 struct hci_dev *hdev = f->private;
386 struct inquiry_cache *cache = &hdev->inq_cache; 386 struct discovery_state *cache = &hdev->discovery;
387 struct inquiry_entry *e; 387 struct inquiry_entry *e;
388 388
389 hci_dev_lock(hdev); 389 hci_dev_lock(hdev);
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index 39775119585a..894f11bc571d 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -2000,7 +2000,7 @@ static int confirm_name(struct sock *sk, u16 index, unsigned char *data,
2000 list_del(&e->list); 2000 list_del(&e->list);
2001 } else { 2001 } else {
2002 e->name_state = NAME_NEEDED; 2002 e->name_state = NAME_NEEDED;
2003 list_move(&e->list, &hdev->inq_cache.resolve); 2003 list_move(&e->list, &hdev->discovery.resolve);
2004 } 2004 }
2005 2005
2006 err = 0; 2006 err = 0;