Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7ac30112 authored by Łukasz Rymanowski's avatar Łukasz Rymanowski Committed by Łukasz Rymanowski (xWF)
Browse files

l2cap: Store remote FCS Configuration options

Make sure to remember remote configuration.

Bug: 371948052
Bug: 372605959
Test: mmm packages/modules/Bluetooth
Test: manual PTS tests L2CAP/FOC/BV-05-C
Flag: com.android.bluetooth.flags.l2cap_fcs_option_fix
Change-Id: I173ecff48efc74c424d9f671c89646a569413f2f
parent 1f1282e0
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -1884,6 +1884,11 @@ uint8_t l2cu_process_peer_cfg_req(tL2C_CCB* p_ccb, tL2CAP_CFG_INFO* p_cfg) {
    p_cfg->fcr.mode = L2CAP_FCR_BASIC_MODE;
  }

  if (com::android::bluetooth::flags::l2cap_fcs_option_fix() && p_cfg->fcs_present) {
    p_ccb->peer_cfg.fcs_present = 1;
    p_ccb->peer_cfg.fcs = p_cfg->fcs;
  }

  if (!p_cfg->mtu_present && required_remote_mtu > L2CAP_DEFAULT_MTU) {
    // We reject if we have a MTU requirement higher than default MTU
    p_cfg->mtu = required_remote_mtu;