summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorSudha Bheemanna <b.sudha@samsung.com>2016-09-08 15:11:28 +0530
committerSeung-Woo Kim <sw0312.kim@samsung.com>2016-12-14 13:53:18 +0900
commit4efa40641bb52bfeac9ba6d41b7ec9e494dc3ef1 (patch)
treea3361095b7e75120cf6b442930bc9e2f25d505cb /net
parent727d8219a63dbbab5ff82eb2f0b8314fdaecb1c1 (diff)
Bluetooth: Send Authentication Request command on pairing failure
This patch allows to send HCI_OP_AUTH_REQUESTED command to the remote device if pairing failure happens because of pin or key missing error. Change-Id: I9c28394dc06b22fd5fe9e58ac0b7d728c086bde4 Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com>
Diffstat (limited to 'net')
-rw-r--r--net/bluetooth/hci_event.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index b501d77a0832..f1308d5ab07a 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -2668,6 +2668,24 @@ static void hci_auth_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)
if (!conn)
goto unlock;
+#ifdef TIZEN_BT
+ /* PIN or Key Missing patch */
+ BT_DBG("remote_auth %x, remote_cap %x, auth_type %x, io_capability %x",
+ conn->remote_auth, conn->remote_cap,
+ conn->auth_type, conn->io_capability);
+
+ if (ev->status == 0x06 && hci_conn_ssp_enabled(conn)) {
+ struct hci_cp_auth_requested cp;
+
+ BT_DBG("Pin or key missing");
+ hci_remove_link_key(hdev, &conn->dst);
+ cp.handle = cpu_to_le16(conn->handle);
+ hci_send_cmd(conn->hdev, HCI_OP_AUTH_REQUESTED,
+ sizeof(cp), &cp);
+ goto unlock;
+ }
+#endif
+
if (!ev->status) {
if (!hci_conn_ssp_enabled(conn) &&
test_bit(HCI_CONN_REAUTH_PEND, &conn->flags)) {