fixeria submitted this change.
oml: ipacc: parse Object Version from SW Activated Report
Change-Id: I39105096a6b29bd7e4fb15287653074527c3e024
Related: OS#4505
---
M include/osmocom/bsc/gsm_data.h
M src/osmo-bsc/bts_ipaccess_nanobts.c
2 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index fa9213b..2876d24 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -537,6 +537,12 @@
bool rsl_connect_sent;
bool rsl_connect_ack_received;
bool force_rf_lock;
+ /* vendor specific fields below */
+ union {
+ struct {
+ uint8_t obj_version;
+ } ipaccess;
+ };
};
/* Ericsson OM2000 Managed Object */
diff --git a/src/osmo-bsc/bts_ipaccess_nanobts.c b/src/osmo-bsc/bts_ipaccess_nanobts.c
index 941fe55..24966a7 100644
--- a/src/osmo-bsc/bts_ipaccess_nanobts.c
+++ b/src/osmo-bsc/bts_ipaccess_nanobts.c
@@ -199,6 +199,7 @@
struct e1inp_sign_link *sign_link = mb->dst;
struct gsm_bts *bts = sign_link->trx->bts;
struct gsm_abis_mo *mo;
+ struct tlv_parsed tp;
if (!is_ipa_abisip_bts(bts))
return 0;
@@ -209,6 +210,20 @@
return -ENOENT;
}
+ if (abis_nm_tlv_parse(&tp, bts, &foh->data[0], msgb_l3len(mb) - sizeof(*foh)) < 0) {
+ LOGPFOH(DNM, LOGL_ERROR, foh, "%s(): tlv_parse failed\n", __func__);
+ return -EINVAL;
+ }
+
+ mo->ipaccess.obj_version = 0; /* implicit default */
+ if (TLVP_PRES_LEN(&tp, NM_ATT_IPACC_OBJ_VERSION, 1)) {
+ /* nanoBTS may report several Object Versions; the first one will
+ * be used by default unless requested explicitly before OPSTARTing. */
+ mo->ipaccess.obj_version = *TLVP_VAL(&tp, NM_ATT_IPACC_OBJ_VERSION);
+ LOGPFOH(DNM, LOGL_INFO, foh, "IPA Object Version is %u (default)\n",
+ mo->ipaccess.obj_version);
+ }
+
osmo_fsm_inst_dispatch(mo->fi, NM_EV_SW_ACT_REP, NULL);
return 0;
}
To view, visit change 34356. To unsubscribe, or for help writing mail filters, visit settings.