]> Pileus Git - ~andy/linux/blobdiff - net/bluetooth/hci_conn.c
Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi...
[~andy/linux] / net / bluetooth / hci_conn.c
index 1458667b284532bf8485c15e73e948f78e3db999..2fcced377e503ad2e9feded38ec5609748e7d2ff 100644 (file)
@@ -483,6 +483,11 @@ struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst,
        if (type == LE_LINK) {
                le = hci_conn_hash_lookup_ba(hdev, LE_LINK, dst);
                if (!le) {
+                       le = hci_conn_hash_lookup_state(hdev, LE_LINK,
+                                                       BT_CONNECT);
+                       if (le)
+                               return ERR_PTR(-EBUSY);
+
                        le = hci_conn_add(hdev, LE_LINK, dst);
                        if (!le)
                                return ERR_PTR(-ENOMEM);