diff options
author | Johan Hedberg <johan.hedberg@intel.com> | 2015-11-11 01:11:20 -0500 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2015-11-19 11:50:29 -0500 |
commit | 84235d222a297a281dbe984ef4f28519cacc5fe3 (patch) | |
tree | 55e90f491d25c235350747ea757eedfeb213ed77 /net/bluetooth/hci_request.c | |
parent | 4ebeee2dff9815619be6ff9a845d33716f48468c (diff) |
Bluetooth: Use req_workqueue for explicit connect requests
Since explicit connect requests are also a sub-category of passive
scan updates, run them through the same workqueue as the other passive
scan changes.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/hci_request.c')
-rw-r--r-- | net/bluetooth/hci_request.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c index b1d4d5bba7c1..c0ea310a116a 100644 --- a/net/bluetooth/hci_request.c +++ b/net/bluetooth/hci_request.c | |||
@@ -841,8 +841,21 @@ static void bg_scan_update(struct work_struct *work) | |||
841 | { | 841 | { |
842 | struct hci_dev *hdev = container_of(work, struct hci_dev, | 842 | struct hci_dev *hdev = container_of(work, struct hci_dev, |
843 | bg_scan_update); | 843 | bg_scan_update); |
844 | struct hci_conn *conn; | ||
845 | u8 status; | ||
846 | int err; | ||
847 | |||
848 | err = hci_req_sync(hdev, update_bg_scan, 0, HCI_CMD_TIMEOUT, &status); | ||
849 | if (!err) | ||
850 | return; | ||
851 | |||
852 | hci_dev_lock(hdev); | ||
853 | |||
854 | conn = hci_conn_hash_lookup_state(hdev, LE_LINK, BT_CONNECT); | ||
855 | if (conn) | ||
856 | hci_le_conn_failed(conn, status); | ||
844 | 857 | ||
845 | hci_req_sync(hdev, update_bg_scan, 0, HCI_CMD_TIMEOUT); | 858 | hci_dev_unlock(hdev); |
846 | } | 859 | } |
847 | 860 | ||
848 | void hci_request_setup(struct hci_dev *hdev) | 861 | void hci_request_setup(struct hci_dev *hdev) |