]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
Bluetooth: Fix updating background scan for LE connect complete
authorJohan Hedberg <johan.hedberg@intel.com>
Sun, 6 Jul 2014 12:44:23 +0000 (15:44 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Sun, 6 Jul 2014 13:03:15 +0000 (15:03 +0200)
When we get an LE connection complete event we should restart background
scanning if there are any devices needing it. So far the code was only
making the decision based on whether the completed connection had any
stored parameters or not. This patch ensures that we trigger background
scanning always when necessary.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/hci_event.c

index f452e44eff3cbe026ddf32e3994ba4473d527cb0..57837cad9919a7bb72d34b6cf4676009184192a8 100644 (file)
@@ -4196,12 +4196,11 @@ static void hci_le_conn_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)
        hci_proto_connect_cfm(conn, ev->status);
 
        params = hci_conn_params_lookup(hdev, &conn->dst, conn->dst_type);
-       if (params) {
+       if (params)
                list_del_init(&params->action);
-               hci_update_background_scan(hdev);
-       }
 
 unlock:
+       hci_update_background_scan(hdev);
        hci_dev_unlock(hdev);
 }