summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSudha Bheemanna <b.sudha@samsung.com>2016-09-12 12:46:44 +0530
committerJaehoon Chung <jh80.chung@samsung.com>2024-11-12 13:03:13 +0900
commit3853ac3a102039d9acc07d8b6f31aa89e3dd9698 (patch)
tree0dec6c9b3de5dc620d82f8960b0ec017a2d5dc73
parentf3d240d0cc8c22e8495e546fd2668e97d709b431 (diff)
downloadlinux-rpi-3853ac3a102039d9acc07d8b6f31aa89e3dd9698.tar.gz
linux-rpi-3853ac3a102039d9acc07d8b6f31aa89e3dd9698.tar.bz2
linux-rpi-3853ac3a102039d9acc07d8b6f31aa89e3dd9698.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: I8d90830af296e718857d73cbdd1de61b8c7a37f1 Signed-off-by: Sudha Bheemanna <b.sudha@samsung.com> Signed-off-by: Amit Purwar <amit.purwar@samsung.com> Signed-off-by: Wootak Jung <wootak.jung@samsung.com> Signed-off-by: Jaehoon Chung <jh80.chung@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 57dbb2ce1ce5..8fd344c2c7fc 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1193,6 +1193,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;