Loading system/gd/hci/hci_layer.cc +20 −4 Original line number Original line Diff line number Diff line Loading @@ -329,10 +329,26 @@ struct HciLayer::impl { ASSERT(event.IsValid()); ASSERT(event.IsValid()); if (command_queue_.empty()) { if (command_queue_.empty()) { auto event_code = event.GetEventCode(); auto event_code = event.GetEventCode(); ASSERT_LOG( // BT Core spec 5.2 (Volume 4, Part E section 4.4) allows anytime event_code != EventCode::COMMAND_COMPLETE && event_code != EventCode::COMMAND_STATUS, // COMMAND_COMPLETE and COMMAND_STATUS with opcode 0x0 for flow control "Received %s without a waiting command (is the HAL sending commands, but not handling the events?)", if (event_code == EventCode::COMMAND_COMPLETE) { EventCodeText(event_code).c_str()); auto view = CommandCompleteView::Create(event); ASSERT(view.IsValid()); auto op_code = view.GetCommandOpCode(); ASSERT_LOG(op_code == OpCode::NONE, "Received %s event with OpCode 0x%02hx (%s) without a waiting command" "(is the HAL sending commands, but not handling the events?)", EventCodeText(event_code).c_str(), op_code, OpCodeText(op_code).c_str()); } if (event_code == EventCode::COMMAND_STATUS) { auto view = CommandStatusView::Create(event); ASSERT(view.IsValid()); auto op_code = view.GetCommandOpCode(); ASSERT_LOG(op_code == OpCode::NONE, "Received %s event with OpCode 0x%02hx (%s) without a waiting command" "(is the HAL sending commands, but not handling the events?)", EventCodeText(event_code).c_str(), op_code, OpCodeText(op_code).c_str()); } std::unique_ptr<CommandView> no_waiting_command{nullptr}; std::unique_ptr<CommandView> no_waiting_command{nullptr}; log_hci_event(no_waiting_command, event, module_.GetDependency<storage::StorageModule>()); log_hci_event(no_waiting_command, event, module_.GetDependency<storage::StorageModule>()); } else { } else { Loading Loading
system/gd/hci/hci_layer.cc +20 −4 Original line number Original line Diff line number Diff line Loading @@ -329,10 +329,26 @@ struct HciLayer::impl { ASSERT(event.IsValid()); ASSERT(event.IsValid()); if (command_queue_.empty()) { if (command_queue_.empty()) { auto event_code = event.GetEventCode(); auto event_code = event.GetEventCode(); ASSERT_LOG( // BT Core spec 5.2 (Volume 4, Part E section 4.4) allows anytime event_code != EventCode::COMMAND_COMPLETE && event_code != EventCode::COMMAND_STATUS, // COMMAND_COMPLETE and COMMAND_STATUS with opcode 0x0 for flow control "Received %s without a waiting command (is the HAL sending commands, but not handling the events?)", if (event_code == EventCode::COMMAND_COMPLETE) { EventCodeText(event_code).c_str()); auto view = CommandCompleteView::Create(event); ASSERT(view.IsValid()); auto op_code = view.GetCommandOpCode(); ASSERT_LOG(op_code == OpCode::NONE, "Received %s event with OpCode 0x%02hx (%s) without a waiting command" "(is the HAL sending commands, but not handling the events?)", EventCodeText(event_code).c_str(), op_code, OpCodeText(op_code).c_str()); } if (event_code == EventCode::COMMAND_STATUS) { auto view = CommandStatusView::Create(event); ASSERT(view.IsValid()); auto op_code = view.GetCommandOpCode(); ASSERT_LOG(op_code == OpCode::NONE, "Received %s event with OpCode 0x%02hx (%s) without a waiting command" "(is the HAL sending commands, but not handling the events?)", EventCodeText(event_code).c_str(), op_code, OpCodeText(op_code).c_str()); } std::unique_ptr<CommandView> no_waiting_command{nullptr}; std::unique_ptr<CommandView> no_waiting_command{nullptr}; log_hci_event(no_waiting_command, event, module_.GetDependency<storage::StorageModule>()); log_hci_event(no_waiting_command, event, module_.GetDependency<storage::StorageModule>()); } else { } else { Loading