Skip to content

Commit

Permalink
bluetooth: controller: openisa: fix assert on invalid packet sequence
Browse files Browse the repository at this point in the history
This is a rework for OpenISA SW LL of
"62c1e1a52b Bluetooth: controller: split: Fix assert on invalid packet
sequence"

Fix to remove assertion failure check on detecting invalid
packet sequence used by peer central and that no non-empty
packet was transmitted.

Fixes zephyrproject-rtos#22967.

Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
Signed-off-by: Alex Porosanu <[email protected]>
  • Loading branch information
alexandru-porosanu-nxp committed Apr 27, 2020
1 parent 6627249 commit e4ed1bb
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions subsys/bluetooth/controller/ll_sw/openisa/lll/lll_conn.c
Original file line number Diff line number Diff line change
Expand Up @@ -663,6 +663,9 @@ static int isr_rx_pdu(struct lll_conn *lll, struct pdu_data *pdu_data_rx,
{
/* Ack for tx-ed data */
if (pdu_data_rx->nesn != lll->sn) {
struct node_tx *tx;
memq_link_t *link;

/* Increment serial number */
lll->sn++;

Expand All @@ -676,14 +679,16 @@ static int isr_rx_pdu(struct lll_conn *lll, struct pdu_data *pdu_data_rx,
#endif /* CONFIG_BT_PERIPHERAL */

if (!lll->empty) {
struct pdu_data *pdu_data_tx;
u8_t pdu_data_tx_len;
struct node_tx *tx;
memq_link_t *link;

link = memq_peek(lll->memq_tx.head, lll->memq_tx.tail,
(void **)&tx);
LL_ASSERT(link);
} else {
lll->empty = 0;
link = NULL;
}

if (link) {
struct pdu_data *pdu_data_tx;
u8_t pdu_data_tx_len;

pdu_data_tx = (void *)(tx->pdu +
lll->packet_tx_head_offset);
Expand Down Expand Up @@ -715,8 +720,6 @@ static int isr_rx_pdu(struct lll_conn *lll, struct pdu_data *pdu_data_rx,

*tx_release = tx;
}
} else {
lll->empty = 0;
}
}

Expand Down

0 comments on commit e4ed1bb

Please sign in to comment.