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

Commit fec909e9 authored by Hansong Zhang's avatar Hansong Zhang
Browse files

p_auth_complete_callback is no-op for HCI_SUCCESS case

Remove.

Test: cert/run --host
Tag: #gd-refactor
Bug: 141555841
Change-Id: Id1e511b2358c8695da721ce6750a8a6eddd1dac4
parent 105c2c03
Loading
Loading
Loading
Loading
+0 −29
Original line number Diff line number Diff line
@@ -2490,17 +2490,6 @@ void btm_sec_rmt_name_request_complete(const RawAddress* p_bd_addr,

    p_dev_rec->link_key_not_sent = false;
    btm_send_link_key_notif(p_dev_rec);

    /* If its not us who perform authentication, we should tell stackserver */
    /* that some authentication has been completed                          */
    /* This is required when different entities receive link notification and
     * auth complete */
    if (!(p_dev_rec->security_required & BTM_SEC_OUT_AUTHENTICATE)) {
      if (btm_cb.api.p_auth_complete_callback)
        (*btm_cb.api.p_auth_complete_callback)(
            p_dev_rec->bd_addr, p_dev_rec->dev_class, p_dev_rec->sec_bd_name,
            HCI_SUCCESS);
    }
  }

  /* If this is a bonding procedure can disconnect the link now */
@@ -3759,11 +3748,6 @@ void btm_sec_connected(const RawAddress& bda, uint16_t handle, uint8_t status,
    else
      res = false;

    if (btm_cb.api.p_auth_complete_callback)
      (*btm_cb.api.p_auth_complete_callback)(
          p_dev_rec->bd_addr, p_dev_rec->dev_class, p_dev_rec->sec_bd_name,
          HCI_SUCCESS);

    btm_sec_change_pairing_state(BTM_PAIR_STATE_IDLE);

    if (res) {
@@ -4079,19 +4063,6 @@ void btm_sec_link_key_notification(const RawAddress& p_bda,
    return;
  }

  /* If its not us who perform authentication, we should tell stackserver */
  /* that some authentication has been completed                          */
  /* This is required when different entities receive link notification and auth
   * complete */
  if (!(p_dev_rec->security_required & BTM_SEC_OUT_AUTHENTICATE)
      /* for derived key, always send authentication callback for BR channel */
      || ltk_derived_lk) {
    if (btm_cb.api.p_auth_complete_callback)
      (*btm_cb.api.p_auth_complete_callback)(
          p_dev_rec->bd_addr, p_dev_rec->dev_class, p_dev_rec->sec_bd_name,
          HCI_SUCCESS);
  }

/* We will save link key only if the user authorized it - BTE report link key in
 * all cases */
#ifdef BRCM_NONE_BTE