pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/32241 )
(
1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: Drop NM_EV_BBTRANSC_INSTALLED in favour of generic NM_EV_SW_ACT ......................................................................
Drop NM_EV_BBTRANSC_INSTALLED in favour of generic NM_EV_SW_ACT
All the other objects already use that one; there's no need to have a specific one for the NM Channel FSM.
Change-Id: Ic5fd37367b500c75a0a53b1d868ba2aed3edef1b --- M include/osmo-bts/nm_common_fsm.h M src/common/nm_bb_transc_fsm.c M src/common/nm_channel_fsm.c M src/common/nm_common_fsm.c 4 files changed, 15 insertions(+), 10 deletions(-)
Approvals: laforge: Looks good to me, but someone else must approve fixeria: Looks good to me, approved Jenkins Builder: Verified
diff --git a/include/osmo-bts/nm_common_fsm.h b/include/osmo-bts/nm_common_fsm.h index 85db0de..4d44402 100644 --- a/include/osmo-bts/nm_common_fsm.h +++ b/include/osmo-bts/nm_common_fsm.h @@ -41,7 +41,6 @@ NM_EV_PHYLINK_UP, /* RadioCarrier and BaseBand Transceiver only */ NM_EV_PHYLINK_DOWN, /* RadioCarrier and BaseBand Transceiver only */ NM_EV_DISABLE, /* RadioCarrier and BaseBand Transceiver only */ - NM_EV_BBTRANSC_INSTALLED, /* Radio Channel only */ NM_EV_BBTRANSC_ENABLED, /* Radio Channel only */ NM_EV_BBTRANSC_DISABLED, /* Radio Channel only */ NM_EV_RCARRIER_ENABLED, /* Radio Channel only */ diff --git a/src/common/nm_bb_transc_fsm.c b/src/common/nm_bb_transc_fsm.c index e51a151..6fdddbe 100644 --- a/src/common/nm_bb_transc_fsm.c +++ b/src/common/nm_bb_transc_fsm.c @@ -70,17 +70,12 @@ static void st_op_disabled_notinstalled(struct osmo_fsm_inst *fi, uint32_t event, void *data) { struct gsm_bts_bb_trx *bb_transc = (struct gsm_bts_bb_trx *)fi->priv; - struct gsm_bts_trx *trx = gsm_bts_bb_trx_get_trx(bb_transc); - int i;
switch (event) { case NM_EV_SW_ACT: oml_mo_tx_sw_act_rep(&bb_transc->mo); nm_bb_transc_fsm_state_chg(fi, NM_BBTRANSC_ST_OP_DISABLED_OFFLINE); - for (i = 0; i < TRX_NR_TS; i++) { - struct gsm_bts_trx_ts *ts = &trx->ts[i]; - osmo_fsm_inst_dispatch(ts->mo.fi, NM_EV_BBTRANSC_INSTALLED, NULL); - } + ev_dispatch_children(bb_transc, event); return; case NM_EV_RSL_UP: return; diff --git a/src/common/nm_channel_fsm.c b/src/common/nm_channel_fsm.c index 252df83..9e22fee 100644 --- a/src/common/nm_channel_fsm.c +++ b/src/common/nm_channel_fsm.c @@ -71,7 +71,7 @@ struct gsm_bts_trx_ts *ts = (struct gsm_bts_trx_ts *)fi->priv;
switch (event) { - case NM_EV_BBTRANSC_INSTALLED: + case NM_EV_SW_ACT: oml_mo_tx_sw_act_rep(&ts->mo); if (ts_can_be_enabled(ts)) nm_chan_fsm_state_chg(fi, NM_CHAN_ST_OP_DISABLED_OFFLINE); @@ -227,7 +227,7 @@ static struct osmo_fsm_state nm_chan_fsm_states[] = { [NM_CHAN_ST_OP_DISABLED_NOTINSTALLED] = { .in_event_mask = - X(NM_EV_BBTRANSC_INSTALLED), + X(NM_EV_SW_ACT), .out_state_mask = X(NM_CHAN_ST_OP_DISABLED_NOTINSTALLED) | X(NM_CHAN_ST_OP_DISABLED_OFFLINE) | diff --git a/src/common/nm_common_fsm.c b/src/common/nm_common_fsm.c index f742357..220ac76 100644 --- a/src/common/nm_common_fsm.c +++ b/src/common/nm_common_fsm.c @@ -36,7 +36,6 @@ { NM_EV_PHYLINK_UP, "PHYLINK_UP" }, { NM_EV_PHYLINK_DOWN, "PHYLINK_DOWN" }, { NM_EV_DISABLE, "DISABLE" }, - { NM_EV_BBTRANSC_INSTALLED, "BBTRANSC_INSTALLED" }, { NM_EV_BBTRANSC_ENABLED, "BBTRANSC_ENABLED" }, { NM_EV_BBTRANSC_DISABLED, "BBTRANSC_DISABLED" }, { NM_EV_RCARRIER_ENABLED, "RCARRIER_ENABLED" },