Bluetooth: Controller: Fix missing ll_adv_cmds_set
Fix to include ll_adv_cmds_set when broadcast role is not enabled in the Controller but advertising extensions is enabled (Extended Scanning is used). Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
parent
b30fda2639
commit
e0cd316049
|
@ -206,6 +206,34 @@ static uint64_t le_event_mask = DEFAULT_LE_EVENT_MASK;
|
|||
static struct net_buf *cmd_complete_status(uint8_t status);
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_ADV_EXT)
|
||||
#if defined(CONFIG_BT_HCI_RAW)
|
||||
static uint8_t ll_adv_cmds;
|
||||
|
||||
__weak int ll_adv_cmds_set(uint8_t adv_cmds)
|
||||
{
|
||||
if (!ll_adv_cmds) {
|
||||
ll_adv_cmds = adv_cmds;
|
||||
}
|
||||
|
||||
if (ll_adv_cmds != adv_cmds) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
__weak int ll_adv_cmds_is_ext(void)
|
||||
{
|
||||
return ll_adv_cmds == LL_ADV_CMDS_EXT;
|
||||
}
|
||||
|
||||
#else /* !CONFIG_BT_HCI_RAW */
|
||||
__weak int ll_adv_cmds_is_ext(void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
#endif /* !CONFIG_BT_HCI_RAW */
|
||||
|
||||
static int adv_cmds_legacy_check(struct net_buf **cc_evt)
|
||||
{
|
||||
int err;
|
||||
|
|
|
@ -5,10 +5,6 @@
|
|||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#define LL_ADV_CMDS_ANY 0 /* Any advertising cmd/evt allowed */
|
||||
#define LL_ADV_CMDS_LEGACY 1 /* Only legacy advertising cmd/evt allowed */
|
||||
#define LL_ADV_CMDS_EXT 2 /* Only extended advertising cmd/evt allowed */
|
||||
|
||||
int ll_init(struct k_sem *sem_rx);
|
||||
void ll_reset(void);
|
||||
|
||||
|
@ -62,16 +58,6 @@ static inline uint8_t ll_adv_iso_by_hci_handle_new(uint8_t hci_handle,
|
|||
#endif
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_ADV_EXT)
|
||||
#if defined(CONFIG_BT_HCI_RAW)
|
||||
int ll_adv_cmds_set(uint8_t adv_cmds);
|
||||
int ll_adv_cmds_is_ext(void);
|
||||
#else
|
||||
static inline int ll_adv_cmds_is_ext(void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
#endif /* CONFIG_BT_HCI_RAW */
|
||||
|
||||
uint8_t ll_adv_params_set(uint8_t handle, uint16_t evt_prop, uint32_t interval,
|
||||
uint8_t adv_type, uint8_t own_addr_type,
|
||||
uint8_t direct_addr_type, uint8_t const *const direct_addr,
|
||||
|
|
|
@ -9,6 +9,14 @@
|
|||
/* Bitmask value returned by ull_adv_is_enabled() */
|
||||
#define ULL_ADV_ENABLED_BITMASK_ENABLED BIT(0)
|
||||
|
||||
/* Helper defined to check if Extended Advertising HCI commands used */
|
||||
#define LL_ADV_CMDS_ANY 0 /* Any advertising cmd/evt allowed */
|
||||
#define LL_ADV_CMDS_LEGACY 1 /* Only legacy advertising cmd/evt allowed */
|
||||
#define LL_ADV_CMDS_EXT 2 /* Only extended advertising cmd/evt allowed */
|
||||
|
||||
/* Helper function to check if Extended Advertising HCI commands used */
|
||||
int ll_adv_cmds_is_ext(void);
|
||||
|
||||
/* Helper functions to initialise and reset ull_adv module */
|
||||
int ull_adv_init(void);
|
||||
int ull_adv_reset(void);
|
||||
|
|
Loading…
Reference in a new issue