Bluetooth: controller: split: Schedule auxiliary after primary PDU
Fix to avoid a crash due to missing aux_ptr in current primary PDU constructed by LE Set Extended Advertising Parameter Set, while aux_ptr was populated by LE Set Extended Advertising Data Set in the latest double buffered PDU. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
9a82f38435
commit
29f26bac24
2 changed files with 11 additions and 0 deletions
|
@ -149,6 +149,9 @@ static int prepare_cb(struct lll_prepare_param *prepare_param)
|
||||||
if (h->adi) {
|
if (h->adi) {
|
||||||
ptr += sizeof(struct ext_adv_adi);
|
ptr += sizeof(struct ext_adv_adi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LL_ASSERT((pri->type == PDU_ADV_TYPE_EXT_IND) && h->aux_ptr);
|
||||||
|
|
||||||
aux = (void *)ptr;
|
aux = (void *)ptr;
|
||||||
|
|
||||||
#if !defined(BT_CTLR_ADV_EXT_PBACK)
|
#if !defined(BT_CTLR_ADV_EXT_PBACK)
|
||||||
|
|
|
@ -1010,11 +1010,19 @@ uint8_t ll_adv_enable(uint8_t enable)
|
||||||
|
|
||||||
aux = (void *)HDR_LLL2EVT(lll_aux);
|
aux = (void *)HDR_LLL2EVT(lll_aux);
|
||||||
ull_hdr_init(&aux->ull);
|
ull_hdr_init(&aux->ull);
|
||||||
|
|
||||||
|
/* Keep aux interval equal or higher than primary PDU
|
||||||
|
* interval.
|
||||||
|
*/
|
||||||
aux->interval =
|
aux->interval =
|
||||||
adv->interval +
|
adv->interval +
|
||||||
(HAL_TICKER_TICKS_TO_US(ULL_ADV_RANDOM_DELAY) /
|
(HAL_TICKER_TICKS_TO_US(ULL_ADV_RANDOM_DELAY) /
|
||||||
625U);
|
625U);
|
||||||
|
|
||||||
|
/* schedule after primary channel PDUs */
|
||||||
|
ticks_anchor += ticks_slot;
|
||||||
|
ticks_anchor += HAL_TICKER_US_TO_TICKS(EVENT_MAFS_US);
|
||||||
|
|
||||||
ret = ull_adv_aux_start(aux, ticks_anchor, &ret_cb);
|
ret = ull_adv_aux_start(aux, ticks_anchor, &ret_cb);
|
||||||
|
|
||||||
aux_is_started = 1U;
|
aux_is_started = 1U;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue