Skip to content
Snippets Groups Projects
Commit e15891cb authored by Peter Cai's avatar Peter Cai Committed by Mohammad Hasan Keramat J
Browse files

gd: hci: Ignore unexpected status events


For some reason, on some old devices, the controller will report a
remote to support SNIFF_SUBRATING even when it does not. Just ignore the
error here (the status event comes from the failure response).

Change-Id: Ifb9a65fd77f21d15a8dc1ced9240194d38218ef6
Signed-off-by: default avatarMohammad Hasan Keramat J <ikeramat@protonmail.com>
parent 2e0b1eb8
No related branches found
No related tags found
No related merge requests found
......@@ -211,14 +211,13 @@ struct HciLayer::impl {
command_queue_.front().GetCallback<CommandCompleteView>()->Invoke(
std::move(command_complete_view));
} else {
ASSERT_LOG(
command_queue_.front().waiting_for_status_ == is_status,
"0x%02hx (%s) was not expecting %s event",
op_code,
OpCodeText(op_code).c_str(),
logging_id.c_str());
command_queue_.front().GetCallback<TResponse>()->Invoke(std::move(response_view));
if (command_queue_.front().waiting_for_status_ == is_status) {
command_queue_.front().GetCallback<TResponse>()->Invoke(std::move(response_view));
} else {
CommandCompleteView command_complete_view = CommandCompleteView::Create(
EventView::Create(PacketView<kLittleEndian>(std::make_shared<std::vector<uint8_t>>(std::vector<uint8_t>()))));
command_queue_.front().GetCallback<CommandCompleteView>()->Invoke(std::move(command_complete_view));
}
}
command_queue_.pop_front();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment