From 363941223fe614bc86fe95f3c1e3df2a8ca17489 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Thu, 8 Nov 2018 16:22:29 +0100 Subject: abis_nm: Allow sending and receiving Get Attributes (Response) against nanoBTS * Allow sending Get Attributes message in abis_nm_get_attr. * Don't try to decode Get Attribute Response Info for nanoBTS, since it uses a different formatting than the one defined in specs. Related: OS#3624 Change-Id: I53d01e73791cf5450aa34b1ac8f051730e3a70f9 --- src/osmo-bsc/abis_nm.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/osmo-bsc/abis_nm.c b/src/osmo-bsc/abis_nm.c index 828d567c9..76fba5919 100644 --- a/src/osmo-bsc/abis_nm.c +++ b/src/osmo-bsc/abis_nm.c @@ -566,7 +566,10 @@ static int abis_nm_rx_get_attr_resp(struct msgb *mb, const struct gsm_bts_trx *t abis_nm_tlv_parse(&tp, bts, foh->data, oh->length-sizeof(*foh)); - return parse_attr_resp_info(bts, trx, foh, &tp); + /* nanoBTS doesn't send Get Attribute Response Info, uses its own format */ + if (bts->type != GSM_BTS_TYPE_NANOBTS) + return parse_attr_resp_info(bts, trx, foh, &tp); + return 0; } /* 3GPP TS 52.021 ยง6.2.5 */ @@ -1641,7 +1644,7 @@ int abis_nm_get_attr(struct gsm_bts *bts, uint8_t obj_class, uint8_t bts_nr, uin struct abis_om_hdr *oh; struct msgb *msg; - if (bts->type != GSM_BTS_TYPE_OSMOBTS) { + if (bts->type != GSM_BTS_TYPE_OSMOBTS && bts->type != GSM_BTS_TYPE_NANOBTS) { LOGPC(DNM, LOGL_NOTICE, "Getting attributes from BTS%d type %s is not supported.\n", bts->nr, btstype2str(bts->type)); return -EINVAL; -- cgit v1.2.3