aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2022-10-06 15:33:28 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2023-01-31 12:05:02 +0100
commitcb3140faf6fcae0614a0416d705c77ee58b5b1a9 (patch)
tree44ffed4c729a19840e02540d3fb22bca2cb9b90a
parent4c680eb79804f191c2519f46a40b96f8ce01ba02 (diff)
abis_om2000: send TS_EV_OML_READY when TRX is fully done
We send the TS_EV_OML_READY event early, even though the TRX is not fully done with all OML initialization steps. Lets complete the TRX initialization first and then notify each timeslot FSM with TS_EV_OML_READY. Change-Id: If5251b102c8aa45dfc8cc4ee4e0223d7dc438938
-rw-r--r--src/osmo-bsc/abis_om2000.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/osmo-bsc/abis_om2000.c b/src/osmo-bsc/abis_om2000.c
index cf69deddb..2a653bf97 100644
--- a/src/osmo-bsc/abis_om2000.c
+++ b/src/osmo-bsc/abis_om2000.c
@@ -2254,10 +2254,6 @@ static void om2k_trx_s_wait_ts(struct osmo_fsm_inst *fi, uint32_t event, void *d
struct om2k_trx_fsm_priv *otfp = fi->priv;
struct gsm_bts_trx_ts *ts;
- /* notify TS is ready */
- ts = &otfp->trx->ts[otfp->cur_ts_nr];
- osmo_fsm_inst_dispatch(ts->fi, TS_EV_OML_READY, NULL);
-
/* next ? */
if (++otfp->cur_ts_nr < 8) {
/* iterate to the next timeslot */
@@ -2285,6 +2281,7 @@ static void om2k_trx_s_done_onenter(struct osmo_fsm_inst *fi, uint32_t prev_stat
struct nm_statechg_signal_data nsd;
struct nm_statechg_signal_data nsd_bb_transc;
struct gsm_bts_trx *trx = otfp->trx;
+ unsigned int i;
memset(&nsd, 0, sizeof(nsd));
@@ -2316,6 +2313,10 @@ static void om2k_trx_s_done_onenter(struct osmo_fsm_inst *fi, uint32_t prev_stat
if (fi->proc.parent)
osmo_fsm_inst_dispatch(fi->proc.parent, otfp->done_event, NULL);
+
+ /* Notify the timeslot FSM that all TRX initialization steps are done. */
+ for (i = 0; i < ARRAY_SIZE(trx->ts); i++)
+ osmo_fsm_inst_dispatch(trx->ts[i].fi, TS_EV_OML_READY, NULL);
}
static void om2k_trx_allstate(struct osmo_fsm_inst *fi, uint32_t event, void *data)