Bluetooth: controller: Require aux for connectable or scannable

Connectable and scannable instances always have AuxPtr so we can return
error immediately if controller is configured with no aux.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
This commit is contained in:
Andrzej Kaczmarek 2020-07-22 15:43:36 +02:00 committed by Carles Cufí
commit bef663d5c0

View file

@ -233,6 +233,14 @@ uint8_t ll_adv_params_set(uint16_t interval, uint8_t adv_type,
return BT_HCI_ERR_INVALID_PARAM;
}
#if (CONFIG_BT_CTLR_ADV_AUX_SET == 0)
/* Connectable or scannable requires aux */
if (evt_prop & (BT_HCI_LE_ADV_PROP_CONN |
BT_HCI_LE_ADV_PROP_SCAN)) {
return BT_HCI_ERR_MEM_CAPACITY_EXCEEDED;
}
#endif
adv_type = 0x05; /* PDU_ADV_TYPE_EXT_IND in */
/* pdu_adv_type array. */