Bluetooth: GAP: Fast ACL disconnection only for Auth fail
This patch causes immediate ACL disconnection only when
auth failure happens.
CRs-fixed: 480067
Change-Id: I23ee743de37d0ab6155bf892cc17037a2036e337
Signed-off-by: Sumit Bajpai <sbajpai@codeaurora.org>
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 7bc1d40..5318889 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -1891,7 +1891,8 @@
} else {
conn->state = BT_CONNECTED;
hci_proto_connect_cfm(conn, ev->status);
- conn->disc_timeout = HCI_DISCONN_AUTH_FAILED_TIMEOUT;
+ if (ev->status)
+ conn->disc_timeout = HCI_DISCONN_AUTH_FAILED_TIMEOUT;
hci_conn_put(conn);
}
} else {