Bluetooth: HCI: Add option CONFIG_BT_HCI_ACL_DATA_SIZE

Add the option CONFIG_BT_HCI_ACL_DATA_SIZE which allows the user
to configure the max HCI ACL data payload. This is needed for platorms
where the BLE LL, HCI uart and host run on three different cores.

Fixes: #30441

Signed-off-by: Johan Stridkvist <johan.stridkvist@nordicsemi.no>
This commit is contained in:
Johan Stridkvist 2020-12-14 13:45:02 +01:00 committed by Johan Hedberg
commit a81765bbe4
2 changed files with 14 additions and 8 deletions

View file

@ -21,14 +21,12 @@
extern "C" {
#endif
#if defined(CONFIG_BT_CTLR_TX_BUFFER_SIZE)
#define BT_L2CAP_MTU (CONFIG_BT_CTLR_TX_BUFFER_SIZE - BT_L2CAP_HDR_SIZE)
#else
#define BT_L2CAP_MTU 65 /* 64-byte public key + opcode */
#endif /* CONFIG_BT_CTLR */
#define _BT_ACL_BUF_SIZE(len) (BT_BUF_RESERVE + \
BT_HCI_ACL_HDR_SIZE + \
(len))
/** Data size needed for ACL buffers */
#define BT_BUF_ACL_SIZE BT_L2CAP_BUF_SIZE(BT_L2CAP_MTU)
#define BT_BUF_ACL_SIZE _BT_ACL_BUF_SIZE(CONFIG_BT_HCI_ACL_DATA_SIZE)
#if defined(CONFIG_BT_CTLR_TX_BUFFERS)
#define BT_HCI_ACL_COUNT CONFIG_BT_CTLR_TX_BUFFERS
@ -36,8 +34,6 @@ extern "C" {
#define BT_HCI_ACL_COUNT 6
#endif
#define BT_BUF_TX_SIZE MAX(BT_BUF_RX_SIZE, BT_BUF_ACL_SIZE)
/** @brief Send packet to the Bluetooth controller
*
* Send packet to the Bluetooth controller. Caller needs to