Bluetooth: Refactor bluetooth buffer configuration for simplification
Refactor and simplify the bluetooth buffer configurations to improve the easy of configurations and eliminate invalid ones. By moving configurations out of host and controller specific configurations and into a common one it becomes easier to configure the host and controller separately as the same configurations can be used as would be for a combined build. All HCI configurations are now given exluding the matching HCI header, which eases the configuration as the application don't have to know the different header sizes. The BT_RX_BUF_LEN is split into ACL and Event, as well as the suprising use of Command size. BT_L2CAP_RX_MTU is removed as the stack does not support reassembling of HCI ACL data to larger L2CAP PDUs. The application will have to set ACL RX size and account for the L2CAP PDU header itself. BT_EATT_RX_MTU was removed as it is only used for setting a different default value for another option which leads to the stuck kconfig symbol problem. The configurations can be updated according to the table below: ** New configuration | ** Old configuration All configurations BT_BUF_ACL_RX_SIZE | BT_L2CAP_RX_MTU + 4 BT_BUF_ACL_RX_SIZE | BT_RX_BUF_LEN - 4 BT_BUF_EVT_RX_SIZE | BT_RX_BUF_LEN - 2 BT_BUF_CMD_TX_SIZE | BT_RX_BUF_LEN - 3 BT_BUF_CMD_TX_COUNT | BT_HCI_CMD_COUNT BT_BUF_EVT_RX_COUNT | BT_RX_BUF_COUNT BT_BUF_ACL_RX_COUNT | BT_RX_BUF_COUNT BT_BUF_ACL_RX_COUNT | BT_ACL_RX_COUNT BT_BUF_EVT_DISCARDABLE_SIZE | BT_DISCARDABLE_BUF_SIZE - 2 BT_BUF_EVT_DISCARDABLE_COUNT | BT_DISCARDABLE_BUF_COUNT Controller-build BT_BUF_ACL_TX_SIZE | BT_CTLR_TX_BUFFERS_SIZE BT_BUF_ACL_TX_COUNT | BT_CTLR_TX_BUFFER HCI-bridge BT_BUF_ACL_TX_SIZE | BT_HCI_ACL_DATA_SIZE BT_BUF_ACL_TX_COUNT | 6 Fixed invalid configurations setting either BT_L2CAP_RX_MTU or BT_CTLR_DATA_LENGTH_MAX larger than BT_RX_BUF_LEN could lead to buffer overruns. Fix advertising report max data length calculation. This always used the BT_DISCARDABLE_BUF_SIZE macro but this feature can be turned off and advertising reports will be allocated from the RX buffer in that case. Also controller-build does not have this buffer (in hci_raw.c). Also the wrong HCI header was used in the calculation, HCI event header should have been used instead of HCI ACL header. Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
This commit is contained in:
parent
7b7b17a495
commit
6483e12a8a
|
@ -14,6 +14,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <bluetooth/l2cap.h>
|
||||
|
||||
/** @brief AVDTP SEID Information */
|
||||
struct bt_avdtp_seid_info {
|
||||
/** Stream End Point ID */
|
||||
|
|
|
@ -64,8 +64,17 @@ struct bt_buf_data {
|
|||
/** Helper to calculate needed buffer size for HCI Command packets. */
|
||||
#define BT_BUF_CMD_SIZE(size) BT_BUF_SIZE(BT_HCI_CMD_HDR_SIZE + (size))
|
||||
|
||||
/** Data size neeed for HCI RX buffers */
|
||||
#define BT_BUF_RX_SIZE (BT_BUF_SIZE(CONFIG_BT_RX_BUF_LEN))
|
||||
/** Data size needed for HCI ACL RX buffers */
|
||||
#define BT_BUF_ACL_RX_SIZE BT_BUF_ACL_SIZE(CONFIG_BT_BUF_ACL_RX_SIZE)
|
||||
|
||||
/** 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))
|
||||
|
||||
/** Data size needed for HCI Command buffers. */
|
||||
#define BT_BUF_CMD_TX_SIZE BT_BUF_CMD_SIZE(CONFIG_BT_BUF_CMD_TX_SIZE)
|
||||
|
||||
/** Allocate a buffer for incoming data
|
||||
*
|
||||
|
|
|
@ -21,19 +21,6 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define _BT_ACL_BUF_SIZE(len) (BT_BUF_RESERVE + \
|
||||
BT_HCI_ACL_HDR_SIZE + \
|
||||
(len))
|
||||
|
||||
/** Data size needed for ACL buffers */
|
||||
#define BT_BUF_ACL_SIZE _BT_ACL_BUF_SIZE(CONFIG_BT_HCI_ACL_DATA_SIZE)
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_TX_BUFFERS)
|
||||
#define BT_HCI_ACL_COUNT CONFIG_BT_CTLR_TX_BUFFERS
|
||||
#else
|
||||
#define BT_HCI_ACL_COUNT 6
|
||||
#endif
|
||||
|
||||
/** @brief Send packet to the Bluetooth controller
|
||||
*
|
||||
* Send packet to the Bluetooth controller. Caller needs to
|
||||
|
|
|
@ -29,6 +29,12 @@ extern "C" {
|
|||
/** L2CAP header size, used for buffer size calculations */
|
||||
#define BT_L2CAP_HDR_SIZE 4
|
||||
|
||||
/** Maximum Transmission Unit (MTU) for an outgoing L2CAP PDU. */
|
||||
#define BT_L2CAP_TX_MTU (CONFIG_BT_L2CAP_TX_MTU)
|
||||
|
||||
/** Maximum Transmission Unit (MTU) for an incoming L2CAP PDU. */
|
||||
#define BT_L2CAP_RX_MTU (CONFIG_BT_BUF_ACL_RX_SIZE - BT_L2CAP_HDR_SIZE)
|
||||
|
||||
/** @def BT_L2CAP_BUF_SIZE
|
||||
*
|
||||
* @brief Helper to calculate needed buffer size for L2CAP PDUs.
|
||||
|
|
|
@ -6,6 +6,6 @@ CONFIG_BT=y
|
|||
CONFIG_BT_HCI_RAW=y
|
||||
CONFIG_BT_MAX_CONN=20
|
||||
CONFIG_BT_TINYCRYPT_ECC=n
|
||||
CONFIG_BT_RX_BUF_COUNT=10
|
||||
CONFIG_BT_RX_BUF_LEN=255
|
||||
CONFIG_BT_BUF_ACL_RX_COUNT=10
|
||||
CONFIG_BT_BUF_ACL_RX_SIZE=251
|
||||
CONFIG_BT_HCI_RAW_RESERVE=1
|
||||
|
|
|
@ -2,5 +2,7 @@ CONFIG_MAIN_STACK_SIZE=512
|
|||
CONFIG_IDLE_STACK_SIZE=256
|
||||
CONFIG_ISR_STACK_SIZE=512
|
||||
CONFIG_BT_MAX_CONN=10
|
||||
CONFIG_BT_RX_BUF_LEN=76
|
||||
CONFIG_BT_DISCARDABLE_BUF_SIZE=45
|
||||
# Revert values set in prj.conf, set them to their Kconfig default value
|
||||
CONFIG_BT_BUF_CMD_TX_SIZE=65
|
||||
CONFIG_BT_BUF_ACL_RX_SIZE=69
|
||||
CONFIG_BT_BUF_EVT_DISCARDABLE_SIZE=43
|
||||
|
|
|
@ -2,5 +2,7 @@ CONFIG_MAIN_STACK_SIZE=512
|
|||
CONFIG_BT_MAX_CONN=10
|
||||
CONFIG_IDLE_STACK_SIZE=256
|
||||
CONFIG_ISR_STACK_SIZE=512
|
||||
CONFIG_BT_RX_BUF_LEN=76
|
||||
CONFIG_BT_DISCARDABLE_BUF_SIZE=45
|
||||
# Revert values set in prj.conf, set them to their Kconfig default value
|
||||
CONFIG_BT_BUF_CMD_TX_SIZE=65
|
||||
CONFIG_BT_BUF_ACL_RX_SIZE=69
|
||||
CONFIG_BT_BUF_EVT_DISCARDABLE_SIZE=43
|
||||
|
|
|
@ -8,8 +8,9 @@ CONFIG_BT=y
|
|||
CONFIG_BT_HCI_RAW=y
|
||||
CONFIG_BT_HCI_RAW_H4=y
|
||||
CONFIG_BT_HCI_RAW_H4_ENABLE=y
|
||||
CONFIG_BT_RX_BUF_LEN=258
|
||||
CONFIG_BT_DISCARDABLE_BUF_SIZE=257
|
||||
CONFIG_BT_BUF_ACL_RX_SIZE=255
|
||||
CONFIG_BT_BUF_CMD_TX_SIZE=255
|
||||
CONFIG_BT_BUF_EVT_DISCARDABLE_SIZE=255
|
||||
CONFIG_BT_CTLR_ASSERT_HANDLER=y
|
||||
CONFIG_BT_MAX_CONN=16
|
||||
CONFIG_BT_TINYCRYPT_ECC=n
|
||||
|
|
|
@ -15,8 +15,6 @@ CONFIG_BT=y
|
|||
CONFIG_BT_DEVICE_NAME="Zephyr Mesh"
|
||||
CONFIG_BT_TINYCRYPT_ECC=y
|
||||
CONFIG_BT_RX_STACK_SIZE=1400
|
||||
CONFIG_BT_L2CAP_RX_MTU=69
|
||||
CONFIG_BT_L2CAP_TX_MTU=69
|
||||
CONFIG_BT_L2CAP_TX_BUF_COUNT=5
|
||||
|
||||
CONFIG_BT_CTLR_DUP_FILTER_LEN=0
|
||||
|
|
|
@ -20,8 +20,6 @@ CONFIG_BT_PERIPHERAL=y
|
|||
|
||||
CONFIG_BT=y
|
||||
CONFIG_BT_TINYCRYPT_ECC=y
|
||||
CONFIG_BT_L2CAP_RX_MTU=69
|
||||
CONFIG_BT_L2CAP_TX_MTU=69
|
||||
CONFIG_BT_L2CAP_TX_BUF_COUNT=5
|
||||
|
||||
CONFIG_BT_MESH=y
|
||||
|
|
|
@ -19,8 +19,9 @@ CONFIG_SETTINGS=y
|
|||
CONFIG_BT=y
|
||||
CONFIG_BT_TINYCRYPT_ECC=y
|
||||
CONFIG_BT_RX_STACK_SIZE=1100
|
||||
CONFIG_BT_RX_BUF_COUNT=3
|
||||
CONFIG_BT_DISCARDABLE_BUF_COUNT=3
|
||||
CONFIG_BT_BUF_EVT_RX_COUNT=3
|
||||
CONFIG_BT_BUF_ACL_RX_COUNT=3
|
||||
CONFIG_BT_BUF_EVT_DISCARDABLE_COUNT=3
|
||||
|
||||
CONFIG_BT_CTLR_DUP_FILTER_LEN=0
|
||||
CONFIG_BT_OBSERVER=y
|
||||
|
|
|
@ -30,8 +30,6 @@ CONFIG_BT_PERIPHERAL=y
|
|||
|
||||
CONFIG_BT=y
|
||||
CONFIG_BT_TINYCRYPT_ECC=y
|
||||
CONFIG_BT_L2CAP_RX_MTU=69
|
||||
CONFIG_BT_L2CAP_TX_MTU=69
|
||||
CONFIG_BT_L2CAP_TX_BUF_COUNT=8
|
||||
|
||||
CONFIG_BT_MESH=y
|
||||
|
@ -95,8 +93,8 @@ CONFIG_BT_RX_STACK_SIZE=4096
|
|||
|
||||
CONFIG_BT_MAX_CONN=1
|
||||
CONFIG_BT_CTLR_RX_BUFFERS=6
|
||||
CONFIG_BT_CTLR_TX_BUFFERS=4
|
||||
CONFIG_BT_HCI_CMD_COUNT=4
|
||||
CONFIG_BT_BUF_ACL_TX_COUNT=4
|
||||
CONFIG_BT_BUF_CMD_TX_COUNT=4
|
||||
|
||||
CONFIG_BT_ATT_PREPARE_COUNT=2
|
||||
|
||||
|
|
|
@ -26,8 +26,6 @@ CONFIG_BT_PERIPHERAL=y
|
|||
CONFIG_BT=y
|
||||
CONFIG_BT_TINYCRYPT_ECC=y
|
||||
CONFIG_BT_RX_STACK_SIZE=4096
|
||||
CONFIG_BT_L2CAP_RX_MTU=69
|
||||
CONFIG_BT_L2CAP_TX_MTU=69
|
||||
CONFIG_BT_L2CAP_TX_BUF_COUNT=8
|
||||
|
||||
CONFIG_BT_MESH=y
|
||||
|
@ -81,7 +79,6 @@ CONFIG_BT_MESH_LABEL_COUNT=3
|
|||
CONFIG_GPIO=y
|
||||
|
||||
CONFIG_BT_CTLR_ADVANCED_FEATURES=y
|
||||
CONFIG_BT_RX_BUF_COUNT=5
|
||||
CONFIG_BT_HCI_TX_STACK_SIZE=1024
|
||||
#CONFIG_BT_DEBUG_HCI_CORE=y
|
||||
#CONFIG_BT_DEBUG_HCI_DRIVER=y
|
||||
|
|
|
@ -6,8 +6,7 @@ CONFIG_BOOTLOADER_MCUBOOT=y
|
|||
|
||||
# Allow for large Bluetooth data packets.
|
||||
CONFIG_BT_L2CAP_TX_MTU=252
|
||||
CONFIG_BT_L2CAP_RX_MTU=252
|
||||
CONFIG_BT_RX_BUF_LEN=260
|
||||
CONFIG_BT_BUF_ACL_RX_SIZE=256
|
||||
|
||||
# Enable the Bluetooth (unauthenticated) and shell mcumgr transports.
|
||||
CONFIG_MCUMGR_SMP_BT=y
|
||||
|
|
|
@ -19,8 +19,6 @@ CONFIG_BT_MESH_DEBUG=y
|
|||
|
||||
CONFIG_BT_OBSERVER=y
|
||||
CONFIG_BT_BROADCASTER=y
|
||||
CONFIG_BT_L2CAP_RX_MTU=69
|
||||
CONFIG_BT_L2CAP_TX_MTU=69
|
||||
CONFIG_BT_L2CAP_TX_BUF_COUNT=8
|
||||
|
||||
CONFIG_BT_MESH=y
|
||||
|
|
|
@ -9,6 +9,5 @@ CONFIG_NET_L2_BT=y
|
|||
CONFIG_NET_CONFIG_BT_NODE=y
|
||||
|
||||
# raise bluetooth RX buffer settings for 6lowpan traffic
|
||||
CONFIG_BT_RX_BUF_COUNT=20
|
||||
CONFIG_BT_RX_BUF_LEN=128
|
||||
CONFIG_BT_L2CAP_RX_MTU=120
|
||||
CONFIG_BT_BUF_ACL_RX_COUNT=20
|
||||
CONFIG_BT_BUF_ACL_RX_SIZE=124
|
||||
|
|
|
@ -4,8 +4,7 @@
|
|||
|
||||
# Allow for large Bluetooth data packets.
|
||||
CONFIG_BT_L2CAP_TX_MTU=252
|
||||
CONFIG_BT_L2CAP_RX_MTU=252
|
||||
CONFIG_BT_RX_BUF_LEN=260
|
||||
CONFIG_BT_BUF_ACL_RX_SIZE=256
|
||||
|
||||
# Enable the Bluetooth (unauthenticated) and UART mcumgr transports.
|
||||
CONFIG_MCUMGR_SMP_BT=y
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# Allow for large Bluetooth data packets.
|
||||
CONFIG_BT_L2CAP_TX_MTU=252
|
||||
CONFIG_BT_L2CAP_RX_MTU=252
|
||||
CONFIG_BT_RX_BUF_LEN=260
|
||||
CONFIG_BT_BUF_ACL_RX_SIZE=256
|
||||
|
||||
# Enable the Bluetooth (unauthenticated) and shell mcumgr transports.
|
||||
CONFIG_MCUMGR_SMP_BT=y
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include <init.h>
|
||||
|
||||
#include <bluetooth/bluetooth.h>
|
||||
#include <bluetooth/l2cap.h>
|
||||
#include <bluetooth/conn.h>
|
||||
#include <bluetooth/gatt.h>
|
||||
#include <bluetooth/audio/aics.h>
|
||||
|
@ -86,7 +87,7 @@ uint8_t aics_client_notify_handler(struct bt_conn *conn, struct bt_gatt_subscrib
|
|||
}
|
||||
}
|
||||
} else if (handle == inst->cli.desc_handle) {
|
||||
char desc[MIN(CONFIG_BT_L2CAP_RX_MTU, BT_ATT_MAX_ATTRIBUTE_LEN) + 1];
|
||||
char desc[MIN(BT_L2CAP_RX_MTU, BT_ATT_MAX_ATTRIBUTE_LEN) + 1];
|
||||
|
||||
/* Truncate if too large */
|
||||
if (length > sizeof(desc) - 1) {
|
||||
|
@ -464,7 +465,7 @@ static uint8_t aics_client_read_desc_cb(struct bt_conn *conn, uint8_t err,
|
|||
const void *data, uint16_t length)
|
||||
{
|
||||
int cb_err = err;
|
||||
char desc[MIN(CONFIG_BT_L2CAP_RX_MTU, BT_ATT_MAX_ATTRIBUTE_LEN) + 1];
|
||||
char desc[MIN(BT_L2CAP_RX_MTU, BT_ATT_MAX_ATTRIBUTE_LEN) + 1];
|
||||
struct bt_aics *inst = lookup_aics_by_handle(conn, params->single.handle);
|
||||
|
||||
memset(params, 0, sizeof(*params));
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
#include <sys/check.h>
|
||||
|
||||
#include <bluetooth/bluetooth.h>
|
||||
#include <bluetooth/l2cap.h>
|
||||
#include <bluetooth/conn.h>
|
||||
#include <bluetooth/gatt.h>
|
||||
#include <bluetooth/audio/vocs.h>
|
||||
|
@ -71,7 +72,7 @@ uint8_t vocs_client_notify_handler(struct bt_conn *conn, struct bt_gatt_subscrib
|
|||
BT_DBG("Invalid state length %u", length);
|
||||
}
|
||||
} else if (handle == inst->cli.desc_handle) {
|
||||
char desc[MIN(CONFIG_BT_L2CAP_RX_MTU, BT_ATT_MAX_ATTRIBUTE_LEN) + 1];
|
||||
char desc[MIN(BT_L2CAP_RX_MTU, BT_ATT_MAX_ATTRIBUTE_LEN) + 1];
|
||||
|
||||
/* Truncate if too large */
|
||||
|
||||
|
@ -289,7 +290,7 @@ static uint8_t vcs_client_read_output_desc_cb(struct bt_conn *conn, uint8_t err,
|
|||
{
|
||||
int cb_err = err;
|
||||
struct bt_vocs *inst = lookup_vocs_by_handle(conn, params->single.handle);
|
||||
char desc[MIN(CONFIG_BT_L2CAP_RX_MTU, BT_ATT_MAX_ATTRIBUTE_LEN) + 1];
|
||||
char desc[MIN(BT_L2CAP_RX_MTU, BT_ATT_MAX_ATTRIBUTE_LEN) + 1];
|
||||
|
||||
memset(params, 0, sizeof(*params));
|
||||
|
||||
|
|
|
@ -4,6 +4,187 @@
|
|||
# Copyright (c) 2016 Intel Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config BT_BUF_ACL_TX_SIZE
|
||||
int "Maximum supported ACL size for outgoing data"
|
||||
range 27 251
|
||||
default 27
|
||||
help
|
||||
Maximum supported ACL size of data packets sent from the Host to the
|
||||
Controller. This value does not include the HCI ACL header.
|
||||
The Host will segment the data transmitted to the Controller so that
|
||||
packets sent to the Controller will contain data up to this size.
|
||||
In a combined build this value will be set in both the Host and the
|
||||
Controller.
|
||||
In a Host-only build the Host will read the maximum ACL size supported
|
||||
by the Controller and use the smallest value supported by both the
|
||||
Bost and the Controller.
|
||||
The Host supports sending of larger L2CAP PDUs than the ACL size and
|
||||
will fragment L2CAP PDUs into ACL data packets.
|
||||
The Controller will return this value in the HCI LE Read Buffer
|
||||
Size command response. If this size if greater than effective Link
|
||||
Layer transmission size then the Controller will perform
|
||||
fragmentation before transmitting the packet(s) on air.
|
||||
If this value is less than the effective Link Layer transmission size
|
||||
then this will restrict the maximum Link Layer transmission size.
|
||||
Maximum is set to 251 due to implementation limitations (use of
|
||||
uint8_t for length field in PDU buffer structure).
|
||||
|
||||
config BT_BUF_ACL_TX_COUNT
|
||||
int "Number of outgoing ACL data buffers"
|
||||
default 7 if BT_HCI_RAW
|
||||
default 3
|
||||
range 1 255
|
||||
help
|
||||
Number of outgoing ACL data buffers sent from the Host to the
|
||||
Controller. This determines the maximum amount of data packets the
|
||||
Host can have queued in the Controller before waiting for the
|
||||
to notify the Host that more packets can be queued with the Number of
|
||||
Completed Packets event.
|
||||
The buffers are shared between all of the connections and the Host
|
||||
determines how to divide the buffers between the connections.
|
||||
The Controller will return this value in the HCI LE Read Buffer Size
|
||||
command response.
|
||||
|
||||
config BT_BUF_ACL_RX_SIZE
|
||||
int "Maximum supported ACL size for incoming data"
|
||||
default 200 if BT_BREDR
|
||||
# Mesh Proxy Recommended: 64 Pkey + 2 Bytes Mesh header.
|
||||
# Overhead: ATT Write command Header (3) in an L2CAP PDU (4).
|
||||
default 73 if BT_MESH_PROXY
|
||||
default 70 if BT_EATT
|
||||
default 69 if BT_SMP
|
||||
default 27
|
||||
range 70 1300 if BT_EATT
|
||||
range 69 1300 if BT_SMP
|
||||
range 27 1300
|
||||
help
|
||||
Maximum support ACL size of data packets sent from the Controller to
|
||||
the Host. This value does not include the HCI ACL header.
|
||||
In a combined Host and Controller build the buffer sizes in both the
|
||||
Host and the Controller will use this value for buffer sizes, and
|
||||
therefore Controller to Host flow Controller is not needed.
|
||||
In a Host only build with Controller to Host flow control enabled
|
||||
the Host will inform the Controller about the maximum ACL data size it
|
||||
can send by setting this value in the Host Buffer Size command.
|
||||
If Controller to Host flow control is not enabled then the Controller
|
||||
can assume the Host has infinite buffer size so this value should then
|
||||
be set to something that is guaranteed the Controller will not exceed
|
||||
or the data packets will be dropped.
|
||||
In a Controller only build this will determine the maximum ACL size
|
||||
that the Controller will send to the Host.
|
||||
The Host supports reassembling of L2CAP PDUs from ACL data packets,
|
||||
but the maximum supported L2CAP PDU size is limited by the maximum
|
||||
supported ACL size.
|
||||
This means the maximum L2CAP PDU MTU is restricted by the maximum ACL
|
||||
size subtracting the 4 byte header of an L2CAP PDU.
|
||||
When using L2CAP Connection oriented Channels without segmentation
|
||||
then the L2CAP SDU MTU is also restricetd by the maximum ACL size
|
||||
subtracting the 4 Byte header of an L2CAP PDU plus the 2 byte header
|
||||
of an L2CAP SDU.
|
||||
|
||||
With Enhanced ATT enabled the minimum of 70 is needed to support the
|
||||
minimum ATT_MTU of 64 octets in an L2CAP SDU without segmentation.
|
||||
With SMP LE Secure Connections enabled the minimum of 69 is needed to
|
||||
support the minimum SMP MTU of 65 octets (public key + opcode) in an
|
||||
L2CAP PDU.
|
||||
|
||||
An L2CAP PDU is also referred to as an L2CAP basic frame or B-frame.
|
||||
An L2CAP SDU is also referred to as an L2CAP Credit-based frame or
|
||||
K-frame.
|
||||
|
||||
config BT_BUF_ACL_RX_COUNT
|
||||
int "Number of incoming ACL data buffers"
|
||||
default NET_BUF_RX_COUNT if NET_L2_BT
|
||||
default 3 if BT_RECV_IS_RX_THREAD
|
||||
default 6
|
||||
range 1 64
|
||||
help
|
||||
Number or incoming ACL data buffers sent from the Controller to the
|
||||
Host.
|
||||
In a combined Host and Controller build the buffers are shared and
|
||||
therefore Controller to Host flow control is not needed.
|
||||
In a Host only build with Controller to Host flow control enabled
|
||||
the Host will inform the Controller about the maximum number of
|
||||
buffers by setting this value in the Host Buffer Size command.
|
||||
When Controller to Host flow control is not enabled the Controller
|
||||
can assume that the Host has infinite amount of buffers.
|
||||
|
||||
config BT_BUF_EVT_RX_SIZE
|
||||
int "Maximum supported HCI Event buffer length"
|
||||
default 255 if (BT_EXT_ADV && !(BT_BUF_EVT_DISCARDABLE_COUNT > 0))
|
||||
# LE Read Supported Commands command complete event.
|
||||
default 68
|
||||
range 68 255
|
||||
help
|
||||
Maximum supported HCI event buffer size. This value does not include
|
||||
the HCI Event header.
|
||||
This value is used by both the Host and the Controller for buffer
|
||||
sizes that include HCI events. It should be set according to the
|
||||
expected HCI events that can be generated from the configuration.
|
||||
If the subset of possible HCI events is unknown, this should be set to
|
||||
the maximum of 255.
|
||||
|
||||
config BT_BUF_EVT_RX_COUNT
|
||||
int "Number of HCI Event buffers"
|
||||
default 3 if BT_RECV_IS_RX_THREAD
|
||||
default 20 if (BT_MESH && !(BT_BUF_EVT_DISCARDABLE_COUNT > 0))
|
||||
default 10
|
||||
range 2 255
|
||||
help
|
||||
Number of buffers available for incoming HCI events from the
|
||||
Controller.
|
||||
|
||||
config BT_BUF_EVT_DISCARDABLE_SIZE
|
||||
int "Maximum supported discardable HCI Event buffer length"
|
||||
range 43 255
|
||||
# LE Extended Advertising Report event
|
||||
default 255 if BT_BREDR || BT_EXT_ADV
|
||||
# Le Advertising Report event
|
||||
default 43
|
||||
help
|
||||
Maximum support discardable HCI event size of buffers in the separate
|
||||
discardable event buffer pool. This value does not include the
|
||||
HCI Event header.
|
||||
The minimum size is set based on the Advertising Report. Setting
|
||||
the buffer size different than BT_BUF_EVT_RX_SIZE can save memory.
|
||||
|
||||
config BT_BUF_EVT_DISCARDABLE_COUNT
|
||||
int "Number of discardable HCI Event buffers"
|
||||
range 1 255
|
||||
default 20 if BT_MESH
|
||||
default 3
|
||||
depends on !BT_HCI_RAW
|
||||
help
|
||||
Number of buffers in a separate buffer pool for events which
|
||||
the HCI driver considers discardable. Examples of such events
|
||||
could be e.g. Advertising Reports. The benefit of having such
|
||||
a pool is that the if there is a heavy inflow of such events
|
||||
it will not cause the allocation for other critical events to
|
||||
block and may even eliminate deadlocks in some cases.
|
||||
|
||||
config BT_BUF_CMD_TX_SIZE
|
||||
int "Maximum support HCI Command buffer length"
|
||||
# LE Set Extended Advertising Data command
|
||||
default 255 if (BT_EXT_ADV || BT_BREDR)
|
||||
# LE Generate DHKey v2 command
|
||||
default 65
|
||||
range 65 255
|
||||
help
|
||||
Maximum data size for each HCI Command buffer. This value does not
|
||||
include the HCI Command header.
|
||||
This value is used by both the Host and the Controller for buffer
|
||||
sizes that include HCI commands. It should be set according to the
|
||||
expected HCI commands that can be sent from the configuration.
|
||||
If the subset of possible HCI commands is unknown, this should be set
|
||||
to the maximum of 255.
|
||||
|
||||
config BT_BUF_CMD_TX_COUNT
|
||||
int "Number of HCI command buffers"
|
||||
default 2
|
||||
range 2 64
|
||||
help
|
||||
Number of buffers available for outgoing HCI commands from the Host.
|
||||
|
||||
config BT_HAS_HCI_VS
|
||||
bool
|
||||
help
|
||||
|
|
|
@ -172,29 +172,6 @@ config BT_CTLR_RX_BUFFERS
|
|||
connection interval and 2M PHY, maximum 18 packets with L2CAP payload
|
||||
size of 1 byte can be received.
|
||||
|
||||
config BT_CTLR_TX_BUFFERS
|
||||
int "Number of Tx buffers"
|
||||
default 7 if BT_HCI_RAW
|
||||
default 3
|
||||
range 1 19
|
||||
help
|
||||
Set the number of Tx PDUs to be queued for transmission in the
|
||||
controller. In a 7.5ms connection interval and 2M PHY, maximum 19
|
||||
packets can be enqueued, with 18 packets with L2CAP payload size of 1
|
||||
byte can be acknowledged.
|
||||
|
||||
config BT_CTLR_TX_BUFFER_SIZE
|
||||
int "Tx buffer size"
|
||||
range 27 251
|
||||
default 27
|
||||
help
|
||||
Size of the Tx buffers and the value returned in HCI LE Read Buffer
|
||||
Size command response. If this size if greater than effective PDU size
|
||||
then controller will perform fragmentation before transmitting on the
|
||||
the packet on air.
|
||||
Maximum is set to 251 due to implementation limitations (use of
|
||||
uint8_t for length field in PDU buffer structure).
|
||||
|
||||
config BT_CTLR_ISO_TX_BUFFERS
|
||||
int "Number of Isochronous Tx buffers"
|
||||
default 3
|
||||
|
@ -345,6 +322,7 @@ config BT_CTLR_DATA_LENGTH_MAX
|
|||
int "Maximum data length supported"
|
||||
depends on BT_CTLR_DATA_LENGTH
|
||||
default 27
|
||||
range 27 BT_BUF_ACL_RX_SIZE if BT_BUF_ACL_RX_SIZE < 251
|
||||
range 27 251
|
||||
help
|
||||
Set the maximum data length of PDU supported in the Controller.
|
||||
|
|
|
@ -124,6 +124,11 @@ static uint32_t conn_count;
|
|||
static uint32_t cis_pending_count;
|
||||
#endif
|
||||
|
||||
#if !defined(CONFIG_BT_HCI_RAW) && defined(CONFIG_BT_BUF_EVT_DISCARDABLE_COUNT)
|
||||
#define ADV_REPORT_EVT_MAX_LEN CONFIG_BT_BUF_EVT_DISCARDABLE_SIZE
|
||||
#else
|
||||
#define ADV_REPORT_EVT_MAX_LEN CONFIG_BT_BUF_EVT_RX_SIZE
|
||||
#endif
|
||||
|
||||
#define DEFAULT_EVENT_MASK 0x1fffffffffff
|
||||
#define DEFAULT_EVENT_MASK_PAGE_2 0x0
|
||||
|
@ -1152,8 +1157,8 @@ static void le_read_buffer_size(struct net_buf *buf, struct net_buf **evt)
|
|||
|
||||
rp->status = 0x00;
|
||||
|
||||
rp->le_max_len = sys_cpu_to_le16(CONFIG_BT_CTLR_TX_BUFFER_SIZE);
|
||||
rp->le_max_num = CONFIG_BT_CTLR_TX_BUFFERS;
|
||||
rp->le_max_len = sys_cpu_to_le16(CONFIG_BT_BUF_ACL_TX_SIZE);
|
||||
rp->le_max_num = CONFIG_BT_BUF_ACL_TX_COUNT;
|
||||
}
|
||||
|
||||
static void le_read_local_features(struct net_buf *buf, struct net_buf **evt)
|
||||
|
@ -3770,7 +3775,7 @@ static void vs_read_build_info(struct net_buf *buf, struct net_buf **evt)
|
|||
sizeof(struct bt_hci_rp_vs_read_build_info) + \
|
||||
sizeof(build_info))
|
||||
|
||||
BUILD_ASSERT(CONFIG_BT_RX_BUF_LEN >= BUILD_INFO_EVT_LEN);
|
||||
BUILD_ASSERT(CONFIG_BT_BUF_EVT_RX_SIZE >= BUILD_INFO_EVT_LEN);
|
||||
|
||||
rp = hci_cmd_complete(evt, sizeof(*rp) + sizeof(build_info));
|
||||
rp->status = 0x00;
|
||||
|
@ -4165,7 +4170,7 @@ int hci_acl_handle(struct net_buf *buf, struct net_buf **evt)
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (len > CONFIG_BT_CTLR_TX_BUFFER_SIZE) {
|
||||
if (len > CONFIG_BT_BUF_ACL_TX_SIZE) {
|
||||
BT_ERR("Invalid HCI ACL Data length");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -4932,8 +4937,7 @@ no_ext_hdr:
|
|||
if (!data_status) {
|
||||
uint8_t data_max_len;
|
||||
|
||||
data_max_len = CONFIG_BT_DISCARDABLE_BUF_SIZE -
|
||||
BT_HCI_ACL_HDR_SIZE - sizeof(*sep) -
|
||||
data_max_len = ADV_REPORT_EVT_MAX_LEN - sizeof(*sep) -
|
||||
sizeof(*adv_info);
|
||||
|
||||
/* if data cannot fit the event, mark it as incomplete */
|
||||
|
@ -5268,8 +5272,7 @@ no_ext_hdr:
|
|||
if (!data_status) {
|
||||
uint8_t data_max_len;
|
||||
|
||||
data_max_len = CONFIG_BT_DISCARDABLE_BUF_SIZE -
|
||||
BT_HCI_ACL_HDR_SIZE - sizeof(*sep);
|
||||
data_max_len = ADV_REPORT_EVT_MAX_LEN - sizeof(*sep);
|
||||
|
||||
/* if data cannot fit the event, mark it as incomplete */
|
||||
if (data_len > data_max_len) {
|
||||
|
|
|
@ -78,7 +78,7 @@ static uint8_t force_md_cnt;
|
|||
#define FORCE_MD_CNT_SET() \
|
||||
do { \
|
||||
if (force_md_cnt || \
|
||||
(trx_cnt >= ((CONFIG_BT_CTLR_TX_BUFFERS) - 1))) { \
|
||||
(trx_cnt >= ((CONFIG_BT_BUF_ACL_TX_COUNT) - 1))) { \
|
||||
force_md_cnt = BT_CTLR_FORCE_MD_COUNT; \
|
||||
} \
|
||||
} while (0)
|
||||
|
|
|
@ -388,7 +388,7 @@ static MEMQ_DECLARE(ull_done);
|
|||
#if defined(CONFIG_BT_CONN)
|
||||
static MFIFO_DEFINE(ll_pdu_rx_free, sizeof(void *), LL_PDU_RX_CNT);
|
||||
static MFIFO_DEFINE(tx_ack, sizeof(struct lll_tx),
|
||||
CONFIG_BT_CTLR_TX_BUFFERS);
|
||||
CONFIG_BT_BUF_ACL_TX_COUNT);
|
||||
|
||||
static void *mark_update;
|
||||
#endif /* CONFIG_BT_CONN */
|
||||
|
|
|
@ -152,7 +152,7 @@ static uint8_t force_md_cnt_calc(struct lll_conn *lll_conn, uint32_t tx_rate);
|
|||
|
||||
#define CONN_TX_BUF_SIZE MROUND(offsetof(struct node_tx, pdu) + \
|
||||
offsetof(struct pdu_data, lldata) + \
|
||||
(CONFIG_BT_CTLR_TX_BUFFER_SIZE + \
|
||||
(CONFIG_BT_BUF_ACL_TX_SIZE + \
|
||||
BT_CTLR_USER_TX_BUFFER_OVERHEAD))
|
||||
|
||||
/**
|
||||
|
@ -169,13 +169,13 @@ static uint8_t force_md_cnt_calc(struct lll_conn *lll_conn, uint32_t tx_rate);
|
|||
#define TERM_REQ 1
|
||||
#define TERM_ACKED 3
|
||||
|
||||
static MFIFO_DEFINE(conn_tx, sizeof(struct lll_tx), CONFIG_BT_CTLR_TX_BUFFERS);
|
||||
static MFIFO_DEFINE(conn_tx, sizeof(struct lll_tx), CONFIG_BT_BUF_ACL_TX_COUNT);
|
||||
static MFIFO_DEFINE(conn_ack, sizeof(struct lll_tx),
|
||||
(CONFIG_BT_CTLR_TX_BUFFERS + CONN_TX_CTRL_BUFFERS));
|
||||
(CONFIG_BT_BUF_ACL_TX_COUNT + CONN_TX_CTRL_BUFFERS));
|
||||
|
||||
static struct {
|
||||
void *free;
|
||||
uint8_t pool[CONN_TX_BUF_SIZE * CONFIG_BT_CTLR_TX_BUFFERS];
|
||||
uint8_t pool[CONN_TX_BUF_SIZE * CONFIG_BT_BUF_ACL_TX_COUNT];
|
||||
} mem_conn_tx;
|
||||
|
||||
static struct {
|
||||
|
@ -186,7 +186,7 @@ static struct {
|
|||
static struct {
|
||||
void *free;
|
||||
uint8_t pool[sizeof(memq_link_t) *
|
||||
(CONFIG_BT_CTLR_TX_BUFFERS + CONN_TX_CTRL_BUFFERS)];
|
||||
(CONFIG_BT_BUF_ACL_TX_COUNT + CONN_TX_CTRL_BUFFERS)];
|
||||
} mem_link_tx;
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_DATA_LENGTH)
|
||||
|
@ -280,7 +280,7 @@ int ll_tx_mem_enqueue(uint16_t handle, void *tx)
|
|||
static struct mayfly mfy = {0, 0, &link, NULL, tx_demux};
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_FORCE_MD_AUTO)
|
||||
if (tx_cnt >= CONFIG_BT_CTLR_TX_BUFFERS) {
|
||||
if (tx_cnt >= CONFIG_BT_BUF_ACL_TX_COUNT) {
|
||||
uint8_t previous, force_md_cnt;
|
||||
|
||||
force_md_cnt = force_md_cnt_calc(&conn->lll, tx_rate);
|
||||
|
@ -1761,7 +1761,7 @@ static int init_reset(void)
|
|||
sizeof(conn_pool) / sizeof(struct ll_conn), &conn_free);
|
||||
|
||||
/* Initialize tx pool. */
|
||||
mem_init(mem_conn_tx.pool, CONN_TX_BUF_SIZE, CONFIG_BT_CTLR_TX_BUFFERS,
|
||||
mem_init(mem_conn_tx.pool, CONN_TX_BUF_SIZE, CONFIG_BT_BUF_ACL_TX_COUNT,
|
||||
&mem_conn_tx.free);
|
||||
|
||||
/* Initialize tx ctrl pool. */
|
||||
|
@ -1770,7 +1770,7 @@ static int init_reset(void)
|
|||
|
||||
/* Initialize tx link pool. */
|
||||
mem_init(mem_link_tx.pool, sizeof(memq_link_t),
|
||||
CONFIG_BT_CTLR_TX_BUFFERS + CONN_TX_CTRL_BUFFERS,
|
||||
CONFIG_BT_BUF_ACL_TX_COUNT + CONN_TX_CTRL_BUFFERS,
|
||||
&mem_link_tx.free);
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_DATA_LENGTH)
|
||||
|
|
|
@ -13,63 +13,6 @@ config BT_HCI_HOST
|
|||
depends on !BT_HCI_RAW
|
||||
select POLL
|
||||
|
||||
config BT_HCI_CMD_COUNT
|
||||
int "Number of HCI command buffers"
|
||||
default 2
|
||||
range 2 64
|
||||
help
|
||||
Number of buffers available for HCI commands.
|
||||
|
||||
config BT_RX_BUF_COUNT
|
||||
int "Number of HCI RX buffers"
|
||||
default NET_BUF_RX_COUNT if NET_L2_BT
|
||||
default 3 if BT_RECV_IS_RX_THREAD
|
||||
default 20 if (BT_MESH && !(BT_DISCARDABLE_BUF_COUNT > 0))
|
||||
default 10
|
||||
range 2 255
|
||||
help
|
||||
Number of buffers available for incoming ACL packets or HCI events
|
||||
from the controller.
|
||||
|
||||
config BT_RX_BUF_LEN
|
||||
int "Maximum supported HCI RX buffer length"
|
||||
default 264 if BT_BREDR
|
||||
default 258 if BT_EXT_ADV
|
||||
default 77 if BT_MESH_PROXY
|
||||
default 76
|
||||
range 73 2000
|
||||
help
|
||||
Maximum data size for each HCI RX buffer. This size includes
|
||||
everything starting with the ACL or HCI event headers. Note that
|
||||
buffer sizes are always rounded up to the nearest multiple of 4,
|
||||
so if this Kconfig value is something else then there will be some
|
||||
wasted space. The minimum of 73 has been taken for LE SC which has
|
||||
an L2CAP MTU of 65 bytes. On top of this there's the L2CAP header
|
||||
(4 bytes) and the ACL header (also 4 bytes) which yields 73 bytes.
|
||||
|
||||
config BT_DISCARDABLE_BUF_COUNT
|
||||
int "Number of discardable event buffers"
|
||||
range 1 255
|
||||
default 20 if BT_MESH
|
||||
default 3
|
||||
depends on !BT_HCI_RAW
|
||||
help
|
||||
Number of buffers in a separate buffer pool for events which
|
||||
the HCI driver considers discardable. Examples of such events
|
||||
could be e.g. Advertising Reports. The benefit of having such
|
||||
a pool means that the if there is a heavy inflow of such events
|
||||
it will not cause the allocation for other critical events to
|
||||
block and may even eliminate deadlocks in some cases.
|
||||
|
||||
config BT_DISCARDABLE_BUF_SIZE
|
||||
int "Size of discardable event buffers"
|
||||
range 45 257
|
||||
default 257 if BT_BREDR || BT_EXT_ADV
|
||||
default 45
|
||||
help
|
||||
Size of buffers in the separate discardable event buffer pool.
|
||||
The minimum size is set based on the Advertising Report. Setting
|
||||
the buffer size different than BT_RX_BUF_LEN can save memory.
|
||||
|
||||
config BT_HCI_TX_STACK_SIZE
|
||||
# NOTE: This value is derived from other symbols and should only be
|
||||
|
@ -127,16 +70,6 @@ config BT_HCI_RESERVE
|
|||
Headroom that the driver needs for sending and receiving buffers. Add a
|
||||
new 'default' entry for each new driver.
|
||||
|
||||
config BT_HCI_ACL_DATA_SIZE
|
||||
int
|
||||
prompt "ACL data buffer size" if !BT_CTLR
|
||||
depends on BT_HCI_RAW
|
||||
range 27 251
|
||||
default BT_CTLR_DATA_LENGTH_MAX if BT_CTLR_DATA_LENGTH
|
||||
default 27
|
||||
help
|
||||
Maximum ACL data payload in HCI packets, excluding HCI header.
|
||||
|
||||
config BT_RECV_IS_RX_THREAD
|
||||
# Hidden option set by the HCI driver to indicate that there's
|
||||
# no need for the host to have its own RX thread.
|
||||
|
@ -259,16 +192,6 @@ config BT_WHITELIST
|
|||
|
||||
if BT_CONN
|
||||
|
||||
config BT_ACL_RX_COUNT
|
||||
int "Number of incoming ACL data buffers"
|
||||
default BT_CTLR_RX_BUFFERS if BT_CTLR
|
||||
default NET_BUF_RX_COUNT if NET_L2_BT
|
||||
default 6
|
||||
range 1 64
|
||||
depends on BT_HCI_ACL_FLOW_CONTROL
|
||||
help
|
||||
Number of buffers available for incoming ACL data.
|
||||
|
||||
config BT_CONN_TX_MAX
|
||||
int "Maximum number of pending TX buffers with a callback"
|
||||
default BT_L2CAP_TX_BUF_COUNT
|
||||
|
@ -830,11 +753,10 @@ config BT_RFCOMM
|
|||
|
||||
config BT_RFCOMM_L2CAP_MTU
|
||||
int "L2CAP MTU for RFCOMM frames"
|
||||
default BT_L2CAP_RX_MTU if BT_HCI_ACL_FLOW_CONTROL
|
||||
default BT_RX_BUF_LEN
|
||||
depends on BT_RFCOMM
|
||||
range BT_L2CAP_RX_MTU 32767 if BT_HCI_ACL_FLOW_CONTROL
|
||||
range BT_RX_BUF_LEN 32767
|
||||
# RX MTU will be truncated to account for the L2CAP PDU header.
|
||||
default BT_BUF_ACL_RX_SIZE
|
||||
range 23 32767
|
||||
help
|
||||
Maximum size of L2CAP PDU for RFCOMM frames.
|
||||
|
||||
|
|
|
@ -42,18 +42,6 @@ config BT_EATT_MAX
|
|||
help
|
||||
Number of Enhanced ATT bearers available.
|
||||
|
||||
config BT_EATT_RX_MTU
|
||||
int "Maximum supported Enhanced ATT MTU for incoming data"
|
||||
default 70
|
||||
range 70 519
|
||||
depends on BT_EATT
|
||||
help
|
||||
Maximum size incoming PDUs on EATT bearers, value shall include L2CAP
|
||||
headers and SDU length, maximum is limited to 512 bytes payload, which
|
||||
is the maximum size for a GATT attribute, plus 1 byte for ATT opcode.
|
||||
This option influences the stack buffer size and by that may also
|
||||
limit the outgoing MTU.
|
||||
|
||||
config BT_EATT_SEC_LEVEL
|
||||
int "Enhanced ATT bearer security level"
|
||||
default 1
|
||||
|
|
|
@ -5,23 +5,10 @@
|
|||
|
||||
menu "L2CAP Options"
|
||||
|
||||
config BT_L2CAP_RX_MTU
|
||||
int "Maximum supported L2CAP MTU for incoming data"
|
||||
default 200 if BT_BREDR
|
||||
default BT_EATT_RX_MTU if BT_EATT
|
||||
default 65 if BT_SMP
|
||||
default 23
|
||||
range 70 1300 if BT_EATT
|
||||
range 65 1300 if BT_SMP
|
||||
range 23 1300
|
||||
help
|
||||
Maximum size of each incoming L2CAP PDU.
|
||||
|
||||
config BT_L2CAP_TX_BUF_COUNT
|
||||
int "Number of L2CAP TX buffers"
|
||||
default NET_BUF_TX_COUNT if NET_L2_BT
|
||||
default BT_CTLR_TX_BUFFERS if BT_CTLR
|
||||
default 3
|
||||
default BT_BUF_ACL_TX_COUNT
|
||||
range 2 255
|
||||
help
|
||||
Number of buffers available for outgoing L2CAP packets.
|
||||
|
|
|
@ -11,11 +11,7 @@
|
|||
#define BT_ATT_TIMEOUT K_SECONDS(30)
|
||||
|
||||
/* ATT MTU must be equal for RX and TX, so select the smallest value */
|
||||
#if CONFIG_BT_L2CAP_RX_MTU < CONFIG_BT_L2CAP_TX_MTU
|
||||
#define BT_ATT_MTU CONFIG_BT_L2CAP_RX_MTU
|
||||
#else
|
||||
#define BT_ATT_MTU CONFIG_BT_L2CAP_TX_MTU
|
||||
#endif
|
||||
#define BT_ATT_MTU (MIN(BT_L2CAP_RX_MTU, BT_L2CAP_TX_MTU))
|
||||
|
||||
struct bt_att_hdr {
|
||||
uint8_t code;
|
||||
|
|
|
@ -82,7 +82,7 @@
|
|||
#define BT_AVDTP_ERR_UNSUPPORTED_CONFIGURAION 0x29
|
||||
#define BT_AVDTP_ERR_BAD_STATE 0x31
|
||||
|
||||
#define BT_AVDTP_MAX_MTU CONFIG_BT_L2CAP_RX_MTU
|
||||
#define BT_AVDTP_MAX_MTU BT_L2CAP_RX_MTU
|
||||
|
||||
#define BT_AVDTP_MIN_SEID 0x01
|
||||
#define BT_AVDTP_MAX_SEID 0x3E
|
||||
|
|
|
@ -16,9 +16,6 @@
|
|||
#define LOG_MODULE_NAME bt_buf
|
||||
#include "common/log.h"
|
||||
|
||||
NET_BUF_POOL_FIXED_DEFINE(hci_rx_pool, CONFIG_BT_RX_BUF_COUNT,
|
||||
BT_BUF_RX_SIZE, NULL);
|
||||
|
||||
#if defined(CONFIG_BT_CONN)
|
||||
#define NUM_COMLETE_EVENT_SIZE BT_BUF_EVT_SIZE( \
|
||||
sizeof(struct bt_hci_cp_host_num_completed_packets) + \
|
||||
|
@ -31,16 +28,25 @@ NET_BUF_POOL_FIXED_DEFINE(hci_rx_pool, CONFIG_BT_RX_BUF_COUNT,
|
|||
NET_BUF_POOL_FIXED_DEFINE(num_complete_pool, 1, NUM_COMLETE_EVENT_SIZE, NULL);
|
||||
#endif /* CONFIG_BT_CONN */
|
||||
|
||||
#if defined(CONFIG_BT_DISCARDABLE_BUF_COUNT)
|
||||
#define DISCARDABLE_EVENT_SIZE BT_BUF_SIZE(CONFIG_BT_DISCARDABLE_BUF_SIZE)
|
||||
NET_BUF_POOL_FIXED_DEFINE(discardable_pool, CONFIG_BT_DISCARDABLE_BUF_COUNT,
|
||||
DISCARDABLE_EVENT_SIZE, NULL);
|
||||
#endif /* CONFIG_BT_DISCARDABLE_BUF_COUNT */
|
||||
#if defined(CONFIG_BT_BUF_EVT_DISCARDABLE_COUNT)
|
||||
NET_BUF_POOL_FIXED_DEFINE(discardable_pool, CONFIG_BT_BUF_EVT_DISCARDABLE_COUNT,
|
||||
BT_BUF_EVT_SIZE(CONFIG_BT_BUF_EVT_DISCARDABLE_SIZE),
|
||||
NULL);
|
||||
#endif /* CONFIG_BT_BUF_EVT_DISCARDABLE_COUNT */
|
||||
|
||||
#if defined(CONFIG_BT_HCI_ACL_FLOW_CONTROL)
|
||||
#define ACL_IN_SIZE BT_L2CAP_BUF_SIZE(CONFIG_BT_L2CAP_RX_MTU)
|
||||
NET_BUF_POOL_DEFINE(acl_in_pool, CONFIG_BT_ACL_RX_COUNT, ACL_IN_SIZE,
|
||||
NET_BUF_POOL_DEFINE(acl_in_pool, CONFIG_BT_BUF_ACL_RX_COUNT,
|
||||
BT_BUF_ACL_SIZE(CONFIG_BT_BUF_ACL_RX_SIZE),
|
||||
sizeof(struct acl_data), bt_hci_host_num_completed_packets);
|
||||
|
||||
NET_BUF_POOL_FIXED_DEFINE(evt_pool, CONFIG_BT_BUF_EVT_RX_COUNT,
|
||||
BT_BUF_EVT_RX_SIZE,
|
||||
NULL);
|
||||
#else
|
||||
#define BT_BUF_RX_COUNT MAX(CONFIG_BT_BUF_EVT_RX_COUNT, CONFIG_BT_BUF_ACL_RX_COUNT)
|
||||
NET_BUF_POOL_FIXED_DEFINE(hci_rx_pool, BT_BUF_RX_COUNT,
|
||||
BT_BUF_RX_SIZE,
|
||||
NULL);
|
||||
#endif /* CONFIG_BT_HCI_ACL_FLOW_CONTROL */
|
||||
|
||||
struct net_buf *bt_buf_get_rx(enum bt_buf_type type, k_timeout_t timeout)
|
||||
|
@ -56,7 +62,7 @@ struct net_buf *bt_buf_get_rx(enum bt_buf_type type, k_timeout_t timeout)
|
|||
|
||||
#if defined(CONFIG_BT_HCI_ACL_FLOW_CONTROL)
|
||||
if (type == BT_BUF_EVT) {
|
||||
buf = net_buf_alloc(&hci_rx_pool, timeout);
|
||||
buf = net_buf_alloc(&evt_pool, timeout);
|
||||
} else {
|
||||
buf = net_buf_alloc(&acl_in_pool, timeout);
|
||||
}
|
||||
|
@ -117,7 +123,7 @@ struct net_buf *bt_buf_get_evt(uint8_t evt, bool discardable,
|
|||
case BT_HCI_EVT_CMD_STATUS:
|
||||
return bt_buf_get_cmd_complete(timeout);
|
||||
default:
|
||||
#if defined(CONFIG_BT_DISCARDABLE_BUF_COUNT)
|
||||
#if defined(CONFIG_BT_BUF_EVT_DISCARDABLE_COUNT)
|
||||
if (discardable) {
|
||||
struct net_buf *buf;
|
||||
|
||||
|
@ -129,7 +135,7 @@ struct net_buf *bt_buf_get_evt(uint8_t evt, bool discardable,
|
|||
|
||||
return buf;
|
||||
}
|
||||
#endif /* CONFIG_BT_DISCARDABLE_BUF_COUNT */
|
||||
#endif /* CONFIG_BT_BUF_EVT_DISCARDABLE_COUNT */
|
||||
|
||||
return bt_buf_get_rx(BT_BUF_EVT, timeout);
|
||||
}
|
||||
|
|
|
@ -53,21 +53,14 @@ NET_BUF_POOL_DEFINE(acl_tx_pool, CONFIG_BT_L2CAP_TX_BUF_COUNT,
|
|||
sizeof(struct tx_meta), NULL);
|
||||
|
||||
#if CONFIG_BT_L2CAP_TX_FRAG_COUNT > 0
|
||||
|
||||
#if defined(CONFIG_BT_CTLR_TX_BUFFER_SIZE)
|
||||
#define FRAG_SIZE BT_L2CAP_BUF_SIZE(CONFIG_BT_CTLR_TX_BUFFER_SIZE - 4)
|
||||
#else
|
||||
#define FRAG_SIZE BT_L2CAP_BUF_SIZE(CONFIG_BT_L2CAP_TX_MTU)
|
||||
#endif
|
||||
|
||||
/* Dedicated pool for fragment buffers in case queued up TX buffers don't
|
||||
* fit the controllers buffer size. We can't use the acl_tx_pool for the
|
||||
* fragmentation, since it's possible that pool is empty and all buffers
|
||||
* are queued up in the TX queue. In such a situation, trying to allocate
|
||||
* another buffer from the acl_tx_pool would result in a deadlock.
|
||||
*/
|
||||
NET_BUF_POOL_FIXED_DEFINE(frag_pool, CONFIG_BT_L2CAP_TX_FRAG_COUNT, FRAG_SIZE,
|
||||
NULL);
|
||||
NET_BUF_POOL_FIXED_DEFINE(frag_pool, CONFIG_BT_L2CAP_TX_FRAG_COUNT,
|
||||
BT_BUF_ACL_SIZE(CONFIG_BT_BUF_ACL_TX_SIZE), NULL);
|
||||
|
||||
#endif /* CONFIG_BT_L2CAP_TX_FRAG_COUNT > 0 */
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ struct cmd_data {
|
|||
struct k_sem *sync;
|
||||
};
|
||||
|
||||
static struct cmd_data cmd_data[CONFIG_BT_HCI_CMD_COUNT];
|
||||
static struct cmd_data cmd_data[CONFIG_BT_BUF_CMD_TX_COUNT];
|
||||
|
||||
#define cmd(buf) (&cmd_data[net_buf_id(buf)])
|
||||
#define acl(buf) ((struct acl_data *)net_buf_user_data(buf))
|
||||
|
@ -127,11 +127,12 @@ void bt_hci_cmd_state_set_init(struct net_buf *buf,
|
|||
cmd(buf)->state = state;
|
||||
}
|
||||
|
||||
/* HCI command buffers. Derive the needed size from BT_BUF_RX_SIZE since
|
||||
* the same buffer is also used for the response.
|
||||
/* HCI command buffers. Derive the needed size from both Command and Event
|
||||
* buffer length since the buffer is also used for the response event i.e
|
||||
* command complete or command status.
|
||||
*/
|
||||
#define CMD_BUF_SIZE BT_BUF_RX_SIZE
|
||||
NET_BUF_POOL_FIXED_DEFINE(hci_cmd_pool, CONFIG_BT_HCI_CMD_COUNT,
|
||||
#define CMD_BUF_SIZE MAX(BT_BUF_EVT_RX_SIZE, BT_BUF_CMD_TX_SIZE)
|
||||
NET_BUF_POOL_FIXED_DEFINE(hci_cmd_pool, CONFIG_BT_BUF_CMD_TX_COUNT,
|
||||
CMD_BUF_SIZE, NULL);
|
||||
|
||||
struct event_handler {
|
||||
|
@ -1534,9 +1535,8 @@ static int set_flow_control(void)
|
|||
|
||||
hbs = net_buf_add(buf, sizeof(*hbs));
|
||||
(void)memset(hbs, 0, sizeof(*hbs));
|
||||
hbs->acl_mtu = sys_cpu_to_le16(CONFIG_BT_L2CAP_RX_MTU +
|
||||
sizeof(struct bt_l2cap_hdr));
|
||||
hbs->acl_pkts = sys_cpu_to_le16(CONFIG_BT_ACL_RX_COUNT);
|
||||
hbs->acl_mtu = sys_cpu_to_le16(CONFIG_BT_BUF_ACL_RX_SIZE);
|
||||
hbs->acl_pkts = sys_cpu_to_le16(CONFIG_BT_BUF_ACL_RX_COUNT);
|
||||
|
||||
err = bt_hci_cmd_send_sync(BT_HCI_OP_HOST_BUFFER_SIZE, buf, NULL);
|
||||
if (err) {
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
#include <sys/byteorder.h>
|
||||
|
||||
#include <drivers/bluetooth/hci_driver.h>
|
||||
#include <bluetooth/buf.h>
|
||||
#include <bluetooth/hci_raw.h>
|
||||
#include <bluetooth/l2cap.h>
|
||||
|
||||
|
@ -36,12 +37,13 @@ static uint8_t raw_mode = BT_HCI_RAW_MODE_H4;
|
|||
static uint8_t raw_mode;
|
||||
#endif
|
||||
|
||||
NET_BUF_POOL_FIXED_DEFINE(hci_rx_pool, CONFIG_BT_RX_BUF_COUNT,
|
||||
#define BT_BUF_RX_COUNT MAX(CONFIG_BT_BUF_EVT_RX_COUNT, CONFIG_BT_BUF_ACL_RX_COUNT)
|
||||
NET_BUF_POOL_FIXED_DEFINE(hci_rx_pool, BT_BUF_RX_COUNT,
|
||||
BT_BUF_RX_SIZE, NULL);
|
||||
NET_BUF_POOL_FIXED_DEFINE(hci_cmd_pool, CONFIG_BT_HCI_CMD_COUNT,
|
||||
BT_BUF_RX_SIZE, NULL);
|
||||
NET_BUF_POOL_FIXED_DEFINE(hci_acl_pool, BT_HCI_ACL_COUNT,
|
||||
BT_BUF_ACL_SIZE, NULL);
|
||||
NET_BUF_POOL_FIXED_DEFINE(hci_cmd_pool, CONFIG_BT_BUF_CMD_TX_COUNT,
|
||||
BT_BUF_CMD_SIZE(CONFIG_BT_BUF_CMD_TX_SIZE), NULL);
|
||||
NET_BUF_POOL_FIXED_DEFINE(hci_acl_pool, CONFIG_BT_BUF_ACL_TX_COUNT,
|
||||
BT_BUF_ACL_SIZE(CONFIG_BT_BUF_ACL_TX_SIZE), NULL);
|
||||
#if defined(CONFIG_BT_ISO)
|
||||
NET_BUF_POOL_FIXED_DEFINE(hci_iso_pool, CONFIG_BT_ISO_TX_BUF_COUNT,
|
||||
CONFIG_BT_ISO_TX_MTU, NULL);
|
||||
|
|
|
@ -32,11 +32,7 @@
|
|||
#define L2CAP_LE_MIN_MTU 23
|
||||
#define L2CAP_ECRED_MIN_MTU 64
|
||||
|
||||
#if defined(CONFIG_BT_HCI_ACL_FLOW_CONTROL)
|
||||
#define L2CAP_LE_MAX_CREDITS (CONFIG_BT_ACL_RX_COUNT - 1)
|
||||
#else
|
||||
#define L2CAP_LE_MAX_CREDITS (CONFIG_BT_RX_BUF_COUNT - 1)
|
||||
#endif
|
||||
#define L2CAP_LE_MAX_CREDITS (CONFIG_BT_BUF_ACL_RX_COUNT - 1)
|
||||
|
||||
#define L2CAP_LE_CID_DYN_START 0x0040
|
||||
#define L2CAP_LE_CID_DYN_END 0x007f
|
||||
|
@ -64,7 +60,8 @@ NET_BUF_POOL_FIXED_DEFINE(disc_pool, 1,
|
|||
sizeof(struct bt_l2cap_disconn_req)),
|
||||
NULL);
|
||||
|
||||
#define L2CAP_MAX_LE_MPS CONFIG_BT_L2CAP_RX_MTU
|
||||
/* Maximum Packet Size (MPS) is defined as the MTU of an L2CAP Basic Frame. */
|
||||
#define L2CAP_MAX_LE_MPS BT_L2CAP_RX_MTU
|
||||
/* For now use MPS - SDU length to disable segmentation */
|
||||
#define L2CAP_MAX_LE_MTU (L2CAP_MAX_LE_MPS - BT_L2CAP_SDU_HDR_SIZE)
|
||||
|
||||
|
|
|
@ -753,8 +753,7 @@ static void l2cap_br_conn_req(struct bt_l2cap_br *l2cap, uint8_t ident,
|
|||
atomic_set_bit(BR_CHAN(chan)->flags, L2CAP_FLAG_CONN_ACCEPTOR);
|
||||
|
||||
/* Disable fragmentation of l2cap rx pdu */
|
||||
BR_CHAN(chan)->rx.mtu = MIN(BR_CHAN(chan)->rx.mtu,
|
||||
CONFIG_BT_L2CAP_RX_MTU);
|
||||
BR_CHAN(chan)->rx.mtu = MIN(BR_CHAN(chan)->rx.mtu, BT_L2CAP_RX_MTU);
|
||||
|
||||
switch (l2cap_br_conn_security(chan, psm)) {
|
||||
case L2CAP_CONN_SECURITY_PENDING:
|
||||
|
|
|
@ -37,12 +37,7 @@
|
|||
#define RFCOMM_MIN_MTU BT_RFCOMM_SIG_MIN_MTU
|
||||
#define RFCOMM_DEFAULT_MTU 127
|
||||
|
||||
#if defined(CONFIG_BT_HCI_ACL_FLOW_CONTROL)
|
||||
#define RFCOMM_MAX_CREDITS (CONFIG_BT_ACL_RX_COUNT - 1)
|
||||
#else
|
||||
#define RFCOMM_MAX_CREDITS (CONFIG_BT_RX_BUF_COUNT - 1)
|
||||
#endif
|
||||
|
||||
#define RFCOMM_MAX_CREDITS (CONFIG_BT_BUF_ACL_RX_COUNT - 1)
|
||||
#define RFCOMM_CREDITS_THRESHOLD (RFCOMM_MAX_CREDITS / 2)
|
||||
#define RFCOMM_DEFAULT_CREDIT RFCOMM_MAX_CREDITS
|
||||
|
||||
|
|
|
@ -55,10 +55,9 @@ config BT_OTS_OLCP_GO_TO_SUPPORT
|
|||
|
||||
config BT_OTS_L2CAP_CHAN_RX_MTU
|
||||
int "Size of RX MTU for Object Transfer Channel"
|
||||
default BT_L2CAP_RX_MTU if BT_HCI_ACL_FLOW_CONTROL
|
||||
default 23
|
||||
range 23 BT_L2CAP_RX_MTU if BT_HCI_ACL_FLOW_CONTROL
|
||||
range 23 BT_RX_BUF_LEN
|
||||
# RX MTU will be truncated to account for the L2CAP PDU and SDU header.
|
||||
default BT_BUF_ACL_RX_SIZE
|
||||
range 21 BT_BUF_ACL_RX_SIZE
|
||||
|
||||
module = BT_OTS
|
||||
module-str = BT_OTS
|
||||
|
|
|
@ -64,12 +64,21 @@ config USB_MAX_NUM_TRANSFERS
|
|||
Allocates buffers used for parallel transfers. Increase this number
|
||||
according to USB devices count.
|
||||
|
||||
config USB_DEVICE_BLUETOOTH_BIG_BUF
|
||||
bool
|
||||
# Hidden option to simplify bluetooth buffer requirement
|
||||
# TODO: Add BUF reserve in H4 mode and ISO?
|
||||
default y if BT_BUF_ACL_RX_SIZE > 123 # 4 byte header
|
||||
default y if BT_BUF_ACL_TX_SIZE > 123 # 4 byte header
|
||||
default y if BT_BUF_EVT_RX_SIZE > 125 # 2 byte header
|
||||
default y if BT_BUF_CMD_TX_SIZE > 124 # 3 byte header
|
||||
|
||||
config USB_REQUEST_BUFFER_SIZE
|
||||
int "Set buffer size for Standard, Class and Vendor request handlers"
|
||||
range 256 65536 if USB_DEVICE_NETWORK_RNDIS
|
||||
range 8 65536
|
||||
default 256 if USB_DEVICE_NETWORK_RNDIS
|
||||
default 266 if (BT_RX_BUF_LEN > 127 && USB_DEVICE_BLUETOOTH)
|
||||
default 266 if (USB_DEVICE_BLUETOOTH && USB_DEVICE_BLUETOOTH_BIG_BUF)
|
||||
default 1024 if USB_DEVICE_LOOPBACK
|
||||
default 128
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ CONFIG_BT_CTLR=y
|
|||
CONFIG_BT_LL_SW_SPLIT=y
|
||||
|
||||
CONFIG_BT_HCI_ACL_FLOW_CONTROL=y
|
||||
CONFIG_BT_L2CAP_RX_MTU=512
|
||||
CONFIG_BT_BUF_ACL_RX_SIZE=516
|
||||
CONFIG_BT_L2CAP_TX_MTU=512
|
||||
CONFIG_BT_DEBUG_LOG=y
|
||||
|
||||
|
|
|
@ -19,7 +19,8 @@ CONFIG_BT_CTLR_LE_ENC=y
|
|||
CONFIG_BT_CTLR_PRIVACY=y
|
||||
CONFIG_BT_CTLR_FILTER=y
|
||||
CONFIG_BT_CTLR_DTM_HCI=y
|
||||
CONFIG_BT_CTLR_TX_BUFFER_SIZE=60
|
||||
CONFIG_BT_BUF_ACL_TX_SIZE=60
|
||||
CONFIG_BT_BUF_ACL_RX_SIZE=60
|
||||
CONFIG_BT_CTLR_DATA_LENGTH_MAX=60
|
||||
|
||||
CONFIG_PM=y
|
||||
|
|
|
@ -157,7 +157,7 @@ NET_BUF_POOL_FIXED_DEFINE(event_pool, 32, BT_BUF_RX_SIZE + 4, NULL);
|
|||
static K_FIFO_DEFINE(event_queue);
|
||||
static K_FIFO_DEFINE(rx_queue);
|
||||
NET_BUF_POOL_FIXED_DEFINE(data_pool, CONFIG_BT_CTLR_RX_BUFFERS + 14,
|
||||
BT_BUF_ACL_SIZE + 4, NULL);
|
||||
BT_BUF_ACL_SIZE(CONFIG_BT_BUF_ACL_TX_SIZE) + 4, NULL);
|
||||
static K_FIFO_DEFINE(data_queue);
|
||||
|
||||
/**
|
||||
|
|
|
@ -233,7 +233,7 @@ struct bt_recv_job_data {
|
|||
struct k_work work; /* Work item */
|
||||
struct k_sem *sync; /* Semaphore to synchronize with */
|
||||
struct net_buf *buf; /* Net buffer to be passed to bt_recv() */
|
||||
} job_data[CONFIG_BT_RX_BUF_COUNT];
|
||||
} job_data[CONFIG_BT_BUF_EVT_RX_COUNT];
|
||||
|
||||
#define job(buf) (&job_data[net_buf_id(buf)])
|
||||
|
||||
|
|
|
@ -19,8 +19,6 @@ CONFIG_BT_PERIPHERAL=y
|
|||
|
||||
CONFIG_BT=y
|
||||
CONFIG_BT_TINYCRYPT_ECC=y
|
||||
CONFIG_BT_L2CAP_RX_MTU=69
|
||||
CONFIG_BT_L2CAP_TX_MTU=69
|
||||
|
||||
CONFIG_BT_MESH=y
|
||||
CONFIG_BT_MESH_RELAY=y
|
||||
|
|
|
@ -18,8 +18,6 @@ CONFIG_BT_PERIPHERAL=y
|
|||
|
||||
CONFIG_BT=y
|
||||
CONFIG_BT_TINYCRYPT_ECC=y
|
||||
CONFIG_BT_L2CAP_RX_MTU=69
|
||||
CONFIG_BT_L2CAP_TX_MTU=69
|
||||
|
||||
CONFIG_BT_MESH=y
|
||||
CONFIG_BT_MESH_RELAY=y
|
||||
|
|
|
@ -19,8 +19,6 @@ CONFIG_BT_PERIPHERAL=y
|
|||
|
||||
CONFIG_BT=y
|
||||
CONFIG_BT_TINYCRYPT_ECC=y
|
||||
CONFIG_BT_L2CAP_RX_MTU=69
|
||||
CONFIG_BT_L2CAP_TX_MTU=69
|
||||
|
||||
CONFIG_BT_MESH=y
|
||||
CONFIG_BT_MESH_RELAY=y
|
||||
|
|
|
@ -19,8 +19,6 @@ CONFIG_BT_PERIPHERAL=y
|
|||
|
||||
CONFIG_BT=y
|
||||
CONFIG_BT_TINYCRYPT_ECC=y
|
||||
CONFIG_BT_L2CAP_RX_MTU=69
|
||||
CONFIG_BT_L2CAP_TX_MTU=69
|
||||
|
||||
CONFIG_BT_MESH=y
|
||||
CONFIG_BT_MESH_RELAY=n
|
||||
|
|
|
@ -13,8 +13,6 @@ CONFIG_BT_MESH_PB_ADV=n
|
|||
CONFIG_BT=y
|
||||
CONFIG_BT_TINYCRYPT_ECC=y
|
||||
CONFIG_BT_RX_STACK_SIZE=1400
|
||||
CONFIG_BT_L2CAP_RX_MTU=69
|
||||
CONFIG_BT_L2CAP_TX_MTU=69
|
||||
CONFIG_BT_L2CAP_TX_BUF_COUNT=4
|
||||
|
||||
CONFIG_BT_CTLR_DUP_FILTER_LEN=0
|
||||
|
|
|
@ -19,8 +19,6 @@ CONFIG_BT_PERIPHERAL=y
|
|||
|
||||
CONFIG_BT=y
|
||||
CONFIG_BT_TINYCRYPT_ECC=y
|
||||
CONFIG_BT_L2CAP_RX_MTU=69
|
||||
CONFIG_BT_L2CAP_TX_MTU=69
|
||||
|
||||
CONFIG_BT_MESH=y
|
||||
CONFIG_BT_MESH_RELAY=y
|
||||
|
|
|
@ -19,8 +19,6 @@ CONFIG_BT_PERIPHERAL=y
|
|||
|
||||
CONFIG_BT=y
|
||||
CONFIG_BT_TINYCRYPT_ECC=y
|
||||
CONFIG_BT_L2CAP_RX_MTU=69
|
||||
CONFIG_BT_L2CAP_TX_MTU=69
|
||||
|
||||
CONFIG_BT_MESH=y
|
||||
CONFIG_BT_MESH_RELAY=y
|
||||
|
|
|
@ -19,8 +19,6 @@ CONFIG_BT_PERIPHERAL=y
|
|||
|
||||
CONFIG_BT=y
|
||||
CONFIG_BT_TINYCRYPT_ECC=y
|
||||
CONFIG_BT_L2CAP_RX_MTU=69
|
||||
CONFIG_BT_L2CAP_TX_MTU=69
|
||||
|
||||
CONFIG_BT_MESH=y
|
||||
CONFIG_BT_MESH_RELAY=n
|
||||
|
|
|
@ -39,8 +39,6 @@ CONFIG_BT_CTLR_SLAVE_FEAT_REQ=n
|
|||
CONFIG_BT_CTLR_ADVANCED_FEATURES=y
|
||||
CONFIG_BT_CTLR_FILTER=n
|
||||
|
||||
CONFIG_BT_L2CAP_RX_MTU=69
|
||||
CONFIG_BT_L2CAP_TX_MTU=69
|
||||
CONFIG_BT_L2CAP_TX_BUF_COUNT=4
|
||||
|
||||
CONFIG_BT_MESH=y
|
||||
|
|
|
@ -20,9 +20,6 @@ CONFIG_BT_DEVICE_NAME="test shell"
|
|||
CONFIG_BT_L2CAP_TX_BUF_COUNT=6
|
||||
CONFIG_BT_HRS=y
|
||||
|
||||
CONFIG_BT_L2CAP_RX_MTU=69
|
||||
CONFIG_BT_L2CAP_TX_MTU=69
|
||||
|
||||
CONFIG_BT_MESH=y
|
||||
CONFIG_BT_MESH_SHELL=y
|
||||
CONFIG_BT_MESH_RELAY=y
|
||||
|
|
Loading…
Reference in a new issue