pespin has submitted this change. (
https://gerrit.osmocom.org/c/osmo-bsc/+/34294?usp=email )
Change subject: oml: ipacc: Use new packed struct abis_nm_ipacc_att_bssgp_cfg from
libosmcore
......................................................................
oml: ipacc: Use new packed struct abis_nm_ipacc_att_bssgp_cfg from libosmcore
This way it becomes a lot clearer what kind of content is expected to be
transmitted over the wire.
It is expected that in the future the bts->gprs.cell.timer will
disappear and the values fed into struct abis_nm_ipacc_att_bssgp_cfg
come from osmo_tdef, etc.
Depends: libosmocore.git Change-Id Ibfd759cb8a252f801bb3a758ea7960072c96f254
Related: OS#5335
Change-Id: Ie659879c548b29a08eeb8bf3fc023bf3d7d52aa1
---
M src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
1 file changed, 34 insertions(+), 3 deletions(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
Jenkins Builder: Verified
osmith: Looks good to me, approved
diff --git a/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
b/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
index 62a6dfb..ce368fd 100644
--- a/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
+++ b/src/osmo-bsc/bts_ipaccess_nanobts_omlattr.c
@@ -113,6 +113,7 @@
{
struct msgb *msgb;
uint8_t buf[256];
+ struct abis_nm_ipacc_att_bssgp_cfg bssgp_cfg;
struct gsm_bts *bts = gsm_bts_sm_get_bts(bts_sm);
msgb = msgb_alloc(1024, "nanobts_attr_bts");
if (!msgb)
@@ -128,9 +129,21 @@
memcpy(buf, bts_sm->gprs.nse.timer, ARRAY_SIZE(bts_sm->gprs.nse.timer));
msgb_tl16v_put(msgb, NM_ATT_IPACC_NS_CFG, 7, buf);
- OSMO_ASSERT(ARRAY_SIZE(bts->gprs.cell.timer) < sizeof(buf));
- memcpy(buf, bts->gprs.cell.timer, ARRAY_SIZE(bts->gprs.cell.timer));
- msgb_tl16v_put(msgb, NM_ATT_IPACC_BSSGP_CFG, 11, buf);
+ osmo_static_assert(ARRAY_SIZE(bts->gprs.cell.timer) == 11,
cell_timer_array_wrong_size);
+ bssgp_cfg = (struct abis_nm_ipacc_att_bssgp_cfg){
+ .t1_s = bts->gprs.cell.timer[0],
+ .t1_blocking_retries = bts->gprs.cell.timer[1],
+ .t1_unblocking_retries = bts->gprs.cell.timer[2],
+ .t2_s = bts->gprs.cell.timer[3],
+ .t2_retries = bts->gprs.cell.timer[4],
+ .t3_100ms = bts->gprs.cell.timer[5],
+ .t3_retries = bts->gprs.cell.timer[6],
+ .t4_100ms = bts->gprs.cell.timer[7],
+ .t4_retries = bts->gprs.cell.timer[8],
+ .t5_s = bts->gprs.cell.timer[9],
+ .t5_retries = bts->gprs.cell.timer[10],
+ };
+ msgb_tl16v_put(msgb, NM_ATT_IPACC_BSSGP_CFG, sizeof(bssgp_cfg), (const uint8_t
*)&bssgp_cfg);
return msgb;
}
--
To view, visit
https://gerrit.osmocom.org/c/osmo-bsc/+/34294?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: Ie659879c548b29a08eeb8bf3fc023bf3d7d52aa1
Gerrit-Change-Number: 34294
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged