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

Commit 753104d5 authored by Hansong Zhang's avatar Hansong Zhang
Browse files

We can't bypass FCS

Note that in the case where the peer doesn't support FCS, we still send
FCS. This is an existing behavior and we keep it the same for now.

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I0803d07122990b5266a1669f3d7e1f3056d9a114
parent 1dbc28e3
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -1971,8 +1971,6 @@ uint8_t l2c_fcr_process_peer_cfg_req(tL2C_CCB* p_ccb, tL2CAP_CFG_INFO* p_cfg) {
      if (p_cfg->fcs_present) {
        p_ccb->peer_cfg.fcs = p_cfg->fcs;
        p_ccb->peer_cfg_bits |= L2CAP_CH_CFG_MASK_FCS;
        if (p_cfg->fcs == L2CAP_CFG_FCS_BYPASS)
          p_ccb->bypass_fcs |= L2CAP_CFG_FCS_PEER;
      }

      max_retrans_size = p_ccb->ertm_info.fcr_tx_buf_size - sizeof(BT_HDR) -
+0 −5
Original line number Diff line number Diff line
@@ -282,11 +282,6 @@ typedef struct t_l2c_ccb {
  bool out_cfg_fcr_present; /* true if cfg response shoulkd include fcr options
                               */

#define L2CAP_CFG_FCS_OUR 0x01  /* Our desired config FCS option */
#define L2CAP_CFG_FCS_PEER 0x02 /* Peer's desired config FCS option */
#define L2CAP_BYPASS_FCS (L2CAP_CFG_FCS_OUR | L2CAP_CFG_FCS_PEER)
  uint8_t bypass_fcs;

  bool is_flushable; /* true if channel is flushable */

  uint16_t fixed_chnl_idle_tout; /* Idle timeout to use for the fixed channel */
+0 −1
Original line number Diff line number Diff line
@@ -1358,7 +1358,6 @@ tL2C_CCB* l2cu_allocate_ccb(tL2C_LCB* p_lcb, uint16_t cid) {
  p_ccb->our_cfg.qos.delay_variation = p_ccb->peer_cfg.qos.delay_variation =
      L2CAP_DEFAULT_DELAY;

  p_ccb->bypass_fcs = 0;
  memset(&p_ccb->ertm_info, 0, sizeof(tL2CAP_ERTM_INFO));
  p_ccb->peer_cfg_already_rejected = false;
  p_ccb->fcr_cfg_tries = L2CAP_MAX_FCR_CFG_TRIES;