linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] Bluetooth: Only schedule raw queue when user channel is active
@ 2013-09-04  1:08 Marcel Holtmann
  2013-09-09  8:23 ` Johan Hedberg
  2013-09-10 15:49 ` Gustavo Padovan
  0 siblings, 2 replies; 3+ messages in thread
From: Marcel Holtmann @ 2013-09-04  1:08 UTC (permalink / raw)
  To: linux-bluetooth

When the user channel is set and an user application has full control
over the device, do not bother trying to schedule any queues except
the raw queue.

This is an optimization since with user channel, only the raw queue
is in use.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
---
 net/bluetooth/hci_core.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 541f4d5..1b86c78 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -3292,15 +3292,13 @@ static void hci_tx_work(struct work_struct *work)
 	BT_DBG("%s acl %d sco %d le %d", hdev->name, hdev->acl_cnt,
 	       hdev->sco_cnt, hdev->le_cnt);
 
-	/* Schedule queues and send stuff to HCI driver */
-
-	hci_sched_acl(hdev);
-
-	hci_sched_sco(hdev);
-
-	hci_sched_esco(hdev);
-
-	hci_sched_le(hdev);
+	if (!test_bit(HCI_USER_CHANNEL, &hdev->dev_flags)) {
+		/* Schedule queues and send stuff to HCI driver */
+		hci_sched_acl(hdev);
+		hci_sched_sco(hdev);
+		hci_sched_esco(hdev);
+		hci_sched_le(hdev);
+	}
 
 	/* Send next queued raw (unknown type) packet */
 	while ((skb = skb_dequeue(&hdev->raw_q)))
-- 
1.8.3.1


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

* Re: [PATCH 2/2] Bluetooth: Only schedule raw queue when user channel is active
  2013-09-04  1:08 [PATCH 2/2] Bluetooth: Only schedule raw queue when user channel is active Marcel Holtmann
@ 2013-09-09  8:23 ` Johan Hedberg
  2013-09-10 15:49 ` Gustavo Padovan
  1 sibling, 0 replies; 3+ messages in thread
From: Johan Hedberg @ 2013-09-09  8:23 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth

Hi Marcel,

On Tue, Sep 03, 2013, Marcel Holtmann wrote:
> When the user channel is set and an user application has full control
> over the device, do not bother trying to schedule any queues except
> the raw queue.
> 
> This is an optimization since with user channel, only the raw queue
> is in use.
> 
> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
> ---
>  net/bluetooth/hci_core.c | 16 +++++++---------
>  1 file changed, 7 insertions(+), 9 deletions(-)

Acked-by: Johan Hedberg <johan.hedberg@intel.com>

Johan

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

* Re: [PATCH 2/2] Bluetooth: Only schedule raw queue when user channel is active
  2013-09-04  1:08 [PATCH 2/2] Bluetooth: Only schedule raw queue when user channel is active Marcel Holtmann
  2013-09-09  8:23 ` Johan Hedberg
@ 2013-09-10 15:49 ` Gustavo Padovan
  1 sibling, 0 replies; 3+ messages in thread
From: Gustavo Padovan @ 2013-09-10 15:49 UTC (permalink / raw)
  To: Marcel Holtmann; +Cc: linux-bluetooth

Hi Marcel,

2013-09-03 Marcel Holtmann <marcel@holtmann.org>:

> When the user channel is set and an user application has full control
> over the device, do not bother trying to schedule any queues except
> the raw queue.
> 
> This is an optimization since with user channel, only the raw queue
> is in use.
> 
> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
> ---
>  net/bluetooth/hci_core.c | 16 +++++++---------
>  1 file changed, 7 insertions(+), 9 deletions(-)

Patch has been applied to bluetooth-next. Thanks.

	Gustavo

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

end of thread, other threads:[~2013-09-10 15:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-04  1:08 [PATCH 2/2] Bluetooth: Only schedule raw queue when user channel is active Marcel Holtmann
2013-09-09  8:23 ` Johan Hedberg
2013-09-10 15:49 ` Gustavo Padovan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).