aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/bsc_init.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2009-12-31 03:05:52 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2009-12-31 03:05:52 +0100
commitf31e4745bb32d120f55d8442669d666d88619fa0 (patch)
treec52cde3e079d50899f132f7954f455eca61a7f62 /openbsc/src/bsc_init.c
parentf7dbd589abdf321c9535d2bafa5b084474e83d4f (diff)
[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.
Diffstat (limited to 'openbsc/src/bsc_init.c')
-rw-r--r--openbsc/src/bsc_init.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/openbsc/src/bsc_init.c b/openbsc/src/bsc_init.c
index cc4a75b5b..ee81b6a80 100644
--- a/openbsc/src/bsc_init.c
+++ b/openbsc/src/bsc_init.c
@@ -431,8 +431,7 @@ static int sw_activ_rep(struct msgb *mb)
* 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;