Do not log unsolicited NOOP command complete events
Bug: 27744135
Change-Id: I683e3a9f0a116f83763ebcf4d0583ea1c89ef5b2
diff --git a/system/hci/src/hci_layer.c b/system/hci/src/hci_layer.c
index b169b03..9a9c5e6 100644
--- a/system/hci/src/hci_layer.c
+++ b/system/hci/src/hci_layer.c
@@ -663,12 +663,17 @@
STREAM_TO_UINT16(opcode, stream);
wait_entry = get_waiting_command(opcode);
- if (!wait_entry)
- LOG_WARN(LOG_TAG, "%s command complete event with no matching command. opcode: 0x%x.", __func__, opcode);
- else if (wait_entry->complete_callback)
+ if (!wait_entry) {
+ // TODO: Currently command_credits aren't parsed at all; here or in higher layers...
+ if (opcode != HCI_COMMAND_NONE) {
+ LOG_WARN(LOG_TAG, "%s command complete event with no matching command (opcode: 0x%04x).",
+ __func__, opcode);
+ }
+ } else if (wait_entry->complete_callback) {
wait_entry->complete_callback(packet, wait_entry->context);
- else if (wait_entry->complete_future)
+ } else if (wait_entry->complete_future) {
future_ready(wait_entry->complete_future, packet);
+ }
goto intercepted;
} else if (event_code == HCI_COMMAND_STATUS_EVT) {