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

Commit 98ea58e9 authored by Hansong Zhang's avatar Hansong Zhang Committed by Automerger Merge Worker
Browse files

L2CAP: Add a "required_remote_mtu" and store it am: 49510436

Original change: https://android-review.googlesource.com/c/platform/system/bt/+/1438414

Change-Id: I1b184c4b93e50339d346cfd635a36c007ed944c3
parents 1244f26c 49510436
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ void AVCT_Register() {

  /* register PSM with L2CAP */
  L2CA_Register2(AVCT_PSM, avct_l2c_appl, true /* enable_snoop */, nullptr,
                 kAvrcMtu, BTA_SEC_AUTHENTICATE);
                 kAvrcMtu, 0, BTA_SEC_AUTHENTICATE);

  /* Include the browsing channel which uses eFCR */
  tL2CAP_ERTM_INFO ertm_info;
@@ -72,7 +72,8 @@ void AVCT_Register() {
  ertm_info.fcr_tx_buf_size = BT_DEFAULT_BUFFER_SIZE;

  L2CA_Register2(AVCT_BR_PSM, avct_l2c_br_appl, true /*enable_snoop*/,
                 &ertm_info, kAvrcBrMtu, BTA_SEC_AUTHENTICATE);
                 &ertm_info, kAvrcBrMtu, AVCT_MIN_BROWSE_MTU,
                 BTA_SEC_AUTHENTICATE);

#if defined(AVCT_INITIAL_TRACE_LEVEL)
  avct_cb.trace_level = AVCT_INITIAL_TRACE_LEVEL;
+1 −1
Original line number Diff line number Diff line
@@ -93,7 +93,7 @@ void avdt_scb_transport_channel_timer_timeout(void* data) {
void AVDT_Register(AvdtpRcb* p_reg, tAVDT_CTRL_CBACK* p_cback) {
  /* register PSM with L2CAP */
  L2CA_Register2(AVDT_PSM, avdt_l2c_appl, true /* enable_snoop */, nullptr,
                 kAvdtpMtu, BTA_SEC_AUTHENTICATE);
                 kAvdtpMtu, 0, BTA_SEC_AUTHENTICATE);

  /* initialize AVDTP data structures */
  avdt_scb_init();
+1 −1
Original line number Diff line number Diff line
@@ -92,7 +92,7 @@ tBNEP_RESULT bnep_register_with_l2cap(void) {

  /* Now, register with L2CAP */
  if (!L2CA_Register2(BT_PSM_BNEP, bnep_cb.reg_info, false /* enable_snoop */,
                      nullptr, BNEP_MTU_SIZE,
                      nullptr, BNEP_MTU_SIZE, BNEP_MTU_SIZE,
                      BTA_SEC_AUTHENTICATE | BTA_SEC_ENCRYPT)) {
    BNEP_TRACE_ERROR("BNEP - Registration failed");
    return BNEP_SECURITY_FAIL;
+1 −1
Original line number Diff line number Diff line
@@ -241,7 +241,7 @@ uint16_t GAP_ConnOpen(const char* p_serv_name, uint8_t service_id,
  if (transport == BT_TRANSPORT_BR_EDR) {
    p_ccb->psm =
        L2CA_Register2(psm, conn.reg_info, false /* enable_snoop */,
                       &p_ccb->ertm_info, L2CAP_SDU_LENGTH_MAX, security);
                       &p_ccb->ertm_info, L2CAP_SDU_LENGTH_MAX, 0, security);
    if (p_ccb->psm == 0) {
      LOG(ERROR) << StringPrintf("%s: Failure registering PSM 0x%04x", __func__,
                                 psm);
+1 −1
Original line number Diff line number Diff line
@@ -114,7 +114,7 @@ void gatt_init(void) {

  /* Now, register with L2CAP for ATT PSM over BR/EDR */
  if (!L2CA_Register2(BT_PSM_ATT, dyn_info, false /* enable_snoop */, nullptr,
                      GATT_MAX_MTU_SIZE, BTM_SEC_NONE)) {
                      GATT_MAX_MTU_SIZE, 0, BTM_SEC_NONE)) {
    LOG(ERROR) << "ATT Dynamic Registration failed";
  }

Loading