aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc/bts_trx.c
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-09-30 16:36:30 +0200
committerlaforge <laforge@osmocom.org>2020-10-15 05:55:36 +0000
commit09544ab43657d16f0ff58f7aa1ee113c9cb4bb05 (patch)
treeabac5aaf37bce7c265502720538c01e6eb4a2a93 /src/osmo-bsc/bts_trx.c
parentd9d105c1f73713b1363849554d5d87d36d4ae7b6 (diff)
Introduce Radio Channel FSM
Diffstat (limited to 'src/osmo-bsc/bts_trx.c')
-rw-r--r--src/osmo-bsc/bts_trx.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/osmo-bsc/bts_trx.c b/src/osmo-bsc/bts_trx.c
index 5f21b497c..0e5223874 100644
--- a/src/osmo-bsc/bts_trx.c
+++ b/src/osmo-bsc/bts_trx.c
@@ -34,6 +34,8 @@
static int gsm_bts_trx_talloc_destructor(struct gsm_bts_trx *trx)
{
+ unsigned int i;
+
if (trx->bb_transc.mo.fi) {
osmo_fsm_inst_free(trx->bb_transc.mo.fi);
trx->bb_transc.mo.fi = NULL;
@@ -42,6 +44,13 @@ static int gsm_bts_trx_talloc_destructor(struct gsm_bts_trx *trx)
osmo_fsm_inst_free(trx->mo.fi);
trx->mo.fi = NULL;
}
+ for (i = 0; i < TRX_NR_TS; i++) {
+ struct gsm_bts_trx_ts *ts = &trx->ts[i];
+ if (ts->mo.fi) {
+ osmo_fsm_inst_free(ts->mo.fi);
+ ts->mo.fi = NULL;
+ }
+ }
return 0;
}
@@ -82,6 +91,10 @@ struct gsm_bts_trx *gsm_bts_trx_alloc(struct gsm_bts *bts)
ts_fsm_alloc(ts);
+ ts->mo.fi = osmo_fsm_inst_alloc(&nm_chan_fsm, trx, ts,
+ LOGL_INFO, NULL);
+ osmo_fsm_inst_update_id_f(ts->mo.fi, "bts%d-trx%d-ts%d",
+ bts->nr, trx->nr, ts->nr);
gsm_mo_init(&ts->mo, bts, NM_OC_CHANNEL,
bts->nr, trx->nr, ts->nr);