Skip to contentSkip to conversation

Bluetooth: Only schedule raw queue when user channel is active

PATCH In review Marcel Holtmann 3 participants 3 messages Sep 4, 2013 – Sep 10, 2013

Subsystems (2)
lore
Share & tools
lore

Marcel Holtmann

author maintainer
#0 lore raw

PATCH 2/2 Bluetooth: Only schedule raw queue when user channel is active

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.

---
 net/bluetooth/hci_core.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)
net/bluetooth/hci_core.c +7 -9
index 541f4d5..1b86c78 100644
@@ -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)))
Signature · 1 line
1.8.3.1
Acked-by on v1 2/2
#1 lore raw

Hi Marcel,

Quoted 11 lines · Marcel Holtmann

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.

---
 net/bluetooth/hci_core.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

Johan

#2 lore raw
In reply to Marcel Holtmann

Hi Marcel,

2013-09-03 Marcel Holtmann <[email protected]>:

Quoted 11 lines

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.

---
 net/bluetooth/hci_core.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

Patch has been applied to bluetooth-next. Thanks.

Gustavo