Skip to content

Commit 68eeb4e

Browse files
thomas-m-johansenrlubos
authored andcommitted
bluetooth: services: Redefine the CS RAS reassembly buffer kconfig
Redefining the BT_CHANNEL_SOUNDING_REASSEMBLY_BUFFER_SIZE kconfig so that it has defaults based off of selected optional features. This allows users to ignore the buffer size in the RAS samples in most cases without it costing too much memory. Signed-off-by: Thomas Johansen <[email protected]>
1 parent 7231ca3 commit 68eeb4e

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

subsys/bluetooth/services/ras/Kconfig.ras

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,25 @@ config BT_RAS_MODE_3_SUPPORTED
3333
Must match the supported CS capabilities of the local device.
3434
This affects the per-instance memory usage of RAS.
3535

36+
# CONFIG_BT_CHANNEL_SOUNDING_REASSEMBLY_BUFFER_SIZE is declared in Zephyr and also
37+
# here for a second time, to set a different range for the CS subevent result reassembly
38+
# buffer. Default values are also set based on RAS configs to help users reduce RAM usage.
39+
config BT_CHANNEL_SOUNDING_REASSEMBLY_BUFFER_SIZE
40+
int "Subevent result reassembly buffer size"
41+
depends on BT_CHANNEL_SOUNDING
42+
range 239 4800
43+
default 1920 if BT_RAS_MAX_ANTENNA_PATHS=1 && !BT_RAS_MODE_3_SUPPORTED
44+
default 2560 if BT_RAS_MAX_ANTENNA_PATHS=2 && !BT_RAS_MODE_3_SUPPORTED
45+
default 3200 if BT_RAS_MAX_ANTENNA_PATHS=3 && !BT_RAS_MODE_3_SUPPORTED
46+
default 3840 if BT_RAS_MAX_ANTENNA_PATHS=4 && !BT_RAS_MODE_3_SUPPORTED
47+
default 2880 if BT_RAS_MAX_ANTENNA_PATHS=1 && BT_RAS_MODE_3_SUPPORTED
48+
default 3520 if BT_RAS_MAX_ANTENNA_PATHS=2 && BT_RAS_MODE_3_SUPPORTED
49+
default 4160 if BT_RAS_MAX_ANTENNA_PATHS=3 && BT_RAS_MODE_3_SUPPORTED
50+
default 4800
51+
help
52+
When the results for a CS subevent cannot fit into a single HCI event,
53+
it will be split up into multiple events and consequently, reassembled into a
54+
full CS subevent. This config sets the size of the reassembly buffer.
55+
56+
3657
endif # BT_RAS

0 commit comments

Comments
 (0)