Bluetooth: controller: Stop aux after connected
After slave connection is created only adv instance is stopped, we also need to stop aux separately if enabled. Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
This commit is contained in:
parent
88a8fc1d5e
commit
98d7adc30d
2 changed files with 29 additions and 0 deletions
|
@ -798,6 +798,15 @@ void ll_rx_dequeue(void)
|
|||
}
|
||||
}
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_ADV_EXT)
|
||||
if (lll->aux) {
|
||||
struct ll_adv_aux_set *aux;
|
||||
|
||||
aux = (void *)HDR_LLL2EVT(lll->aux);
|
||||
aux->is_started = 0U;
|
||||
}
|
||||
#endif /* CONFIG_BT_CTLR_ADV_EXT */
|
||||
|
||||
adv->is_enabled = 0U;
|
||||
#else /* !CONFIG_BT_PERIPHERAL */
|
||||
ARG_UNUSED(cc);
|
||||
|
|
|
@ -310,6 +310,26 @@ void ull_slave_setup(memq_link_t *link, struct node_rx_hdr *rx,
|
|||
mayfly_enable(TICKER_USER_ID_ULL_HIGH, TICKER_USER_ID_ULL_LOW, 0);
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_ADV_EXT) && (CONFIG_BT_CTLR_ADV_AUX_SET > 0)
|
||||
struct lll_adv_aux *lll_aux = adv->lll.aux;
|
||||
|
||||
if (lll_aux) {
|
||||
struct ll_adv_aux_set *aux;
|
||||
|
||||
aux = (void *)HDR_LLL2EVT(lll_aux);
|
||||
|
||||
ticker_id_adv = TICKER_ID_ADV_AUX_BASE +
|
||||
ull_adv_aux_handle_get(aux);
|
||||
ticker_status = ticker_stop(TICKER_INSTANCE_ID_CTLR,
|
||||
TICKER_USER_ID_ULL_HIGH,
|
||||
ticker_id_adv,
|
||||
ticker_op_stop_adv_cb, aux);
|
||||
ticker_op_stop_adv_cb(ticker_status, aux);
|
||||
|
||||
aux->is_started = 0U;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Stop Advertiser */
|
||||
ticker_id_adv = TICKER_ID_ADV_BASE + ull_adv_handle_get(adv);
|
||||
ticker_status = ticker_stop(TICKER_INSTANCE_ID_CTLR,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue