OSDN Git Service

L2cap FCR: Use MTU from registration
authorHansong Zhang <hsz@google.com>
Wed, 27 Jan 2021 18:07:30 +0000 (10:07 -0800)
committerHansong Zhang <hsz@google.com>
Wed, 27 Jan 2021 22:47:13 +0000 (22:47 +0000)
Bug: 174845935
Test: manual
Tag: #stability
Change-Id: I817bc44a436de150aa12377741f99d468f42df73

stack/l2cap/l2c_csm.cc
stack/l2cap/l2c_fcr.cc

index 61562fe..e4ff6a2 100644 (file)
@@ -66,6 +66,7 @@ static void l2c_csm_send_config_req(tL2C_CCB* p_ccb) {
   tL2CAP_CFG_INFO config{};
   config.mtu_present = true;
   config.mtu = p_ccb->p_rcb->my_mtu;
+  p_ccb->max_rx_mtu = config.mtu;
   if (p_ccb->p_rcb->ertm_info.preferred_mode != L2CAP_FCR_BASIC_MODE) {
     config.fcr_present = true;
     config.fcr = kDefaultErtmOptions;
index e200801..dcf83d8 100644 (file)
@@ -1193,7 +1193,7 @@ static bool do_sar_reassembly(tL2C_CCB* p_ccb, BT_HDR* p_buf,
 
       if (p_fcrb->rx_sdu_len > p_ccb->max_rx_mtu) {
         L2CAP_TRACE_WARNING("SAR - SDU len: %u  larger than MTU: %u",
-                            p_fcrb->rx_sdu_len, p_fcrb->rx_sdu_len);
+                            p_fcrb->rx_sdu_len, p_ccb->max_rx_mtu);
         packet_ok = false;
       } else {
         p_fcrb->p_rx_sdu = (BT_HDR*)osi_malloc(