Bluetooth: Fix updating SMP keys on BR/EDR

This should be done only for LE links.

Change-Id: I3037e5fbceb39de46ec0be389401f5e907837399
Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com>
This commit is contained in:
Szymon Janc 2016-01-13 16:49:07 +01:00 committed by Anas Nashif
commit 66f0ad5335

View file

@ -864,8 +864,10 @@ static void hci_encrypt_change(struct net_buf *buf)
* losing valid keys if encryption was not successful
*
* 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->encrypt) {
if (conn->encrypt && conn->type == BT_CONN_TYPE_LE) {
bt_smp_update_keys(conn);
}