summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2009-05-28 11:39:21 +0000
committerHarald Welte <laforge@gnumonks.org>2009-05-28 11:39:21 +0000
commit7b26bcb1b5f7fc8bf34744531a95c1ca0ce5dd3f (patch)
tree1f4e3b1e8a5ae12a0e4b3d73054db77b91390069 /src
parentfe609d85c3d91dd6921b6631d00597030a9723cb (diff)
* give Siemens ObjClass reasonable names rather than A3/A5/A6
* add nm_state objects for RACK and CCLK * add obj_class human-readable printing for all vendor obj_classes * add human-readable printing of administrative state * add enum for cell_alloc numbers
Diffstat (limited to 'src')
-rw-r--r--src/abis_nm.c81
-rw-r--r--src/bs11_config.c2
-rw-r--r--src/bsc_hack.c4
3 files changed, 70 insertions, 17 deletions
diff --git a/src/abis_nm.c b/src/abis_nm.c
index 0107c294e..57d415984 100644
--- a/src/abis_nm.c
+++ b/src/abis_nm.c
@@ -435,19 +435,46 @@ int abis_nm_sendmsg(struct gsm_bts *bts, struct msgb *msg)
static int abis_nm_rcvmsg_sw(struct msgb *mb);
-const char *oc_names[] = {
- [NM_OC_SITE_MANAGER] = "SITE MANAGER",
- [NM_OC_BTS] = "BTS",
- [NM_OC_RADIO_CARRIER] = "RADIO CARRIER",
- [NM_OC_BASEB_TRANSC] = "BASEBAND TRANSCEIVER",
- [NM_OC_CHANNEL] = "CHANNEL",
-};
-
static const char *obj_class_name(u_int8_t oc)
{
- if (oc >= ARRAY_SIZE(oc_names))
- return "UNKNOWN";
- return oc_names[oc];
+ switch (oc) {
+ case NM_OC_SITE_MANAGER:
+ return "SITE MANAGER";
+ case NM_OC_BTS:
+ return "BTS";
+ case NM_OC_RADIO_CARRIER:
+ return "RADIO CARRIER";
+ case NM_OC_BASEB_TRANSC:
+ return "BASEBAND TRANSCEIVER";
+ case NM_OC_CHANNEL:
+ return "CHANNL";
+ case NM_OC_BS11_ADJC:
+ return "ADJC";
+ case NM_OC_BS11_HANDOVER:
+ return "HANDOVER";
+ case NM_OC_BS11_PWR_CTRL:
+ return "POWER CONTROL";
+ case NM_OC_BS11_BTSE:
+ return "BTSE";
+ case NM_OC_BS11_RACK:
+ return "RACK";
+ case NM_OC_BS11_TEST:
+ return "TEST";
+ case NM_OC_BS11_ENVABTSE:
+ return "ENVABTSE";
+ case NM_OC_BS11_BPORT:
+ return "BPORT";
+ case NM_OC_GPRS_NSE:
+ return "GPRS NSE";
+ case NM_OC_GPRS_CELL:
+ return "GPRS CELL";
+ case NM_OC_GPRS_NSVC0:
+ return "GPRS NSVC0";
+ case NM_OC_GPRS_NSVC1:
+ return "GPRS NSVC1";
+ }
+
+ return "UNKNOWN";
}
const char *nm_opstate_name(u_int8_t os)
@@ -484,7 +511,20 @@ const char *nm_avail_name(u_int8_t avail)
return "UNKNOWN";
return avail_names[avail];
}
-
+
+const char *nm_adm_name(u_int8_t adm)
+{
+ switch (adm) {
+ case 1:
+ return "Locked";
+ case 2:
+ return "Unlocked";
+ case 3:
+ return "Shutdown";
+ default:
+ return "<not used>";
+ }
+}
/* obtain the gsm_nm_state data structure for a given object instance */
static struct gsm_nm_state *
@@ -521,6 +561,17 @@ objclass2nmstate(struct gsm_bts *bts, u_int8_t obj_class,
case NM_OC_SITE_MANAGER:
nm_state = &bts->site_mgr.nm_state;
break;
+ case NM_OC_BS11:
+ switch (obj_inst->bts_nr) {
+ case BS11_OBJ_CCLK:
+ nm_state = &bts->bs11.cclk.nm_state;
+ break;
+ default:
+ return NULL;
+ }
+ case NM_OC_BS11_RACK:
+ nm_state = &bts->bs11.rack.nm_state;
+ break;
}
return nm_state;
}
@@ -622,7 +673,7 @@ static int abis_nm_rx_statechg_rep(struct msgb *mb)
}
if (TLVP_PRESENT(&tp, NM_ATT_ADM_STATE)) {
new_state.administrative = *TLVP_VAL(&tp, NM_ATT_ADM_STATE);
- DEBUGPC(DNM, "ADM=%02x ", new_state.administrative);
+ DEBUGPC(DNM, "ADM=%02x ", nm_adm_name(new_state.administrative));
}
DEBUGPC(DNM, "\n");
@@ -1872,7 +1923,7 @@ int abis_nm_bs11_factory_logon(struct gsm_bts *bts, int on)
u_int8_t len = 3*2 + sizeof(bdt)
+ sizeof(bs11_logon_c8) + sizeof(bs11_logon_c9);
fill_om_fom_hdr(oh, len, NM_MT_BS11_LMT_LOGON,
- NM_OC_BS11_A3, 0xff, 0xff, 0xff);
+ NM_OC_BS11_BTSE, 0xff, 0xff, 0xff);
msgb_tlv_put(msg, NM_ATT_BS11_LMT_LOGIN_TIME,
sizeof(bdt), (u_int8_t *) &bdt);
msgb_tlv_put(msg, NM_ATT_BS11_LMT_USER_ACC_LEV,
@@ -1881,7 +1932,7 @@ int abis_nm_bs11_factory_logon(struct gsm_bts *bts, int on)
sizeof(bs11_logon_c9), bs11_logon_c9);
} else {
fill_om_fom_hdr(oh, 0, NM_MT_BS11_LMT_LOGOFF,
- NM_OC_BS11_A3, 0xff, 0xff, 0xff);
+ NM_OC_BS11_BTSE, 0xff, 0xff, 0xff);
}
return abis_nm_sendmsg(bts, msg);
diff --git a/src/bs11_config.c b/src/bs11_config.c
index ceb23a8e2..656feb453 100644
--- a/src/bs11_config.c
+++ b/src/bs11_config.c
@@ -310,8 +310,10 @@ static const char *cclk_acc_name(u_int8_t acc)
{
switch (acc) {
case 0:
+ /* Out of the demanded +/- 0.05ppm */
return "Medium";
case 1:
+ /* Synchronized with Abis, within demanded tolerance +/- 0.05ppm */
return "High";
default:
return "unknown";
diff --git a/src/bsc_hack.c b/src/bsc_hack.c
index 7ac65c576..a8fd53771 100644
--- a/src/bsc_hack.c
+++ b/src/bsc_hack.c
@@ -157,8 +157,8 @@ unsigned char msg_2[] =
NM_ATT_BS11_BTSLS_HOPPING, 0x00,
NM_ATT_CCCH_L_I_P, 0x01,
NM_ATT_CCCH_L_T, 0x00,
- NM_ATT_BS11_CELL_ALLOC_NR, 0x00,
- NM_ATT_BS11_ENA_INTERF_CLASS, 0x00,
+ NM_ATT_BS11_CELL_ALLOC_NR, NM_BS11_CANR_GSM,
+ NM_ATT_BS11_ENA_INTERF_CLASS, 0x01,
NM_ATT_BS11_FACCH_QUAL, 0x06,
/* interference avg. period in numbers of SACCH multifr */
NM_ATT_INTAVE_PARAM, 0x1F,