aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/hci_core.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 8b206d0942aa..c566b57610c9 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -959,7 +959,6 @@ static ssize_t le_auto_conn_write(struct file *file, const char __user *data,
959 } else if (memcmp(buf, "clr", 3) == 0) { 959 } else if (memcmp(buf, "clr", 3) == 0) {
960 hci_dev_lock(hdev); 960 hci_dev_lock(hdev);
961 hci_conn_params_clear(hdev); 961 hci_conn_params_clear(hdev);
962 hci_update_background_scan(hdev);
963 hci_dev_unlock(hdev); 962 hci_dev_unlock(hdev);
964 } else { 963 } else {
965 err = -EINVAL; 964 err = -EINVAL;
@@ -3483,6 +3482,8 @@ void hci_pend_le_conns_clear(struct hci_dev *hdev)
3483 } 3482 }
3484 3483
3485 BT_DBG("All LE pending connections cleared"); 3484 BT_DBG("All LE pending connections cleared");
3485
3486 hci_update_background_scan(hdev);
3486} 3487}
3487 3488
3488/* This function requires the caller holds hdev->lock */ 3489/* This function requires the caller holds hdev->lock */
@@ -5293,6 +5294,9 @@ void hci_update_background_scan(struct hci_dev *hdev)
5293 struct hci_conn *conn; 5294 struct hci_conn *conn;
5294 int err; 5295 int err;
5295 5296
5297 if (test_bit(HCI_UNREGISTER, &hdev->dev_flags))
5298 return;
5299
5296 hci_req_init(&req, hdev); 5300 hci_req_init(&req, hdev);
5297 5301
5298 if (list_empty(&hdev->pend_le_conns)) { 5302 if (list_empty(&hdev->pend_le_conns)) {