From c793c0edda931ab95644ee3bf977600a88266260 Mon Sep 17 00:00:00 2001 From: Vinayak Kariappa Chettimada Date: Fri, 17 Jan 2020 18:05:43 +0530 Subject: [PATCH] Bluetooth: controller: split: Update lll_conn_flush interface Updated the lll_conn_flush interface to pass the connection handle while the LLL connection context stored handle has been invalidated. Signed-off-by: Vinayak Kariappa Chettimada --- subsys/bluetooth/controller/ll_sw/lll_conn.h | 2 +- subsys/bluetooth/controller/ll_sw/nordic/lll/lll_conn.c | 2 +- subsys/bluetooth/controller/ll_sw/openisa/lll/lll_conn.c | 2 +- subsys/bluetooth/controller/ll_sw/ull_conn.c | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/subsys/bluetooth/controller/ll_sw/lll_conn.h b/subsys/bluetooth/controller/ll_sw/lll_conn.h index 4d73fe12318..61c324d750c 100644 --- a/subsys/bluetooth/controller/ll_sw/lll_conn.h +++ b/subsys/bluetooth/controller/ll_sw/lll_conn.h @@ -134,7 +134,7 @@ void lll_conn_isr_abort(void *param); void lll_conn_rx_pkt_set(struct lll_conn *lll); void lll_conn_tx_pkt_set(struct lll_conn *lll, struct pdu_data *pdu_data_tx); void lll_conn_pdu_tx_prep(struct lll_conn *lll, struct pdu_data **pdu_data_tx); -void lll_conn_flush(struct lll_conn *lll); +void lll_conn_flush(u16_t handle, struct lll_conn *lll); extern void ull_conn_lll_ack_enqueue(u16_t handle, struct node_tx *tx); extern u16_t ull_conn_lll_max_tx_octets_get(struct lll_conn *lll); diff --git a/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_conn.c b/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_conn.c index c37b3b38270..8462b0198c0 100644 --- a/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_conn.c +++ b/subsys/bluetooth/controller/ll_sw/nordic/lll/lll_conn.c @@ -801,7 +801,7 @@ static struct pdu_data *empty_tx_enqueue(struct lll_conn *lll) return p; } -void lll_conn_flush(struct lll_conn *lll) +void lll_conn_flush(u16_t handle, struct lll_conn *lll) { /* Nothing to be flushed */ } diff --git a/subsys/bluetooth/controller/ll_sw/openisa/lll/lll_conn.c b/subsys/bluetooth/controller/ll_sw/openisa/lll/lll_conn.c index e39b6f02ec1..1164962a01b 100644 --- a/subsys/bluetooth/controller/ll_sw/openisa/lll/lll_conn.c +++ b/subsys/bluetooth/controller/ll_sw/openisa/lll/lll_conn.c @@ -798,7 +798,7 @@ static struct pdu_data *empty_tx_enqueue(struct lll_conn *lll) return p; } -void lll_conn_flush(struct lll_conn *lll) +void lll_conn_flush(u16_t handle, struct lll_conn *lll) { /* Nothing to be flushed */ } diff --git a/subsys/bluetooth/controller/ll_sw/ull_conn.c b/subsys/bluetooth/controller/ll_sw/ull_conn.c index 4b64600825b..63653594d1f 100644 --- a/subsys/bluetooth/controller/ll_sw/ull_conn.c +++ b/subsys/bluetooth/controller/ll_sw/ull_conn.c @@ -1739,12 +1739,13 @@ static void tx_ull_flush(struct ll_conn *conn) static void tx_lll_flush(void *param) { struct ll_conn *conn = (void *)HDR_LLL2EVT(param); + u16_t handle = ll_conn_handle_get(conn); struct lll_conn *lll = param; struct node_rx_pdu *rx; struct node_tx *tx; memq_link_t *link; - lll_conn_flush(lll); + lll_conn_flush(handle, lll); link = memq_dequeue(lll->memq_tx.tail, &lll->memq_tx.head, (void **)&tx);