aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/osmo-bsc/abis_nm.c3
-rw-r--r--src/osmo-bsc/gsm_data.c11
-rw-r--r--src/osmo-bsc/osmo_bsc_main.c2
-rw-r--r--tests/handover/handover_test.c3
4 files changed, 11 insertions, 8 deletions
diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c
index b6d1ec5c2..e17c6f5e4 100644
--- a/src/osmo-bsc/abis_nm.c
+++ b/src/osmo-bsc/abis_nm.c
@@ -848,9 +848,6 @@ bool all_trx_rsl_connected_unlocked(const struct gsm_bts *bts)
if (!trx_is_usable(trx))
return false;
-
- if (trx->mo.nm_state.administrative == NM_STATE_LOCKED)
- return false;
}
return true;
diff --git a/src/osmo-bsc/gsm_data.c b/src/osmo-bsc/gsm_data.c
index 2098f1345..f790b90d8 100644
--- a/src/osmo-bsc/gsm_data.c
+++ b/src/osmo-bsc/gsm_data.c
@@ -1459,10 +1459,13 @@ void gsm48_lchan2chan_desc_as_configured(struct gsm48_chan_desc *cd,
}
bool nm_is_running(const struct gsm_nm_state *s) {
- return (s->operational == NM_OPSTATE_ENABLED) && (
- (s->availability == NM_AVSTATE_OK) ||
- (s->availability == 0xff)
- );
+ if (s->operational != NM_OPSTATE_ENABLED)
+ return false;
+ if ((s->availability != NM_AVSTATE_OK) && (s->availability != 0xff))
+ return false;
+ if (s->administrative != NM_STATE_UNLOCKED)
+ return false;
+ return true;
}
/* determine the logical channel type based on the physical channel type */
diff --git a/src/osmo-bsc/osmo_bsc_main.c b/src/osmo-bsc/osmo_bsc_main.c
index 9eaaf2a7a..5fd02dda6 100644
--- a/src/osmo-bsc/osmo_bsc_main.c
+++ b/src/osmo-bsc/osmo_bsc_main.c
@@ -306,7 +306,7 @@ static void bootstrap_rsl(struct gsm_bts_trx *trx)
* This ensures that RACH control in system information is configured correctly.
* TRX 0 should be usable and unlocked, otherwise starting ACC ramping is pointless.
*/
- if (trx_is_usable(trx) && trx->mo.nm_state.administrative == NM_STATE_UNLOCKED)
+ if (trx_is_usable(trx))
acc_ramp_trigger(&trx->bts->acc_ramp);
gsm_bts_trx_set_system_infos(trx);
diff --git a/tests/handover/handover_test.c b/tests/handover/handover_test.c
index b08e2a32e..1a756cda3 100644
--- a/tests/handover/handover_test.c
+++ b/tests/handover/handover_test.c
@@ -197,14 +197,17 @@ static struct gsm_bts *create_bts(int arfcn)
bts->c0->mo.nm_state.operational = NM_OPSTATE_ENABLED;
bts->c0->mo.nm_state.availability = NM_AVSTATE_OK;
+ bts->c0->mo.nm_state.administrative = NM_STATE_UNLOCKED;
bts->c0->bb_transc.mo.nm_state.operational = NM_OPSTATE_ENABLED;
bts->c0->bb_transc.mo.nm_state.availability = NM_AVSTATE_OK;
+ bts->c0->bb_transc.mo.nm_state.administrative = NM_STATE_UNLOCKED;
/* 4 full rate and 4 half rate channels */
for (i = 1; i <= 6; i++) {
bts->c0->ts[i].pchan_from_config = (i < 5) ? GSM_PCHAN_TCH_F : GSM_PCHAN_TCH_H;
bts->c0->ts[i].mo.nm_state.operational = NM_OPSTATE_ENABLED;
bts->c0->ts[i].mo.nm_state.availability = NM_AVSTATE_OK;
+ bts->c0->ts[i].mo.nm_state.administrative = NM_STATE_UNLOCKED;
}
for (i = 0; i < ARRAY_SIZE(bts->c0->ts); i++) {