Bluetooth: tester: Update tester to reserve bytes for an L2CAP SDU
Update the tester application to correctly reserve the number of bytes needed for an L2CAP SDU. Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit is contained in:
parent
396450b72b
commit
b8c5eda2d2
1 changed files with 3 additions and 3 deletions
|
@ -19,8 +19,8 @@ LOG_MODULE_REGISTER(LOG_MODULE_NAME);
|
|||
#include "bttester.h"
|
||||
|
||||
#define CONTROLLER_INDEX 0
|
||||
#define DATA_BUF_SIZE (256 + BT_L2CAP_CHAN_SEND_RESERVE)
|
||||
#define DATA_MTU (DATA_BUF_SIZE - BT_L2CAP_CHAN_SEND_RESERVE)
|
||||
#define DATA_MTU 256
|
||||
#define DATA_BUF_SIZE BT_L2CAP_SDU_BUF_SIZE(DATA_MTU)
|
||||
#define CHANNELS 2
|
||||
#define SERVERS 1
|
||||
|
||||
|
@ -253,7 +253,7 @@ static void send_data(uint8_t *data, uint16_t len)
|
|||
}
|
||||
|
||||
buf = net_buf_alloc(&data_pool, K_FOREVER);
|
||||
net_buf_reserve(buf, BT_L2CAP_CHAN_SEND_RESERVE);
|
||||
net_buf_reserve(buf, BT_L2CAP_SDU_CHAN_SEND_RESERVE);
|
||||
|
||||
net_buf_add_mem(buf, cmd->data, data_len);
|
||||
ret = bt_l2cap_chan_send(&chan->le.chan, buf);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue