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
This commit is contained in:
parent
737bb2f47b
commit
12e15479d6
|
@ -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);
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -292,7 +292,7 @@ class TestCtrlBSC(TestCtrlBase):
|
|||
r = self.do_get('bts.0.rf_state')
|
||||
self.assertEqual(r['mtype'], 'GET_REPLY')
|
||||
self.assertEqual(r['var'], 'bts.0.rf_state')
|
||||
self.assertEqual(r['value'], 'inoperational,unlocked,on')
|
||||
self.assertEqual(r['value'], 'inoperational,locked,on')
|
||||
|
||||
r = self.do_set('rf_locked', '1')
|
||||
self.assertEqual(r['mtype'], 'SET_REPLY')
|
||||
|
|
Loading…
Reference in New Issue