mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
Bluetooth: Initiate dedicated bonding if pin/key missing on remote device
In case of 2.1 capable devices, when remote device had unpaired, successive connect from the DUT was resulting in general bonding with automatic accept allowed for numeric comparison (i.e. authentication_requirements = 0x04). This lead to bad user experience as user confirmation pop up wasn't notified on the DUT. Now its ensured that if remote device has unpaired then DUT would trigger dedicated bonding as part of the DUT intiated connect. CRs-fixed: 362572 Change-Id: Id55f6cf3cc70621c29f583aa913fc08180e2d8f0 Signed-off-by: Royston Rodrigues <roystonr@codeaurora.org>
This commit is contained in:
parent
c2301e3b2b
commit
48f285e53a
1 changed files with 9 additions and 0 deletions
|
@ -1813,6 +1813,15 @@ static inline void hci_auth_complete_evt(struct hci_dev *hdev, struct sk_buff *s
|
|||
struct hci_cp_auth_requested cp;
|
||||
hci_remove_link_key(hdev, &conn->dst);
|
||||
cp.handle = cpu_to_le16(conn->handle);
|
||||
/*Initiates dedicated bonding as pin or key is missing
|
||||
on remote device*/
|
||||
/*In case if remote device is ssp supported,
|
||||
reduce the security level to MEDIUM if it is HIGH*/
|
||||
if (conn->ssp_mode && conn->auth_initiator &&
|
||||
conn->io_capability != 0x03) {
|
||||
conn->pending_sec_level = BT_SECURITY_HIGH;
|
||||
conn->auth_type = HCI_AT_DEDICATED_BONDING_MITM;
|
||||
}
|
||||
hci_send_cmd(conn->hdev, HCI_OP_AUTH_REQUESTED,
|
||||
sizeof(cp), &cp);
|
||||
hci_dev_unlock(hdev);
|
||||
|
|
Loading…
Reference in a new issue