Bluetooth: controller: split: Fix extended event properties changes
Added implementation to handle updates to adv mode and event properties of an already created advertising set. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
6c2bccfb09
commit
9a82f38435
3 changed files with 44 additions and 1 deletions
|
@ -177,9 +177,44 @@ uint8_t ll_adv_params_set(uint16_t interval, uint8_t adv_type,
|
|||
pdu = lll_adv_data_peek(&adv->lll);
|
||||
#if defined(CONFIG_BT_CTLR_ADV_EXT)
|
||||
if (pdu->type != pdu_adv_type[adv_type]) {
|
||||
is_pdu_type_changed = 1;
|
||||
|
||||
if (pdu->type == PDU_ADV_TYPE_EXT_IND) {
|
||||
struct lll_adv_aux *lll_aux = adv->lll.aux;
|
||||
|
||||
if (lll_aux) {
|
||||
struct ll_adv_aux_set *aux;
|
||||
|
||||
/* FIXME: copy AD data from auxiliary channel
|
||||
* PDU.
|
||||
*/
|
||||
pdu->len = 0;
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_ADV_PERIODIC)
|
||||
/* FIXME: release periodic adv set */
|
||||
LL_ASSERT(!adv->lll.sync);
|
||||
#endif /* CONFIG_BT_CTLR_ADV_PERIODIC */
|
||||
|
||||
/* Release auxiliary channel set */
|
||||
aux = (void *)HDR_LLL2EVT(lll_aux);
|
||||
ull_adv_aux_release(aux);
|
||||
|
||||
adv->lll.aux = NULL;
|
||||
} else {
|
||||
/* No previous AD data in auxiliary channel
|
||||
* PDU.
|
||||
*/
|
||||
pdu->len = 0;
|
||||
}
|
||||
}
|
||||
|
||||
pdu->type = pdu_adv_type[adv_type];
|
||||
|
||||
is_pdu_type_changed = 1;
|
||||
if (pdu->type == PDU_ADV_TYPE_EXT_IND) {
|
||||
/* TODO: Copy AD data from legacy PDU into auxiliary
|
||||
* PDU.
|
||||
*/
|
||||
}
|
||||
}
|
||||
#else /* !CONFIG_BT_CTLR_ADV_EXT */
|
||||
pdu->type = pdu_adv_type[adv_type];
|
||||
|
|
|
@ -620,6 +620,11 @@ uint8_t ull_adv_aux_stop(struct ll_adv_aux_set *aux)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void ull_adv_aux_release(struct ll_adv_aux_set *aux)
|
||||
{
|
||||
aux_release(aux);
|
||||
}
|
||||
|
||||
void ull_adv_aux_offset_get(struct ll_adv_set *adv)
|
||||
{
|
||||
static memq_link_t link;
|
||||
|
|
|
@ -49,6 +49,9 @@ uint32_t ull_adv_aux_start(struct ll_adv_aux_set *aux, uint32_t ticks_anchor,
|
|||
/* helper function to stop auxiliary advertising */
|
||||
uint8_t ull_adv_aux_stop(struct ll_adv_aux_set *aux);
|
||||
|
||||
/* helper function to release auxiliary advertising instance */
|
||||
void ull_adv_aux_release(struct ll_adv_aux_set *aux);
|
||||
|
||||
/* helper function to schedule a mayfly to get aux offset */
|
||||
void ull_adv_aux_offset_get(struct ll_adv_set *adv);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue