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

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

stack::l2cap::tL2C_CONN_INFO Rename status => hci_status

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

Change-Id: I6bf09610da939973bcb5415bb4d30b442bd98135
parent 6920ebe9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -698,7 +698,7 @@ bool L2CA_ConnectCreditBasedRsp(const RawAddress& p_bd_addr, uint8_t id,

  tL2C_CONN_INFO conn_info = {
          .bd_addr = p_bd_addr,
          .status{},
          .hci_status{},
          .psm{},
          .l2cap_result = result,
          .l2cap_status{},
+1 −1
Original line number Diff line number Diff line
@@ -273,7 +273,7 @@ void l2cble_process_sig_cmd(tL2C_LCB* p_lcb, uint8_t* p, uint16_t pkt_len) {
      if (reason == L2CAP_CMD_REJ_NOT_UNDERSTOOD && p_lcb->pending_ecoc_conn_cnt > 0) {
        tL2C_CONN_INFO con_info = {
                .bd_addr{},
                .status{},
                .hci_status{},
                .psm{},
                .l2cap_result = L2CAP_LE_RESULT_NO_PSM,
                .l2cap_status{},
+2 −2
Original line number Diff line number Diff line
@@ -229,7 +229,7 @@ static void l2c_csm_closed(tL2C_CCB* p_ccb, tL2CEVT event, void* p_data) {
      break;

    case L2CEVT_LP_CONNECT_CFM_NEG: /* Link failed          */
      if (p_ci->status == HCI_ERR_CONNECTION_EXISTS) {
      if (p_ci->hci_status == HCI_ERR_CONNECTION_EXISTS) {
        btm_acl_notif_conn_collision(p_ccb->p_lcb->remote_bd_addr);
      } else {
        l2cu_release_ccb(p_ccb);
@@ -532,7 +532,7 @@ static void l2c_csm_term_w4_sec_comp(tL2C_CCB* p_ccb, tL2CEVT event, void* p_dat
      break;

    case L2CEVT_SEC_COMP_NEG:
      if (((tL2C_CONN_INFO*)p_data)->status == static_cast<tHCI_STATUS>(BTM_DELAY_CHECK)) {
      if (((tL2C_CONN_INFO*)p_data)->hci_status == static_cast<tHCI_STATUS>(BTM_DELAY_CHECK)) {
        /* start a timer - encryption change not received before L2CAP connect
         * req */
        alarm_set_on_mloop(p_ccb->l2c_ccb_timer, L2CAP_DELAY_CHECK_SM4_TIMEOUT_MS,
+1 −1
Original line number Diff line number Diff line
@@ -640,7 +640,7 @@ struct tL2C_CB {
 */
struct tL2C_CONN_INFO {
  RawAddress bd_addr;          /* Remote BD address */
  uint8_t status;              /* Connection status */
  tHCI_STATUS hci_status;      /* Connection status */
  uint16_t psm;                /* PSM of the connection */
  uint16_t l2cap_result;       /* L2CAP result */
  uint16_t l2cap_status;       /* L2CAP status */
+6 −7
Original line number Diff line number Diff line
@@ -32,7 +32,6 @@

#include "device/include/device_iot_config.h"
#include "internal_include/bt_target.h"
#include "os/log.h"
#include "osi/include/allocator.h"
#include "stack/btm/btm_int_types.h"
#include "stack/include/acl_api.h"
@@ -68,7 +67,7 @@ void l2c_link_hci_conn_comp(tHCI_STATUS status, uint16_t handle, const RawAddres
  /* Save the parameters */
  tL2C_CONN_INFO ci = {
          .bd_addr = p_bda,
          .status = status,
          .hci_status = status,
          .psm{},
          .l2cap_result{},
          .l2cap_status{},
@@ -110,7 +109,7 @@ void l2c_link_hci_conn_comp(tHCI_STATUS status, uint16_t handle, const RawAddres
  /* Save the handle */
  l2cu_set_lcb_handle(*p_lcb, handle);

  if (ci.status == HCI_SUCCESS) {
  if (ci.hci_status == HCI_SUCCESS) {
    /* Connected OK. Change state to connected */
    p_lcb->link_state = LST_CONNECTED;

@@ -138,7 +137,7 @@ void l2c_link_hci_conn_comp(tHCI_STATUS status, uint16_t handle, const RawAddres
  }
  /* Max number of acl connections.                          */
  /* If there's an lcb disconnecting set this one to holding */
  else if ((ci.status == HCI_ERR_MAX_NUM_OF_CONNECTIONS) && l2cu_lcb_disconnecting()) {
  else if ((ci.hci_status == HCI_ERR_MAX_NUM_OF_CONNECTIONS) && l2cu_lcb_disconnecting()) {
    log::warn("Delaying connection as reached max number of links:{}",
              HCI_ERR_MAX_NUM_OF_CONNECTIONS);
    p_lcb->link_state = LST_CONNECT_HOLDING;
@@ -165,7 +164,7 @@ void l2c_link_hci_conn_comp(tHCI_STATUS status, uint16_t handle, const RawAddres
      l2cu_release_lcb(p_lcb);
    } else /* there are any CCBs remaining */
    {
      if (ci.status == HCI_ERR_CONNECTION_EXISTS) {
      if (ci.hci_status == HCI_ERR_CONNECTION_EXISTS) {
        /* we are in collision situation, wait for connecttion request from
         * controller */
        p_lcb->link_state = LST_CONNECTING;
@@ -202,7 +201,7 @@ void l2c_link_sec_comp(RawAddress p_bda, tBT_TRANSPORT transport, void* p_ref_da
  /* Save the parameters */
  tL2C_CONN_INFO ci = {
          .bd_addr = p_bda,
          .status = static_cast<tHCI_STATUS>(btm_status),
          .hci_status = static_cast<tHCI_STATUS>(btm_status),
          .psm{},
          .l2cap_result{},
          .l2cap_status{},
@@ -544,7 +543,7 @@ void l2c_info_resp_timer_timeout(void* data) {
      if (p_lcb->ccb_queue.p_first_ccb) {
        tL2C_CONN_INFO ci = {
                .bd_addr = p_lcb->remote_bd_addr,
                .status = HCI_SUCCESS,
                .hci_status = HCI_SUCCESS,
                .psm{},
                .l2cap_result{},
                .l2cap_status{},
Loading