From f5f0714c814c2002b0ab819d3444711d228d9c58 Mon Sep 17 00:00:00 2001 From: Erik Brockhoff Date: Tue, 15 Nov 2022 13:21:25 +0100 Subject: [PATCH] Bluetooth: controller: refactor to remove duplicated state function Removing code for duplicate state handling in local procedure Signed-off-by: Erik Brockhoff --- .../bluetooth/controller/ll_sw/ull_llcp_chmu.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/subsys/bluetooth/controller/ll_sw/ull_llcp_chmu.c b/subsys/bluetooth/controller/ll_sw/ull_llcp_chmu.c index 1f968d4de5f..5bc4b615e46 100644 --- a/subsys/bluetooth/controller/ll_sw/ull_llcp_chmu.c +++ b/subsys/bluetooth/controller/ll_sw/ull_llcp_chmu.c @@ -122,18 +122,6 @@ static void lp_chmu_send_channel_map_update_ind(struct ll_conn *conn, struct pro } } -static void lp_chmu_st_idle(struct ll_conn *conn, struct proc_ctx *ctx, uint8_t evt, void *param) -{ - switch (evt) { - case LP_CHMU_EVT_RUN: - lp_chmu_send_channel_map_update_ind(conn, ctx, evt, param); - break; - default: - /* Ignore other evts */ - break; - } -} - static void lp_chmu_st_wait_tx_chan_map_ind(struct ll_conn *conn, struct proc_ctx *ctx, uint8_t evt, void *param) { @@ -176,8 +164,9 @@ static void lp_chmu_execute_fsm(struct ll_conn *conn, struct proc_ctx *ctx, uint { switch (ctx->state) { case LP_CHMU_STATE_IDLE: - lp_chmu_st_idle(conn, ctx, evt, param); - break; + /* Empty/fallthrough on purpose as idle state handling is equivalent to + * 'wait for tx state' - simply to attempt TX'ing chan map ind + */ case LP_CHMU_STATE_WAIT_TX_CHAN_MAP_IND: lp_chmu_st_wait_tx_chan_map_ind(conn, ctx, evt, param); break;