Timur Davydov has uploaded this change for review.

View Change

abis: add helper to update BTS identity

Introduce abis_update() to update site_id and bts_id in
bts_dev_info at runtime

This allows adjusting BTS identity after initialization,
e.g. from external control interfaces

Change-Id: Ibafd66a1e1dc42ad0063c412087bee10d212fe33
---
M include/osmo-bts/abis.h
M src/common/abis.c
2 files changed, 7 insertions(+), 1 deletion(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/99/42699/1
diff --git a/include/osmo-bts/abis.h b/include/osmo-bts/abis.h
index 40707cd..83cdfd8 100644
--- a/include/osmo-bts/abis.h
+++ b/include/osmo-bts/abis.h
@@ -14,7 +14,7 @@

void abis_init(struct gsm_bts *bts);
int abis_open(struct gsm_bts *bts, char *model_name);
-
+void abis_update(unsigned site_id, unsigned bts_id);


int abis_oml_sendmsg(struct msgb *msg);
diff --git a/src/common/abis.c b/src/common/abis.c
index d9c56e9..02294a9 100644
--- a/src/common/abis.c
+++ b/src/common/abis.c
@@ -552,6 +552,12 @@
return 0;
}

+void abis_update(unsigned site_id, unsigned bts_id)
+{
+ bts_dev_info.site_id = site_id;
+ bts_dev_info.bts_id = bts_id;
+}
+
static __attribute__((constructor)) void abis_link_fsm_init(void)
{
OSMO_ASSERT(osmo_fsm_register(&abis_link_fsm) == 0);

To view, visit change 42699. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: newchange
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ibafd66a1e1dc42ad0063c412087bee10d212fe33
Gerrit-Change-Number: 42699
Gerrit-PatchSet: 1
Gerrit-Owner: Timur Davydov <dtv.comp@gmail.com>