OSDN Git Service

BNEP: Always use BNEP_MTU_SIZE as remote MTU size
authorHansong Zhang <hsz@google.com>
Thu, 24 Sep 2020 02:19:35 +0000 (19:19 -0700)
committerHansong Zhang <hsz@google.com>
Thu, 24 Sep 2020 02:19:35 +0000 (19:19 -0700)
Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I4462455539f1801b3b9960e822caa56b25699ed6

stack/bnep/bnep_main.cc

index 8093794..4edbd35 100644 (file)
@@ -227,10 +227,7 @@ static void bnep_config_ind(uint16_t l2cap_cid, tL2CAP_CFG_INFO* p_cfg) {
     p_cfg->mtu = BNEP_MTU_SIZE;
     p_cfg->result = result = L2CAP_CFG_UNACCEPTABLE_PARAMS;
   } else {
-    if (p_cfg->mtu > BNEP_MTU_SIZE)
-      p_bcb->rem_mtu_size = BNEP_MTU_SIZE;
-    else
-      p_bcb->rem_mtu_size = p_cfg->mtu;
+    p_bcb->rem_mtu_size = BNEP_MTU_SIZE;
 
     /* For now, always accept configuration from the other side */
     p_cfg->flush_to_present = false;