OSDN Git Service

L2CAP: We never explicitly disable FCS
authorHansong Zhang <hsz@google.com>
Thu, 24 Sep 2020 03:29:22 +0000 (20:29 -0700)
committerHansong Zhang <hsz@google.com>
Thu, 24 Sep 2020 22:35:05 +0000 (15:35 -0700)
Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: If90d75c969277137d356617dec9b8f5c02c5d3f3

stack/l2cap/l2c_utils.cc

index 3078dc5..38013da 100644 (file)
@@ -1927,12 +1927,9 @@ void l2cu_process_our_cfg_req(tL2C_CCB* p_ccb, tL2CAP_CFG_INFO* p_cfg) {
     p_ccb->fcrb.max_held_acks = p_cfg->fcr.tx_win_sz / 3;
 
     /* Include FCS option only if peer can handle it */
-    if (p_ccb->p_lcb->peer_ext_fea & L2CAP_EXTFEA_NO_CRC) {
-      /* FCS check can be bypassed if peer also desires to bypass */
-      if (p_cfg->fcs_present && p_cfg->fcs == L2CAP_CFG_FCS_BYPASS)
-        p_ccb->bypass_fcs |= L2CAP_CFG_FCS_OUR;
-    } else
+    if ((p_ccb->p_lcb->peer_ext_fea & L2CAP_EXTFEA_NO_CRC) == 0) {
       p_cfg->fcs_present = false;
+    }
   } else {
     p_cfg->fcr.mode = L2CAP_FCR_BASIC_MODE;
   }