dexter has uploaded this change for review. ( 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, 55 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/48/34648/1 diff --git a/include/osmo-bts/pcuif_proto.h b/include/osmo-bts/pcuif_proto.h index a620993..4e2e702 100644 --- a/include/osmo-bts/pcuif_proto.h +++ b/include/osmo-bts/pcuif_proto.h @@ -60,6 +60,17 @@ #define PCU_IF_ADDR_TYPE_IPV4 0x04 /* IPv4 address */ #define PCU_IF_ADDR_TYPE_IPV6 0x29 /* IPv6 address */ +/* BTS model */ +#define PCU_IF_BTS_MODEL_UNSPEC 0x00 +#define PCU_IF_BTS_MODEL_LC15 0x01 +#define PCU_IF_BTS_MODEL_OC2G 0x02 +#define PCU_IF_BTS_MODEL_OCTPHY 0x03 +#define PCU_IF_BTS_MODEL_SYSMO 0x04 +#define PCU_IF_BTS_MODEL_TRX 0x05 +#define PCU_IF_BTS_MODEL_VIRTUAL 0x06 +#define PCU_IF_BTS_MODEL_OMLDUMMY 0x07 +#define PCU_IF_BTS_MODEL_RBS 0x08 + #define PCU_IF_NUM_NSVC 2 #define PCU_IF_NUM_TRX 8 @@ -173,6 +184,7 @@ struct in_addr v4; struct in6_addr v6; } remote_ip[PCU_IF_NUM_NSVC]; + uint8_t 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 79b39c4..07174dc 100644 --- a/src/common/pcu_sock.c +++ b/src/common/pcu_sock.c @@ -360,6 +360,32 @@ info_ind_fill_trx(&info_ind->trx[trx->nr], trx); } + switch(bts->variant) { + case BTS_OSMO_LITECELL15: + info_ind->bts_model = PCU_IF_BTS_MODEL_LC15; + break; + case BTS_OSMO_OC2G: + info_ind->bts_model = PCU_IF_BTS_MODEL_OC2G; + break; + case BTS_OSMO_OCTPHY: + info_ind->bts_model = PCU_IF_BTS_MODEL_OCTPHY; + break; + case BTS_OSMO_SYSMO: + info_ind->bts_model = PCU_IF_BTS_MODEL_SYSMO; + break; + case BTS_OSMO_TRX: + info_ind->bts_model = PCU_IF_BTS_MODEL_TRX; + break; + case BTS_OSMO_VIRTUAL: + info_ind->bts_model = PCU_IF_BTS_MODEL_VIRTUAL; + break; + case BTS_OSMO_OMLDUMMY: + info_ind->bts_model = PCU_IF_BTS_MODEL_OMLDUMMY; + break; + default: + info_ind->bts_model = PCU_IF_BTS_MODEL_UNSPEC; + } + 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: 1 Gerrit-Owner: dexter <pma...@sysmocom.de> Gerrit-MessageType: newchange