Bluetooth: controller: Use Subsystem defined Periodic Advertising Kconfig

Use the Subsystem defined BT_PER_ADV_SYNC_MAX Kconfig in the
controller implementation of Periodic Advertising Sync Sets.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
This commit is contained in:
Vinayak Kariappa Chettimada 2021-02-05 10:08:16 +05:30 committed by Anas Nashif
commit db3f7e7a7b
4 changed files with 5 additions and 13 deletions

View file

@ -203,14 +203,6 @@ config BT_CTLR_SCAN_AUX_SET
help help
Maximum supported auxiliary channel scan sets. Maximum supported auxiliary channel scan sets.
config BT_CTLR_SCAN_SYNC_SET
int "LE Periodic Sync Sets"
depends on BT_CTLR_SYNC_PERIODIC
range 1 64
default 1
help
Maximum supported periodic sync sets.
config BT_CTLR_SCAN_SYNC_ISO_SET config BT_CTLR_SCAN_SYNC_ISO_SET
int "LE ISO Broadcast Isochronous Groups Sync Sets" int "LE ISO Broadcast Isochronous Groups Sync Sets"
depends on BT_CTLR_SYNC_ISO depends on BT_CTLR_SYNC_ISO

View file

@ -82,7 +82,7 @@ enum {
#if defined(CONFIG_BT_CTLR_SYNC_PERIODIC) #if defined(CONFIG_BT_CTLR_SYNC_PERIODIC)
TICKER_ID_SCAN_SYNC_BASE, TICKER_ID_SCAN_SYNC_BASE,
TICKER_ID_SCAN_SYNC_LAST = ((TICKER_ID_SCAN_SYNC_BASE) + TICKER_ID_SCAN_SYNC_LAST = ((TICKER_ID_SCAN_SYNC_BASE) +
(CONFIG_BT_CTLR_SCAN_SYNC_SET) - 1), (CONFIG_BT_PER_ADV_SYNC_MAX) - 1),
#if defined(CONFIG_BT_CTLR_SYNC_ISO) #if defined(CONFIG_BT_CTLR_SYNC_ISO)
TICKER_ID_SCAN_SYNC_ISO_BASE, TICKER_ID_SCAN_SYNC_ISO_BASE,
TICKER_ID_SCAN_SYNC_ISO_LAST = ((TICKER_ID_SCAN_SYNC_ISO_BASE) + TICKER_ID_SCAN_SYNC_ISO_LAST = ((TICKER_ID_SCAN_SYNC_ISO_BASE) +

View file

@ -262,8 +262,8 @@ static MFIFO_DEFINE(pdu_rx_free, sizeof(void *), PDU_RX_CNT);
#define BT_CTLR_MAX_CONN 0 #define BT_CTLR_MAX_CONN 0
#endif #endif
#if defined(CONFIG_BT_CTLR_SCAN_SYNC_SET) #if defined(CONFIG_BT_PER_ADV_SYNC_MAX)
#define BT_CTLR_SCAN_SYNC_SET CONFIG_BT_CTLR_SCAN_SYNC_SET #define BT_CTLR_SCAN_SYNC_SET CONFIG_BT_PER_ADV_SYNC_MAX
#else #else
#define BT_CTLR_SCAN_SYNC_SET 0 #define BT_CTLR_SCAN_SYNC_SET 0
#endif #endif

View file

@ -52,7 +52,7 @@ static void ticker_update_sync_op_cb(uint32_t status, void *param);
static void ticker_stop_op_cb(uint32_t status, void *param); static void ticker_stop_op_cb(uint32_t status, void *param);
static void sync_lost(void *param); static void sync_lost(void *param);
static struct ll_sync_set ll_sync_pool[CONFIG_BT_CTLR_SCAN_SYNC_SET]; static struct ll_sync_set ll_sync_pool[CONFIG_BT_PER_ADV_SYNC_MAX];
static void *sync_free; static void *sync_free;
uint8_t ll_sync_create(uint8_t options, uint8_t sid, uint8_t adv_addr_type, uint8_t ll_sync_create(uint8_t options, uint8_t sid, uint8_t adv_addr_type,
@ -296,7 +296,7 @@ int ull_sync_reset(void)
struct ll_sync_set *ull_sync_set_get(uint16_t handle) struct ll_sync_set *ull_sync_set_get(uint16_t handle)
{ {
if (handle >= CONFIG_BT_CTLR_SCAN_SYNC_SET) { if (handle >= CONFIG_BT_PER_ADV_SYNC_MAX) {
return NULL; return NULL;
} }