Loading system/stack/l2cap/l2c_fcr.cc +6 −11 Original line number Diff line number Diff line Loading @@ -1789,18 +1789,11 @@ BT_HDR* l2c_fcr_get_next_xmit_sdu_seg(tL2C_CCB* p_ccb, return (p_xmit); } /******************************************************************************* * * Function l2c_lcc_get_next_xmit_sdu_seg * * Description Get the next SDU segment to transmit for LE connection * oriented channel * * Returns pointer to buffer with segment or NULL * ******************************************************************************/ /** Get the next PDU to transmit for LE connection oriented channel. Returns * pointer to buffer with PDU. |last_piece_of_sdu| will be set to true, if * returned PDU is last piece from this SDU.*/ BT_HDR* l2c_lcc_get_next_xmit_sdu_seg(tL2C_CCB* p_ccb, uint16_t max_packet_length) { bool* last_piece_of_sdu) { bool first_seg = false; /* The segment is the first part of data */ bool last_seg = false; /* The segment is the last part of data */ uint16_t no_of_bytes_to_send = 0; Loading Loading @@ -1859,6 +1852,8 @@ BT_HDR* l2c_lcc_get_next_xmit_sdu_seg(tL2C_CCB* p_ccb, return (NULL); } if (last_piece_of_sdu) *last_piece_of_sdu = last_seg; if (last_seg) { p_buf = (BT_HDR*)fixed_queue_try_dequeue(p_ccb->xmit_hold_q); osi_free(p_buf); Loading system/stack/l2cap/l2c_int.h +1 −1 Original line number Diff line number Diff line Loading @@ -739,7 +739,7 @@ extern BT_HDR* l2c_fcr_get_next_xmit_sdu_seg(tL2C_CCB* p_ccb, extern void l2c_fcr_start_timer(tL2C_CCB* p_ccb); extern void l2c_lcc_proc_pdu(tL2C_CCB* p_ccb, BT_HDR* p_buf); extern BT_HDR* l2c_lcc_get_next_xmit_sdu_seg(tL2C_CCB* p_ccb, uint16_t max_packet_length); bool* last_piece_of_sdu); /* Configuration negotiation */ extern uint8_t l2c_fcr_chk_chan_modes(tL2C_CCB* p_ccb); Loading system/stack/l2cap/l2c_utils.cc +8 −2 Original line number Diff line number Diff line Loading @@ -3286,10 +3286,16 @@ BT_HDR* l2cu_get_next_buffer_to_send(tL2C_LCB* p_lcb, L2CAP_TRACE_DEBUG("%s No credits to send packets", __func__); return NULL; } p_buf = l2c_lcc_get_next_xmit_sdu_seg(p_ccb, 0); if (p_buf == NULL) return (NULL); bool last_piece_of_sdu = false; p_buf = l2c_lcc_get_next_xmit_sdu_seg(p_ccb, &last_piece_of_sdu); p_ccb->peer_conn_cfg.credits--; if (last_piece_of_sdu) { // TODO: send callback up the stack. Investigate setting p_cbi->cb to // notify after controller ack send. } } else { if (p_ccb->peer_cfg.fcr.mode != L2CAP_FCR_BASIC_MODE) { p_buf = l2c_fcr_get_next_xmit_sdu_seg(p_ccb, 0); Loading Loading
system/stack/l2cap/l2c_fcr.cc +6 −11 Original line number Diff line number Diff line Loading @@ -1789,18 +1789,11 @@ BT_HDR* l2c_fcr_get_next_xmit_sdu_seg(tL2C_CCB* p_ccb, return (p_xmit); } /******************************************************************************* * * Function l2c_lcc_get_next_xmit_sdu_seg * * Description Get the next SDU segment to transmit for LE connection * oriented channel * * Returns pointer to buffer with segment or NULL * ******************************************************************************/ /** Get the next PDU to transmit for LE connection oriented channel. Returns * pointer to buffer with PDU. |last_piece_of_sdu| will be set to true, if * returned PDU is last piece from this SDU.*/ BT_HDR* l2c_lcc_get_next_xmit_sdu_seg(tL2C_CCB* p_ccb, uint16_t max_packet_length) { bool* last_piece_of_sdu) { bool first_seg = false; /* The segment is the first part of data */ bool last_seg = false; /* The segment is the last part of data */ uint16_t no_of_bytes_to_send = 0; Loading Loading @@ -1859,6 +1852,8 @@ BT_HDR* l2c_lcc_get_next_xmit_sdu_seg(tL2C_CCB* p_ccb, return (NULL); } if (last_piece_of_sdu) *last_piece_of_sdu = last_seg; if (last_seg) { p_buf = (BT_HDR*)fixed_queue_try_dequeue(p_ccb->xmit_hold_q); osi_free(p_buf); Loading
system/stack/l2cap/l2c_int.h +1 −1 Original line number Diff line number Diff line Loading @@ -739,7 +739,7 @@ extern BT_HDR* l2c_fcr_get_next_xmit_sdu_seg(tL2C_CCB* p_ccb, extern void l2c_fcr_start_timer(tL2C_CCB* p_ccb); extern void l2c_lcc_proc_pdu(tL2C_CCB* p_ccb, BT_HDR* p_buf); extern BT_HDR* l2c_lcc_get_next_xmit_sdu_seg(tL2C_CCB* p_ccb, uint16_t max_packet_length); bool* last_piece_of_sdu); /* Configuration negotiation */ extern uint8_t l2c_fcr_chk_chan_modes(tL2C_CCB* p_ccb); Loading
system/stack/l2cap/l2c_utils.cc +8 −2 Original line number Diff line number Diff line Loading @@ -3286,10 +3286,16 @@ BT_HDR* l2cu_get_next_buffer_to_send(tL2C_LCB* p_lcb, L2CAP_TRACE_DEBUG("%s No credits to send packets", __func__); return NULL; } p_buf = l2c_lcc_get_next_xmit_sdu_seg(p_ccb, 0); if (p_buf == NULL) return (NULL); bool last_piece_of_sdu = false; p_buf = l2c_lcc_get_next_xmit_sdu_seg(p_ccb, &last_piece_of_sdu); p_ccb->peer_conn_cfg.credits--; if (last_piece_of_sdu) { // TODO: send callback up the stack. Investigate setting p_cbi->cb to // notify after controller ack send. } } else { if (p_ccb->peer_cfg.fcr.mode != L2CAP_FCR_BASIC_MODE) { p_buf = l2c_fcr_get_next_xmit_sdu_seg(p_ccb, 0); Loading