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

Commit c3de238a authored by howardchung's avatar howardchung Committed by Yun-hao Chung
Browse files

Floss: Fix reconfigure L2CAP mode in receiving failure response

In the original code, we check if basic mode is supported by checking
preferred_mode. This is wrong and unnecessary because preferred_mode
only stores one mode and the basic mode should always be supported.

This CL removes the checking entirely.

Bug: 270529845
Test: run L2CAP/CMC/BV-03-C and L2CAP/CMC/BV-07-C
Change-Id: I369bcf9e63cb8ffe52eceeb7a18c1cfa17e8a052
parent 1f3cdb14
Loading
Loading
Loading
Loading
+5 −6
Original line number Original line Diff line number Diff line
@@ -1727,12 +1727,11 @@ bool l2c_fcr_renegotiate_chan(tL2C_CCB* p_ccb, tL2CAP_CFG_INFO* p_cfg) {
       * channel */
       * channel */
      switch (p_ccb->our_cfg.fcr.mode) {
      switch (p_ccb->our_cfg.fcr.mode) {
        case L2CAP_FCR_ERTM_MODE:
        case L2CAP_FCR_ERTM_MODE:
          /* We can try basic for any other peer mode if we support it */
          /* We can try basic for any other peer mode because it's always
          if (p_ccb->p_rcb->ertm_info.preferred_mode & L2CAP_FCR_BASIC_MODE) {
           * supported */
          L2CAP_TRACE_DEBUG("%s(Trying Basic)", __func__);
          L2CAP_TRACE_DEBUG("%s(Trying Basic)", __func__);
          can_renegotiate = true;
          can_renegotiate = true;
          p_ccb->our_cfg.fcr.mode = L2CAP_FCR_BASIC_MODE;
          p_ccb->our_cfg.fcr.mode = L2CAP_FCR_BASIC_MODE;
          }
          break;
          break;


        default:
        default: