Bluetooth: Fix not updating LE keys on Key Refresh Event
If link is already encrypted controller issues "Encryption Key Refresh Complete" for "LE Start Encryption". Failing to update keys resulted in invalid security level being set. Change-Id: I8d8dd1682937bd35a35111366ec6ebdaa619db7c Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This commit is contained in:
parent
56ba2ffb6b
commit
719e8e4710
1 changed files with 9 additions and 0 deletions
|
@ -899,6 +899,15 @@ static void hci_encrypt_key_refresh_complete(struct net_buf *buf)
|
|||
return;
|
||||
}
|
||||
|
||||
/*
|
||||
* Update keys with last pairing info for proper sec level update.
|
||||
* This is done only for LE transport, for BR/EDR keys are updated on
|
||||
* HCI 'Link Key Notification Event'
|
||||
*/
|
||||
if (conn->type == BT_CONN_TYPE_LE) {
|
||||
bt_smp_update_keys(conn);
|
||||
}
|
||||
|
||||
update_sec_level(conn);
|
||||
bt_l2cap_encrypt_change(conn);
|
||||
bt_conn_security_changed(conn);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue