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

Commit 1244f26c authored by Hansong Zhang's avatar Hansong Zhang Committed by Automerger Merge Worker
Browse files

Remove unused code in BNEP am: 0d449d12

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1438412

Change-Id: Ied8c5cccc4da6f559095f9f37ae127d9445d7a53
parents f760b267 0d449d12
Loading
Loading
Loading
Loading
+0 −48
Original line number Diff line number Diff line
@@ -644,51 +644,3 @@ uint8_t BNEP_SetTraceLevel(uint8_t new_level) {
  return (bnep_cb.trace_level);
}
/*******************************************************************************
 *
 * Function         BNEP_GetStatus
 *
 * Description      This function gets the status information for BNEP
 *                  connection
 *
 * Returns          BNEP_SUCCESS            - if the status is available
 *                  BNEP_NO_RESOURCES       - if no structure is passed for
 *                                            output
 *                  BNEP_WRONG_HANDLE       - if the handle is invalid
 *                  BNEP_WRONG_STATE        - if not in connected state
 *
 ******************************************************************************/
tBNEP_RESULT BNEP_GetStatus(uint16_t handle, tBNEP_STATUS* p_status) {
#if (BNEP_SUPPORTS_STATUS_API == TRUE)
  tBNEP_CONN* p_bcb;

  if (!p_status) return BNEP_NO_RESOURCES;

  if ((!handle) || (handle > BNEP_MAX_CONNECTIONS)) return (BNEP_WRONG_HANDLE);

  p_bcb = &(bnep_cb.bcb[handle - 1]);

  memset(p_status, 0, sizeof(tBNEP_STATUS));
  if ((p_bcb->con_state != BNEP_STATE_CONNECTED) &&
      (!(p_bcb->con_flags & BNEP_FLAGS_CONN_COMPLETED)))
    return BNEP_WRONG_STATE;

  /* Read the status parameters from the connection control block */
  p_status->con_status = BNEP_STATUS_CONNECTED;
  p_status->l2cap_cid = p_bcb->l2cap_cid;
  p_status->rem_mtu_size = p_bcb->rem_mtu_size;
  p_status->xmit_q_depth = fixed_queue_length(p_bcb->xmit_q);
  p_status->sent_num_filters = p_bcb->sent_num_filters;
  p_status->sent_mcast_filters = p_bcb->sent_mcast_filters;
  p_status->rcvd_num_filters = p_bcb->rcvd_num_filters;
  p_status->rcvd_mcast_filters = p_bcb->rcvd_mcast_filters;

  p_status->rem_bda = p_bcb->rem_bda;
  p_status->src_uuid = p_bcb->src_uuid;
  p_status->dst_uuid = p_bcb->dst_uuid;

  return BNEP_SUCCESS;
#else
  return (BNEP_IGNORE_CMD);
#endif
}
+0 −1
Original line number Diff line number Diff line
@@ -107,7 +107,6 @@ typedef struct {

  uint16_t l2cap_cid;
  RawAddress rem_bda;
  uint16_t rem_mtu_size;
  alarm_t* conn_timer;
  fixed_queue_t* xmit_q;

+0 −1
Original line number Diff line number Diff line
@@ -225,7 +225,6 @@ static void bnep_config_ind(uint16_t l2cap_cid, tL2CAP_CFG_INFO* p_cfg) {
    p_cfg->mtu = BNEP_MTU_SIZE;
    p_cfg->result = result = L2CAP_CFG_UNACCEPTABLE_PARAMS;
  } else {
    p_bcb->rem_mtu_size = BNEP_MTU_SIZE;

    /* For now, always accept configuration from the other side */
    p_cfg->flush_to_present = false;
+0 −36
Original line number Diff line number Diff line
@@ -176,26 +176,6 @@ typedef struct {

} tBNEP_REGISTER;

/* This is the structure used by profile to get the status of BNEP */
typedef struct {
#define BNEP_STATUS_FAILE 0
#define BNEP_STATUS_CONNECTED 1
  uint8_t con_status;

  uint16_t l2cap_cid;
  RawAddress rem_bda;
  uint16_t rem_mtu_size;
  uint16_t xmit_q_depth;

  uint16_t sent_num_filters;
  uint16_t sent_mcast_filters;
  uint16_t rcvd_num_filters;
  uint16_t rcvd_mcast_filters;
  bluetooth::Uuid src_uuid;
  bluetooth::Uuid dst_uuid;

} tBNEP_STATUS;

/*****************************************************************************
 *  External Function Declarations
 ****************************************************************************/
@@ -416,20 +396,4 @@ extern uint8_t BNEP_SetTraceLevel(uint8_t new_level);
 ******************************************************************************/
extern void BNEP_Init(void);

/*******************************************************************************
 *
 * Function         BNEP_GetStatus
 *
 * Description      This function gets the status information for BNEP
 *                  connection
 *
 * Returns          BNEP_SUCCESS            - if the status is available
 *                  BNEP_NO_RESOURCES       - if no structure is passed for
 *                                            output
 *                  BNEP_WRONG_HANDLE       - if the handle is invalid
 *                  BNEP_WRONG_STATE        - if not in connected state
 *
 ******************************************************************************/
extern tBNEP_RESULT BNEP_GetStatus(uint16_t handle, tBNEP_STATUS* p_status);

#endif