Skip to content

Commit 37c46e3

Browse files
cvinayakjhedberg
authored andcommitted
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 62c1e1a ("Bluetooth: controller: split: Fix assert on invalid packet sequence") Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent c5f9a2d commit 37c46e3

File tree

1 file changed

+5
-3
lines changed
  • subsys/bluetooth/controller/ll_sw/nordic/lll

1 file changed

+5
-3
lines changed

subsys/bluetooth/controller/ll_sw/nordic/lll/lll_conn.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,7 @@ static int isr_rx_pdu(struct lll_conn *lll, struct pdu_data *pdu_data_rx,
688688
if (link) {
689689
struct pdu_data *pdu_data_tx;
690690
u8_t pdu_data_tx_len;
691+
u8_t offset;
691692

692693
pdu_data_tx = (void *)(tx->pdu +
693694
lll->packet_tx_head_offset);
@@ -702,9 +703,10 @@ static int isr_rx_pdu(struct lll_conn *lll, struct pdu_data *pdu_data_rx,
702703
}
703704
#endif /* CONFIG_BT_CTLR_LE_ENC */
704705

705-
lll->packet_tx_head_offset += pdu_data_tx_len;
706-
if (lll->packet_tx_head_offset ==
707-
lll->packet_tx_head_len) {
706+
offset = lll->packet_tx_head_offset + pdu_data_tx_len;
707+
if (offset < lll->packet_tx_head_len) {
708+
lll->packet_tx_head_offset = offset;
709+
} else if (offset == lll->packet_tx_head_len) {
708710
lll->packet_tx_head_len = 0;
709711
lll->packet_tx_head_offset = 0;
710712

0 commit comments

Comments
 (0)