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

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

Merge "Use proper types stack::l2cap::tL2CAP_DW_RESULT" into main

parents 155f306d d782eb68
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -483,8 +483,8 @@ void avdt_ad_tc_data_ind(AvdtpTransportChannel* p_tbl, BT_HDR* p_buf) {
 *                  AVDT_AD_FAILED, if error
 *
 ******************************************************************************/
uint8_t avdt_ad_write_req(uint8_t type, AvdtpCcb* p_ccb, AvdtpScb* p_scb,
                          BT_HDR* p_buf) {
tL2CAP_DW_RESULT avdt_ad_write_req(uint8_t type, AvdtpCcb* p_ccb,
                                   AvdtpScb* p_scb, BT_HDR* p_buf) {
  uint8_t tcid;

  /* get tcid from type, scb */
+2 −2
Original line number Diff line number Diff line
@@ -929,8 +929,8 @@ void avdt_ad_tc_cong_ind(AvdtpTransportChannel* p_tbl, bool is_congested);
void avdt_ad_tc_data_ind(AvdtpTransportChannel* p_tbl, BT_HDR* p_buf);
AvdtpTransportChannel* avdt_ad_tc_tbl_by_type(uint8_t type, AvdtpCcb* p_ccb,
                                              AvdtpScb* p_scb);
uint8_t avdt_ad_write_req(uint8_t type, AvdtpCcb* p_ccb, AvdtpScb* p_scb,
                          BT_HDR* p_buf);
tL2CAP_DW_RESULT avdt_ad_write_req(uint8_t type, AvdtpCcb* p_ccb,
                                   AvdtpScb* p_scb, BT_HDR* p_buf);
void avdt_ad_open_req(uint8_t type, AvdtpCcb* p_ccb, AvdtpScb* p_scb,
                      uint8_t role);
void avdt_ad_close_req(uint8_t type, AvdtpCcb* p_ccb, AvdtpScb* p_scb);
+3 −3
Original line number Diff line number Diff line
@@ -87,11 +87,11 @@ class FakeL2cap {
        [](uint16_t psm, const RawAddress& p_bd_addr, uint16_t sec_level) {
          return L2CA_ConnectReq(psm, p_bd_addr);
        };
    test::mock::stack_l2cap_api::L2CA_DataWrite.body = [](uint16_t cid,
                                                          BT_HDR* p_data) {
    test::mock::stack_l2cap_api::L2CA_DataWrite.body =
        [](uint16_t cid, BT_HDR* p_data) -> tL2CAP_DW_RESULT {
      auto len = p_data->len;
      osi_free(p_data);
      return (uint8_t)len;
      return L2CAP_DW_SUCCESS;
    };
    test::mock::stack_l2cap_api::L2CA_DisconnectReq.body = [](uint16_t lcid) {
      return true;
+1 −1
Original line number Diff line number Diff line
@@ -434,7 +434,7 @@ static bool gap_try_write_queued_data(tGAP_CCB* p_ccb) {
  /* Send the buffer through L2CAP */
  BT_HDR* p_buf;
  while ((p_buf = (BT_HDR*)fixed_queue_try_dequeue(p_ccb->tx_queue)) != NULL) {
    uint8_t status;
    tL2CAP_DW_RESULT status;
    if (p_ccb->transport == BT_TRANSPORT_LE) {
      status = L2CA_LECocDataWrite(p_ccb->connection_id, p_buf);
    } else {
+2 −2
Original line number Diff line number Diff line
@@ -373,14 +373,14 @@ static BT_HDR* attp_build_value_cmd(uint16_t payload_size, uint8_t op_code,
 ******************************************************************************/
tGATT_STATUS attp_send_msg_to_l2cap(tGATT_TCB& tcb, uint16_t lcid,
                                    BT_HDR* p_toL2CAP) {
  uint16_t l2cap_ret;
  tL2CAP_DW_RESULT l2cap_ret;

  if (lcid == L2CAP_ATT_CID) {
    log::debug("Sending ATT message on att fixed channel");
    l2cap_ret = L2CA_SendFixedChnlData(lcid, tcb.peer_bda, p_toL2CAP);
  } else {
    log::debug("Sending ATT message on lcid:{}", lcid);
    l2cap_ret = (uint16_t)L2CA_DataWrite(lcid, p_toL2CAP);
    l2cap_ret = L2CA_DataWrite(lcid, p_toL2CAP);
  }

  if (l2cap_ret == L2CAP_DW_FAILED) {
Loading