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

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

Let L2CAP send ConfigRsp for you am: 1e5a1649

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

Change-Id: I18cd60e397d3d74dbf2827918010b08e443b2f7d
parents 3cb813f9 1e5a1649
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -285,11 +285,6 @@ void avct_l2c_config_ind_cback(uint16_t lcid, tL2CAP_CFG_INFO* p_cfg) {
      p_lcb->peer_mtu = L2CAP_DEFAULT_MTU;
    }

    /* send L2CAP configure response */
    memset(p_cfg, 0, sizeof(tL2CAP_CFG_INFO));
    p_cfg->result = L2CAP_CFG_OK;
    L2CA_ConfigRsp(lcid, p_cfg);

    /* if first config ind */
    if ((p_lcb->ch_flags & AVCT_L2C_CFG_IND_DONE) == 0) {
      /* update flags */
+2 −18
Original line number Diff line number Diff line
@@ -260,13 +260,6 @@ void avct_l2c_br_config_ind_cback(uint16_t lcid, tL2CAP_CFG_INFO* p_cfg) {
  tAVCT_BCB* p_lcb;
  uint16_t max_mtu = BT_DEFAULT_BUFFER_SIZE - L2CAP_MIN_OFFSET - BT_HDR_SIZE;

  /* Don't include QoS nor flush timeout in the response since we
     currently always accept these values.  Note: fcr_present is left
     untouched since l2cap negotiates this internally
  */
  p_cfg->flush_to_present = false;
  p_cfg->qos_present = false;

  /* look up lcb for this channel */
  p_lcb = avct_bcb_by_lcid(lcid);
  if (p_lcb == NULL) return;
@@ -278,20 +271,11 @@ void avct_l2c_br_config_ind_cback(uint16_t lcid, tL2CAP_CFG_INFO* p_cfg) {
  }

  if (p_lcb->peer_mtu > max_mtu) {
    p_lcb->peer_mtu = p_cfg->mtu = max_mtu;

    /* Must tell the peer what the adjusted value is */
    p_cfg->mtu_present = true;
  } else /* Don't include in the response */
    p_cfg->mtu_present = false;
    p_lcb->peer_mtu = max_mtu;
  }

  AVCT_TRACE_DEBUG("%s peer_mtu:%d use:%d", __func__, p_lcb->peer_mtu, max_mtu);

  p_cfg->result = L2CAP_CFG_OK;

  /* send L2CAP configure response */
  L2CA_ConfigRsp(lcid, p_cfg);

  /* if first config ind */
  if ((p_lcb->ch_flags & AVCT_L2C_CFG_IND_DONE) == 0) {
    /* update flags */
+0 −5
Original line number Diff line number Diff line
@@ -383,11 +383,6 @@ void avdt_l2c_config_ind_cback(uint16_t lcid, tL2CAP_CFG_INFO* p_cfg) {
    AVDT_TRACE_DEBUG("%s: peer_mtu: %d, lcid: %d", __func__, p_tbl->peer_mtu,
                     lcid);

    /* send L2CAP configure response */
    memset(p_cfg, 0, sizeof(tL2CAP_CFG_INFO));
    p_cfg->result = L2CAP_CFG_OK;
    L2CA_ConfigRsp(lcid, p_cfg);

    /* if first config ind */
    if ((p_tbl->cfg_flags & AVDT_L2C_CFG_IND_DONE) == 0) {
      /* update cfg_flags */
+0 −7
Original line number Diff line number Diff line
@@ -216,13 +216,6 @@ static void bnep_config_ind(uint16_t l2cap_cid, tL2CAP_CFG_INFO* p_cfg) {

  BNEP_TRACE_EVENT("BNEP - Rcvd cfg ind, CID: 0x%x", l2cap_cid);

  /* For now, always accept configuration from the other side */
  p_cfg->flush_to_present = false;
  p_cfg->mtu_present = false;
  p_cfg->result = L2CAP_CFG_OK;

  L2CA_ConfigRsp(l2cap_cid, p_cfg);

  p_bcb->con_flags |= BNEP_FLAGS_HIS_CFG_DONE;

  if (p_bcb->con_flags & BNEP_FLAGS_MY_CFG_DONE) {
+0 −8
Original line number Diff line number Diff line
@@ -781,14 +781,6 @@ static void gap_config_ind(uint16_t l2cap_cid, tL2CAP_CFG_INFO* p_cfg) {
  } else
    p_ccb->rem_mtu_size = p_cfg->mtu;

  /* For now, always accept configuration from the other side */
  p_cfg->flush_to_present = false;
  p_cfg->mtu_present = false;
  p_cfg->result = L2CAP_CFG_OK;
  p_cfg->fcs_present = false;

  L2CA_ConfigRsp(l2cap_cid, p_cfg);

  p_ccb->con_flags |= GAP_CCB_FLAGS_HIS_CFG_DONE;

  gap_checks_con_flags(p_ccb);
Loading