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

Commit de21381e authored by Yun-hao Chung's avatar Yun-hao Chung Committed by Automerger Merge Worker
Browse files

Merge "Floss: Ignore the timeout-ed HCI command instead of crash" into main...

Merge "Floss: Ignore the timeout-ed HCI command instead of crash" into main am: 26fb05c4 am: 3308aa64

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/3304678



Change-Id: If51f0490afd1aedc7d39637afccaabb7ef735a98
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 02a4aef7 3308aa64
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -279,6 +279,17 @@ struct HciLayer::impl {
    command_queue_.clear();
    command_credits_ = 1;
    waiting_command_ = OpCode::NONE;

#ifdef TARGET_FLOSS
    log::warn("Ignoring the timeouted HCI command {}.", OpCodeText(op_code));
    // Terminate the process to trigger controller reset, also mark the controller
    // is broken to prevent further error while terminating.
    auto hal = module_.GetDependency<hal::HciHal>();
    hal->markControllerBroken();
    kill(getpid(), SIGTERM);
    return;
#endif

    // Ignore the response, since we don't know what might come back.
    enqueue_command(ControllerDebugInfoBuilder::Create(),
                    module_.GetHandler()->BindOnce([](CommandCompleteView) {}));