Fix disconnect not sent from host when pairing is cancelled

Fixes the issue that disconnect command is not sent
from the host when pairing is cancelled.

CRs-fixed: 489957

Change-Id: I600a526aa9b95a3f17d77d5ef16d91e206ce7161
Signed-off-by: Subramanian Srinivasan <subrsrin@codeaurora.org>
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index 200637e..6d06582 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -453,6 +453,7 @@
 		clear_bit(HCI_CONN_ENCRYPT_PEND, &hcon->pend);
 		mgmt_auth_failed(hcon->hdev->id, conn->dst, reason);
 		hci_conn_put(hcon);
+		l2cap_conn_del(hcon, EACCES, 0);
 	} else if (hcon->cfm_pending) {
 		BT_DBG("send_pairing_confirm");
 		ret = send_pairing_confirm(conn);
@@ -1084,4 +1085,6 @@
 	clear_bit(HCI_CONN_ENCRYPT_PEND, &conn->hcon->pend);
 	mgmt_auth_failed(conn->hcon->hdev->id, conn->dst, SMP_UNSPECIFIED);
 	hci_conn_put(conn->hcon);
+	//delete the l2cap connection
+	l2cap_conn_del(conn->hcon, EACCES, 0);
 }