Bluetooth: mgmt: Fix missing connect failed event for LE
authorHemant Gupta <hemant.gupta@stericsson.com>
Thu, 5 Apr 2012 11:21:04 +0000 (16:51 +0530)
committerGustavo Padovan <gustavo@padovan.org>
Wed, 9 May 2012 03:41:38 +0000 (00:41 -0300)
This patch adds management connect failed event when LE Create Connection
Command fails to inform user space that LE Connection failed to get
established.

Signed-off-by: Hemant Gupta <hemant.gupta@stericsson.com>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
net/bluetooth/hci_event.c

index 1778b18ffd97c7200c59c4434370ed9153cbd944..054b1ad74496fce32284eb9577e4d17c5a510db0 100644 (file)
@@ -1648,6 +1648,8 @@ static void hci_cs_le_create_conn(struct hci_dev *hdev, __u8 status)
        if (status) {
                if (conn && conn->state == BT_CONNECT) {
                        conn->state = BT_CLOSED;
+                       mgmt_connect_failed(hdev, &cp->peer_addr, conn->type,
+                                           conn->dst_type, status);
                        hci_proto_connect_cfm(conn, status);
                        hci_conn_del(conn);
                }