Commit 04530982 authored by Ville Tervo's avatar Ville Tervo Committed by Marcel Holtmann

Bluetooth: Update sec_level/auth_type for already existing connections

Update auth level for already existing connections if it is lower
than required by new connection.
Signed-off-by: default avatarVille Tervo <ville.tervo@nokia.com>
Reviewed-by: default avatarEmeltchenko Andrei <andrei.emeltchenko@nokia.com>
Signed-off-by: default avatarLuciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: default avatarAndrei Emeltchenko <andrei.emeltchenko@nokia.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent da213f41
......@@ -358,6 +358,11 @@ struct hci_conn *hci_connect(struct hci_dev *hdev, int type, bdaddr_t *dst, __u8
acl->sec_level = sec_level;
acl->auth_type = auth_type;
hci_acl_connect(acl);
} else {
if (acl->sec_level < sec_level)
acl->sec_level = sec_level;
if (acl->auth_type < auth_type)
acl->auth_type = auth_type;
}
if (type == ACL_LINK)
......
Markdown is supported
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