aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2023-10-05 11:44:31 +0200
committerPhilipp Maier <pmaier@sysmocom.de>2023-11-01 15:59:24 +0100
commit070b7b2fc57fdb30adab4d0789acfdf155c426e9 (patch)
tree8d546cc3393745484afbd740d75c4dbcc351c947
parent46140948d9800bca6a7b4299f08b25efc1af0fa3 (diff)
pcu_l1_if: signal BTS model via PCUIFpmaier/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 and store this information in struct gprs_rlcmac_bts Related: OS#6191 Change-Id: I48eb75f65ab54fdec41ef913e24c1f18cd4a4047
-rw-r--r--include/osmocom/pcu/pcuif_proto.h14
-rw-r--r--src/bts.h3
-rw-r--r--src/pcu_l1_if.cpp14
3 files changed, 30 insertions, 1 deletions
diff --git a/include/osmocom/pcu/pcuif_proto.h b/include/osmocom/pcu/pcuif_proto.h
index 1133ca61..33036c33 100644
--- a/include/osmocom/pcu/pcuif_proto.h
+++ b/include/osmocom/pcu/pcuif_proto.h
@@ -8,7 +8,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 */
@@ -63,6 +63,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
@@ -176,6 +187,7 @@ struct gsm_pcu_if_info_ind {
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));
/* E1 CCU connection parameters */
diff --git a/src/bts.h b/src/bts.h
index 3fe4503c..1d88cb5a 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -275,6 +275,9 @@ struct gprs_rlcmac_bts {
struct llist_head pch_timer;
struct osmo_time_cc all_allocated_pdch;
+
+ /* BTS hardware model, see pcuif_proto.h */
+ uint8_t bts_model;
};
struct paging_req_cs {
diff --git a/src/pcu_l1_if.cpp b/src/pcu_l1_if.cpp
index 9557f66c..e3918298 100644
--- a/src/pcu_l1_if.cpp
+++ b/src/pcu_l1_if.cpp
@@ -724,6 +724,17 @@ static int pcu_info_ind_ns(struct gprs_rlcmac_bts *bts,
return gprs_ns_update_config(bts, info_ind->nsei, local, remote, nsvci, valid);
}
+const struct value_string gsm_pcuif_bts_model_names[] = {
+ { PCU_IF_BTS_MODEL_UNSPEC, "(unspecified)" },
+ { PCU_IF_BTS_MODEL_LC15, "osmo-bts-lc15" },
+ { PCU_IF_BTS_MODEL_OC2G, "osmo-bts-oc2g" },
+ { PCU_IF_BTS_MODEL_OCTPHY, "osmo-bts-octphy" },
+ { PCU_IF_BTS_MODEL_SYSMO, "osmo-bts-sysmo" },
+ { PCU_IF_BTS_MODEL_TRX, "osmo-bts-trx" },
+ { PCU_IF_BTS_MODEL_RBS, "ericsson-rbs" },
+ { 0, NULL }
+};
+
static int pcu_rx_info_ind(struct gprs_rlcmac_bts *bts, const struct gsm_pcu_if_info_ind *info_ind)
{
struct gprs_bssgp_pcu *pcu;
@@ -933,6 +944,9 @@ bssgp_failed:
}
}
+ LOGP(DL1IF, LOGL_INFO, "BTS model: %s\n", get_value_string(gsm_pcuif_bts_model_names, info_ind->bts_model));
+ bts->bts_model = info_ind->bts_model;
+
bts->active = true;
return rc;
}