All of lore.kernel.org
 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

* [PATCH 2/2] Bluetooth: Queue adv_work on system workqueue
  2012-01-02 22:18 [PATCH 1/2] Bluetooth: Fix adv_work delay Andre Guedes
@ 2012-01-02 22:18 ` 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
  1 sibling, 2 replies; 5+ messages in thread
From: Andre Guedes @ 2012-01-02 22:18 UTC (permalink / raw)
  To: linux-bluetooth

This patch queues hdev->adv_work on the system-wide workqueue
instead of on hdev->workqueue. This way we keep only tx/rx works
on hdev->workqueue.

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 871a864..3184f17 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -1047,8 +1047,7 @@ static void hci_cc_le_set_scan_enable(struct hci_dev *hdev,
 	case LE_SCANNING_DISABLED:
 		clear_bit(HCI_LE_SCAN, &hdev->dev_flags);
 
-		queue_delayed_work(hdev->workqueue, &hdev->adv_work,
-							ADV_CLEAR_TIMEOUT);
+		schedule_delayed_work(&hdev->adv_work, ADV_CLEAR_TIMEOUT);
 		break;
 
 	default:
-- 
1.7.8.1


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

* Re: [PATCH 1/2] Bluetooth: Fix adv_work delay
  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:23 ` Marcel Holtmann
  1 sibling, 0 replies; 5+ messages in thread
From: Marcel Holtmann @ 2012-01-02 22:23 UTC (permalink / raw)
  To: Andre Guedes; +Cc: linux-bluetooth

Hi Andre,

> 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(-)

Acked-by: Marcel Holtmann <marcel@holtmann.org>

Regards

Marcel



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

* Re: [PATCH 2/2] Bluetooth: Queue adv_work on system workqueue
  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
  1 sibling, 0 replies; 5+ messages in thread
From: Marcel Holtmann @ 2012-01-02 22:24 UTC (permalink / raw)
  To: Andre Guedes; +Cc: linux-bluetooth

Hi Andre,

> This patch queues hdev->adv_work on the system-wide workqueue
> instead of on hdev->workqueue. This way we keep only tx/rx works
> on hdev->workqueue.
> 
> Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
> ---
>  net/bluetooth/hci_event.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)

Acked-by: Marcel Holtmann <marcel@holtmann.org>

Regards

Marcel



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

* Re: [PATCH 2/2] Bluetooth: Queue adv_work on system workqueue
  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
  1 sibling, 0 replies; 5+ messages in thread
From: Gustavo Padovan @ 2012-01-03  0:28 UTC (permalink / raw)
  To: Andre Guedes; +Cc: linux-bluetooth

Hi Andre,

* Andre Guedes <andre.guedes@openbossa.org> [2012-01-02 19:18:11 -0300]:

> This patch queues hdev->adv_work on the system-wide workqueue
> instead of on hdev->workqueue. This way we keep only tx/rx works
> on hdev->workqueue.
> 
> Signed-off-by: Andre Guedes <andre.guedes@openbossa.org>
> ---
>  net/bluetooth/hci_event.c |    3 +--
>  1 files changed, 1 insertions(+), 2 deletions(-)

All applied, thanks.

	Gustavo

^ permalink raw reply	[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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.