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

Commit c0f5c1f5 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "BTM: Switch role after auth complete"

parents e2097086 c6d4cbd2
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -3140,6 +3140,13 @@ void btm_sec_auth_complete(uint16_t handle, tHCI_STATUS status) {
          // indicate that this is encryption after authentication
          BTM_SetEncryption(p_dev_rec->bd_addr, BT_TRANSPORT_BR_EDR, NULL, NULL,
                            BTM_BLE_SEC_NONE);
        } else if (p_dev_rec->IsLocallyInitiated()) {
          // Encryption will be set in role_changed callback
          BTM_TRACE_DEBUG(
              "%s auth completed in role=peripheral, try to switch role and "
              "encrypt",
              __func__);
          BTM_SwitchRoleToCentral(p_dev_rec->RemoteAddress());
        }
      }
      l2cu_start_post_bond_timer(p_dev_rec->hci_handle);