diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2015-11-11 08:11:21 +0200 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-11-19 17:50:29 +0100 |
commit | af02dd446999796a742e3940d1a25f2b35b6eeba (patch) | |
tree | b3e1b496b9a0232cef9965d6e7853737613ae7e7 /net | |
parent | 84235d222a297a281dbe984ef4f28519cacc5fe3 (diff) | |
download | linux-af02dd446999796a742e3940d1a25f2b35b6eeba.tar.gz linux-af02dd446999796a742e3940d1a25f2b35b6eeba.tar.bz2 linux-af02dd446999796a742e3940d1a25f2b35b6eeba.zip |
Bluetooth: Use req_workqueue for background scanning when powering on
We can easily use the new req_workqueue based background scan update
for the power on case. This also removes the last external user of
__hci_update_background_scan().
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/bluetooth/mgmt.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c index 27504949e995..bb870c3aadae 100644 --- a/net/bluetooth/mgmt.c +++ b/net/bluetooth/mgmt.c @@ -7465,9 +7465,8 @@ void mgmt_index_removed(struct hci_dev *hdev) } /* This function requires the caller holds hdev->lock */ -static void restart_le_actions(struct hci_request *req) +static void restart_le_actions(struct hci_dev *hdev) { - struct hci_dev *hdev = req->hdev; struct hci_conn_params *p; list_for_each_entry(p, &hdev->le_conn_params, list) { @@ -7488,8 +7487,6 @@ static void restart_le_actions(struct hci_request *req) break; } } - - __hci_update_background_scan(req); } static void powered_complete(struct hci_dev *hdev, u8 status, u16 opcode) @@ -7505,6 +7502,9 @@ static void powered_complete(struct hci_dev *hdev, u8 status, u16 opcode) * decide if the public address or static address is used. */ smp_register(hdev); + + restart_le_actions(hdev); + hci_update_background_scan(hdev); } hci_dev_lock(hdev); @@ -7583,8 +7583,6 @@ static int powered_update_hci(struct hci_dev *hdev) hdev->cur_adv_instance) schedule_adv_instance(&req, hdev->cur_adv_instance, true); - - restart_le_actions(&req); } link_sec = hci_dev_test_flag(hdev, HCI_LINK_SECURITY); |