From 99843ffcc815f5cecb164e61d45291ad1a5b0f0e Mon Sep 17 00:00:00 2001 From: Erik Sandgren Date: Mon, 20 Jan 2025 15:20:22 +0100 Subject: [PATCH] Bluetooth: Controller: Update to memory allocation for CS Controller required memory for CS will soon be changed to depend on `CONFIG_BT_CTLR_SDC_CS_MAX_ANTENNA_PATHS` and `CONFIG_BT_CTLR_SDC_CS_STEP_MODE3`. This commit prepares hci_driver.c to make use of the new API `SDC_MEM_CS(count, max_antenna_paths_supported, step_mode3_supported)` to calculate memory requirement for CS. The old API `SDC_MEM_CS(count)` will soon be deprecated. Signed-off-by: Erik Sandgren --- subsys/bluetooth/controller/hci_driver.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/subsys/bluetooth/controller/hci_driver.c b/subsys/bluetooth/controller/hci_driver.c index db88f5970cc..aa36e962d43 100644 --- a/subsys/bluetooth/controller/hci_driver.c +++ b/subsys/bluetooth/controller/hci_driver.c @@ -261,9 +261,18 @@ BUILD_ASSERT(!IS_ENABLED(CONFIG_BT_PERIPHERAL) || #endif #if defined(CONFIG_BT_CTLR_SDC_CS_COUNT) +#if defined(SDC_MEM_CS_DEPRECATED) +#define SDC_MEM_CS_POOL \ + SDC_MEM_CS( \ + CONFIG_BT_CTLR_SDC_CS_COUNT, \ + CONFIG_BT_CTLR_SDC_CS_MAX_ANTENNA_PATHS, \ + IS_ENABLED(CONFIG_BT_CTLR_SDC_CS_STEP_MODE3)) + \ + SDC_MEM_CS_SETUP_PHASE_LINKS(SDC_CENTRAL_COUNT + PERIPHERAL_COUNT) +#else #define SDC_MEM_CS_POOL \ SDC_MEM_CS(CONFIG_BT_CTLR_SDC_CS_COUNT) + \ SDC_MEM_CS_SETUP_PHASE_LINKS(SDC_CENTRAL_COUNT + PERIPHERAL_COUNT) +#endif #else #define SDC_MEM_CS_POOL 0 #endif