|
@@ -3727,6 +3727,17 @@ sendresp:
|
|
|
static int l2cap_connect_req(struct l2cap_conn *conn,
|
|
|
struct l2cap_cmd_hdr *cmd, u8 *data)
|
|
|
{
|
|
|
+ struct hci_dev *hdev = conn->hcon->hdev;
|
|
|
+ struct hci_conn *hcon = conn->hcon;
|
|
|
+
|
|
|
+ hci_dev_lock(hdev);
|
|
|
+ if (test_bit(HCI_MGMT, &hdev->dev_flags) &&
|
|
|
+ !test_and_set_bit(HCI_CONN_MGMT_CONNECTED, &hcon->flags))
|
|
|
+ mgmt_device_connected(hdev, &hcon->dst, hcon->type,
|
|
|
+ hcon->dst_type, 0, NULL, 0,
|
|
|
+ hcon->dev_class);
|
|
|
+ hci_dev_unlock(hdev);
|
|
|
+
|
|
|
l2cap_connect(conn, cmd, data, L2CAP_CONN_RSP, 0);
|
|
|
return 0;
|
|
|
}
|