Browse Source

Bluetooth: Controller: Fix to release aux context stored in node rx

Fix to release aux context stored in node rx, and not in the
superior scan or sync context as the one in the superior scan
or sync context could be reset or have a different new aux
context when multiple advertising chain reception is used.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
(cherry picked from commit a8065926ac)
backport-85407-to-v4.0-branch
Vinayak Kariappa Chettimada 5 months ago committed by github-actions[bot]
parent
commit
64e33c4ddc
  1. 1
      subsys/bluetooth/controller/ll_sw/nordic/lll/lll_scan.c
  2. 5
      subsys/bluetooth/controller/ll_sw/nordic/lll/lll_scan_aux.c
  3. 2
      subsys/bluetooth/controller/ll_sw/nordic/lll/lll_sync.c
  4. 4
      subsys/bluetooth/controller/ll_sw/ull_scan_aux.c

1
subsys/bluetooth/controller/ll_sw/nordic/lll/lll_scan.c

@ -1100,6 +1100,7 @@ static void isr_done_cleanup(void *param) @@ -1100,6 +1100,7 @@ static void isr_done_cleanup(void *param)
node_rx2->hdr.type = NODE_RX_TYPE_EXT_AUX_RELEASE;
node_rx2->rx_ftr.param = lll;
node_rx2->rx_ftr.lll_aux = lll->lll_aux;
ull_rx_put_sched(node_rx2->hdr.link, node_rx2);
}

5
subsys/bluetooth/controller/ll_sw/nordic/lll/lll_scan_aux.c

@ -707,6 +707,7 @@ static void isr_done(void *param) @@ -707,6 +707,7 @@ static void isr_done(void *param)
node_rx->hdr.type = NODE_RX_TYPE_EXT_AUX_RELEASE;
node_rx->rx_ftr.param = lll;
node_rx->rx_ftr.lll_aux = lll->lll_aux;
node_rx->rx_ftr.aux_failed = 1U;
ull_rx_put_sched(node_rx->hdr.link, node_rx);
@ -891,6 +892,7 @@ isr_rx_do_close: @@ -891,6 +892,7 @@ isr_rx_do_close:
* free it.
*/
node_rx2->rx_ftr.param = lll;
node_rx2->rx_ftr.lll_aux = lll->lll_aux;
ull_rx_put_sched(node_rx2->hdr.link, node_rx2);
}
@ -1612,7 +1614,8 @@ isr_rx_connect_rsp_do_close: @@ -1612,7 +1614,8 @@ isr_rx_connect_rsp_do_close:
node_rx->hdr.type = NODE_RX_TYPE_EXT_AUX_RELEASE;
node_rx->rx_ftr.param = lll->lll_aux;
node_rx->rx_ftr.param = lll;
node_rx->rx_ftr.lll_aux = lll->lll_aux;
ull_rx_put_sched(node_rx->hdr.link, node_rx);

2
subsys/bluetooth/controller/ll_sw/nordic/lll/lll_sync.c

@ -1152,6 +1152,7 @@ isr_rx_aux_chain_done: @@ -1152,6 +1152,7 @@ isr_rx_aux_chain_done:
node_rx->hdr.type = NODE_RX_TYPE_EXT_AUX_RELEASE;
node_rx->rx_ftr.param = lll;
node_rx->rx_ftr.lll_aux = lll->lll_aux;
node_rx->rx_ftr.aux_failed = 1U;
ull_rx_put(node_rx->hdr.link, node_rx);
@ -1250,6 +1251,7 @@ static void isr_done(void *param) @@ -1250,6 +1251,7 @@ static void isr_done(void *param)
node_rx->hdr.type = NODE_RX_TYPE_EXT_AUX_RELEASE;
node_rx->rx_ftr.param = lll;
node_rx->rx_ftr.lll_aux = lll->lll_aux;
node_rx->rx_ftr.aux_failed = 1U;
ull_rx_put_sched(node_rx->hdr.link, node_rx);

4
subsys/bluetooth/controller/ll_sw/ull_scan_aux.c

@ -1100,7 +1100,7 @@ void ull_scan_aux_release(memq_link_t *link, struct node_rx_pdu *rx) @@ -1100,7 +1100,7 @@ void ull_scan_aux_release(memq_link_t *link, struct node_rx_pdu *rx)
rx->hdr.type = NODE_RX_TYPE_RELEASE;
lll = rx->rx_ftr.param;
lll_aux = lll->lll_aux;
lll_aux = rx->rx_ftr.lll_aux;
} else if (!IS_ENABLED(CONFIG_BT_CTLR_SYNC_PERIODIC) ||
ull_scan_aux_is_valid_get(param_ull)) {
@ -1119,7 +1119,7 @@ void ull_scan_aux_release(memq_link_t *link, struct node_rx_pdu *rx) @@ -1119,7 +1119,7 @@ void ull_scan_aux_release(memq_link_t *link, struct node_rx_pdu *rx)
sync->data_len = 0U;
lll = rx->rx_ftr.param;
lll_aux = lll->lll_aux;
lll_aux = rx->rx_ftr.lll_aux;
/* Change node type so HCI can dispatch report for truncated
* data properly.

Loading…
Cancel
Save