Home | History | Annotate | Download | only in src

Lines Matching defs:packet

54 extern void hci_transmit(BT_HDR* packet);
58 extern void hci_log_firmware_debug_packet(int fd, BT_HDR* packet);
115 static bool filter_incoming_event(BT_HDR* packet);
124 static void enqueue_packet(void* packet);
125 static void event_packet_ready(void* packet);
130 static void transmit_fragment(BT_HDR* packet, bool send_transmit_finished);
131 static void dispatch_reassembled(BT_HDR* packet);
132 static void fragmenter_transmit_finished(BT_HDR* packet,
145 BT_HDR* packet) {
146 btsnoop->capture(packet, true);
148 if (!filter_incoming_event(packet)) {
149 send_data_upwards.Run(from_here, packet);
153 void acl_event_received(BT_HDR* packet) {
154 btsnoop->capture(packet, true);
155 packet_fragmenter->reassemble_and_dispatch(packet);
158 void sco_data_received(BT_HDR* packet) {
159 btsnoop->capture(packet, true);
160 packet_fragmenter->reassemble_and_dispatch(packet);
388 // Command/packet transmitting functions
421 static void enqueue_packet(void* packet) {
425 buffer_allocator->free(packet);
429 FROM_HERE, base::Bind(&event_packet_ready, packet));
433 // The queue may be the command queue or the packet queue, we don't care
434 BT_HDR* packet = (BT_HDR*)pkt;
435 packet_fragmenter->fragment_and_dispatch(packet);
439 static void transmit_fragment(BT_HDR* packet, bool send_transmit_finished) {
440 btsnoop->capture(packet, false);
443 // event is received. Check packet->event before sending to avoid a race.
445 (packet->event & MSG_EVT_MASK) != MSG_STACK_TO_HC_HCI_CMD &&
448 hci_transmit(packet);
451 buffer_allocator->free(packet);
455 static void fragmenter_transmit_finished(BT_HDR* packet,
458 buffer_allocator->free(packet);
461 // packet up to a higher layer.
464 send_data_upwards.Run(FROM_HERE, packet);
550 // Event/packet receiving functions
574 static bool filter_incoming_event(BT_HDR* packet) {
576 uint8_t* stream = packet->data;
602 wait_entry->complete_callback(packet, wait_entry->context);
604 future_ready(wait_entry->complete_future, packet);
639 hci_log_firmware_debug_packet(hci_firmware_log_fd, packet);
641 buffer_allocator->free(packet);
649 // If it has a callback, it's responsible for freeing the packet
652 buffer_allocator->free(packet);
660 buffer_allocator->free(packet);
666 // Callback for the fragmenter to dispatch up a completely reassembled packet
667 static void dispatch_reassembled(BT_HDR* packet) {
669 CHECK((packet->event & MSG_EVT_MASK) != MSG_HC_TO_STACK_HCI_EVT);
672 send_data_upwards.Run(FROM_HERE, packet);