aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/bluetooth/hci_core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 2ac6036b70c3..59ca4755b6b3 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1083,8 +1083,11 @@ int hci_add_link_key(struct hci_dev *hdev, struct hci_conn *conn, int new_key,
1083 * previous key */ 1083 * previous key */
1084 if (type == HCI_LK_CHANGED_COMBINATION && 1084 if (type == HCI_LK_CHANGED_COMBINATION &&
1085 (!conn || conn->remote_auth == 0xff) && 1085 (!conn || conn->remote_auth == 0xff) &&
1086 old_key_type == 0xff) 1086 old_key_type == 0xff) {
1087 type = HCI_LK_COMBINATION; 1087 type = HCI_LK_COMBINATION;
1088 if (conn)
1089 conn->key_type = type;
1090 }
1088 1091
1089 if (new_key && !hci_persistent_key(hdev, conn, type, old_key_type)) { 1092 if (new_key && !hci_persistent_key(hdev, conn, type, old_key_type)) {
1090 list_del(&key->list); 1093 list_del(&key->list);