[misc] Utilize rf_locking by setting the nm_state.administrative
* On start the vty code will call the abis_nm method and this
will set the administrative state to unlock/lock
* During startup the BTS will report its state as well and would
possible overwrite the set administrative. We are only going
to update the administrative if it was 0 before. This appears
to work on all of my tests. In case this will not be the case
for others we will have to split the administrative into two
sets one for the BTS and one for the BSC.
diff --git a/openbsc/src/bsc_init.c b/openbsc/src/bsc_init.c
index cc4a75b..ee81b6a 100644
--- a/openbsc/src/bsc_init.c
+++ b/openbsc/src/bsc_init.c
@@ -431,8 +431,7 @@
* This code is here to make sure that on start
* a TRX remains locked.
*/
- int rc_state = trx->rf_locked ?
- NM_STATE_LOCKED : NM_STATE_UNLOCKED;
+ int rc_state = trx->nm_state.administrative;
/* Patch ARFCN into radio attribute */
nanobts_attr_radio[5] &= 0xf0;
nanobts_attr_radio[5] |= trx->arfcn >> 8;