Skip to content

Commit

Permalink
Bluetooth: Controller: Update to memory allocation for CS
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
eriksandgren committed Jan 21, 2025
1 parent 42ebbf2 commit 99843ff
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions subsys/bluetooth/controller/hci_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 99843ff

Please sign in to comment.