From: Sudha Bheemanna Date: Mon, 12 Sep 2016 07:16:44 +0000 (+0530) Subject: Bluetooth: Store the key if auth type is P192 X-Git-Tag: accepted/tizen/unified/20230814.120944~267 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=25713e64fd653875fb5e7abed31fb1157c9f4f21;p=platform%2Fkernel%2Flinux-rpi.git 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 Signed-off-by: Amit Purwar --- diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 87a1436..0080afe 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -2523,6 +2523,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;