Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH 1/2] Bluetooth: Fix adv_work delay
@ 2012-01-02 22:18 Andre Guedes
  2012-01-02 22:18 ` [PATCH 2/2] Bluetooth: Queue adv_work on system workqueue Andre Guedes
  2012-01-02 22:23 ` [PATCH 1/2] Bluetooth: Fix adv_work delay Marcel Holtmann
  0 siblings, 2 replies; 5+ messages in thread
From: Andre Guedes @ 2012-01-02 22:18 UTC (permalink / raw)
  To: linux-bluetooth

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>
---
 net/bluetooth/hci_event.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 919e3c0..871a864 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -1047,9 +1047,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:
-- 
1.7.8.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-01-03  0:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-02 22:18 [PATCH 1/2] Bluetooth: Fix adv_work delay Andre Guedes
2012-01-02 22:18 ` [PATCH 2/2] Bluetooth: Queue adv_work on system workqueue Andre Guedes
2012-01-02 22:24   ` Marcel Holtmann
2012-01-03  0:28   ` Gustavo Padovan
2012-01-02 22:23 ` [PATCH 1/2] Bluetooth: Fix adv_work delay Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox