summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-06-05 19:18:45 +0000
committerHarald Welte <laforge@gnumonks.org>2009-06-05 19:18:45 +0000
commit8b697c74c776ae439a76525f14f8d9325fae32cb (patch)
tree72e3d55b67ad8146f253916b663550c1dc9b90c3 /src
parentc3d4b2d441814a37736791911fce1f4e3725ac35 (diff)
BS11: add nm_state for EnveBTES, PA and BBSIG physical objects
Diffstat (limited to 'src')
-rw-r--r--src/abis_nm.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/abis_nm.c b/src/abis_nm.c
index 57d415984..cd1f444f3 100644
--- a/src/abis_nm.c
+++ b/src/abis_nm.c
@@ -472,6 +472,8 @@ static const char *obj_class_name(u_int8_t oc)
return "GPRS NSVC0";
case NM_OC_GPRS_NSVC1:
return "GPRS NSVC1";
+ case NM_OC_BS11:
+ return "SIEMENSHW";
}
return "UNKNOWN";
@@ -566,12 +568,29 @@ objclass2nmstate(struct gsm_bts *bts, u_int8_t obj_class,
case BS11_OBJ_CCLK:
nm_state = &bts->bs11.cclk.nm_state;
break;
+ case BS11_OBJ_BBSIG:
+ if (obj_inst->ts_nr > bts->num_trx)
+ return NULL;
+ trx = &bts->trx[obj_inst->ts_nr];
+ nm_state = &trx->bs11.bbsig.nm_state;
+ break;
+ case BS11_OBJ_PA:
+ if (obj_inst->ts_nr > bts->num_trx)
+ return NULL;
+ trx = &bts->trx[obj_inst->ts_nr];
+ nm_state = &trx->bs11.pa.nm_state;
+ break;
default:
return NULL;
}
case NM_OC_BS11_RACK:
nm_state = &bts->bs11.rack.nm_state;
break;
+ case NM_OC_BS11_ENVABTSE:
+ if (obj_inst->trx_nr > ARRAY_SIZE(bts->bs11.envabtse))
+ return NULL;
+ nm_state = &bts->bs11.envabtse[obj_inst->trx_nr].nm_state;
+ break;
}
return nm_state;
}
@@ -650,6 +669,8 @@ static int abis_nm_rx_statechg_rep(struct msgb *mb)
DEBUGPC(DNM, "STATE CHG: ");
+ memset(&new_state, 0, sizeof(new_state));
+
nm_state = objclass2nmstate(bts, foh->obj_class, &foh->obj_inst);
if (!nm_state) {
DEBUGPC(DNM, "\n");