Bluetooth: buf: Update BT_BUF_RX_SIZE with ISO
The BT_BUF_RX_SIZE did not take the CONFIG_BT_ISO_RX_MTU into account. Add BT_BUF_ISO_RX_SIZE which depend on CONFIG_BT_ISO and use that for the BT_BUF_RX_SIZE macro. Furthermore, move the BT_BUF_RX_COUNT macro definitions into buf.h and update that to account for ISO RX as well. Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This commit is contained in:
parent
1fb6c6387e
commit
815dd27d8c
3 changed files with 16 additions and 4 deletions
|
@ -79,8 +79,22 @@ struct bt_buf_data {
|
|||
/** Data size needed for HCI Event RX buffers */
|
||||
#define BT_BUF_EVT_RX_SIZE BT_BUF_EVT_SIZE(CONFIG_BT_BUF_EVT_RX_SIZE)
|
||||
|
||||
/** Data size needed for HCI ACL or Event RX buffers */
|
||||
#define BT_BUF_RX_SIZE (MAX(BT_BUF_ACL_RX_SIZE, BT_BUF_EVT_RX_SIZE))
|
||||
#if defined(CONFIG_BT_ISO)
|
||||
#define BT_BUF_ISO_RX_SIZE BT_BUF_ISO_SIZE(CONFIG_BT_ISO_RX_MTU)
|
||||
#define BT_BUF_ISO_RX_COUNT CONFIG_BT_ISO_RX_BUF_COUNT
|
||||
#else
|
||||
#define BT_BUF_ISO_RX_SIZE 0
|
||||
#define BT_BUF_ISO_RX_COUNT 0
|
||||
#endif /* CONFIG_BT_ISO */
|
||||
|
||||
/** Data size needed for HCI ACL, HCI ISO or Event RX buffers */
|
||||
#define BT_BUF_RX_SIZE (MAX(MAX(BT_BUF_ACL_RX_SIZE, BT_BUF_EVT_RX_SIZE), \
|
||||
BT_BUF_ISO_RX_SIZE))
|
||||
|
||||
/** Buffer count needed for HCI ACL, HCI ISO or Event RX buffers */
|
||||
#define BT_BUF_RX_COUNT (MAX(MAX(CONFIG_BT_BUF_EVT_RX_COUNT, \
|
||||
CONFIG_BT_BUF_ACL_RX_COUNT), \
|
||||
BT_BUF_ISO_RX_COUNT))
|
||||
|
||||
/** Data size needed for HCI Command buffers. */
|
||||
#define BT_BUF_CMD_TX_SIZE BT_BUF_CMD_SIZE(CONFIG_BT_BUF_CMD_TX_SIZE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue