diff options
author | 2024-10-11 14:54:10 +0000 | |
---|---|---|
committer | 2024-10-11 18:10:48 +0000 | |
commit | 7ac301122a06beb0c5480862fe7c63f0f717395d (patch) | |
tree | e3a519f5dc422723a250379fe84cc302e2d1f7a8 | |
parent | 1f1282e0437cd473adcb08c8db0034d722da91d8 (diff) |
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
-rw-r--r-- | system/stack/l2cap/l2c_utils.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/system/stack/l2cap/l2c_utils.cc b/system/stack/l2cap/l2c_utils.cc index a45d2c1e68..9efa7dea3e 100644 --- a/system/stack/l2cap/l2c_utils.cc +++ b/system/stack/l2cap/l2c_utils.cc @@ -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; |