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

Commit 81b7bcd1 authored by Chris Manton's avatar Chris Manton
Browse files

stack::l2cap [8/19] L2CA_Register2

Bug: 339732512
Test: m .
Flag: EXEMPT, Logging Change

Change-Id: Ia2430bdce69eb563bfb9c1d0b6fab0de4fe60987
parent a1b79195
Loading
Loading
Loading
Loading
+12 −5
Original line number Diff line number Diff line
@@ -62,16 +62,23 @@ void AVCT_Register() {
  memset(&avct_cb, 0, sizeof(tAVCT_CB));

  /* register PSM with L2CAP */
  L2CA_Register2(AVCT_PSM, avct_l2c_appl, true /* enable_snoop */, nullptr,
                 kAvrcMtu, 0, BTA_SEC_AUTHENTICATE);
  if (!L2CA_Register2(AVCT_PSM, avct_l2c_appl, true /* enable_snoop */, nullptr,
                      kAvrcMtu, 0, BTA_SEC_AUTHENTICATE)) {
    log::error(
        "Unable to register with L2CAP AVCT profile psm:AVCT_PSM[0x0017]");
  }

  /* Include the browsing channel which uses eFCR */
  tL2CAP_ERTM_INFO ertm_info;
  ertm_info.preferred_mode = L2CAP_FCR_ERTM_MODE;

  L2CA_Register2(AVCT_BR_PSM, avct_l2c_br_appl, true /*enable_snoop*/,
  if (!L2CA_Register2(AVCT_BR_PSM, avct_l2c_br_appl, true /*enable_snoop*/,
                      &ertm_info, kAvrcBrMtu, AVCT_MIN_BROWSE_MTU,
                 BTA_SEC_AUTHENTICATE);
                      BTA_SEC_AUTHENTICATE)) {
    log::error(
        "Unable to register with L2CAP AVCT_BR profile "
        "psm:AVCT_BR_PSM[0x001b]");
  }
}

/*******************************************************************************
+5 −2
Original line number Diff line number Diff line
@@ -98,8 +98,11 @@ 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, 0, BTA_SEC_AUTHENTICATE);
  if (!L2CA_Register2(AVDT_PSM, avdt_l2c_appl, true /* enable_snoop */, nullptr,
                      kAvdtpMtu, 0, BTA_SEC_AUTHENTICATE)) {
    log::error(
        "Unable to register with L2CAP profile AVDT psm:AVDT_PSM[0x0019]");
  }

  /* initialize AVDTP data structures */
  avdt_scb_init();