Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b48e4e8e authored by Himanshu Rawat's avatar Himanshu Rawat Committed by Gerrit Code Review
Browse files

Merge "Conclude the LE encryption request immediately if already encrypted." into main

parents 4d2bbac7 92e627ea
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1143,6 +1143,10 @@ tBTM_STATUS btm_ble_set_encryption(const RawAddress& bd_addr, tBTM_BLE_SEC_ACT s

  switch (sec_act) {
    case BTM_BLE_SEC_ENCRYPT:
      if (p_rec->sec_rec.is_le_device_encrypted()) {
        return tBTM_STATUS::BTM_SUCCESS;
      }

      if (link_role == HCI_ROLE_CENTRAL) {
        /* start link layer encryption using the security info stored */
        cmd = btm_ble_start_encrypt(bd_addr, false, NULL);