Fix pairing not successful when remote reports missing pin
Fix was added to update the LE Connection parameters to speed
up pairing before sending pairing request from the host.
CRs-fixed: 459212
Change-Id: Iac52fd90007dcb4ca3dc6e0fd612eba104fb83c2
Signed-off-by: Archana Ramachandran <archanar@codeaurora.org>
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index b908996..8ef2d63 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
@@ -715,6 +715,10 @@
invalid_key:
hcon->sec_req = FALSE;
+ /* Switch to Pairing Connection Parameters */
+ hci_le_conn_update(hcon, SMP_MIN_CONN_INTERVAL, SMP_MAX_CONN_INTERVAL,
+ SMP_MAX_CONN_LATENCY, SMP_SUPERVISION_TIMEOUT);
+
skb_pull(skb, sizeof(*rp));
memset(&cp, 0, sizeof(cp));
@@ -775,6 +779,11 @@
if (hcon->link_mode & HCI_LM_MASTER) {
struct smp_cmd_pairing cp;
+ /* Switch to Pairing Connection Parameters */
+ hci_le_conn_update(hcon, SMP_MIN_CONN_INTERVAL,
+ SMP_MAX_CONN_INTERVAL, SMP_MAX_CONN_LATENCY,
+ SMP_SUPERVISION_TIMEOUT);
+
build_pairing_cmd(conn, &cp, NULL, authreq);
hcon->preq[0] = SMP_CMD_PAIRING_REQ;
memcpy(&hcon->preq[1], &cp, sizeof(cp));