Bluetooth: controller: split: cond compile Ext Adv without Aux chan
Conditional compile Extended Advertising without Auxiliary channel PDU use. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
46299e71cc
commit
c8b050ee77
2 changed files with 22 additions and 3 deletions
|
@ -247,11 +247,13 @@ uint8_t ll_adv_params_set(uint16_t interval, uint8_t adv_type,
|
||||||
ptr += sizeof(struct ext_adv_adi);
|
ptr += sizeof(struct ext_adv_adi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if (CONFIG_BT_CTLR_ADV_AUX_SET > 0)
|
||||||
/* AuxPtr flag */
|
/* AuxPtr flag */
|
||||||
if (_h.aux_ptr) {
|
if (_h.aux_ptr) {
|
||||||
h->aux_ptr = 1;
|
h->aux_ptr = 1;
|
||||||
ptr += sizeof(struct ext_adv_aux_ptr);
|
ptr += sizeof(struct ext_adv_aux_ptr);
|
||||||
}
|
}
|
||||||
|
#endif /* (CONFIG_BT_CTLR_ADV_AUX_SET > 0) */
|
||||||
|
|
||||||
/* No SyncInfo flag in primary channel PDU */
|
/* No SyncInfo flag in primary channel PDU */
|
||||||
|
|
||||||
|
@ -303,6 +305,7 @@ uint8_t ll_adv_params_set(uint16_t interval, uint8_t adv_type,
|
||||||
|
|
||||||
/* No SyncInfo in primary channel PDU */
|
/* No SyncInfo in primary channel PDU */
|
||||||
|
|
||||||
|
#if (CONFIG_BT_CTLR_ADV_AUX_SET > 0)
|
||||||
/* AuxPtr */
|
/* AuxPtr */
|
||||||
if (h->aux_ptr) {
|
if (h->aux_ptr) {
|
||||||
struct ext_adv_aux_ptr *aux;
|
struct ext_adv_aux_ptr *aux;
|
||||||
|
@ -319,6 +322,7 @@ uint8_t ll_adv_params_set(uint16_t interval, uint8_t adv_type,
|
||||||
aux->phy = find_lsb_set(phy_s) - 1;
|
aux->phy = find_lsb_set(phy_s) - 1;
|
||||||
}
|
}
|
||||||
adv->lll.phy_s = phy_s;
|
adv->lll.phy_s = phy_s;
|
||||||
|
#endif /* (CONFIG_BT_CTLR_ADV_AUX_SET > 0) */
|
||||||
|
|
||||||
/* ADI */
|
/* ADI */
|
||||||
if (h->adi) {
|
if (h->adi) {
|
||||||
|
@ -467,7 +471,7 @@ uint8_t ll_adv_enable(uint8_t handle, uint8_t enable)
|
||||||
struct ll_adv_sync_set *sync = NULL;
|
struct ll_adv_sync_set *sync = NULL;
|
||||||
uint8_t sync_is_started = 0U;
|
uint8_t sync_is_started = 0U;
|
||||||
#endif /* CONFIG_BT_CTLR_ADV_PERIODIC */
|
#endif /* CONFIG_BT_CTLR_ADV_PERIODIC */
|
||||||
struct ll_adv_aux_set *aux;
|
struct ll_adv_aux_set *aux = NULL;
|
||||||
uint8_t aux_is_started = 0U;
|
uint8_t aux_is_started = 0U;
|
||||||
uint32_t ticks_anchor;
|
uint32_t ticks_anchor;
|
||||||
#endif /* !CONFIG_BT_HCI_MESH_EXT */
|
#endif /* !CONFIG_BT_HCI_MESH_EXT */
|
||||||
|
@ -525,6 +529,7 @@ uint8_t ll_adv_enable(uint8_t enable)
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(ptr, tx_addr, BDADDR_SIZE);
|
memcpy(ptr, tx_addr, BDADDR_SIZE);
|
||||||
|
#if (CONFIG_BT_CTLR_ADV_AUX_SET > 0)
|
||||||
} else if (h->aux_ptr) {
|
} else if (h->aux_ptr) {
|
||||||
struct pdu_adv_com_ext_adv *s;
|
struct pdu_adv_com_ext_adv *s;
|
||||||
struct pdu_adv *pdu_aux;
|
struct pdu_adv *pdu_aux;
|
||||||
|
@ -554,6 +559,7 @@ uint8_t ll_adv_enable(uint8_t enable)
|
||||||
/* TODO: allocate periodic advertising context
|
/* TODO: allocate periodic advertising context
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
#endif /* (CONFIG_BT_CTLR_ADV_AUX_SET > 0) */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: TargetA, fill here at enable */
|
/* TODO: TargetA, fill here at enable */
|
||||||
|
@ -986,7 +992,7 @@ uint8_t ll_adv_enable(uint8_t enable)
|
||||||
#endif /* CONFIG_BT_TICKER_EXT */
|
#endif /* CONFIG_BT_TICKER_EXT */
|
||||||
);
|
);
|
||||||
|
|
||||||
#if defined(CONFIG_BT_CTLR_ADV_EXT)
|
#if (CONFIG_BT_CTLR_ADV_AUX_SET > 0)
|
||||||
if (lll->aux) {
|
if (lll->aux) {
|
||||||
struct lll_adv_aux *lll_aux = lll->aux;
|
struct lll_adv_aux *lll_aux = lll->aux;
|
||||||
|
|
||||||
|
@ -1027,7 +1033,7 @@ uint8_t ll_adv_enable(uint8_t enable)
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_BT_CTLR_ADV_PERIODIC */
|
#endif /* CONFIG_BT_CTLR_ADV_PERIODIC */
|
||||||
}
|
}
|
||||||
#endif /* CONFIG_BT_CTLR_ADV_EXT */
|
#endif /* (CONFIG_BT_CTLR_ADV_AUX_SET > 0) */
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = ull_ticker_status_take(ret, &ret_cb);
|
ret = ull_ticker_status_take(ret, &ret_cb);
|
||||||
|
|
|
@ -37,6 +37,8 @@
|
||||||
#include "hal/debug.h"
|
#include "hal/debug.h"
|
||||||
|
|
||||||
static int init_reset(void);
|
static int init_reset(void);
|
||||||
|
|
||||||
|
#if (CONFIG_BT_CTLR_ADV_AUX_SET > 0)
|
||||||
static inline struct ll_adv_aux_set *aux_acquire(void);
|
static inline struct ll_adv_aux_set *aux_acquire(void);
|
||||||
static inline void aux_release(struct ll_adv_aux_set *aux);
|
static inline void aux_release(struct ll_adv_aux_set *aux);
|
||||||
static inline uint16_t aux_handle_get(struct ll_adv_aux_set *aux);
|
static inline uint16_t aux_handle_get(struct ll_adv_aux_set *aux);
|
||||||
|
@ -47,6 +49,7 @@ static void ticker_op_cb(uint32_t status, void *param);
|
||||||
|
|
||||||
static struct ll_adv_aux_set ll_adv_aux_pool[CONFIG_BT_CTLR_ADV_AUX_SET];
|
static struct ll_adv_aux_set ll_adv_aux_pool[CONFIG_BT_CTLR_ADV_AUX_SET];
|
||||||
static void *adv_aux_free;
|
static void *adv_aux_free;
|
||||||
|
#endif /* (CONFIG_BT_CTLR_ADV_AUX_SET > 0) */
|
||||||
|
|
||||||
uint8_t ll_adv_aux_random_addr_set(uint8_t handle, uint8_t *addr)
|
uint8_t ll_adv_aux_random_addr_set(uint8_t handle, uint8_t *addr)
|
||||||
{
|
{
|
||||||
|
@ -60,6 +63,7 @@ uint8_t *ll_adv_aux_random_addr_get(uint8_t handle, uint8_t *addr)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if (CONFIG_BT_CTLR_ADV_AUX_SET > 0)
|
||||||
uint8_t ll_adv_aux_ad_data_set(uint8_t handle, uint8_t op, uint8_t frag_pref, uint8_t len,
|
uint8_t ll_adv_aux_ad_data_set(uint8_t handle, uint8_t op, uint8_t frag_pref, uint8_t len,
|
||||||
uint8_t *data)
|
uint8_t *data)
|
||||||
{
|
{
|
||||||
|
@ -431,6 +435,7 @@ uint16_t ll_adv_aux_max_data_length_get(void)
|
||||||
/* TODO: return a Kconfig value */
|
/* TODO: return a Kconfig value */
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif /* (CONFIG_BT_CTLR_ADV_AUX_SET > 0) */
|
||||||
|
|
||||||
uint8_t ll_adv_aux_set_count_get(void)
|
uint8_t ll_adv_aux_set_count_get(void)
|
||||||
{
|
{
|
||||||
|
@ -476,6 +481,7 @@ int ull_adv_aux_reset(void)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if (CONFIG_BT_CTLR_ADV_AUX_SET > 0)
|
||||||
uint16_t ull_adv_aux_lll_handle_get(struct lll_adv_aux *lll)
|
uint16_t ull_adv_aux_lll_handle_get(struct lll_adv_aux *lll)
|
||||||
{
|
{
|
||||||
return aux_handle_get((void *)lll->hdr.parent);
|
return aux_handle_get((void *)lll->hdr.parent);
|
||||||
|
@ -700,3 +706,10 @@ static void ticker_op_cb(uint32_t status, void *param)
|
||||||
{
|
{
|
||||||
*((uint32_t volatile *)param) = status;
|
*((uint32_t volatile *)param) = status;
|
||||||
}
|
}
|
||||||
|
#else /* !(CONFIG_BT_CTLR_ADV_AUX_SET > 0) */
|
||||||
|
|
||||||
|
static int init_reset(void)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
#endif /* !(CONFIG_BT_CTLR_ADV_AUX_SET > 0) */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue