Commit 19202573 authored by Johan Hedberg's avatar Johan Hedberg Committed by Gustavo Padovan

Bluetooth: Use req_workqueue for hci_request operations

This patch converts work assignment relying on hci_request() from the
system-global work queue to the per-HCI device specific work queue
(hdev->req_workqueue) intended for hci_request() related tasks.
Signed-off-by: default avatarJohan Hedberg <johan.hedberg@intel.com>
Acked-by: default avatarMarcel Holtmann <marcel@holtmann.org>
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
parent 6ead1bbc
...@@ -1146,7 +1146,8 @@ static void hci_power_on(struct work_struct *work) ...@@ -1146,7 +1146,8 @@ static void hci_power_on(struct work_struct *work)
return; return;
if (test_bit(HCI_AUTO_OFF, &hdev->dev_flags)) if (test_bit(HCI_AUTO_OFF, &hdev->dev_flags))
schedule_delayed_work(&hdev->power_off, HCI_AUTO_OFF_TIMEOUT); queue_delayed_work(hdev->req_workqueue, &hdev->power_off,
HCI_AUTO_OFF_TIMEOUT);
if (test_and_clear_bit(HCI_SETUP, &hdev->dev_flags)) if (test_and_clear_bit(HCI_SETUP, &hdev->dev_flags))
mgmt_index_added(hdev); mgmt_index_added(hdev);
...@@ -1830,7 +1831,7 @@ int hci_register_dev(struct hci_dev *hdev) ...@@ -1830,7 +1831,7 @@ int hci_register_dev(struct hci_dev *hdev)
hci_notify(hdev, HCI_DEV_REG); hci_notify(hdev, HCI_DEV_REG);
hci_dev_hold(hdev); hci_dev_hold(hdev);
schedule_work(&hdev->power_on); queue_work(hdev->req_workqueue, &hdev->power_on);
return id; return id;
......
...@@ -812,9 +812,9 @@ static int set_powered(struct sock *sk, struct hci_dev *hdev, void *data, ...@@ -812,9 +812,9 @@ static int set_powered(struct sock *sk, struct hci_dev *hdev, void *data,
} }
if (cp->val) if (cp->val)
schedule_work(&hdev->power_on); queue_work(hdev->req_workqueue, &hdev->power_on);
else else
schedule_work(&hdev->power_off.work); queue_work(hdev->req_workqueue, &hdev->power_off.work);
err = 0; err = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment