|
|
@@ -1581,7 +1581,8 @@ static void hci_check_pending_name(struct hci_dev *hdev, struct hci_conn *conn,
|
|
|
struct discovery_state *discov = &hdev->discovery;
|
|
|
struct inquiry_entry *e;
|
|
|
|
|
|
- if (conn && !test_and_set_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags))
|
|
|
+ if (conn && conn->state == BT_CONFIG &&
|
|
|
+ !test_and_set_bit(HCI_CONN_MGMT_CONNECTED, &conn->flags))
|
|
|
mgmt_device_connected(hdev, conn, 0, name, name_len);
|
|
|
|
|
|
if (discov->state == DISCOVERY_STOPPED)
|