mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-09-05 16:50:01 +00:00
nimble/ll: Fix data fragmentation with maxTxTime<maxTxOctets
We did not properly adjust payload length for 2nd and subsequent packet fragments so in case effectiveMaxTxTime is less than time required to send payload of effectiveMaxTxOctets, we send too many data in all packets except 1st one. X-Original-Commit: 28a6757071fef72b2b6171fdf2c2fede48d524df
This commit is contained in:
@@ -3788,11 +3788,9 @@ ble_ll_conn_rx_isr_end(uint8_t *rxbuf, struct ble_mbuf_hdr *rxhdr)
|
||||
/* XXX: TODO need to check with phy update procedure.
|
||||
* There are limitations if we have started update */
|
||||
rem_bytes = OS_MBUF_PKTLEN(txpdu) - txhdr->txinfo.offset;
|
||||
if (rem_bytes > connsm->eff_max_tx_octets) {
|
||||
txhdr->txinfo.pyld_len = connsm->eff_max_tx_octets;
|
||||
} else {
|
||||
txhdr->txinfo.pyld_len = rem_bytes;
|
||||
}
|
||||
/* Adjust payload for max TX time and octets */
|
||||
rem_bytes = ble_ll_conn_adjust_pyld_len(connsm, rem_bytes);
|
||||
txhdr->txinfo.pyld_len = rem_bytes;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user