Bluetooth: controller: refactor to remove duplicated state function

Removing code for duplicate state handling in local  procedure

Signed-off-by: Erik Brockhoff <erbr@oticon.com>
This commit is contained in:
Erik Brockhoff 2022-11-15 13:21:25 +01:00 committed by Carles Cufí
commit f5f0714c81

View file

@ -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;