OSDN Git Service

Remove already handled case
authorHansong Zhang <hsz@google.com>
Thu, 24 Sep 2020 00:29:34 +0000 (17:29 -0700)
committerHansong Zhang <hsz@google.com>
Thu, 24 Sep 2020 02:14:16 +0000 (19:14 -0700)
Handled in `p_cfg->fcr.mode == L2CAP_FCR_BASIC_MODE` case.

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I08cd4d60930ab0bc9bd49e0242c27facec1d4fc5

stack/l2cap/l2c_fcr.cc

index 4c6e90e..fb3ba53 100644 (file)
@@ -1970,13 +1970,6 @@ uint8_t l2c_fcr_process_peer_cfg_req(tL2C_CCB* p_ccb, tL2CAP_CFG_INFO* p_cfg) {
           p_ccb->our_cfg.fcr.mps = 0;
       fcr_ok = L2CAP_PEER_CFG_UNACCEPTABLE;
     }
-
-    /* Only other valid case is if they want BASIC and we wanted ERTM
-     */
-    else if ((p_cfg->fcr.mode != L2CAP_FCR_ERTM_MODE) ||
-             (p_ccb->ertm_info.preferred_mode != L2CAP_FCR_ERTM_MODE)) {
-      fcr_ok = L2CAP_PEER_CFG_DISCONNECT;
-    }
   }
 
   /* Configuration for FCR channels so make any adjustments and fwd to upper