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

Commit 04b0402d authored by Hansong Zhang's avatar Hansong Zhang
Browse files

HIDD: Treat unacceptable QOS as normal failure

Bug: 159815595
Tag: #refactor
Test: compile & verify basic functions working
Change-Id: I7d37c46f7c6b16a55afafe04b62081d43f63c122
parent e2596469
Loading
Loading
Loading
Loading
+1 −11
Original line number Diff line number Diff line
@@ -388,17 +388,7 @@ static void hidd_l2cif_config_cfm(uint16_t cid, tL2CAP_CFG_INFO* p_cfg) {
    return;
  }

  if (p_hcon->intr_cid == cid &&
      p_cfg->result == L2CAP_CFG_UNACCEPTABLE_PARAMS && p_cfg->qos_present) {
    // TODO: QoS parameters not accepted for intr, try again with host proposal
    // So far we just disconnect

    hidd_conn_disconnect();
    reason = HID_L2CAP_CFG_FAIL | (uint32_t)p_cfg->result;

    hd_cb.callback(hd_cb.device.addr, HID_DHOST_EVT_CLOSE, reason, NULL);
    return;
  } else if (p_cfg->result != L2CAP_CFG_OK) {
  if (p_cfg->result != L2CAP_CFG_OK) {
    HIDD_TRACE_WARNING("%s: config failed, disconnecting", __func__);

    hidd_conn_disconnect();