From 8308c24d8a1970082d57f663feda2ddbc2e63a6c Mon Sep 17 00:00:00 2001 From: Hansong Zhang Date: Sat, 26 Sep 2020 23:38:13 -0700 Subject: [PATCH] L2CAP ERTM: Fix p_ccb->max_rx_mtu Use the old value, which was removed in I78c3d65fdaf14addf80607ce5105221e52447a9e. Bug: 159815595 Tag: #refactor Test: compile & verify basic functions working & OPP Change-Id: I90a8f94d16f87df2d4ce8bb0de8130d544affd12 --- stack/l2cap/l2c_utils.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/stack/l2cap/l2c_utils.cc b/stack/l2cap/l2c_utils.cc index 56b12b853..deac03db8 100644 --- a/stack/l2cap/l2c_utils.cc +++ b/stack/l2cap/l2c_utils.cc @@ -1368,7 +1368,8 @@ tL2C_CCB* l2cu_allocate_ccb(tL2C_LCB* p_lcb, uint16_t cid) { alarm_free(p_ccb->fcrb.mon_retrans_timer); p_ccb->fcrb.mon_retrans_timer = alarm_new("l2c_fcrb.mon_retrans_timer"); - p_ccb->max_rx_mtu = L2CAP_MTU_SIZE; + p_ccb->max_rx_mtu = BT_DEFAULT_BUFFER_SIZE - + (L2CAP_MIN_OFFSET + L2CAP_SDU_LEN_OFFSET + L2CAP_FCS_LEN); p_ccb->tx_mps = BT_DEFAULT_BUFFER_SIZE - 32; p_ccb->xmit_hold_q = fixed_queue_new(SIZE_MAX); -- 2.11.0