• Home
  • Raw
  • Download

Lines Matching refs:incoming

530   packet_receive_data_t *incoming = &incoming_packets[PACKET_TYPE_TO_INBOUND_INDEX(type)];  in hal_says_data_ready()  local
534 switch (incoming->state) { in hal_says_data_ready()
537 incoming->bytes_remaining = preamble_sizes[PACKET_TYPE_TO_INDEX(type)]; in hal_says_data_ready()
538 memset(incoming->preamble, 0, PREAMBLE_BUFFER_SIZE); in hal_says_data_ready()
539 incoming->index = 0; in hal_says_data_ready()
540 incoming->state = PREAMBLE; in hal_says_data_ready()
543 incoming->preamble[incoming->index] = byte; in hal_says_data_ready()
544 incoming->index++; in hal_says_data_ready()
545 incoming->bytes_remaining--; in hal_says_data_ready()
547 if (incoming->bytes_remaining == 0) { in hal_says_data_ready()
549incoming->bytes_remaining = (type == DATA_TYPE_ACL) ? RETRIEVE_ACL_LENGTH(incoming->preamble) : by… in hal_says_data_ready()
551 size_t buffer_size = BT_HDR_SIZE + incoming->index + incoming->bytes_remaining; in hal_says_data_ready()
552 incoming->buffer = (BT_HDR *)buffer_allocator->alloc(buffer_size); in hal_says_data_ready()
554 if (!incoming->buffer) { in hal_says_data_ready()
557 incoming->state = incoming->bytes_remaining == 0 ? BRAND_NEW : IGNORE; in hal_says_data_ready()
562 incoming->buffer->offset = 0; in hal_says_data_ready()
563 incoming->buffer->layer_specific = 0; in hal_says_data_ready()
564 incoming->buffer->event = outbound_event_types[PACKET_TYPE_TO_INDEX(type)]; in hal_says_data_ready()
565 memcpy(incoming->buffer->data, incoming->preamble, incoming->index); in hal_says_data_ready()
567 incoming->state = incoming->bytes_remaining > 0 ? BODY : FINISHED; in hal_says_data_ready()
572 incoming->buffer->data[incoming->index] = byte; in hal_says_data_ready()
573 incoming->index++; in hal_says_data_ready()
574 incoming->bytes_remaining--; in hal_says_data_ready()
576 …size_t bytes_read = hal->read_data(type, (incoming->buffer->data + incoming->index), incoming->byt… in hal_says_data_ready()
577 incoming->index += bytes_read; in hal_says_data_ready()
578 incoming->bytes_remaining -= bytes_read; in hal_says_data_ready()
580 incoming->state = incoming->bytes_remaining == 0 ? FINISHED : incoming->state; in hal_says_data_ready()
583 incoming->bytes_remaining--; in hal_says_data_ready()
584 if (incoming->bytes_remaining == 0) { in hal_says_data_ready()
585 incoming->state = BRAND_NEW; in hal_says_data_ready()
599 if (incoming->state == FINISHED) { in hal_says_data_ready()
600 incoming->buffer->len = incoming->index; in hal_says_data_ready()
601 btsnoop->capture(incoming->buffer, true); in hal_says_data_ready()
604 packet_fragmenter->reassemble_and_dispatch(incoming->buffer); in hal_says_data_ready()
605 } else if (!filter_incoming_event(incoming->buffer)) { in hal_says_data_ready()
607 uint8_t *stream = incoming->buffer->data; in hal_says_data_ready()
614 incoming->buffer in hal_says_data_ready()
619 incoming->buffer = NULL; in hal_says_data_ready()
620 incoming->state = BRAND_NEW; in hal_says_data_ready()