Bluetooth: Create protocol-specific outgoing ACL buffer pools
With this split we get better control of the buffer sizes and counts. We also anyway will need a fragments pool so a simple generic ACL_OUT pool doesn't make sense anymore. The related Kconfig options for that have been removed. Change-Id: I616cf49915a1cc0dc0ddc724e2e182bcbe0c80f6 Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
1f6841c9c1
commit
b9d13664ab
8 changed files with 51 additions and 38 deletions
|
@ -80,6 +80,11 @@ struct bt_att {
|
|||
|
||||
static struct bt_att bt_att_pool[CONFIG_BLUETOOTH_MAX_CONN];
|
||||
|
||||
/* Pool for outgoing ATT packets, default MTU is 23 */
|
||||
static struct nano_fifo att_buf;
|
||||
static NET_BUF_POOL(att_pool, CONFIG_BLUETOOTH_MAX_CONN,
|
||||
BT_L2CAP_BUF_SIZE(23), &att_buf, NULL, 0);
|
||||
|
||||
static const struct bt_uuid primary_uuid = {
|
||||
.type = BT_UUID_16,
|
||||
.u16 = BT_UUID_GATT_PRIMARY,
|
||||
|
@ -1544,7 +1549,7 @@ struct net_buf *bt_att_create_pdu(struct bt_conn *conn, uint8_t op, size_t len)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
buf = bt_l2cap_create_pdu(conn);
|
||||
buf = bt_l2cap_create_pdu(&att_buf);
|
||||
if (!buf) {
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1641,6 +1646,8 @@ void bt_att_init(void)
|
|||
.accept = bt_att_accept,
|
||||
};
|
||||
|
||||
net_buf_pool_init(att_pool);
|
||||
|
||||
bt_l2cap_fixed_chan_register(&chan);
|
||||
|
||||
#if defined(CONFIG_BLUETOOTH_SMP)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue