aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_event.c
diff options
context:
space:
mode:
authorGustavo F. Padovan <padovan@profusion.mobi>2011-06-20 15:39:29 -0400
committerGustavo F. Padovan <padovan@profusion.mobi>2011-12-18 14:07:55 -0500
commitdb323f2fff0ded058f033df6235e8c2be4146bfd (patch)
tree4e267f325506f2cff3b496dc1c52cde57c4a74fd /net/bluetooth/hci_event.c
parent19c40e3bcaf2d969f5d4ee85bbe1330b54d36d9c (diff)
Bluetooth: Use delayed work for advertisiment cache timeout
As HCI rx path is now done in process context it makes sense to do all the timer in process context as well. Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth/hci_event.c')
-rw-r--r--net/bluetooth/hci_event.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 35cb56ed3b0b..0a9501f17366 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -1017,7 +1017,7 @@ static void hci_cc_le_set_scan_enable(struct hci_dev *hdev,
1017 if (cp->enable == 0x01) { 1017 if (cp->enable == 0x01) {
1018 set_bit(HCI_LE_SCAN, &hdev->dev_flags); 1018 set_bit(HCI_LE_SCAN, &hdev->dev_flags);
1019 1019
1020 del_timer(&hdev->adv_timer); 1020 cancel_delayed_work_sync(&hdev->adv_work);
1021 1021
1022 hci_dev_lock(hdev); 1022 hci_dev_lock(hdev);
1023 hci_adv_entries_clear(hdev); 1023 hci_adv_entries_clear(hdev);
@@ -1025,7 +1025,9 @@ static void hci_cc_le_set_scan_enable(struct hci_dev *hdev,
1025 } else if (cp->enable == 0x00) { 1025 } else if (cp->enable == 0x00) {
1026 clear_bit(HCI_LE_SCAN, &hdev->dev_flags); 1026 clear_bit(HCI_LE_SCAN, &hdev->dev_flags);
1027 1027
1028 mod_timer(&hdev->adv_timer, jiffies + ADV_CLEAR_TIMEOUT); 1028 cancel_delayed_work_sync(&hdev->adv_work);
1029 queue_delayed_work(hdev->workqueue, &hdev->adv_work,
1030 jiffies + ADV_CLEAR_TIMEOUT);
1029 } 1031 }
1030} 1032}
1031 1033