Skip to content

Commit ab3a94e

Browse files
Thomas Stenersenthomsten
authored andcommitted
bluetooth: host: Specify controller in BT_HCI_TX_STACK_SIZE defaults
By specifying the controller directly when selecting the default BT_HCI_TX_STACK_SIZE, an external controller may rely on the final default value when none of the in-tree controllers are used. The value is increased to 1024 to accomodate the current worst-case stack size. Signed-off-by: Thomas Stenersen <[email protected]>
1 parent b259bce commit ab3a94e

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

subsys/bluetooth/host/Kconfig

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,20 @@ config BT_RX_BUF_LEN
4848
(4 bytes) and the ACL header (also 4 bytes) which yields 73 bytes.
4949

5050
config BT_HCI_TX_STACK_SIZE
51+
# NOTE: This value is derived from other symbols and should not be
52+
# user-configurable. Do not give it a prompt.
5153
int
5254
default 512 if BT_H4
5355
default 512 if BT_H5
5456
default 416 if BT_SPI
55-
default 940 if BT_CTLR && NO_OPTIMIZATIONS
56-
default 1024 if BT_CTLR && BT_CENTRAL
57-
default 640 if BT_CTLR
57+
default 940 if BT_CTLR && (BT_LL_SW || BT_LL_SW_SPLIT) && NO_OPTIMIZATIONS
58+
default 1024 if BT_CTLR && (BT_LL_SW || BT_LL_SW_SPLIT) && BT_CENTRAL
59+
default 640 if BT_CTLR && (BT_LL_SW || BT_LL_SW_SPLIT)
5860
default 512 if BT_USERCHAN
5961
# Even if no driver is selected the following default is still
60-
# needed e.g. for unit tests.
61-
default 512
62+
# needed e.g. for unit tests. This default will also server as
63+
# the worst-case stack size if an out-of-tree controller is used.
64+
default 1024
6265
help
6366
Stack size needed for executing bt_send with specified driver
6467

0 commit comments

Comments
 (0)