Bluetooth: Modify security level at remote_features event for BT2.0 devices
For non SSP devices, MEDIUM_SECURITY has to be used for pairing. This
can be determined and set while receiving remote supported features
event for BT2.0 devices.
Change-Id: I24558d40be01c4232fff4a871e2b57e390d4128a
CRs-fixed: 345945
Signed-off-by: Prabhakaran Mc <prabhakaranmc@codeaurora.org>
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 1d76674..178bdeb 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -1970,6 +1970,9 @@
hci_send_cmd(hdev, HCI_OP_READ_REMOTE_EXT_FEATURES,
sizeof(cp), &cp);
goto unlock;
+ } else if (!(lmp_ssp_capable(conn)) && conn->auth_initiator &&
+ (conn->pending_sec_level == BT_SECURITY_HIGH)) {
+ conn->pending_sec_level = BT_SECURITY_MEDIUM;
}
if (!ev->status) {