Lines Matching full:sdu

156     if (OS_MBUF_PKTLEN(rx->sdu) == 0) {  in ble_l2cap_coc_rx_fn()
172 rc = os_mbuf_appendfrom(rx->sdu, *om, 0, om_total - BLE_L2CAP_SDU_SIZE); in ble_l2cap_coc_rx_fn()
181 /* In RX case data_offset keeps incoming SDU len */ in ble_l2cap_coc_rx_fn()
187 rc = os_mbuf_appendfrom(rx->sdu, *om, 0, om_total); in ble_l2cap_coc_rx_fn()
197 if (OS_MBUF_PKTLEN(rx->sdu) == rx->data_offset) { in ble_l2cap_coc_rx_fn()
198 struct os_mbuf *sdu_rx = rx->sdu; in ble_l2cap_coc_rx_fn()
201 OS_MBUF_PKTLEN(rx->sdu), rx->credits); in ble_l2cap_coc_rx_fn()
204 * Since it this callback application might want to set new sdu in ble_l2cap_coc_rx_fn()
207 rx->sdu = NULL; in ble_l2cap_coc_rx_fn()
215 /* If we did not received full SDU and credits are 0 it means in ble_l2cap_coc_rx_fn()
218 * credit to peer so it can send us full SDU in ble_l2cap_coc_rx_fn()
221 /* Remote did not send full SDU. Lets give him one more credits to do in ble_l2cap_coc_rx_fn()
229 OS_MBUF_PKTLEN(rx->sdu), rx->credits); in ble_l2cap_coc_rx_fn()
253 chan->coc_rx.sdu = sdu_rx; in ble_l2cap_coc_chan_alloc()
255 /* Number of credits should allow to send full SDU with on given in ble_l2cap_coc_chan_alloc()
312 os_mbuf_free_chain(chan->coc_rx.sdu); in ble_l2cap_coc_cleanup_chan()
313 os_mbuf_free_chain(chan->coc_tx.sdu); in ble_l2cap_coc_cleanup_chan()
329 if (!tx->sdu) { in ble_l2cap_coc_continue_tx()
339 left_to_send = OS_MBUF_PKTLEN(tx->sdu) - tx->data_offset; in ble_l2cap_coc_continue_tx()
358 /* First packet needs SDU len first. Left to send */ in ble_l2cap_coc_continue_tx()
359 uint16_t l = htole16(OS_MBUF_PKTLEN(tx->sdu)); in ble_l2cap_coc_continue_tx()
361 BLE_HS_LOG(DEBUG, "Sending SDU len=%d\n", OS_MBUF_PKTLEN(tx->sdu)); in ble_l2cap_coc_continue_tx()
370 * that for first packet we need to decrease data size by 2 bytes for sdu in ble_l2cap_coc_continue_tx()
373 rc = os_mbuf_appendfrom(txom, tx->sdu, tx->data_offset, in ble_l2cap_coc_continue_tx()
395 len, tx->credits, OS_MBUF_PKTLEN(tx->sdu)- tx->data_offset ); in ble_l2cap_coc_continue_tx()
397 if (tx->data_offset == OS_MBUF_PKTLEN(tx->sdu)) { in ble_l2cap_coc_continue_tx()
399 os_mbuf_free_chain(tx->sdu); in ble_l2cap_coc_continue_tx()
400 tx->sdu = 0; in ble_l2cap_coc_continue_tx()
409 os_mbuf_free_chain(tx->sdu); in ble_l2cap_coc_continue_tx()
410 tx->sdu = NULL; in ble_l2cap_coc_continue_tx()
455 chan->coc_rx.sdu = sdu_rx; in ble_l2cap_coc_recv_ready()
466 * to be able to send complete SDU. in ble_l2cap_coc_recv_ready()
490 if (tx->sdu) { in ble_l2cap_coc_send()
498 tx->sdu = sdu_tx; in ble_l2cap_coc_send()