Skip to content

Commit 0300040

Browse files
committed
Bluetooth: Remove CONFIG_BT_BUF_ACL_RX_COUNT
Remove the deprecated CONFIG_BT_BUF_ACL_RX_COUNT config as it has been deprecated since 4.1 Signed-off-by: Emil Gydesen <[email protected]>
1 parent 2d72d86 commit 0300040

File tree

2 files changed

+8
-36
lines changed

2 files changed

+8
-36
lines changed

include/zephyr/bluetooth/buf.h

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -144,27 +144,20 @@ static inline enum bt_buf_type bt_buf_type_from_h4(uint8_t h4_type, enum bt_buf_
144144
#define BT_BUF_ACL_RX_COUNT_MAX 65535
145145

146146
#if defined(CONFIG_BT_CONN) && defined(CONFIG_BT_HCI_HOST)
147-
/* The host needs more ACL buffers than maximum ACL links. This is because of
148-
* the way we re-assemble ACL packets into L2CAP PDUs.
149-
*
150-
* We keep around the first buffer (that comes from the driver) to do
151-
* re-assembly into, and if all links are re-assembling, there will be no buffer
152-
* available for the HCI driver to allocate from.
153-
*
154-
* TODO: When CONFIG_BT_BUF_ACL_RX_COUNT is removed,
155-
* remove the MAX and only keep the 1.
156-
*/
147+
/* The host needs more ACL buffers than maximum ACL links. This is because of
148+
* the way we re-assemble ACL packets into L2CAP PDUs.
149+
*
150+
* We keep around the first buffer (that comes from the driver) to do
151+
* re-assembly into, and if all links are re-assembling, there will be no buffer
152+
* available for the HCI driver to allocate from.
153+
*/
157154
#define BT_BUF_ACL_RX_COUNT_EXTRA CONFIG_BT_BUF_ACL_RX_COUNT_EXTRA
158-
#define BT_BUF_ACL_RX_COUNT (MAX(CONFIG_BT_BUF_ACL_RX_COUNT, 1) + BT_BUF_ACL_RX_COUNT_EXTRA)
155+
#define BT_BUF_ACL_RX_COUNT (1 + BT_BUF_ACL_RX_COUNT_EXTRA)
159156
#else
160157
#define BT_BUF_ACL_RX_COUNT_EXTRA 0
161158
#define BT_BUF_ACL_RX_COUNT 0
162159
#endif /* CONFIG_BT_CONN && CONFIG_BT_HCI_HOST */
163160

164-
#if defined(CONFIG_BT_BUF_ACL_RX_COUNT) && CONFIG_BT_BUF_ACL_RX_COUNT > 0
165-
#warning "CONFIG_BT_BUF_ACL_RX_COUNT is deprecated, see Zephyr 4.1 migration guide"
166-
#endif /* CONFIG_BT_BUF_ACL_RX_COUNT && CONFIG_BT_BUF_ACL_RX_COUNT > 0 */
167-
168161
BUILD_ASSERT(BT_BUF_ACL_RX_COUNT <= BT_BUF_ACL_RX_COUNT_MAX,
169162
"Maximum number of ACL RX buffer is 65535, reduce CONFIG_BT_BUF_ACL_RX_COUNT_EXTRA");
170163

subsys/bluetooth/common/Kconfig

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -102,27 +102,6 @@ config BT_BUF_ACL_RX_COUNT_EXTRA
102102
connection and uses one Rx buffer across all connections to receive a
103103
fragment from the Controller.
104104

105-
config BT_BUF_ACL_RX_COUNT
106-
int "[DEPRECATED] Number of incoming ACL data buffers"
107-
default 0
108-
range 0 256
109-
help
110-
Number or incoming ACL data buffers sent from the Controller to the
111-
Host.
112-
In a combined Host and Controller build the buffers are shared and
113-
therefore Controller to Host flow control is not needed.
114-
115-
In a Host only build with Controller to Host flow control enabled
116-
the Host will inform the Controller about the maximum number of
117-
buffers by setting this value in the Host Buffer Size command.
118-
119-
When Controller to Host flow control is not enabled the Controller
120-
can assume that the Host has infinite amount of buffers.
121-
122-
For both configurations, there is an additional requirement that is
123-
enforced by a build-time check: BT_BUF_ACL_RX_COUNT needs to be at
124-
least one greater than BT_MAX_CONN.
125-
126105
config BT_BUF_EVT_RX_SIZE
127106
int "Maximum supported HCI Event buffer length"
128107
default $(UINT8_MAX) if (BT_EXT_ADV && BT_OBSERVER) || BT_PER_ADV_SYNC || BT_DF_CONNECTION_CTE_RX || BT_CLASSIC || BT_CHANNEL_SOUNDING || BT_LE_EXTENDED_FEAT_SET

0 commit comments

Comments
 (0)