Commit 64e33c4d authored by Vinayak Kariappa Chettimada's avatar Vinayak Kariappa Chettimada Committed by github-actions[bot]
Browse files

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: default avatarVinayak Kariappa Chettimada <vich@nordicsemi.no>
(cherry picked from commit a8065926)
parent 6dc38064
Loading
Loading
Loading
Loading
+1 −0
Changes for subsys/bluetooth/controller/ll_sw/nordic/lll/lll_scan.c: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -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);
	}
+4 −1
Changes for subsys/bluetooth/controller/ll_sw/nordic/lll/lll_scan_aux.c: 4 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -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:
			 * 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:

		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 −0
Changes for subsys/bluetooth/controller/ll_sw/nordic/lll/lll_sync.c: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -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)
		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);
+2 −2
Changes for subsys/bluetooth/controller/ll_sw/ull_scan_aux.c: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -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)
		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.