Bluetooth: Avoid link entering sniff mode during pairing process.
Found incoming connection issue with IOT devices when link enters
sniff mode during pairing process. The current change avoids link
entering sniff mode when link key is not available for connection.
Change-Id: I26fbbccec8d7b3faa91cba8f976fb0e44d7f5344
CRs-Fixed: 331520
Signed-off-by: Srinivas Krovvidi <skrovvid@codeaurora.org>
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 675b34f..fec6f32 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -1,6 +1,6 @@
/*
BlueZ - Bluetooth protocol stack for Linux
- Copyright (c) 2000-2001, 2010-2011, Code Aurora Forum. All rights reserved.
+ Copyright (c) 2000-2001, 2010-2012, Code Aurora Forum. All rights reserved.
Written 2000,2001 by Maxim Krasnyansky <maxk@qualcomm.com>
@@ -2492,6 +2492,7 @@
hci_conn_hold(conn);
conn->disc_timeout = HCI_PAIRING_TIMEOUT;
hci_conn_put(conn);
+ hci_conn_enter_active_mode(conn, 0);
}
if (!test_bit(HCI_PAIRABLE, &hdev->flags))
@@ -2587,6 +2588,7 @@
pin_len = conn->pin_length;
hci_conn_put(conn);
+ hci_conn_enter_active_mode(conn, 0);
}
if (test_bit(HCI_LINK_KEYS, &hdev->flags))