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

Commit cad2bc18 authored by Yun-hao Chung's avatar Yun-hao Chung Committed by Automerger Merge Worker
Browse files

Merge "Floss: Disallow retring non-basic mode" am: cd467bb6

parents 4431d9d5 cd467bb6
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -1804,12 +1804,13 @@ uint8_t l2c_fcr_process_peer_cfg_req(tL2C_CCB* p_ccb, tL2CAP_CFG_INFO* p_cfg) {
  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.
     ** If we want ERTM and they want non-basic mode, retry our mode.
     ** Note: If we have already determined they support our mode previously
     **       from their EXF mask.
     */
    if ((((1 << p_cfg->fcr.mode) & L2CAP_FCR_CHAN_OPT_ALL_MASK) == 0) ||
        (p_ccb->p_rcb->ertm_info.preferred_mode == L2CAP_FCR_ERTM_MODE)) {
        ((p_ccb->p_rcb->ertm_info.preferred_mode == L2CAP_FCR_ERTM_MODE) &&
         (p_cfg->fcr.mode != L2CAP_FCR_BASIC_MODE))) {
      p_cfg->fcr.mode = p_ccb->our_cfg.fcr.mode;
      p_cfg->fcr.tx_win_sz = p_ccb->our_cfg.fcr.tx_win_sz;
      p_cfg->fcr.max_transmit = p_ccb->our_cfg.fcr.max_transmit;