aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2018-11-08 16:22:29 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2018-11-09 15:50:44 +0000
commit363941223fe614bc86fe95f3c1e3df2a8ca17489 (patch)
treea63bfd39ef02959a68ec833c94f034fe2fad1b6b
parent14955320fa3f357d19668250bc4db2dc27cbeb12 (diff)
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
-rw-r--r--src/osmo-bsc/abis_nm.c7
1 files changed, 5 insertions, 2 deletions
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;