aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/mgmt.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@intel.com>2014-07-07 08:19:50 -0400
committerMarcel Holtmann <marcel@holtmann.org>2014-07-07 09:18:16 -0400
commita70f4b5f14a029c14c3901f429e4d3d7e5477b4f (patch)
treeda81f377da03693a268fb9d9621fcdf98b1accf8 /net/bluetooth/mgmt.c
parentcdd6275e510bd86c44d3fc85a78306f514bbac9a (diff)
Bluetooth: Don't try background scanning if LE is not enabled
For adapters that do not support LE and ones where LE hasn't been enabled we shouldn't be trying to initiate background scanning. This patch adds an extra check to the hci_update_background_scan() to ensure that we bail out if HCI_LE_ENABLED is not set. Since we do allow user space to feed the kernel with LE connection parameters even when LE is not enabled we now need to also call hci_update_background_scan() as soon as LE gets enabled so that scanning gets started if necessary. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/mgmt.c')
-rw-r--r--net/bluetooth/mgmt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/bluetooth/mgmt.c b/net/bluetooth/mgmt.c
index b391e2fef4b6..9cc7108f4c45 100644
--- a/net/bluetooth/mgmt.c
+++ b/net/bluetooth/mgmt.c
@@ -2152,6 +2152,8 @@ static void le_enable_complete(struct hci_dev *hdev, u8 status)
2152 update_scan_rsp_data(&req); 2152 update_scan_rsp_data(&req);
2153 hci_req_run(&req, NULL); 2153 hci_req_run(&req, NULL);
2154 2154
2155 hci_update_background_scan(hdev);
2156
2155 hci_dev_unlock(hdev); 2157 hci_dev_unlock(hdev);
2156 } 2158 }
2157} 2159}