Bluetooth: Move LE scan disable/restart behind req_workqueue

To avoid any risks of races, place also these LE scan modification
work callbacks behind the same work queue as the other LE scan
changes.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
This commit is contained in:
Johan Hedberg
2015-11-11 08:11:23 +02:00
committed by Marcel Holtmann
parent 145a0913ef
commit 7c1fbed239
4 changed files with 183 additions and 173 deletions

View File

@@ -4367,7 +4367,7 @@ static void start_discovery_complete(struct hci_dev *hdev, u8 status,
hdev->discovery.scan_duration = timeout;
}
queue_delayed_work(hdev->workqueue,
queue_delayed_work(hdev->req_workqueue,
&hdev->le_scan_disable, timeout);
}
@@ -8389,7 +8389,7 @@ static void restart_le_scan(struct hci_dev *hdev)
hdev->discovery.scan_duration))
return;
queue_delayed_work(hdev->workqueue, &hdev->le_scan_restart,
queue_delayed_work(hdev->req_workqueue, &hdev->le_scan_restart,
DISCOV_LE_RESTART_DELAY);
}