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

Commit 7324359a authored by Hansong Zhang's avatar Hansong Zhang
Browse files

Minor clean up in l2c_api

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I4e7f7d610dba175c9d0abc3d23038891acf31242
parent e728bbda
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -680,8 +680,6 @@ extern bool L2CA_RegisterFixedChannel(uint16_t fixed_cid,
 ******************************************************************************/
 ******************************************************************************/
extern bool L2CA_ConnectFixedChnl(uint16_t fixed_cid,
extern bool L2CA_ConnectFixedChnl(uint16_t fixed_cid,
                                  const RawAddress& bd_addr);
                                  const RawAddress& bd_addr);
extern bool L2CA_ConnectFixedChnl(uint16_t fixed_cid, const RawAddress& bd_addr,
                                  uint8_t initiating_phys);


/*******************************************************************************
/*******************************************************************************
 *
 *
+3 −11
Original line number Original line Diff line number Diff line
@@ -947,7 +947,7 @@ bool L2CA_SetTxPriority(uint16_t cid, tL2CAP_CHNL_PRIORITY priority) {
 * NOTE             This flush timeout applies to all logical channels active on
 * NOTE             This flush timeout applies to all logical channels active on
 *                  the ACL link.
 *                  the ACL link.
 ******************************************************************************/
 ******************************************************************************/
inline uint32_t ConvertMillisecondsToBasebandSlots(uint32_t milliseconds) {
constexpr uint32_t ConvertMillisecondsToBasebandSlots(uint32_t milliseconds) {
  return ((milliseconds * 8) + 3) / 5;
  return ((milliseconds * 8) + 3) / 5;
}
}


@@ -1098,16 +1098,8 @@ bool L2CA_ConnectFixedChnl(uint16_t fixed_cid, const RawAddress& rem_bda) {
  if (bluetooth::shim::is_gd_shim_enabled()) {
  if (bluetooth::shim::is_gd_shim_enabled()) {
    return bluetooth::shim::L2CA_ConnectFixedChnl(fixed_cid, rem_bda);
    return bluetooth::shim::L2CA_ConnectFixedChnl(fixed_cid, rem_bda);
  }
  }
  uint8_t phy = controller_get_interface()->get_le_all_initiating_phys();
  uint8_t initiating_phys =
  return L2CA_ConnectFixedChnl(fixed_cid, rem_bda, phy);
      controller_get_interface()->get_le_all_initiating_phys();
}

bool L2CA_ConnectFixedChnl(uint16_t fixed_cid, const RawAddress& rem_bda,
                           uint8_t initiating_phys) {
  if (bluetooth::shim::is_gd_shim_enabled()) {
    return bluetooth::shim::L2CA_ConnectFixedChnl(fixed_cid, rem_bda,
                                                  initiating_phys);
  }


  tL2C_LCB* p_lcb;
  tL2C_LCB* p_lcb;
  tBT_TRANSPORT transport = BT_TRANSPORT_BR_EDR;
  tBT_TRANSPORT transport = BT_TRANSPORT_BR_EDR;