Lines Matching refs:wait_entry
120 static void enqueue_command(waiting_command_t* wait_entry);
121 static void event_command_ready(waiting_command_t* wait_entry);
306 waiting_command_t* wait_entry = reinterpret_cast<waiting_command_t*>( in transmit_command() local
310 STREAM_TO_UINT16(wait_entry->opcode, stream); in transmit_command()
311 wait_entry->complete_callback = complete_callback; in transmit_command()
312 wait_entry->status_callback = status_callback; in transmit_command()
313 wait_entry->command = command; in transmit_command()
314 wait_entry->context = context; in transmit_command()
320 enqueue_command(wait_entry); in transmit_command()
324 waiting_command_t* wait_entry = reinterpret_cast<waiting_command_t*>( in transmit_command_futured() local
329 STREAM_TO_UINT16(wait_entry->opcode, stream); in transmit_command_futured()
330 wait_entry->complete_future = future; in transmit_command_futured()
331 wait_entry->command = command; in transmit_command_futured()
337 enqueue_command(wait_entry); in transmit_command_futured()
372 static void enqueue_command(waiting_command_t* wait_entry) { in enqueue_command() argument
373 base::Closure callback = base::Bind(&event_command_ready, wait_entry); in enqueue_command()
380 buffer_allocator->free(wait_entry->command); in enqueue_command()
381 osi_free(wait_entry); in enqueue_command()
391 static void event_command_ready(waiting_command_t* wait_entry) { in event_command_ready() argument
394 wait_entry->timestamp = std::chrono::steady_clock::now(); in event_command_ready()
395 list_append(commands_pending_response, wait_entry); in event_command_ready()
398 packet_fragmenter->fragment_and_dispatch(wait_entry->command); in event_command_ready()
453 waiting_command_t* wait_entry = in command_timed_out() local
458 std::chrono::steady_clock::now() - wait_entry->timestamp) in command_timed_out()
461 __func__, wait_time_ms, wait_entry->opcode, in command_timed_out()
462 (wait_entry == original_wait_entry) ? "*matches timer*" : ""); in command_timed_out()
465 uint8_t* command = wait_entry->command->data + wait_entry->command->offset; in command_timed_out()
466 if (wait_entry->command->len > 3) { in command_timed_out()
468 wait_entry->command->len, command[0], command[1], command[2], in command_timed_out()
472 wait_entry->command->len, command[0], command[1], command[2]); in command_timed_out()
475 LOG_EVENT_INT(BT_HCI_TIMEOUT_TAG_NUM, wait_entry->opcode); in command_timed_out()
535 waiting_command_t* wait_entry = NULL; in filter_incoming_event() local
548 wait_entry = get_waiting_command(opcode); in filter_incoming_event()
552 if (!wait_entry) { in filter_incoming_event()
561 if (wait_entry->complete_callback) { in filter_incoming_event()
562 wait_entry->complete_callback(packet, wait_entry->context); in filter_incoming_event()
563 } else if (wait_entry->complete_future) { in filter_incoming_event()
564 future_ready(wait_entry->complete_future, packet); in filter_incoming_event()
577 wait_entry = get_waiting_command(opcode); in filter_incoming_event()
581 if (!wait_entry) { in filter_incoming_event()
588 if (wait_entry->status_callback) in filter_incoming_event()
589 wait_entry->status_callback(status, wait_entry->command, in filter_incoming_event()
590 wait_entry->context); in filter_incoming_event()
608 if (wait_entry) { in filter_incoming_event()
611 (!wait_entry->complete_callback && !wait_entry->complete_future)) in filter_incoming_event()
615 if (event_code == HCI_COMMAND_COMPLETE_EVT || !wait_entry->status_callback) in filter_incoming_event()
616 buffer_allocator->free(wait_entry->command); in filter_incoming_event()
618 osi_free(wait_entry); in filter_incoming_event()
642 waiting_command_t* wait_entry = in get_waiting_command() local
645 if (!wait_entry || wait_entry->opcode != opcode) continue; in get_waiting_command()
647 list_remove(commands_pending_response, wait_entry); in get_waiting_command()
649 return wait_entry; in get_waiting_command()