aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/net/bluetooth/hci_core.h1
-rw-r--r--net/bluetooth/hci_core.c10
2 files changed, 6 insertions, 5 deletions
diff --git a/include/net/bluetooth/hci_core.h b/include/net/bluetooth/hci_core.h
index 7cb6d360d147..7c150e4d65b9 100644
--- a/include/net/bluetooth/hci_core.h
+++ b/include/net/bluetooth/hci_core.h
@@ -432,6 +432,7 @@ void hci_inquiry_cache_update_resolve(struct hci_dev *hdev,
432 struct inquiry_entry *ie); 432 struct inquiry_entry *ie);
433bool hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data, 433bool hci_inquiry_cache_update(struct hci_dev *hdev, struct inquiry_data *data,
434 bool name_known, bool *ssp); 434 bool name_known, bool *ssp);
435void hci_inquiry_cache_flush(struct hci_dev *hdev);
435 436
436/* ----- HCI Connections ----- */ 437/* ----- HCI Connections ----- */
437enum { 438enum {
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index ace5e55fe5a3..43c63877c5b7 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -751,7 +751,7 @@ void hci_discovery_set_state(struct hci_dev *hdev, int state)
751 hdev->discovery.state = state; 751 hdev->discovery.state = state;
752} 752}
753 753
754static void inquiry_cache_flush(struct hci_dev *hdev) 754void hci_inquiry_cache_flush(struct hci_dev *hdev)
755{ 755{
756 struct discovery_state *cache = &hdev->discovery; 756 struct discovery_state *cache = &hdev->discovery;
757 struct inquiry_entry *p, *n; 757 struct inquiry_entry *p, *n;
@@ -964,7 +964,7 @@ int hci_inquiry(void __user *arg)
964 hci_dev_lock(hdev); 964 hci_dev_lock(hdev);
965 if (inquiry_cache_age(hdev) > INQUIRY_CACHE_AGE_MAX || 965 if (inquiry_cache_age(hdev) > INQUIRY_CACHE_AGE_MAX ||
966 inquiry_cache_empty(hdev) || ir.flags & IREQ_CACHE_FLUSH) { 966 inquiry_cache_empty(hdev) || ir.flags & IREQ_CACHE_FLUSH) {
967 inquiry_cache_flush(hdev); 967 hci_inquiry_cache_flush(hdev);
968 do_inquiry = 1; 968 do_inquiry = 1;
969 } 969 }
970 hci_dev_unlock(hdev); 970 hci_dev_unlock(hdev);
@@ -1230,7 +1230,7 @@ static int hci_dev_do_close(struct hci_dev *hdev)
1230 cancel_delayed_work_sync(&hdev->le_scan_disable); 1230 cancel_delayed_work_sync(&hdev->le_scan_disable);
1231 1231
1232 hci_dev_lock(hdev); 1232 hci_dev_lock(hdev);
1233 inquiry_cache_flush(hdev); 1233 hci_inquiry_cache_flush(hdev);
1234 hci_conn_hash_flush(hdev); 1234 hci_conn_hash_flush(hdev);
1235 hci_dev_unlock(hdev); 1235 hci_dev_unlock(hdev);
1236 1236
@@ -1331,7 +1331,7 @@ int hci_dev_reset(__u16 dev)
1331 skb_queue_purge(&hdev->cmd_q); 1331 skb_queue_purge(&hdev->cmd_q);
1332 1332
1333 hci_dev_lock(hdev); 1333 hci_dev_lock(hdev);
1334 inquiry_cache_flush(hdev); 1334 hci_inquiry_cache_flush(hdev);
1335 hci_conn_hash_flush(hdev); 1335 hci_conn_hash_flush(hdev);
1336 hci_dev_unlock(hdev); 1336 hci_dev_unlock(hdev);
1337 1337
@@ -3562,7 +3562,7 @@ int hci_do_inquiry(struct hci_dev *hdev, u8 length)
3562 if (test_bit(HCI_INQUIRY, &hdev->flags)) 3562 if (test_bit(HCI_INQUIRY, &hdev->flags))
3563 return -EINPROGRESS; 3563 return -EINPROGRESS;
3564 3564
3565 inquiry_cache_flush(hdev); 3565 hci_inquiry_cache_flush(hdev);
3566 3566
3567 memset(&cp, 0, sizeof(cp)); 3567 memset(&cp, 0, sizeof(cp));
3568 memcpy(&cp.lap, lap, sizeof(cp.lap)); 3568 memcpy(&cp.lap, lap, sizeof(cp.lap));