1# Bluetooth ATT/GATT configuration options 2 3# Copyright (c) 2019 Intel Corporation 4# Copyright (c) 2023 Nordic Semiconductor 5# SPDX-License-Identifier: Apache-2.0 6 7menu "L2CAP Options" 8 9config BT_L2CAP_TX_BUF_COUNT 10 int "Number of L2CAP TX buffers" 11 default NET_BUF_TX_COUNT if NET_L2_BT 12 default BT_BUF_ACL_TX_COUNT 13 range 2 255 14 help 15 Number of buffers available for outgoing L2CAP packets. 16 17config BT_L2CAP_TX_FRAG_COUNT 18 int "Number of L2CAP TX fragment buffers" 19 default NET_BUF_TX_COUNT if NET_L2_BT 20 default 2 21 range 0 255 22 help 23 Number of buffers available for fragments of TX buffers. Warning: 24 setting this to 0 means that the application must ensure that 25 queued TX buffers never need to be fragmented, i.e. that the 26 controller's buffer size is large enough. If this is not ensured, 27 and there are no dedicated fragment buffers, a deadlock may occur. 28 In most cases the default value of 2 is a safe bet. 29 30config BT_L2CAP_TX_MTU 31 int "Maximum supported L2CAP MTU for L2CAP TX buffers" 32 default 253 if BT_BREDR 33 default 66 if BT_EATT 34 default 65 if BT_SMP 35 default 64 if BT_BAP_UNICAST_SERVER || \ 36 BT_BAP_UNICAST_CLIENT || \ 37 BT_BAP_BROADCAST_SINK || \ 38 BT_BAP_SCAN_DELEGATOR || \ 39 BT_BAP_BROADCAST_ASSISTANT 40 default 49 if BT_HAS || BT_HAS_CLIENT 41 default 33 if BT_MESH_GATT 42 default 23 43 range 66 2000 if BT_EATT 44 range 65 2000 if BT_SMP 45 range 23 2000 46 help 47 Maximum L2CAP MTU for L2CAP TX buffers. 48 49config BT_L2CAP_RESCHED_MS 50 int 51 default 1000 52 help 53 Delay between retries for sending L2CAP segment. Necessary because the 54 stack might not be able to allocate enough conn contexts and might not 55 have enough credits, leading to a state where an SDU is stuck 56 mid-transfer and never resumes. 57 58 Note that this should seldom happen, this is just to work around a few 59 edge cases. 60 61config BT_L2CAP_DYNAMIC_CHANNEL 62 bool "L2CAP Dynamic Channel support" 63 depends on BT_SMP 64 help 65 This option enables support for LE Connection oriented Channels, 66 allowing the creation of dynamic L2CAP Channels. 67 68config BT_L2CAP_ECRED 69 bool "L2CAP Enhanced Credit Based Flow Control support" 70 depends on BT_L2CAP_DYNAMIC_CHANNEL 71 help 72 This option enables support for LE Connection oriented Channels with 73 Enhanced Credit Based Flow Control support on dynamic L2CAP Channels. 74 75config BT_L2CAP_SEG_RECV 76 bool "L2CAP Receive segment direct API [EXPERIMENTAL]" 77 select EXPERIMENTAL 78 help 79 80 Enable API for direct receiving of L2CAP SDU segments, bypassing the 81 Host's fixed-function SDU re-assembler, RX SDU buffer management and 82 credit issuer. 83 84 This API enforces conformance with L2CAP TS, but is otherwise as 85 flexible and semantically simple as possible. 86 87endmenu 88