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

Commit b6f8a51f authored by Chris Manton's avatar Chris Manton Committed by Gerrit Code Review
Browse files

Merge changes I74142415,I48f35c12 into main

* changes:
  stack::l2cap: Properly name L2CA_Register2 => L2CA_RegisterWithSecurity
  stack::l2cap: Properly name L2CA_ConnectReq2 => L2CA_ConnectReqWithSecurity
parents 27c98fd7 19259136
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -62,8 +62,9 @@ void AVCT_Register() {
  memset(&avct_cb, 0, sizeof(tAVCT_CB));

  /* register PSM with L2CAP */
  if (!L2CA_Register2(AVCT_PSM, avct_l2c_appl, true /* enable_snoop */, nullptr,
                      kAvrcMtu, 0, BTA_SEC_AUTHENTICATE)) {
  if (!L2CA_RegisterWithSecurity(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]");
  }
@@ -72,9 +73,9 @@ void AVCT_Register() {
  tL2CAP_ERTM_INFO ertm_info;
  ertm_info.preferred_mode = L2CAP_FCR_ERTM_MODE;

  if (!L2CA_Register2(AVCT_BR_PSM, avct_l2c_br_appl, true /*enable_snoop*/,
                      &ertm_info, kAvrcBrMtu, AVCT_MIN_BROWSE_MTU,
                      BTA_SEC_AUTHENTICATE)) {
  if (!L2CA_RegisterWithSecurity(AVCT_BR_PSM, avct_l2c_br_appl,
                                 true /*enable_snoop*/, &ertm_info, kAvrcBrMtu,
                                 AVCT_MIN_BROWSE_MTU, BTA_SEC_AUTHENTICATE)) {
    log::error(
        "Unable to register with L2CAP AVCT_BR profile "
        "psm:AVCT_BR_PSM[0x001b]");
+2 −2
Original line number Diff line number Diff line
@@ -115,8 +115,8 @@ void avct_bcb_chnl_open(tAVCT_BCB* p_bcb, tAVCT_LCB_EVT* /* p_data */) {

  /* call l2cap connect req */
  p_bcb->ch_state = AVCT_CH_CONN;
  p_bcb->ch_lcid =
      L2CA_ConnectReq2(AVCT_BR_PSM, p_lcb->peer_addr, BTA_SEC_AUTHENTICATE);
  p_bcb->ch_lcid = L2CA_ConnectReqWithSecurity(AVCT_BR_PSM, p_lcb->peer_addr,
                                               BTA_SEC_AUTHENTICATE);
  if (p_bcb->ch_lcid == 0) {
    /* if connect req failed, send ourselves close event */
    tAVCT_LCB_EVT avct_lcb_evt;
+2 −2
Original line number Diff line number Diff line
@@ -184,8 +184,8 @@ void avct_lcb_chnl_open(tAVCT_LCB* p_lcb, tAVCT_LCB_EVT* /* p_data */) {
  uint16_t result = AVCT_RESULT_FAIL;

  p_lcb->ch_state = AVCT_CH_CONN;
  p_lcb->ch_lcid =
      L2CA_ConnectReq2(AVCT_PSM, p_lcb->peer_addr, BTA_SEC_AUTHENTICATE);
  p_lcb->ch_lcid = L2CA_ConnectReqWithSecurity(AVCT_PSM, p_lcb->peer_addr,
                                               BTA_SEC_AUTHENTICATE);
  if (p_lcb->ch_lcid == 0) {
    /* if connect req failed, send ourselves close event */
    tAVCT_LCB_EVT avct_lcb_evt;
+2 −2
Original line number Diff line number Diff line
@@ -548,8 +548,8 @@ void avdt_ad_open_req(uint8_t type, AvdtpCcb* p_ccb, AvdtpScb* p_scb,
    p_tbl->state = AVDT_AD_ST_CONN;

    /* call l2cap connect req */
    lcid =
        L2CA_ConnectReq2(AVDT_PSM, p_ccb->peer_addr, BTM_SEC_OUT_AUTHENTICATE);
    lcid = L2CA_ConnectReqWithSecurity(AVDT_PSM, p_ccb->peer_addr,
                                       BTM_SEC_OUT_AUTHENTICATE);
    if (lcid != 0) {
      /* if connect req ok, store tcid in lcid table  */
      avdtp_cb.ad.lcid_tbl[lcid] = avdt_ad_tc_tbl_to_idx(p_tbl);
+3 −2
Original line number Diff line number Diff line
@@ -98,8 +98,9 @@ void avdt_scb_transport_channel_timer_timeout(void* data) {
 ******************************************************************************/
void AVDT_Register(AvdtpRcb* p_reg, tAVDT_CTRL_CBACK* p_cback) {
  /* register PSM with L2CAP */
  if (!L2CA_Register2(AVDT_PSM, avdt_l2c_appl, true /* enable_snoop */, nullptr,
                      kAvdtpMtu, 0, BTA_SEC_AUTHENTICATE)) {
  if (!L2CA_RegisterWithSecurity(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]");
  }
Loading