aboutsummaryrefslogtreecommitdiffstats
path: root/net/bluetooth/hci_core.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/bluetooth/hci_core.c')
-rw-r--r--net/bluetooth/hci_core.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 59ca4755b6b..60260cae3a0 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -1097,14 +1097,15 @@ int hci_add_link_key(struct hci_dev *hdev, struct hci_conn *conn, int new_key,
1097 1097
1098 bacpy(&key->bdaddr, bdaddr); 1098 bacpy(&key->bdaddr, bdaddr);
1099 memcpy(key->val, val, 16); 1099 memcpy(key->val, val, 16);
1100 key->type = type;
1101 key->pin_len = pin_len; 1100 key->pin_len = pin_len;
1102 1101
1103 if (new_key)
1104 mgmt_new_key(hdev->id, key, old_key_type);
1105
1106 if (type == HCI_LK_CHANGED_COMBINATION) 1102 if (type == HCI_LK_CHANGED_COMBINATION)
1107 key->type = old_key_type; 1103 key->type = old_key_type;
1104 else
1105 key->type = type;
1106
1107 if (new_key)
1108 mgmt_new_key(hdev->id, key);
1108 1109
1109 return 0; 1110 return 0;
1110} 1111}