From e85c4d00b68fe22cf6cda5fa2d7badc40f37373f Mon Sep 17 00:00:00 2001 From: Vinayak Kariappa Chettimada Date: Mon, 4 Feb 2019 22:33:51 +0530 Subject: [PATCH] Bluetooth: controller: Rename ull_tx_ack_put to ll_tx_ack_put Rename ull_tx_ack_put to ll_tx_ack_put as ack is enqueued into LL thread context from ULL ISR context. Signed-off-by: Vinayak Kariappa Chettimada --- subsys/bluetooth/controller/ll_sw/ull.c | 34 +++++++++---------- subsys/bluetooth/controller/ll_sw/ull_conn.c | 4 +-- .../bluetooth/controller/ll_sw/ull_internal.h | 2 +- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/subsys/bluetooth/controller/ll_sw/ull.c b/subsys/bluetooth/controller/ll_sw/ull.c index 6b909f5dc8b..68cfd39431a 100644 --- a/subsys/bluetooth/controller/ll_sw/ull.c +++ b/subsys/bluetooth/controller/ll_sw/ull.c @@ -809,6 +809,22 @@ void ll_rx_sched(void) k_sem_give(sem_recv); } +#if defined(CONFIG_BT_CONN) +void ll_tx_ack_put(u16_t handle, struct node_tx *node_tx) +{ + struct lll_tx *tx; + u8_t idx; + + idx = MFIFO_ENQUEUE_GET(tx_ack, (void **)&tx); + LL_ASSERT(tx); + + tx->handle = handle; + tx->node = node_tx; + + MFIFO_ENQUEUE(tx_ack, idx); +} +#endif /* CONFIG_BT_CONN */ + void ll_timeslice_ticker_id_get(u8_t * const instance_index, u8_t * const user_id) { @@ -943,22 +959,6 @@ void ull_rx_sched(void) mayfly_enqueue(TICKER_USER_ID_LLL, TICKER_USER_ID_ULL_HIGH, 1, &mfy); } -#if defined(CONFIG_BT_CONN) -void ull_tx_ack_put(u16_t handle, struct node_tx *node_tx) -{ - struct lll_tx *tx; - u8_t idx; - - idx = MFIFO_ENQUEUE_GET(tx_ack, (void **)&tx); - LL_ASSERT(tx); - - tx->handle = handle; - tx->node = node_tx; - - MFIFO_ENQUEUE(tx_ack, idx); -} -#endif /* CONFIG_BT_CONN */ - int ull_prepare_enqueue(lll_is_abort_cb_t is_abort_cb, lll_abort_cb_t abort_cb, struct lll_prepare_param *prepare_param, @@ -1249,7 +1249,7 @@ static inline void rx_demux_conn_tx_ack(u8_t ack_last, u16_t handle, ull_conn_tx_lll_enqueue(conn, 1); } else { /* Pass through Tx ack */ - ull_tx_ack_put(0xFFFF, node_tx); + ll_tx_ack_put(0xFFFF, node_tx); /* Release link mem */ ull_conn_link_tx_release(link); diff --git a/subsys/bluetooth/controller/ll_sw/ull_conn.c b/subsys/bluetooth/controller/ll_sw/ull_conn.c index b2733351c92..ebb89278b35 100644 --- a/subsys/bluetooth/controller/ll_sw/ull_conn.c +++ b/subsys/bluetooth/controller/ll_sw/ull_conn.c @@ -1126,7 +1126,7 @@ void ull_conn_tx_demux(u8_t count) struct pdu_data *p = (void *)tx->pdu; p->ll_id = PDU_DATA_LLID_RESV; - ull_tx_ack_put(0xFFFF, tx); + ll_tx_ack_put(0xFFFF, tx); } MFIFO_DEQUEUE(conn_tx); @@ -1198,7 +1198,7 @@ void ull_conn_tx_ack(struct ll_conn *conn, memq_link_t *link, } } - ull_tx_ack_put(conn->lll.handle, tx); + ll_tx_ack_put(conn->lll.handle, tx); } static int init_reset(void) diff --git a/subsys/bluetooth/controller/ll_sw/ull_internal.h b/subsys/bluetooth/controller/ll_sw/ull_internal.h index edddaab4441..eff7426affd 100644 --- a/subsys/bluetooth/controller/ll_sw/ull_internal.h +++ b/subsys/bluetooth/controller/ll_sw/ull_internal.h @@ -22,7 +22,7 @@ void *ll_pdu_rx_alloc_peek(u8_t count); void *ll_pdu_rx_alloc(void); void ll_rx_put(memq_link_t *link, void *rx); void ll_rx_sched(void); -void ull_tx_ack_put(u16_t handle, struct node_tx *node_tx); +void ll_tx_ack_put(u16_t handle, struct node_tx *node_tx); void ull_ticker_status_give(u32_t status, void *param); u32_t ull_ticker_status_take(u32_t ret, u32_t volatile *ret_cb); void *ull_disable_mark(void *param);