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

Commit 22ac9489 authored by Chris Manton's avatar Chris Manton
Browse files

stack::rnr::btm_initiate_rem_name [4/5] Extract page_scan_mode

Bug: 354452689
Test: m .
Flag: EXEMPT, Mechanical Refactor

Change-Id: Id5594a1ac56fd0a5a2979bfb8f14dcf0c51d6809
parent 256b57fa
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -1862,6 +1862,7 @@ tBTM_STATUS btm_initiate_rem_name(const RawAddress& remote_bda, uint64_t timeout

  uint16_t clock_offset = get_clock_offset_from_storage(remote_bda);
  uint8_t page_scan_rep_mode = HCI_PAGE_SCAN_REP_MODE_R1;
  uint8_t page_scan_mode = HCI_MANDATARY_PAGE_SCAN_MODE;

  /* If the database entry exists for the device, use its clock offset */
  tINQ_DB_ENT* p_i = btm_inq_db_find(remote_bda);
@@ -1880,11 +1881,12 @@ tBTM_STATUS btm_initiate_rem_name(const RawAddress& remote_bda, uint64_t timeout
              page_scan_rep_mode, remote_bda);
      page_scan_rep_mode = HCI_PAGE_SCAN_REP_MODE_R1;
    }
    bluetooth::shim::ACL_RemoteNameRequest(remote_bda, page_scan_rep_mode,
                                           p_cur->results.page_scan_mode, clock_offset);
    page_scan_mode = p_cur->results.page_scan_mode;
    bluetooth::shim::ACL_RemoteNameRequest(remote_bda, page_scan_rep_mode, page_scan_mode,
                                           clock_offset);
  } else {
    bluetooth::shim::ACL_RemoteNameRequest(remote_bda, page_scan_rep_mode,
                                           HCI_MANDATARY_PAGE_SCAN_MODE, clock_offset);
    bluetooth::shim::ACL_RemoteNameRequest(remote_bda, page_scan_rep_mode, page_scan_mode,
                                           clock_offset);
  }

  btm_cb.rnr.p_remname_cmpl_cb = p_cb;