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

Commit e04d45bc authored by Chris Manton's avatar Chris Manton
Browse files

Remove stack::hcic::btsnd_hcic_rmt_name_req

Skip unneeded layer of indirection

Bug: 332984058
Test: m .
Flag: EXEMPT, Mechanical Refactor
Change-Id: Ibd16612f65bba061f935ccd5f27361624382bac8
parent 6b0af6b4
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -254,7 +254,7 @@ static const uint8_t* btm_eir_get_uuid_list(const uint8_t* p_eir,
                                            uint8_t* p_uuid_list_type);

void SendRemoteNameRequest(const RawAddress& raw_address) {
  btsnd_hcic_rmt_name_req(raw_address, HCI_PAGE_SCAN_REP_MODE_R1,
  bluetooth::shim::ACL_RemoteNameRequest(raw_address, HCI_PAGE_SCAN_REP_MODE_R1,
                                         HCI_MANDATARY_PAGE_SCAN_MODE, 0);
}
static void btm_process_cancel_complete(tHCI_STATUS status, uint8_t mode);
@@ -1902,8 +1902,7 @@ tBTM_STATUS btm_initiate_rem_name(const RawAddress& remote_bda, uint8_t origin,
            clock_offset = clock_offset_in_cfg;
          }
        }

        btsnd_hcic_rmt_name_req(
        bluetooth::shim::ACL_RemoteNameRequest(
            remote_bda, p_cur->results.page_scan_rep_mode,
            p_cur->results.page_scan_mode, clock_offset);
      } else {
@@ -1912,9 +1911,9 @@ tBTM_STATUS btm_initiate_rem_name(const RawAddress& remote_bda, uint8_t origin,
        if (btif_get_device_clockoffset(remote_bda, &clock_offset_in_cfg)) {
          clock_offset = clock_offset_in_cfg;
        }
        /* Otherwise use defaults and mark the clock offset as invalid */
        btsnd_hcic_rmt_name_req(remote_bda, HCI_PAGE_SCAN_REP_MODE_R1,
                                HCI_MANDATARY_PAGE_SCAN_MODE, clock_offset);
        bluetooth::shim::ACL_RemoteNameRequest(
            remote_bda, HCI_PAGE_SCAN_REP_MODE_R1, HCI_MANDATARY_PAGE_SCAN_MODE,
            clock_offset);
      }

      btm_cb.btm_inq_vars.remname_active = true;
+0 −7
Original line number Diff line number Diff line
@@ -654,13 +654,6 @@ void btsnd_hcic_set_conn_encrypt(uint16_t handle, bool enable) {
  btu_hcif_send_cmd(LOCAL_BR_EDR_CONTROLLER_ID, p);
}

void btsnd_hcic_rmt_name_req(const RawAddress& bd_addr,
                             uint8_t page_scan_rep_mode, uint8_t page_scan_mode,
                             uint16_t clock_offset) {
  bluetooth::shim::ACL_RemoteNameRequest(bd_addr, page_scan_rep_mode,
                                         page_scan_mode, clock_offset);
}

void btsnd_hcic_rmt_ext_features(uint16_t handle, uint8_t page_num) {
  BT_HDR* p = (BT_HDR*)osi_malloc(HCI_CMD_BUF_SIZE);
  uint8_t* pp = (uint8_t*)(p + 1);
+0 −4
Original line number Diff line number Diff line
@@ -89,10 +89,6 @@ void btsnd_hcic_auth_request(uint16_t handle); /* Authentication Request */
/* Set Connection Encryption */
void btsnd_hcic_set_conn_encrypt(uint16_t handle, bool enable);

/* Remote Name Request */
void btsnd_hcic_rmt_name_req(const RawAddress& bd_addr,
                             uint8_t page_scan_rep_mode, uint8_t page_scan_mode,
                             uint16_t clock_offset);
/* Remote Extended Features */
void btsnd_hcic_rmt_ext_features(uint16_t handle, uint8_t page_num);

+6 −0
Original line number Diff line number Diff line
@@ -122,3 +122,9 @@ void bluetooth::shim::ACL_CancelRemoteNameRequest(
    const RawAddress& /* addr */) {
  inc_func_call_count(__func__);
}
void bluetooth::shim::ACL_RemoteNameRequest(const RawAddress& /* addr */,
                                            uint8_t /* page_scan_rep_mode */,
                                            uint8_t /* page_scan_mode */,
                                            uint16_t /* clock_offset */) {
  inc_func_call_count(__func__);
}
+0 −8
Original line number Diff line number Diff line
@@ -68,7 +68,6 @@ struct btsnd_hcic_reject_esco_conn btsnd_hcic_reject_esco_conn;
struct btsnd_hcic_rem_oob_neg_reply btsnd_hcic_rem_oob_neg_reply;
struct btsnd_hcic_rem_oob_reply btsnd_hcic_rem_oob_reply;
struct btsnd_hcic_rmt_ext_features btsnd_hcic_rmt_ext_features;
struct btsnd_hcic_rmt_name_req btsnd_hcic_rmt_name_req;
struct btsnd_hcic_rmt_ver_req btsnd_hcic_rmt_ver_req;
struct btsnd_hcic_set_conn_encrypt btsnd_hcic_set_conn_encrypt;
struct btsnd_hcic_set_event_filter btsnd_hcic_set_event_filter;
@@ -255,13 +254,6 @@ void btsnd_hcic_rmt_ext_features(uint16_t handle, uint8_t page_num) {
  inc_func_call_count(__func__);
  test::mock::stack_hcic_hcicmds::btsnd_hcic_rmt_ext_features(handle, page_num);
}
void btsnd_hcic_rmt_name_req(const RawAddress& bd_addr,
                             uint8_t page_scan_rep_mode, uint8_t page_scan_mode,
                             uint16_t clock_offset) {
  inc_func_call_count(__func__);
  test::mock::stack_hcic_hcicmds::btsnd_hcic_rmt_name_req(
      bd_addr, page_scan_rep_mode, page_scan_mode, clock_offset);
}
void btsnd_hcic_rmt_ver_req(uint16_t handle) {
  inc_func_call_count(__func__);
  test::mock::stack_hcic_hcicmds::btsnd_hcic_rmt_ver_req(handle);
Loading