mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-03 23:47:08 +00:00
l2cap-ertm: calculate fcs only if used
This commit is contained in:
parent
fcb125edaf
commit
b72f690607
@ -1134,7 +1134,7 @@ int l2cap_send_prepared(uint16_t local_cid, uint16_t len){
|
|||||||
l2cap_setup_header(acl_buffer, channel->con_handle, packet_boundary_flag, channel->remote_cid, len + fcs_size);
|
l2cap_setup_header(acl_buffer, channel->con_handle, packet_boundary_flag, channel->remote_cid, len + fcs_size);
|
||||||
|
|
||||||
#ifdef ENABLE_L2CAP_ENHANCED_RETRANSMISSION_MODE
|
#ifdef ENABLE_L2CAP_ENHANCED_RETRANSMISSION_MODE
|
||||||
if (channel->mode == L2CAP_CHANNEL_MODE_ENHANCED_RETRANSMISSION){
|
if (fcs_size){
|
||||||
// calculate FCS over l2cap data
|
// calculate FCS over l2cap data
|
||||||
uint16_t fcs = crc16_calc(acl_buffer + 4, 4 + len);
|
uint16_t fcs = crc16_calc(acl_buffer + 4, 4 + len);
|
||||||
log_info("I-Frame: fcs 0x%04x", fcs);
|
log_info("I-Frame: fcs 0x%04x", fcs);
|
||||||
|
Loading…
Reference in New Issue
Block a user