Commit 655fe6ec authored by Johan Hedberg's avatar Johan Hedberg Committed by Gustavo F. Padovan
Browse files

Bluetooth: Fix connection key type updating for buggy controllers

If a controller generates a changed combination key as its first key the
connection key type will not be correctly set. In these situations make
sure the update the connection key type when such a buggy controller is
Signed-off-by: default avatarJohan Hedberg <>
Signed-off-by: default avatarGustavo F. Padovan <>
parent 12adcf3a
......@@ -1083,8 +1083,11 @@ int hci_add_link_key(struct hci_dev *hdev, struct hci_conn *conn, int new_key,
* previous key */
(!conn || conn->remote_auth == 0xff) &&
old_key_type == 0xff)
old_key_type == 0xff) {
if (conn)
conn->key_type = type;
if (new_key && !hci_persistent_key(hdev, conn, type, old_key_type)) {
Supports Markdown
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