Commit 045309820afe047920a50de25634dab46a1e851d

Authored by Ville Tervo
Committed by Marcel Holtmann
1 parent da213f41cd

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: Ville Tervo <ville.tervo@nokia.com>
Reviewed-by: Emeltchenko Andrei <andrei.emeltchenko@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>

Showing 1 changed file with 5 additions and 0 deletions Side-by-side Diff

net/bluetooth/hci_conn.c
... ... @@ -358,6 +358,11 @@
358 358 acl->sec_level = sec_level;
359 359 acl->auth_type = auth_type;
360 360 hci_acl_connect(acl);
  361 + } else {
  362 + if (acl->sec_level < sec_level)
  363 + acl->sec_level = sec_level;
  364 + if (acl->auth_type < auth_type)
  365 + acl->auth_type = auth_type;
361 366 }
362 367  
363 368 if (type == ACL_LINK)