Bluetooth: Increase ATT buffers to count for buffer cloning

When sending ATT packets we may need to clone the original buffer.
Because of this one buffer per connection is not enough. Add one extra
buffer to the pool to cover for this.

Change-Id: I9fd9cb806f79ff99f1415a0fd7293ef0baf1d3f9
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
Johan Hedberg 2015-11-09 10:40:27 +02:00 committed by Anas Nashif
commit b85593fb09

View file

@ -80,9 +80,12 @@ struct bt_att {
static struct bt_att bt_att_pool[CONFIG_BLUETOOTH_MAX_CONN];
/* Pool for outgoing ATT packets, default MTU is 23 */
/*
* Pool for outgoing ATT packets. Reserve one buffer per connection plus
* one additional one in case cloning is needed.
*/
static struct nano_fifo att_buf;
static NET_BUF_POOL(att_pool, CONFIG_BLUETOOTH_MAX_CONN,
static NET_BUF_POOL(att_pool, CONFIG_BLUETOOTH_MAX_CONN + 1,
BT_L2CAP_BUF_SIZE(CONFIG_BLUETOOTH_ATT_MTU),
&att_buf, NULL, 0);