Skip to content

Commit 1e94933

Browse files
lylezhu2012kartben
authored andcommitted
Bluetooth: tester: L2CAP: Set TX data buffer count to windows size
If `CONFIG_BT_CLASSIC` and `CONFIG_BT_L2CAP_MAX_WINDOW_SIZE` are defined, set the TX data buffer count to CONFIG_BT_L2CAP_MAX_WINDOW_SIZE. Or, set the TX data buffer count to CHANNELS. Signed-off-by: Lyle Zhu <[email protected]>
1 parent b9e1f53 commit 1e94933

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/bluetooth/tester/src/btp_l2cap.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,12 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME, CONFIG_BTTESTER_LOG_LEVEL);
3737
#define CHANNELS 2
3838
#define SERVERS 1
3939

40-
NET_BUF_POOL_FIXED_DEFINE(data_pool, CHANNELS, BT_L2CAP_SDU_BUF_SIZE(DATA_MTU),
40+
#if defined(CONFIG_BT_CLASSIC) && defined(CONFIG_BT_L2CAP_MAX_WINDOW_SIZE)
41+
#define DATA_POOL_COUNT CONFIG_BT_L2CAP_MAX_WINDOW_SIZE
42+
#else
43+
#define DATA_POOL_COUNT CHANNELS
44+
#endif /* CONFIG_BT_CLASSIC && CONFIG_BT_L2CAP_MAX_WINDOW_SIZE */
45+
NET_BUF_POOL_FIXED_DEFINE(data_pool, DATA_POOL_COUNT, BT_L2CAP_SDU_BUF_SIZE(DATA_MTU),
4146
CONFIG_BT_CONN_TX_USER_DATA_SIZE, NULL);
4247

4348
static bool authorize_flag;

0 commit comments

Comments
 (0)