Commit 52de599e authored by Marcel Holtmann's avatar Marcel Holtmann Committed by Gustavo Padovan
Browse files

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.

Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Acked-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
parent a675d7f1
Loading
Loading
Loading
Loading
+7 −9
Original line number Diff line number Diff line
@@ -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);

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