fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/34356?usp=email )
Change subject: oml: ipacc: parse Object Version from SW Activated Report ...................................................................... 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(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved 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 https://gerrit.osmocom.org/c/osmo-bsc/+/34356?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I39105096a6b29bd7e4fb15287653074527c3e024 Gerrit-Change-Number: 34356 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria <vyanits...@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanits...@sysmocom.de> Gerrit-Reviewer: laforge <lafo...@osmocom.org> Gerrit-Reviewer: pespin <pes...@sysmocom.de> Gerrit-MessageType: merged