Bluetooth: Add a new workqueue for hci_request operations

The hci_request function is blocking and cannot be called through the
usual per-HCI device workqueue (hdev->workqueue). While hci_request is
in progress any other work from the queue, including sending HCI
commands to the controller would be blocked and eventually cause the
hci_request call to time out.

This patch adds a second workqueue to be used by operations needing
hci_request and thereby avoiding issues with blocking other workqueue
users.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
This commit is contained in:
Johan Hedberg
2013-01-14 22:33:50 +02:00
committed by Gustavo Padovan
parent 52e0b011e2
commit 6ead1bbc38
2 changed files with 12 additions and 0 deletions

View File

@@ -216,6 +216,7 @@ struct hci_dev {
unsigned long le_last_tx;
struct workqueue_struct *workqueue;
struct workqueue_struct *req_workqueue;
struct work_struct power_on;
struct delayed_work power_off;