l2cap-ertm: fix l2cap data dispatch for ertm

This commit is contained in:
Matthias Ringwald 2017-07-25 13:24:37 +02:00
parent 550189ff21
commit 3c412221cc

View File

@ -2925,7 +2925,7 @@ static void l2cap_acl_handler(uint8_t packet_type, uint16_t channel, uint8_t *pa
l2cap_channel->req_seq = l2cap_channel->expected_tx_seq; l2cap_channel->req_seq = l2cap_channel->expected_tx_seq;
// process SDU // process SDU
l2cap_ertm_handle_in_sequence_sdu(l2cap_channel, sar, &packet[COMPLETE_L2CAP_HEADER+2], size-(COMPLETE_L2CAP_HEADER+2)); l2cap_ertm_handle_in_sequence_sdu(l2cap_channel, sar, &packet[COMPLETE_L2CAP_HEADER+2], size-(COMPLETE_L2CAP_HEADER+2+2));
// process stored segments // process stored segments
while (1){ while (1){
@ -2955,7 +2955,7 @@ static void l2cap_acl_handler(uint8_t packet_type, uint16_t channel, uint8_t *pa
int delta = (tx_seq - l2cap_channel->expected_tx_seq) & 0x3f; int delta = (tx_seq - l2cap_channel->expected_tx_seq) & 0x3f;
if (delta < 2){ if (delta < 2){
// store segment // store segment
l2cap_ertm_handle_out_of_sequence_sdu(l2cap_channel, sar, delta, &packet[COMPLETE_L2CAP_HEADER+2], size-(COMPLETE_L2CAP_HEADER+2)); l2cap_ertm_handle_out_of_sequence_sdu(l2cap_channel, sar, delta, &packet[COMPLETE_L2CAP_HEADER+2], size-(COMPLETE_L2CAP_HEADER+2+2));
log_info("Received unexpected frame TxSeq %u but expected %u -> send S-SREJ", tx_seq, l2cap_channel->expected_tx_seq); log_info("Received unexpected frame TxSeq %u but expected %u -> send S-SREJ", tx_seq, l2cap_channel->expected_tx_seq);
l2cap_channel->send_supervisor_frame_selective_reject = 1; l2cap_channel->send_supervisor_frame_selective_reject = 1;