Lines Matching refs:seg_o

80 	uint8_t               seg_o;         /* Segment being sent */  member
300 (tx->seg_o <= tx->seg_n) ? in schedule_transmit_continue()
343 static void seg_tx_buf_build(struct seg_tx *tx, uint8_t seg_o, in seg_tx_buf_build() argument
347 uint8_t len = MIN(seg_len(tx->ctl), tx->len - (seg_len(tx->ctl) * seg_o)); in seg_tx_buf_build()
351 net_buf_simple_add_u8(buf, (((seq_zero & 0x3f) << 2) | (seg_o >> 3))); in seg_tx_buf_build()
352 net_buf_simple_add_u8(buf, ((seg_o & 0x07) << 5) | tx->seg_n); in seg_tx_buf_build()
353 net_buf_simple_add_mem(buf, tx->seg[seg_o], len); in seg_tx_buf_build()
405 while (tx->seg_o <= tx->seg_n) { in seg_tx_send_unacked()
409 if (!tx->seg[tx->seg_o]) { in seg_tx_send_unacked()
411 tx->seg_o++; in seg_tx_send_unacked()
423 seg_tx_buf_build(tx, tx->seg_o, &seg->b); in seg_tx_send_unacked()
425 LOG_DBG("Sending %u/%u", tx->seg_o, tx->seg_n); in seg_tx_send_unacked()
434 tx->seg_o++; in seg_tx_send_unacked()
446 tx->seg_o = 0U; in seg_tx_send_unacked()
491 uint8_t seg_o; in send_seg() local
522 tx->seg_o = 0; in send_seg()
553 for (seg_o = 0U; sdu->len; seg_o++) { in send_seg()
568 LOG_DBG("seg %u: %s", seg_o, bt_hex(buf, len)); in send_seg()
570 tx->seg[seg_o] = buf; in send_seg()
576 seg_tx_buf_build(tx, seg_o, &seg); in send_seg()
578 if (seg_o == tx->seg_n) { in send_seg()
592 tx->seg[seg_o] = NULL; in send_seg()
921 if (tx->seg_o == 0) { in trans_ack()
1344 uint8_t seg_o; in trans_seg() local
1363 seg_o = (seq_zero & 0x03) << 3; in trans_seg()
1366 seg_o |= seg_n >> 5; in trans_seg()
1369 LOG_DBG("SeqZero 0x%04x SegO %u SegN %u", seq_zero, seg_o, seg_n); in trans_seg()
1371 if (seg_o > seg_n) { in trans_seg()
1372 LOG_ERR("SegO greater than SegN (%u > %u)", seg_o, seg_n); in trans_seg()
1506 if (BIT(seg_o) & rx->block) { in trans_seg()
1515 if (seg_o == seg_n) { in trans_seg()
1546 err = k_mem_slab_alloc(&segs, &rx->seg[seg_o], K_NO_WAIT); in trans_seg()
1548 LOG_WRN("Unable allocate buffer for Seg %u", seg_o); in trans_seg()
1552 memcpy(rx->seg[seg_o], buf->data, buf->len); in trans_seg()
1554 LOG_DBG("Received %u/%u", seg_o, seg_n); in trans_seg()
1557 rx->block |= BIT(seg_o); in trans_seg()