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

Commit b5c07eeb authored by Hansong Zhang's avatar Hansong Zhang
Browse files

L2CAP: peer_cfg_bits is unused

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: Icec4e536f28a649779f747d34a7d76295f5ef10f
parent 49510436
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -159,15 +159,6 @@ struct tL2CAP_LE_CFG_INFO {
  uint16_t credits = L2CAP_LE_CREDIT_DEFAULT;
};

/* L2CAP channel configured field bitmap */
#define L2CAP_CH_CFG_MASK_MTU 0x0001
#define L2CAP_CH_CFG_MASK_QOS 0x0002
#define L2CAP_CH_CFG_MASK_FLUSH_TO 0x0004
#define L2CAP_CH_CFG_MASK_FCR 0x0008
#define L2CAP_CH_CFG_MASK_FCS 0x0010

typedef uint16_t tL2CAP_CH_CFG_BITS;

/*********************************
 *  Callback Functions Prototypes
 *********************************/
+0 −2
Original line number Diff line number Diff line
@@ -1970,7 +1970,6 @@ uint8_t l2c_fcr_process_peer_cfg_req(tL2C_CCB* p_ccb, tL2CAP_CFG_INFO* p_cfg) {
      /* Peer desires to bypass FCS check, and streaming or ERTM mode */
      if (p_cfg->fcs_present) {
        p_ccb->peer_cfg.fcs = p_cfg->fcs;
        p_ccb->peer_cfg_bits |= L2CAP_CH_CFG_MASK_FCS;
      }

      max_retrans_size = p_ccb->ertm_info.fcr_tx_buf_size - sizeof(BT_HDR) -
@@ -2001,7 +2000,6 @@ uint8_t l2c_fcr_process_peer_cfg_req(tL2C_CCB* p_ccb, tL2CAP_CFG_INFO* p_cfg) {
    /* Everything ok, so save the peer's adjusted fcr options */
    p_ccb->peer_cfg.fcr = p_cfg->fcr;

    if (p_cfg->fcr_present) p_ccb->peer_cfg_bits |= L2CAP_CH_CFG_MASK_FCR;
  } else if (fcr_ok == L2CAP_PEER_CFG_UNACCEPTABLE) {
    /* Allow peer only one retry for mode */
    if (p_ccb->peer_cfg_already_rejected)
+0 −1
Original line number Diff line number Diff line
@@ -262,7 +262,6 @@ typedef struct t_l2c_ccb {
  uint8_t flags;

  tL2CAP_CFG_INFO our_cfg;          /* Our saved configuration options */
  tL2CAP_CH_CFG_BITS peer_cfg_bits; /* Store what peer wants to configure */
  tL2CAP_CFG_INFO peer_cfg;         /* Peer's saved configuration options */

  fixed_queue_t* xmit_hold_q; /* Transmit data hold queue */
+0 −6
Original line number Diff line number Diff line
@@ -1335,9 +1335,6 @@ tL2C_CCB* l2cu_allocate_ccb(tL2C_LCB* p_lcb, uint16_t cid) {

  if (p_lcb) l2cu_enqueue_ccb(p_ccb);

  /* clear what peer wants to configure */
  p_ccb->peer_cfg_bits = 0;

  /* Put in default values for configuration */
  memset(&p_ccb->our_cfg, 0, sizeof(tL2CAP_CFG_INFO));
  memset(&p_ccb->peer_cfg, 0, sizeof(tL2CAP_CFG_INFO));
@@ -1770,7 +1767,6 @@ uint8_t l2cu_process_peer_cfg_req(tL2C_CCB* p_ccb, tL2CAP_CFG_INFO* p_cfg) {
      /* Save the accepted value in case of renegotiation */
      p_ccb->peer_cfg.mtu = p_cfg->mtu;
      p_ccb->peer_cfg.mtu_present = true;
      p_ccb->peer_cfg_bits |= L2CAP_CH_CFG_MASK_MTU;
    } else /* Illegal MTU value */
    {
      p_cfg->mtu = L2CAP_MIN_MTU;
@@ -1792,7 +1788,6 @@ uint8_t l2cu_process_peer_cfg_req(tL2C_CCB* p_ccb, tL2CAP_CFG_INFO* p_cfg) {
    {
      p_ccb->peer_cfg.flush_to_present = true;
      p_ccb->peer_cfg.flush_to = p_cfg->flush_to;
      p_ccb->peer_cfg_bits |= L2CAP_CH_CFG_MASK_FLUSH_TO;
    }
  }
  /* Reload flush_to from a previously accepted config request */
@@ -1809,7 +1804,6 @@ uint8_t l2cu_process_peer_cfg_req(tL2C_CCB* p_ccb, tL2CAP_CFG_INFO* p_cfg) {
    if (p_cfg->qos.service_type <= SVC_TYPE_GUARANTEED) {
      p_ccb->peer_cfg.qos = p_cfg->qos;
      p_ccb->peer_cfg.qos_present = true;
      p_ccb->peer_cfg_bits |= L2CAP_CH_CFG_MASK_QOS;
    } else /* Illegal service type value */
    {
      p_cfg->qos.service_type = SVC_TYPE_BEST_EFFORT;