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

Commit ef7b707e authored by howardchung's avatar howardchung
Browse files

Floss: Allow falling back to basic L2CAP mode

Prefer mode is what we first propose not what we support.

Bug: 270529845
Test: run L2CAP/CMC/BV-03-C and L2CAP/CMC/BV-07-C
Change-Id: I4df3c2a5455ffddb95cb890483cfe90557a10710
parent 26b705cc
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -1800,15 +1800,8 @@ uint8_t l2c_fcr_process_peer_cfg_req(tL2C_CCB* p_ccb, tL2CAP_CFG_INFO* p_cfg) {
      p_cfg->fcr_present, p_cfg->fcr.mode, p_ccb->our_cfg.fcr.mode,
      p_ccb->p_rcb->ertm_info.preferred_mode);

  /* If Peer wants basic, we are done (accept it or disconnect) */
  if (p_cfg->fcr.mode == L2CAP_FCR_BASIC_MODE) {
    /* If we do not allow basic, disconnect */
    if (p_ccb->p_rcb->ertm_info.preferred_mode != L2CAP_FCR_BASIC_MODE)
      fcr_ok = L2CAP_PEER_CFG_DISCONNECT;
  }

  /* Need to negotiate if our modes are not the same */
  else if (p_cfg->fcr.mode != p_ccb->p_rcb->ertm_info.preferred_mode) {
  if (p_cfg->fcr.mode != p_ccb->p_rcb->ertm_info.preferred_mode) {
    /* If peer wants a mode that we don't support then retry our mode (ex.
    *rtx/flc), OR
    ** If we want ERTM and they wanted streaming retry our mode.