aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bsc
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-10-01 16:14:44 +0200
committerlaforge <laforge@osmocom.org>2020-10-15 05:55:36 +0000
commit12e15479d69b226ea1fb6a2f2a478b6df3dd6682 (patch)
tree459a99c58849d3c3776f1ed0c6019ea35cab535e /src/osmo-bsc
parent737bb2f47b3547c05f4ed6b5da99d058eebfabcf (diff)
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
Diffstat (limited to 'src/osmo-bsc')
-rw-r--r--src/osmo-bsc/bts_trx.c1
-rw-r--r--src/osmo-bsc/gsm_data.c1
2 files changed, 1 insertions, 1 deletions
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,