summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSudha Bheemanna <b.sudha@samsung.com>2016-09-12 12:46:44 +0530
committerAmit Purwar <amit.purwar@samsung.com>2019-06-28 10:03:08 +0530
commit2cb61a3fefde33cbe6fb9b447da51e737eeb1204 (patch)
tree7a50be33c53f0bddc900a6aebc24f9eafe76f3ce
parent315ddd59d6694a8d22e55e06cd3eb8e2f3cc009b (diff)
downloadlinux-rpi3-2cb61a3fefde33cbe6fb9b447da51e737eeb1204.tar.gz
linux-rpi3-2cb61a3fefde33cbe6fb9b447da51e737eeb1204.tar.bz2
linux-rpi3-2cb61a3fefde33cbe6fb9b447da51e737eeb1204.zip
Bluetooth: Store the key if auth type is P192
This patch allows to store the key after authentication if auth type is "HCI_LK_AUTH_COMBINATION_P192" Change-Id: Ie44dbe7dfec361edab61aceaf9b2ca4057b88fa5 Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com> Signed-off-by: Amit Purwar <amit.purwar@samsung.com>
-rw-r--r--net/bluetooth/hci_core.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 95b801e7eca2..11b49058615e 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2351,6 +2351,14 @@ static bool hci_persistent_key(struct hci_dev *hdev, struct hci_conn *conn,
if (conn->remote_auth == 0x02 || conn->remote_auth == 0x03)
return true;
+#ifdef TIZEN_BT
+ /* In case of auth_type '0x01', it is authenticated by MITM.
+ * So store it.
+ */
+ if (key_type == HCI_LK_AUTH_COMBINATION_P192)
+ return true;
+#endif
+
/* If none of the above criteria match, then don't store the key
* persistently */
return false;