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

Commit 431c3ec0 authored by Chris Manton's avatar Chris Manton
Browse files

stack::l2cap [16/19] L2CA_SetTxPriority

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

Change-Id: I497998709ef3089beef8babfa0f99dd327d97cc2
parent a05d4199
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1218,7 +1218,10 @@ void bta_av_str_opened(tBTA_AV_SCB* p_scb, tBTA_AV_DATA* p_data) {
               p_scb->stream_mtu);

  /* Set the media channel as high priority */
  L2CA_SetTxPriority(p_scb->l2c_cid, L2CAP_CHNL_PRIORITY_HIGH);
  if (!L2CA_SetTxPriority(p_scb->l2c_cid, L2CAP_CHNL_PRIORITY_HIGH)) {
    log::warn("Unable to set L2CAP flush peer:{} cid:{}", p_scb->PeerAddress(),
              p_scb->l2c_cid);
  }
  if (!L2CA_SetChnlFlushability(p_scb->l2c_cid, true)) {
    log::warn("Unable to set L2CAP flush peer:{} cid:{}", p_scb->PeerAddress(),
              p_scb->l2c_cid);
+20 −4
Original line number Diff line number Diff line
@@ -250,7 +250,11 @@ void avct_lcb_open_ind(tAVCT_LCB* p_lcb, tAVCT_LCB_EVT* p_data) {
        if (p_ccb->cc.role == AVCT_INT) {
          /** @} */
          bind = true;
          L2CA_SetTxPriority(p_lcb->ch_lcid, L2CAP_CHNL_PRIORITY_HIGH);
          if (!L2CA_SetTxPriority(p_lcb->ch_lcid, L2CAP_CHNL_PRIORITY_HIGH)) {
            log::warn(
                "Unable to set L2CAP transmit high priority peer:{} cid:{}",
                p_ccb->p_lcb->peer_addr, p_lcb->ch_lcid);
          }
          p_ccb->cc.p_ctrl_cback(avct_ccb_to_idx(p_ccb), AVCT_CONNECT_CFM_EVT,
                                 0, &p_lcb->peer_addr);
        }
@@ -267,7 +271,11 @@ void avct_lcb_open_ind(tAVCT_LCB* p_lcb, tAVCT_LCB_EVT* p_data) {
          } else {
            bind = true;
            p_ccb->p_lcb = p_lcb;
            L2CA_SetTxPriority(p_lcb->ch_lcid, L2CAP_CHNL_PRIORITY_HIGH);
            if (!L2CA_SetTxPriority(p_lcb->ch_lcid, L2CAP_CHNL_PRIORITY_HIGH)) {
              log::warn(
                  "Unable to set L2CAP transmit high priority peer:{} cid:{}",
                  p_ccb->p_lcb->peer_addr, p_lcb->ch_lcid);
            }
            p_ccb->cc.p_ctrl_cback(avct_ccb_to_idx(p_ccb), AVCT_CONNECT_IND_EVT,
                                   0, &p_lcb->peer_addr);
          }
@@ -281,7 +289,11 @@ void avct_lcb_open_ind(tAVCT_LCB* p_lcb, tAVCT_LCB_EVT* p_data) {
        /* if bound to this lcb send connect confirm event */
        if (p_ccb->p_lcb == p_lcb) {
          bind = true;
          L2CA_SetTxPriority(p_lcb->ch_lcid, L2CAP_CHNL_PRIORITY_HIGH);
          if (!L2CA_SetTxPriority(p_lcb->ch_lcid, L2CAP_CHNL_PRIORITY_HIGH)) {
            log::warn(
                "Unable to set L2CAP transmit high priority peer:{} cid:{}",
                p_ccb->p_lcb->peer_addr, p_lcb->ch_lcid);
          }
          p_ccb->cc.p_ctrl_cback(avct_ccb_to_idx(p_ccb), AVCT_CONNECT_CFM_EVT,
                                 0, &p_lcb->peer_addr);
        }
@@ -292,7 +304,11 @@ void avct_lcb_open_ind(tAVCT_LCB* p_lcb, tAVCT_LCB_EVT* p_data) {
          /* bind ccb to lcb and send connect ind event */
          bind = true;
          p_ccb->p_lcb = p_lcb;
          L2CA_SetTxPriority(p_lcb->ch_lcid, L2CAP_CHNL_PRIORITY_HIGH);
          if (!L2CA_SetTxPriority(p_lcb->ch_lcid, L2CAP_CHNL_PRIORITY_HIGH)) {
            log::warn(
                "Unable to set L2CAP transmit high priority peer:{} cid:{}",
                p_ccb->p_lcb->peer_addr, p_lcb->ch_lcid);
          }
          p_ccb->cc.p_ctrl_cback(avct_ccb_to_idx(p_ccb), AVCT_CONNECT_IND_EVT,
                                 0, &p_lcb->peer_addr);
        }
+6 −2
Original line number Diff line number Diff line
@@ -355,8 +355,12 @@ void avdt_ad_tc_open_ind(AvdtpTransportChannel* p_tbl) {
  /* if signaling channel, notify ccb that channel open */
  if (p_tbl->tcid == 0) {
    /* set the signal channel to use high priority within the ACL link */
    L2CA_SetTxPriority(avdtp_cb.ad.rt_tbl[p_tbl->ccb_idx][AVDT_CHAN_SIG].lcid,
                       L2CAP_CHNL_PRIORITY_HIGH);
    if (!L2CA_SetTxPriority(
            avdtp_cb.ad.rt_tbl[p_tbl->ccb_idx][AVDT_CHAN_SIG].lcid,
            L2CAP_CHNL_PRIORITY_HIGH)) {
      log::warn("Unable to set L2CAP transmit high priority cid:{}",
                avdtp_cb.ad.rt_tbl[p_tbl->ccb_idx][AVDT_CHAN_SIG].lcid);
    }

    p_ccb = avdt_ccb_by_idx(p_tbl->ccb_idx);
    /* use err_param to indicate the role of connection.