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:
Vinayak Kariappa Chettimada 2021-11-03 21:13:10 +05:30 committed by Carles Cufí
commit e0cd316049
3 changed files with 36 additions and 14 deletions

View file

@ -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;