From f0407410e7ecbcfcffca06153e57e65187c3a01b Mon Sep 17 00:00:00 2001 From: Philipp Maier Date: Thu, 21 Jan 2021 18:45:20 +0100 Subject: pcu_sock: send SI1, SI3 and SI3 along with PCUIF info indication The new version (0x0b) of the PCUIF offers fields to transfer system information 1, 3 and 13 with the info indication that is sent by osmo-bts on startup. The system information is needed by the NACC RIM application which runs inside osmo-pcu. Depends: osmo-pcu Id72118120c14984d2fb1b918b41fac4868150d41 Change-Id: Ie8c3467b6cf8b8bfdeee9a281412d814cbc379b8 Related: SYS#5103 --- TODO-RELEASE | 1 + include/osmo-bts/pcuif_proto.h | 9 ++++++++- src/common/pcu_sock.c | 17 +++++++++++++++++ 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/TODO-RELEASE b/TODO-RELEASE index 03c11eb2..9544fc52 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -1 +1,2 @@ * update osmo-gsm-manuals dependency to > 0.3.0 for vty_cpu_sched.adoc include. +* increment PCUIF version number \ No newline at end of file diff --git a/include/osmo-bts/pcuif_proto.h b/include/osmo-bts/pcuif_proto.h index 8f726028..7c48835d 100644 --- a/include/osmo-bts/pcuif_proto.h +++ b/include/osmo-bts/pcuif_proto.h @@ -6,7 +6,7 @@ #define PCU_SOCK_DEFAULT "/tmp/pcu_bts" -#define PCU_IF_VERSION 0x0a +#define PCU_IF_VERSION 0x0b #define TXT_MAX_LEN 128 /* msg_type */ @@ -175,6 +175,13 @@ struct gsm_pcu_if_info_ind { struct in_addr v4; struct in6_addr v6; } remote_ip[2]; + /* RIM */ + uint8_t si1[GSM_MACBLOCK_LEN]; + uint8_t si1_is_set; + uint8_t si3[GSM_MACBLOCK_LEN]; + uint8_t si3_is_set; + uint8_t si13[GSM_MACBLOCK_LEN]; + uint8_t si13_is_set; } __attribute__ ((packed)); struct gsm_pcu_if_act_req { diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c index 0466698d..b5c5f4b6 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -348,6 +348,23 @@ int pcu_tx_info_ind(void) } } + /* RIM */ + if (GSM_BTS_HAS_SI(bts, SYSINFO_TYPE_1)) { + memcpy(info_ind->si1, GSM_BTS_SI(bts, SYSINFO_TYPE_1), + sizeof(info_ind->si1)); + info_ind->si1_is_set = true; + } + if (GSM_BTS_HAS_SI(bts, SYSINFO_TYPE_3)) { + memcpy(info_ind->si3, GSM_BTS_SI(bts, SYSINFO_TYPE_3), + sizeof(info_ind->si3)); + info_ind->si3_is_set = true; + } + if (GSM_BTS_HAS_SI(bts, SYSINFO_TYPE_13)) { + memcpy(info_ind->si13, GSM_BTS_SI(bts, SYSINFO_TYPE_13), + sizeof(info_ind->si13)); + info_ind->si13_is_set = true; + } + llist_for_each_entry(trx, &bts->trx_list, list) { if (trx->nr >= ARRAY_SIZE(info_ind->trx)) { LOGPTRX(trx, DPCU, LOGL_NOTICE, "PCU interface (version %u) " -- cgit v1.2.3