Bluetooth: Controller: Fix Advertising LLL header initialization
Fix Advertising LLL header initialization to be done early
so that other functions like Periodic Advertising Parameter
set functions can use LLL context to reference ULL conttext.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
diff --git a/subsys/bluetooth/controller/ll_sw/ull_adv.c b/subsys/bluetooth/controller/ll_sw/ull_adv.c
index fea6955..47bee19 100644
--- a/subsys/bluetooth/controller/ll_sw/ull_adv.c
+++ b/subsys/bluetooth/controller/ll_sw/ull_adv.c
@@ -644,6 +644,11 @@
pdu->rx_addr = 0;
}
+ /* Initialize LLL header with parent pointer so that ULL contexts
+ * can be referenced in functions having the LLL context reference.
+ */
+ lll_hdr_init(&adv->lll, adv);
+
if (0) {
#if defined(CONFIG_BT_CTLR_ADV_EXT)
} else if (pdu->type == PDU_ADV_TYPE_EXT_IND) {
@@ -1202,8 +1207,8 @@
}
#endif /* CONFIG_BT_HCI_MESH_EXT */
+ /* Initialize ULL context before radio event scheduling is started. */
ull_hdr_init(&adv->ull);
- lll_hdr_init(lll, adv);
/* TODO: active_to_start feature port */
adv->ull.ticks_active_to_start = 0;