dexter has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/34648?usp=email )
Change subject: pcuif_proto: signal BTS model via PCUIF ...................................................................... pcuif_proto: signal BTS model via PCUIF At the moment the PCU has no way of knowing with which BTS model it is used with. However, some BTS models may require slightly different behaviour by the PCU, depending on which BTS model is used. So, lets add an additional bts_model field to struct gsm_pcu_if_info_ind in order to convey the exact BTS model to the PCU. Related: OS#6191 Depends: osmo-pcu.git I48eb75f65ab54fdec41ef913e24c1f18cd4a4047 Change-Id: Ib51238a0e09d4484a539a7f822864189872698b6 --- M include/osmo-bts/pcuif_proto.h M src/common/pcu_sock.c 2 files changed, 51 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, but someone else must approve Jenkins Builder: Verified pespin: Looks good to me, approved diff --git a/include/osmo-bts/pcuif_proto.h b/include/osmo-bts/pcuif_proto.h index 15e3e20..04936af 100644 --- a/include/osmo-bts/pcuif_proto.h +++ b/include/osmo-bts/pcuif_proto.h @@ -7,7 +7,7 @@ #define PCU_SOCK_DEFAULT "/tmp/pcu_bts" -#define PCU_IF_VERSION 0x0b +#define PCU_IF_VERSION 0x0c #define TXT_MAX_LEN 128 /* msg_type */ @@ -57,6 +57,17 @@ #define PCU_IF_ADDR_TYPE_IPV4 0x04 /* IPv4 address */ #define PCU_IF_ADDR_TYPE_IPV6 0x29 /* IPv6 address */ +/* BTS model */ +enum gsm_pcuif_bts_model { + PCU_IF_BTS_MODEL_UNSPEC, + PCU_IF_BTS_MODEL_LC15, + PCU_IF_BTS_MODEL_OC2G, + PCU_IF_BTS_MODEL_OCTPHY, + PCU_IF_BTS_MODEL_SYSMO, + PCU_IF_BTS_MODEL_TRX, + PCU_IF_BTS_MODEL_RBS, +}; + #define PCU_IF_NUM_NSVC 2 #define PCU_IF_NUM_TRX 8 @@ -170,6 +181,7 @@ struct in_addr v4; struct in6_addr v6; } remote_ip[PCU_IF_NUM_NSVC]; + uint8_t bts_model; /* enum gsm_pcuif_bts_model */ } __attribute__ ((packed)); struct gsm_pcu_if_act_req { diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c index 6116c9e..048e766 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -230,6 +230,25 @@ } } +static enum gsm_pcuif_bts_model bts_model_from_variant(enum gsm_bts_type_variant variant) +{ + switch (variant) { + case BTS_OSMO_LITECELL15: + return PCU_IF_BTS_MODEL_LC15; + case BTS_OSMO_OC2G: + return PCU_IF_BTS_MODEL_OC2G; + case BTS_OSMO_OCTPHY: + return PCU_IF_BTS_MODEL_OCTPHY; + case BTS_OSMO_SYSMO: + return PCU_IF_BTS_MODEL_SYSMO; + case BTS_OSMO_TRX: + case BTS_OSMO_VIRTUAL: + return PCU_IF_BTS_MODEL_TRX; + default: + return PCU_IF_BTS_MODEL_UNSPEC; + } +} + int pcu_tx_info_ind(void) { struct msgb *msg; @@ -358,6 +377,8 @@ info_ind_fill_trx(&info_ind->trx[trx->nr], trx); } + info_ind->bts_model = bts_model_from_variant(bts->variant); + return pcu_sock_send(msg); } -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/34648?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Ib51238a0e09d4484a539a7f822864189872698b6 Gerrit-Change-Number: 34648 Gerrit-PatchSet: 9 Gerrit-Owner: dexter <pma...@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pma...@sysmocom.de> Gerrit-Reviewer: laforge <lafo...@osmocom.org> Gerrit-Reviewer: pespin <pes...@sysmocom.de> Gerrit-CC: osmith <osm...@sysmocom.de> Gerrit-MessageType: merged