Bluetooth: Run all background scan updates through req_workqueue

Instead of firing off a simple async request queue all background scan
updates through req_workqueue and use hci_req_sync() there to ensure
that no two updates overlap with each other.

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:17 +02:00 committed by Marcel Holtmann
parent 5fc16cc4f3
commit 2e93e53b8f
4 changed files with 25 additions and 24 deletions

View file

@ -2510,8 +2510,8 @@ static void le_enable_complete(struct hci_dev *hdev, u8 status, u16 opcode)
hci_req_init(&req, hdev);
update_adv_data(&req);
update_scan_rsp_data(&req);
__hci_update_background_scan(&req);
hci_req_run(&req, NULL);
hci_update_background_scan(hdev);
}
unlock: