Bluetooth: BR/EDR: Validate security on encryption change evt

During endup pairing as acceptor update security level on encryption change
event.

Change-Id: Icddedc09f70093cc05ac99d04053b3bd3ef22555
Signed-off-by: Arkadiusz Lichwa <arkadiusz.lichwa@tieto.com>
This commit is contained in:
Arkadiusz Lichwa 2016-01-21 09:46:51 +01:00 committed by Gerrit Code Review
commit 9c88e66935

View file

@ -1125,7 +1125,14 @@ static void hci_encrypt_change(struct net_buf *buf)
bt_smp_update_keys(conn);
}
update_sec_level(conn);
if (conn->type == BT_CONN_TYPE_LE) {
update_sec_level(conn);
#if defined(CONFIG_BLUETOOTH_BREDR)
} else {
update_sec_level_br(conn);
#endif /* CONFIG_BLUETOOTH_BREDR */
}
bt_l2cap_encrypt_change(conn);
bt_conn_security_changed(conn);