From 02231177a9d670acc4249774eb694b93c6838c91 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Fri, 8 Feb 2019 22:23:52 +0100 Subject: OML: Ensure MOs are initialized with valid "Administrative State' When osmo-bts connects to the BSC, it sends a ton of "State Change Event Report" messages indicating the Operational State (NULL), Availability status (power off) and [as an osmocom extension] also the Administrative State. However, the value of the administrative state is "0", which is not defined in TS 12.21 Section 9.4.4 Change-Id: I03f8a4b08b266cd40036076c76f9dc7e8bf08da2 Closes: OS#3785 --- src/common/gsm_data_shared.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common/gsm_data_shared.c b/src/common/gsm_data_shared.c index 2d9af783..58b2503f 100644 --- a/src/common/gsm_data_shared.c +++ b/src/common/gsm_data_shared.c @@ -38,6 +38,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; } static void gsm_mo_init(struct gsm_abis_mo *mo, struct gsm_bts *bts, @@ -222,10 +223,12 @@ 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); + /* FIXME: Why would the TRX come up unlocked? */ + trx->mo.nm_state.administrative = NM_STATE_UNLOCKED; + gsm_mo_init(&trx->bb_transc.mo, bts, NM_OC_BASEB_TRANSC, bts->nr, trx->nr, 0xff); -- cgit v1.2.3