From 12e15479d69b226ea1fb6a2f2a478b6df3dd6682 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Thu, 1 Oct 2020 16:14:44 +0200 Subject: Set all NM OML objects to Locked by default Before they were set with a value of 0, which had no related enum field, but since in general all comparsions are done against NM_STATE_UNLOCKED they also hold valid. The major change in behavior with this patch is upon OML link down, where gsm_bts_mo_reset() is called on all objects. This way, upon OML re-establishment we have again all objects as Locked again, which is the expected default value as per TS 12.21. Change-Id: I68ae0bc51a565f903b47cf72f3e3dd6f1a2d2651 --- src/osmo-bsc/bts_trx.c | 1 - src/osmo-bsc/gsm_data.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) (limited to 'src/osmo-bsc') diff --git a/src/osmo-bsc/bts_trx.c b/src/osmo-bsc/bts_trx.c index 25a3fc73e..65ff7526e 100644 --- a/src/osmo-bsc/bts_trx.c +++ b/src/osmo-bsc/bts_trx.c @@ -41,7 +41,6 @@ struct gsm_bts_trx *gsm_bts_trx_alloc(struct gsm_bts *bts) trx->bts = bts; trx->nr = bts->num_trx++; - trx->mo.nm_state.administrative = NM_STATE_UNLOCKED; gsm_mo_init(&trx->mo, bts, NM_OC_RADIO_CARRIER, bts->nr, trx->nr, 0xff); diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c index 1152783ae..22616f37d 100644 --- a/src/osmo-bsc/gsm_data.c +++ b/src/osmo-bsc/gsm_data.c @@ -153,6 +153,7 @@ void gsm_abis_mo_reset(struct gsm_abis_mo *mo) { mo->nm_state.operational = NM_OPSTATE_NULL; mo->nm_state.availability = NM_AVSTATE_POWER_OFF; + mo->nm_state.administrative = NM_STATE_LOCKED; } void gsm_mo_init(struct gsm_abis_mo *mo, struct gsm_bts *bts, -- cgit v1.2.3