Skip to content

Commit f2e11a6

Browse files
committed
Bluetooth: Controller: Remove duplicate define CONN_DATA_BUFFERS
Remove duplicate define CONN_DATA_BUFFERS and use CONFIG_BT_BUF_ACL_TX_COUNT instead. Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
1 parent 7da64e7 commit f2e11a6

File tree

1 file changed

+6
-14
lines changed

1 file changed

+6
-14
lines changed

subsys/bluetooth/controller/ll_sw/ull_conn.c

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -127,23 +127,18 @@ static uint8_t force_md_cnt_calc(struct lll_conn *lll_conn, uint32_t tx_rate);
127127
(LL_LENGTH_OCTETS_TX_MAX + \
128128
BT_CTLR_USER_TX_BUFFER_OVERHEAD))
129129

130-
#define CONN_DATA_BUFFERS CONFIG_BT_BUF_ACL_TX_COUNT
131-
132-
static MFIFO_DEFINE(conn_tx, sizeof(struct lll_tx), CONN_DATA_BUFFERS);
130+
static MFIFO_DEFINE(conn_tx, sizeof(struct lll_tx), CONFIG_BT_BUF_ACL_TX_COUNT);
133131
static MFIFO_DEFINE(conn_ack, sizeof(struct lll_tx),
134-
(CONN_DATA_BUFFERS +
135-
LLCP_TX_CTRL_BUF_COUNT));
132+
(CONFIG_BT_BUF_ACL_TX_COUNT + LLCP_TX_CTRL_BUF_COUNT));
136133

137134
static struct {
138135
void *free;
139-
uint8_t pool[CONN_TX_BUF_SIZE * CONN_DATA_BUFFERS];
136+
uint8_t pool[CONN_TX_BUF_SIZE * CONFIG_BT_BUF_ACL_TX_COUNT];
140137
} mem_conn_tx;
141138

142139
static struct {
143140
void *free;
144-
uint8_t pool[sizeof(memq_link_t) *
145-
(CONN_DATA_BUFFERS +
146-
LLCP_TX_CTRL_BUF_COUNT)];
141+
uint8_t pool[sizeof(memq_link_t) * (CONFIG_BT_BUF_ACL_TX_COUNT + LLCP_TX_CTRL_BUF_COUNT)];
147142
} mem_link_tx;
148143

149144
#if defined(CONFIG_BT_CTLR_DATA_LENGTH)
@@ -1693,14 +1688,11 @@ static int init_reset(void)
16931688
}
16941689

16951690
/* Initialize tx pool. */
1696-
mem_init(mem_conn_tx.pool, CONN_TX_BUF_SIZE, CONN_DATA_BUFFERS,
1697-
&mem_conn_tx.free);
1691+
mem_init(mem_conn_tx.pool, CONN_TX_BUF_SIZE, CONFIG_BT_BUF_ACL_TX_COUNT, &mem_conn_tx.free);
16981692

16991693
/* Initialize tx link pool. */
17001694
mem_init(mem_link_tx.pool, sizeof(memq_link_t),
1701-
(CONN_DATA_BUFFERS +
1702-
LLCP_TX_CTRL_BUF_COUNT),
1703-
&mem_link_tx.free);
1695+
(CONFIG_BT_BUF_ACL_TX_COUNT + LLCP_TX_CTRL_BUF_COUNT), &mem_link_tx.free);
17041696

17051697
/* Initialize control procedure system. */
17061698
ull_cp_init();

0 commit comments

Comments
 (0)