aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_core.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2011-12-14 17:47:39 -0500
committerGustavo F. Padovan <padovan@profusion.mobi>2011-12-18 14:41:04 -0500
commit7d78525dcf5c6fe5e6e73d22776ed5f960e3153e (patch)
treebe4ab2f2c9b140733a685e6ac6da2c7e409b3618 /net/bluetooth/hci_core.c
parentef5803729c2323204f7372617ad97e55e94153b9 (diff)
Bluetooth: Add timer for automatically disabling the service cache
We do not want the service cache to be enabled indefinitely after mgmt_read_info is called. To solve this a timer is added which will automatically disable the cache if mgmt_set_dev_class isn't called within 5 seconds of calling mgmt_read_info. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r--net/bluetooth/hci_core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 82d1d9e6b7c..b5ba42db056 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -598,6 +598,9 @@ static int hci_dev_do_close(struct hci_dev *hdev)
598 if (test_and_clear_bit(HCI_AUTO_OFF, &hdev->flags)) 598 if (test_and_clear_bit(HCI_AUTO_OFF, &hdev->flags))
599 cancel_delayed_work(&hdev->power_off); 599 cancel_delayed_work(&hdev->power_off);
600 600
601 if (test_and_clear_bit(HCI_SERVICE_CACHE, &hdev->flags))
602 cancel_delayed_work(&hdev->service_cache);
603
601 hci_dev_lock(hdev); 604 hci_dev_lock(hdev);
602 inquiry_cache_flush(hdev); 605 inquiry_cache_flush(hdev);
603 hci_conn_hash_flush(hdev); 606 hci_conn_hash_flush(hdev);