aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorAndre Guedes <andre.guedes@openbossa.org>2012-01-02 19:18:10 -0300
committerGustavo F. Padovan <padovan@profusion.mobi>2012-01-02 22:30:09 -0200
commitc1b9b4f45f014093231c568be9b5c2e392943696 (patch)
tree115b437ffe603d6ceb606633289408b3b66534f4 /net/bluetooth
parentb5b32b653dedb29eb95e57cbbaefc4abf7141cb2 (diff)
downloadkernel_goldelico_gta04-c1b9b4f45f014093231c568be9b5c2e392943696.zip
kernel_goldelico_gta04-c1b9b4f45f014093231c568be9b5c2e392943696.tar.gz
kernel_goldelico_gta04-c1b9b4f45f014093231c568be9b5c2e392943696.tar.bz2
Bluetooth: Fix adv_work delay
This patch fixes the adv_work delay. It should be set to ADV_ CLEAR_TIMEOUT instead of (jiffies + ADV_CLEAR_TIMEOUT) since queue_delayed_work() receives the number of jiffies to wait before queueing. It also removes the unnecessary cancel_delayed_ work_sync() call in case LE scan has been disabled. Signed-off-by: Andre Guedes <andre.guedes@openbossa.org> Acked-by: Marcel Holtmann <marcel@holtmann.org> Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/hci_event.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 10152d2..444ca41 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -1054,9 +1054,8 @@ static void hci_cc_le_set_scan_enable(struct hci_dev *hdev,
case LE_SCANNING_DISABLED:
clear_bit(HCI_LE_SCAN, &hdev->dev_flags);
- cancel_delayed_work_sync(&hdev->adv_work);
queue_delayed_work(hdev->workqueue, &hdev->adv_work,
- jiffies + ADV_CLEAR_TIMEOUT);
+ ADV_CLEAR_TIMEOUT);
break;
default: