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

Commit a17eb9e1 authored by Yun-Hao Chung's avatar Yun-Hao Chung
Browse files

Floss: Remove the SCO hack for wrong HCI event

The known issue was found in Intel controller and it should have been
fixed.

Bug: 307198029
Test: build
Tag: #floss
Test: mma -j
Flag: EXEMPT floss only changes

Change-Id: I781073d139e0133ba063459502b99a3fe98a2038
parent b0ceadb8
Loading
Loading
Loading
Loading
+0 −23
Original line number Diff line number Diff line
@@ -368,29 +368,6 @@ struct classic_impl : public security::ISecurityManagerListener {
    auto status = connection_complete.GetStatus();
    auto address = connection_complete.GetBdAddr();

    // TODO(b/261610529) - Some controllers incorrectly return connection
    // failures via HCI Connect Complete instead of SCO connect complete.
    // Temporarily just drop these packets until we have finer grained control
    // over these ASSERTs.
#if TARGET_FLOSS
    auto handle = connection_complete.GetConnectionHandle();
    auto link_type = connection_complete.GetLinkType();

    // HACK: Some failed SCO connections are reporting failures via
    //       ConnectComplete instead of ScoConnectionComplete.
    //       The pattern of it is that the handle is always 0xffff.
    //       We check it with 0x0fff since PDL only extracts 12 bits for handle.
    //       Drop such packets when the pattern is matched.
    if (handle == 0x0fff && link_type == LinkType::SCO) {
      LOG_ERROR(
          "ConnectionComplete with invalid handle(%u), link type(%u) and status(%d). Dropping packet.",
          handle,
          link_type,
          status);
      return;
    }
#endif

    acl_scheduler_->ReportAclConnectionCompletion(
        address,
        handler_->BindOnceOn(