Skip to content

Commit 8d6cd64

Browse files
cvinayaknordicjm
authored andcommitted
[nrf fromtree] 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 <[email protected]> (cherry picked from commit a806592) Signed-off-by: Vinayak Kariappa Chettimada <[email protected]>
1 parent 84483b8 commit 8d6cd64

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,6 +1100,7 @@ static void isr_done_cleanup(void *param)
11001100
node_rx2->hdr.type = NODE_RX_TYPE_EXT_AUX_RELEASE;
11011101

11021102
node_rx2->rx_ftr.param = lll;
1103+
node_rx2->rx_ftr.lll_aux = lll->lll_aux;
11031104

11041105
ull_rx_put_sched(node_rx2->hdr.link, node_rx2);
11051106
}

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,7 @@ static void isr_done(void *param)
710710
node_rx->hdr.type = NODE_RX_TYPE_EXT_AUX_RELEASE;
711711

712712
node_rx->rx_ftr.param = lll;
713+
node_rx->rx_ftr.lll_aux = lll->lll_aux;
713714
node_rx->rx_ftr.aux_failed = 1U;
714715

715716
ull_rx_put_sched(node_rx->hdr.link, node_rx);
@@ -897,6 +898,7 @@ static void isr_rx(struct lll_scan *lll, struct lll_scan_aux *lll_aux,
897898
* free it.
898899
*/
899900
node_rx2->rx_ftr.param = lll;
901+
node_rx2->rx_ftr.lll_aux = lll->lll_aux;
900902

901903
ull_rx_put_sched(node_rx2->hdr.link, node_rx2);
902904
}
@@ -1620,7 +1622,8 @@ static void isr_rx_connect_rsp(void *param)
16201622

16211623
node_rx->hdr.type = NODE_RX_TYPE_EXT_AUX_RELEASE;
16221624

1623-
node_rx->rx_ftr.param = lll->lll_aux;
1625+
node_rx->rx_ftr.param = lll;
1626+
node_rx->rx_ftr.lll_aux = lll->lll_aux;
16241627

16251628
ull_rx_put_sched(node_rx->hdr.link, node_rx);
16261629

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1152,6 +1152,7 @@ static void isr_rx_aux_chain(void *param)
11521152
node_rx->hdr.type = NODE_RX_TYPE_EXT_AUX_RELEASE;
11531153

11541154
node_rx->rx_ftr.param = lll;
1155+
node_rx->rx_ftr.lll_aux = lll->lll_aux;
11551156
node_rx->rx_ftr.aux_failed = 1U;
11561157

11571158
ull_rx_put(node_rx->hdr.link, node_rx);
@@ -1250,6 +1251,7 @@ static void isr_done(void *param)
12501251
node_rx->hdr.type = NODE_RX_TYPE_EXT_AUX_RELEASE;
12511252

12521253
node_rx->rx_ftr.param = lll;
1254+
node_rx->rx_ftr.lll_aux = lll->lll_aux;
12531255
node_rx->rx_ftr.aux_failed = 1U;
12541256

12551257
ull_rx_put_sched(node_rx->hdr.link, node_rx);

subsys/bluetooth/controller/ll_sw/ull_scan_aux.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,7 +1132,7 @@ void ull_scan_aux_release(memq_link_t *link, struct node_rx_pdu *rx)
11321132
rx->hdr.type = NODE_RX_TYPE_RELEASE;
11331133

11341134
lll = rx->rx_ftr.param;
1135-
lll_aux = lll->lll_aux;
1135+
lll_aux = rx->rx_ftr.lll_aux;
11361136

11371137
} else if (!IS_ENABLED(CONFIG_BT_CTLR_SYNC_PERIODIC) ||
11381138
ull_scan_aux_is_valid_get(param_ull)) {
@@ -1151,7 +1151,7 @@ void ull_scan_aux_release(memq_link_t *link, struct node_rx_pdu *rx)
11511151
sync->data_len = 0U;
11521152

11531153
lll = rx->rx_ftr.param;
1154-
lll_aux = lll->lll_aux;
1154+
lll_aux = rx->rx_ftr.lll_aux;
11551155

11561156
/* Change node type so HCI can dispatch report for truncated
11571157
* data properly.

0 commit comments

Comments
 (0)