Lines Matching full:rx
139 struct ble_l2cap_coc_endpoint *rx; in ble_l2cap_coc_rx_fn() local
146 /* Create a shortcut to rx endpoint */ in ble_l2cap_coc_rx_fn()
147 rx = &chan->coc_rx; in ble_l2cap_coc_rx_fn()
156 if (OS_MBUF_PKTLEN(rx->sdu) == 0) { in ble_l2cap_coc_rx_fn()
160 if (sdu_len > rx->mtu) { in ble_l2cap_coc_rx_fn()
162 BLE_HS_LOG(INFO, "error: sdu_len > rx->mtu (%d>%d)\n", in ble_l2cap_coc_rx_fn()
163 sdu_len, rx->mtu); in ble_l2cap_coc_rx_fn()
168 sdu_len, om_total, rx->credits); 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()
182 rx->data_offset = 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()
195 rx->credits--; 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()
207 rx->sdu = NULL; in ble_l2cap_coc_rx_fn()
208 rx->data_offset = 0; in ble_l2cap_coc_rx_fn()
220 if (rx->credits == 0) { in ble_l2cap_coc_rx_fn()
224 rx->credits = 1; in ble_l2cap_coc_rx_fn()
225 ble_l2cap_sig_le_credits(chan->conn_handle, chan->scid, rx->credits); in ble_l2cap_coc_rx_fn()
229 OS_MBUF_PKTLEN(rx->sdu), rx->credits); in ble_l2cap_coc_rx_fn()