Skip to content

Commit f6172f3

Browse files
Andries Kruithofaescolar
authored andcommitted
Blueotooth: controller: removed delayed notification code
The code that was added for delaying notifications to the host, which was only implemented for legacy controller, is removed in this commit Signed-off-by: Andries Kruithof <[email protected]>
1 parent 2ada005 commit f6172f3

File tree

4 files changed

+0
-117
lines changed

4 files changed

+0
-117
lines changed

subsys/bluetooth/controller/ll_sw/lll_conn.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,6 @@ struct lll_conn {
139139
#endif /* CONFIG_BT_CTLR_CONN_RSSI_EVENT */
140140
#endif /* CONFIG_BT_CTLR_CONN_RSSI */
141141

142-
#if defined(CONFIG_BT_CTLR_RX_ENQUEUE_HOLD)
143-
#define RX_HOLD_MASK 3U
144-
#define RX_HOLD_REQ 1U
145-
#define RX_HOLD_ACK 2U
146-
uint8_t rx_hold_req;
147-
uint8_t rx_hold_ack;
148-
#endif /* CONFIG_BT_CTLR_RX_ENQUEUE_HOLD */
149-
150142
#if defined(CONFIG_BT_CTLR_CONN_META)
151143
struct lll_conn_meta conn_meta;
152144
#endif /* CONFIG_BT_CTLR_CONN_META */

subsys/bluetooth/controller/ll_sw/nordic/lll/lll_conn.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -410,13 +410,6 @@ void lll_conn_isr_rx(void *param)
410410

411411
is_ull_rx = 0U;
412412

413-
#if defined(CONFIG_BT_CTLR_RX_ENQUEUE_HOLD)
414-
if (((lll->rx_hold_req - lll->rx_hold_ack) & RX_HOLD_MASK) ==
415-
RX_HOLD_REQ) {
416-
lll->rx_hold_ack--;
417-
}
418-
#endif /* CONFIG_BT_CTLR_RX_ENQUEUE_HOLD */
419-
420413
if (tx_release) {
421414
LL_ASSERT(lll->handle != 0xFFFF);
422415

subsys/bluetooth/controller/ll_sw/ull_central.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -283,13 +283,6 @@ uint8_t ll_create_connection(uint16_t scan_interval, uint16_t scan_window,
283283
conn->apto_reload;
284284
#endif /* CONFIG_BT_CTLR_LE_PING */
285285

286-
/* TODO: verify if we need to enable CTLR_RX_ENQUEUE_HOLD */
287-
#if defined(CONFIG_BT_CTLR_RX_ENQUEUE_HOLD)
288-
conn->llcp_rx_hold = NULL;
289-
conn_lll->rx_hold_req = 0U;
290-
conn_lll->rx_hold_ack = 0U;
291-
#endif /* CONFIG_BT_CTLR_RX_ENQUEUE_HOLD */
292-
293286
/* Re-initialize the control procedure data structures */
294287
ull_llcp_init(conn);
295288

subsys/bluetooth/controller/ll_sw/ull_conn.c

Lines changed: 0 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,6 @@
7474
LOG_MODULE_REGISTER(bt_ctlr_ull_conn);
7575

7676
static int init_reset(void);
77-
#if defined(CONFIG_BT_CTLR_RX_ENQUEUE_HOLD)
78-
static bool rx_hold_is_done(struct ll_conn *conn);
79-
static void rx_hold_flush(struct ll_conn *conn);
80-
#endif /* CONFIG_BT_CTLR_RX_ENQUEUE_HOLD */
8177
#if !defined(CONFIG_BT_CTLR_LOW_LAT_ULL)
8278
static void tx_demux_sched(struct ll_conn *conn);
8379
#endif /* CONFIG_BT_CTLR_LOW_LAT_ULL */
@@ -850,13 +846,6 @@ int ull_conn_rx(memq_link_t *link, struct node_rx_pdu **rx)
850846
return 0;
851847
}
852848

853-
#if defined(CONFIG_BT_CTLR_RX_ENQUEUE_HOLD)
854-
/* TODO: is this required for refactored LLCP? */
855-
if (conn->llcp_rx_hold && rx_hold_is_done(conn)) {
856-
rx_hold_flush(conn);
857-
}
858-
#endif /* CONFIG_BT_CTLR_RX_ENQUEUE_HOLD */
859-
860849
ull_cp_tx_ntf(conn);
861850

862851
pdu_rx = (void *)(*rx)->pdu;
@@ -952,19 +941,6 @@ void ull_conn_done(struct node_rx_event_done *done)
952941
return;
953942
}
954943

955-
#if defined(CONFIG_BT_CTLR_RX_ENQUEUE_HOLD)
956-
if (conn->llcp_rx_hold && rx_hold_is_done(conn)) {
957-
rx_hold_flush(conn);
958-
959-
/* For both CONFIG_BT_CTLR_LOW_LAT_ULL or when done events have
960-
* separate mayfly, explicitly trigger rx_demux mayfly. In the
961-
* later we could be here without any node rx or tx ack being
962-
* processed hence an explicit ll_rx_sched call is necessary.
963-
*/
964-
ll_rx_sched();
965-
}
966-
#endif /* CONFIG_BT_CTLR_RX_ENQUEUE_HOLD */
967-
968944
ull_cp_tx_ntf(conn);
969945

970946
#if defined(CONFIG_BT_CTLR_LE_ENC)
@@ -1470,12 +1446,6 @@ void ull_conn_tx_ack(uint16_t handle, memq_link_t *link, struct node_tx *tx)
14701446
if (handle != LLL_HANDLE_INVALID) {
14711447
struct ll_conn *conn = ll_conn_get(handle);
14721448

1473-
#if defined(CONFIG_BT_CTLR_RX_ENQUEUE_HOLD)
1474-
if (conn->llcp_rx_hold && rx_hold_is_done(conn)) {
1475-
rx_hold_flush(conn);
1476-
}
1477-
#endif /* CONFIG_BT_CTLR_RX_ENQUEUE_HOLD */
1478-
14791449
ull_cp_tx_ack(conn, tx);
14801450
}
14811451

@@ -1496,14 +1466,6 @@ void ull_conn_tx_ack(uint16_t handle, memq_link_t *link, struct node_tx *tx)
14961466
pdu_tx->ll_id = PDU_DATA_LLID_RESV;
14971467
} else {
14981468
LL_ASSERT(handle != LLL_HANDLE_INVALID);
1499-
1500-
#if defined(CONFIG_BT_CTLR_RX_ENQUEUE_HOLD)
1501-
struct ll_conn *conn = ll_conn_get(handle);
1502-
1503-
if (conn->llcp_rx_hold && rx_hold_is_done(conn)) {
1504-
rx_hold_flush(conn);
1505-
}
1506-
#endif /* CONFIG_BT_CTLR_RX_ENQUEUE_HOLD */
15071469
}
15081470

15091471
ll_tx_ack_put(handle, tx);
@@ -1642,63 +1604,6 @@ static int init_reset(void)
16421604
return 0;
16431605
}
16441606

1645-
#if defined(CONFIG_BT_CTLR_RX_ENQUEUE_HOLD)
1646-
static void rx_hold_put(struct ll_conn *conn, memq_link_t *link,
1647-
struct node_rx_pdu *rx)
1648-
{
1649-
struct node_rx_pdu *rx_last;
1650-
struct lll_conn *lll;
1651-
1652-
link->mem = NULL;
1653-
rx->hdr.link = link;
1654-
1655-
rx_last = conn->llcp_rx_hold;
1656-
while (rx_last && rx_last->hdr.link && rx_last->hdr.link->mem) {
1657-
rx_last = rx_last->hdr.link->mem;
1658-
}
1659-
1660-
if (rx_last) {
1661-
rx_last->hdr.link->mem = rx;
1662-
} else {
1663-
conn->llcp_rx_hold = rx;
1664-
}
1665-
1666-
lll = &conn->lll;
1667-
if (lll->rx_hold_req == lll->rx_hold_ack) {
1668-
lll->rx_hold_req++;
1669-
}
1670-
}
1671-
1672-
static bool rx_hold_is_done(struct ll_conn *conn)
1673-
{
1674-
return ((conn->lll.rx_hold_req -
1675-
conn->lll.rx_hold_ack) & RX_HOLD_MASK) == RX_HOLD_ACK;
1676-
}
1677-
1678-
static void rx_hold_flush(struct ll_conn *conn)
1679-
{
1680-
struct node_rx_pdu *rx;
1681-
struct lll_conn *lll;
1682-
1683-
rx = conn->llcp_rx_hold;
1684-
do {
1685-
struct node_rx_hdr *hdr;
1686-
1687-
/* traverse to next rx node */
1688-
hdr = &rx->hdr;
1689-
rx = hdr->link->mem;
1690-
1691-
/* enqueue rx node towards Thread */
1692-
ll_rx_put(hdr->link, hdr);
1693-
} while (rx);
1694-
1695-
conn->llcp_rx_hold = NULL;
1696-
lll = &conn->lll;
1697-
lll->rx_hold_req = 0U;
1698-
lll->rx_hold_ack = 0U;
1699-
}
1700-
#endif /* CONFIG_BT_CTLR_RX_ENQUEUE_HOLD */
1701-
17021607
#if !defined(CONFIG_BT_CTLR_LOW_LAT_ULL)
17031608
static void tx_demux_sched(struct ll_conn *conn)
17041609
{

0 commit comments

Comments
 (0)