Bluetooth: controller: split: Fix regression in handling invalid pkt seq
Fix regression in handling invalid packet sequence in the
first packet in a connection.
This relates to commit 62c1e1a52b
("Bluetooth: controller:
split: Fix assert on invalid packet sequence")
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
6a37dc5a68
commit
5474dbb544
1 changed files with 5 additions and 3 deletions
|
@ -688,6 +688,7 @@ static int isr_rx_pdu(struct lll_conn *lll, struct pdu_data *pdu_data_rx,
|
|||
if (link) {
|
||||
struct pdu_data *pdu_data_tx;
|
||||
u8_t pdu_data_tx_len;
|
||||
u8_t offset;
|
||||
|
||||
pdu_data_tx = (void *)(tx->pdu +
|
||||
lll->packet_tx_head_offset);
|
||||
|
@ -702,9 +703,10 @@ static int isr_rx_pdu(struct lll_conn *lll, struct pdu_data *pdu_data_rx,
|
|||
}
|
||||
#endif /* CONFIG_BT_CTLR_LE_ENC */
|
||||
|
||||
lll->packet_tx_head_offset += pdu_data_tx_len;
|
||||
if (lll->packet_tx_head_offset ==
|
||||
lll->packet_tx_head_len) {
|
||||
offset = lll->packet_tx_head_offset + pdu_data_tx_len;
|
||||
if (offset < lll->packet_tx_head_len) {
|
||||
lll->packet_tx_head_offset = offset;
|
||||
} else if (offset == lll->packet_tx_head_len) {
|
||||
lll->packet_tx_head_len = 0;
|
||||
lll->packet_tx_head_offset = 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue