Commit 82c8b927 authored by Nitin Arora's avatar Nitin Arora Committed by Andre Eisenbach
Browse files

Reset LE encryption key size at LE disconnection only

This change checks the transport type on receiving the disconnection
and resets the encryption key size only if the LE disconnection
has taken place.
This fixes the issue where read request to characteristics that
require encryption,  fails after cross key derivation due to
disconnection of BR/EDR transport.

Bug: 22515016
Change-Id: If6aad91a628eabbb5a4b7f5c22812fe94d4c5db2
parent dab356e3
......@@ -4827,7 +4827,6 @@ void btm_sec_disconnected (UINT16 handle, UINT8 reason)
}
#if BLE_INCLUDED == TRUE && SMP_INCLUDED == TRUE
p_dev_rec->enc_key_size = 0;
btm_ble_update_mode_operation(HCI_ROLE_UNKNOWN, p_dev_rec->bd_addr, HCI_SUCCESS);
/* see sec_flags processing in btm_acl_removed */
......@@ -4835,6 +4834,7 @@ void btm_sec_disconnected (UINT16 handle, UINT8 reason)
{
p_dev_rec->ble_hci_handle = BTM_SEC_INVALID_HANDLE;
p_dev_rec->sec_flags &= ~(BTM_SEC_LE_AUTHENTICATED|BTM_SEC_LE_ENCRYPTED);
p_dev_rec->enc_key_size = 0;
}
else
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment