aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-11-13 21:04:31 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2018-11-20 10:40:09 +0100
commit825797cfcb2f9a3d871d358704c328d9cd3d3132 (patch)
tree00eb7be74ce0052990982387ad2b39be76c008b2
parent9d17840f83fa0c460098fc5b142d2f8b767fa501 (diff)
common: Implement OML for trx_set_available(1)
-rw-r--r--src/common/bts.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/common/bts.c b/src/common/bts.c
index 68cb1672..2b17ec68 100644
--- a/src/common/bts.c
+++ b/src/common/bts.c
@@ -322,13 +322,11 @@ int trx_set_available(struct gsm_bts_trx *trx, int avail)
LOGP(DSUM, LOGL_INFO, "TRX(%d): Setting available = %d\n",
trx->nr, avail);
if (avail) {
- /* FIXME: This needs to be sorted out */
-#if 0
- oml_mo_state_chg(&trx->mo, NM_OPSTATE_DISABLED, NM_AVSTATE_OFF_LINE);
- oml_mo_state_chg(&trx->bb_transc.mo, -1, NM_AVSTATE_OFF_LINE);
+ int op_state = trx->rsl_link ? NM_OPSTATE_ENABLED : NM_OPSTATE_DISABLED;
+ oml_mo_state_chg(&trx->mo, op_state, NM_AVSTATE_OK);
+ oml_mo_state_chg(&trx->bb_transc.mo, -1, NM_AVSTATE_OK);
for (tn = 0; tn < ARRAY_SIZE(trx->ts); tn++)
- oml_mo_state_chg(&trx->ts[tn].mo, NM_OPSTATE_DISABLED, NM_AVSTATE_DEPENDENCY);
-#endif
+ oml_mo_state_chg(&trx->ts[tn].mo, op_state, NM_AVSTATE_OK);
} else {
oml_mo_state_chg(&trx->mo, NM_OPSTATE_DISABLED, NM_AVSTATE_NOT_INSTALLED);
oml_mo_state_chg(&trx->bb_transc.mo, -1, NM_AVSTATE_NOT_INSTALLED);