summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--openbsc/include/openbsc/gsm_data.h4
-rw-r--r--openbsc/include/openbsc/gsm_data_shared.h19
-rw-r--r--openbsc/src/libbsc/abis_nm.c4
-rw-r--r--openbsc/src/libbsc/bsc_vty.c5
-rw-r--r--openbsc/src/libbsc/bts_sysmobts.c2
-rw-r--r--openbsc/src/libbsc/e1_config.c2
-rw-r--r--openbsc/src/libbsc/system_information.c8
-rw-r--r--openbsc/src/libcommon/gsm_data.c6
-rw-r--r--openbsc/src/libmsc/gsm_04_08.c6
9 files changed, 38 insertions, 18 deletions
diff --git a/openbsc/include/openbsc/gsm_data.h b/openbsc/include/openbsc/gsm_data.h
index 08e07d8cc..1d90eee59 100644
--- a/openbsc/include/openbsc/gsm_data.h
+++ b/openbsc/include/openbsc/gsm_data.h
@@ -469,7 +469,7 @@ static inline int is_ipaccess_bts(struct gsm_bts *bts)
{
switch (bts->type) {
case GSM_BTS_TYPE_NANOBTS:
- case GSM_BTS_TYPE_OSMO_SYSMO:
+ case GSM_BTS_TYPE_OSMOBTS:
return 1;
default:
break;
@@ -480,7 +480,7 @@ static inline int is_ipaccess_bts(struct gsm_bts *bts)
static inline int is_sysmobts_v2(struct gsm_bts *bts)
{
switch (bts->type) {
- case GSM_BTS_TYPE_OSMO_SYSMO:
+ case GSM_BTS_TYPE_OSMOBTS:
return 1;
default:
break;
diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h
index 06fa8dd76..242889a45 100644
--- a/openbsc/include/openbsc/gsm_data_shared.h
+++ b/openbsc/include/openbsc/gsm_data_shared.h
@@ -64,6 +64,8 @@ enum gsm_chreq_reason_t {
#define HARDCODED_BTS1_TS 6
#define HARDCODED_BTS2_TS 11
+#define MAX_VERSION_LENGTH 64
+
enum gsm_hooks {
GSM_HOOK_NM_SWLOAD,
GSM_HOOK_RR_PAGING,
@@ -489,16 +491,26 @@ enum gsm_bts_type {
GSM_BTS_TYPE_NANOBTS,
GSM_BTS_TYPE_RBS2000,
GSM_BTS_TYPE_NOKIA_SITE,
- GSM_BTS_TYPE_OSMO_SYSMO,
+ GSM_BTS_TYPE_OSMOBTS,
_NUM_GSM_BTS_TYPE
};
+enum gsm_bts_type_variant {
+ BTS_UNKNOWN,
+ BTS_OSMO_LITECELL15,
+ BTS_OSMO_OCTPHY,
+ BTS_OSMO_SYSMO,
+ BTS_OSMO_TRX,
+ _NUM_BTS_VARIANT
+};
+
struct vty;
struct gsm_bts_model {
struct llist_head list;
enum gsm_bts_type type;
+ enum gsm_bts_type_variant variant;
const char *name;
bool started;
@@ -653,6 +665,11 @@ struct gsm_bts {
enum gsm_bts_type type;
struct gsm_bts_model *model;
enum gsm_band band;
+ char version[MAX_VERSION_LENGTH];
+
+ /* Connected PCU version (if any) */
+ char pcu_version[MAX_VERSION_LENGTH];
+
/* maximum Tx power that the MS is permitted to use in this cell */
int ms_max_power;
diff --git a/openbsc/src/libbsc/abis_nm.c b/openbsc/src/libbsc/abis_nm.c
index 651ca02f3..56b6fcf2a 100644
--- a/openbsc/src/libbsc/abis_nm.c
+++ b/openbsc/src/libbsc/abis_nm.c
@@ -738,7 +738,7 @@ static int abis_nm_rcvmsg_manuf(struct msgb *mb)
switch (bts_type) {
case GSM_BTS_TYPE_NANOBTS:
- case GSM_BTS_TYPE_OSMO_SYSMO:
+ case GSM_BTS_TYPE_OSMOBTS:
rc = abis_nm_rx_ipacc(mb);
abis_nm_queue_send_next(sign_link->trx->bts);
break;
@@ -1723,7 +1723,7 @@ static int verify_chan_comb(struct gsm_bts_trx_ts *ts, uint8_t chan_comb,
}
*reason = "Unknown combination";
return -EINVAL;
- case GSM_BTS_TYPE_OSMO_SYSMO:
+ case GSM_BTS_TYPE_OSMOBTS:
/* no known restrictions */
return 0;
default:
diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c
index 66b30cd6e..c1882fcf4 100644
--- a/openbsc/src/libbsc/bsc_vty.c
+++ b/openbsc/src/libbsc/bsc_vty.c
@@ -245,6 +245,9 @@ static void bts_dump_vty(struct vty *vty, struct gsm_bts *bts)
bts->num_trx, VTY_NEWLINE);
vty_out(vty, "Description: %s%s",
bts->description ? bts->description : "(null)", VTY_NEWLINE);
+ if (strnlen(bts->pcu_version, MAX_VERSION_LENGTH))
+ vty_out(vty, "PCU version %s connected%s", bts->pcu_version,
+ VTY_NEWLINE);
vty_out(vty, "MS Max power: %u dBm%s", bts->ms_max_power, VTY_NEWLINE);
vty_out(vty, "Minimum Rx Level for Access: %i dBm%s",
rxlev2dbm(bts->si_common.cell_sel_par.rxlev_acc_min),
@@ -649,7 +652,7 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts)
bts->early_classmark_allowed ? "allowed" : "forbidden", VTY_NEWLINE);
switch (bts->type) {
case GSM_BTS_TYPE_NANOBTS:
- case GSM_BTS_TYPE_OSMO_SYSMO:
+ case GSM_BTS_TYPE_OSMOBTS:
vty_out(vty, " ip.access unit_id %u %u%s",
bts->ip_access.site_id, bts->ip_access.bts_id, VTY_NEWLINE);
if (bts->ip_access.rsl_ip) {
diff --git a/openbsc/src/libbsc/bts_sysmobts.c b/openbsc/src/libbsc/bts_sysmobts.c
index e1bf661fc..e4b6cdc78 100644
--- a/openbsc/src/libbsc/bts_sysmobts.c
+++ b/openbsc/src/libbsc/bts_sysmobts.c
@@ -46,7 +46,7 @@ int bts_model_sysmobts_init(void)
{
model_sysmobts = bts_model_nanobts;
model_sysmobts.name = "sysmobts";
- model_sysmobts.type = GSM_BTS_TYPE_OSMO_SYSMO;
+ model_sysmobts.type = GSM_BTS_TYPE_OSMOBTS;
model_sysmobts.features.data = &model_sysmobts._features_data[0];
model_sysmobts.features.data_len =
diff --git a/openbsc/src/libbsc/e1_config.c b/openbsc/src/libbsc/e1_config.c
index 8910d217f..d57dec57e 100644
--- a/openbsc/src/libbsc/e1_config.c
+++ b/openbsc/src/libbsc/e1_config.c
@@ -179,7 +179,7 @@ int e1_reconfig_bts(struct gsm_bts *bts)
/* skip signal link initialization, this is done later for these BTS. */
if (bts->type == GSM_BTS_TYPE_NANOBTS ||
- bts->type == GSM_BTS_TYPE_OSMO_SYSMO)
+ bts->type == GSM_BTS_TYPE_OSMOBTS)
return e1inp_line_update(line);
/* OML link */
diff --git a/openbsc/src/libbsc/system_information.c b/openbsc/src/libbsc/system_information.c
index a2dd8279a..261033147 100644
--- a/openbsc/src/libbsc/system_information.c
+++ b/openbsc/src/libbsc/system_information.c
@@ -830,7 +830,7 @@ static int generate_si5(uint8_t *output, struct gsm_bts *bts)
/* ip.access nanoBTS needs l2_plen!! */
switch (bts->type) {
case GSM_BTS_TYPE_NANOBTS:
- case GSM_BTS_TYPE_OSMO_SYSMO:
+ case GSM_BTS_TYPE_OSMOBTS:
*output++ = GSM48_LEN2PLEN(l2_plen);
l2_plen++;
break;
@@ -865,7 +865,7 @@ static int generate_si5bis(uint8_t *output, struct gsm_bts *bts)
/* ip.access nanoBTS needs l2_plen!! */
switch (bts->type) {
case GSM_BTS_TYPE_NANOBTS:
- case GSM_BTS_TYPE_OSMO_SYSMO:
+ case GSM_BTS_TYPE_OSMOBTS:
*output++ = GSM48_LEN2PLEN(l2_plen);
l2_plen++;
break;
@@ -909,7 +909,7 @@ static int generate_si5ter(uint8_t *output, struct gsm_bts *bts)
/* ip.access nanoBTS needs l2_plen!! */
switch (bts->type) {
case GSM_BTS_TYPE_NANOBTS:
- case GSM_BTS_TYPE_OSMO_SYSMO:
+ case GSM_BTS_TYPE_OSMOBTS:
*output++ = GSM48_LEN2PLEN(l2_plen);
l2_plen++;
break;
@@ -946,7 +946,7 @@ static int generate_si6(uint8_t *output, struct gsm_bts *bts)
/* ip.access nanoBTS needs l2_plen!! */
switch (bts->type) {
case GSM_BTS_TYPE_NANOBTS:
- case GSM_BTS_TYPE_OSMO_SYSMO:
+ case GSM_BTS_TYPE_OSMOBTS:
*output++ = GSM48_LEN2PLEN(l2_plen);
l2_plen++;
break;
diff --git a/openbsc/src/libcommon/gsm_data.c b/openbsc/src/libcommon/gsm_data.c
index 3e12430e4..fd3479338 100644
--- a/openbsc/src/libcommon/gsm_data.c
+++ b/openbsc/src/libcommon/gsm_data.c
@@ -96,7 +96,7 @@ const struct value_string bts_type_names[_NUM_GSM_BTS_TYPE+1] = {
{ GSM_BTS_TYPE_NANOBTS, "nanobts" },
{ GSM_BTS_TYPE_RBS2000, "rbs2000" },
{ GSM_BTS_TYPE_NOKIA_SITE, "nokia_site" },
- { GSM_BTS_TYPE_OSMO_SYSMO, "sysmobts" },
+ { GSM_BTS_TYPE_OSMOBTS, "sysmobts" },
{ 0, NULL }
};
@@ -106,7 +106,7 @@ const struct value_string bts_type_descs[_NUM_GSM_BTS_TYPE+1] = {
{ GSM_BTS_TYPE_NANOBTS, "ip.access nanoBTS or compatible" },
{ GSM_BTS_TYPE_RBS2000, "Ericsson RBS2000 Series" },
{ GSM_BTS_TYPE_NOKIA_SITE, "Nokia {Metro,Ultra,In}Site" },
- { GSM_BTS_TYPE_OSMO_SYSMO, "sysmocom sysmoBTS" },
+ { GSM_BTS_TYPE_OSMOBTS, "sysmocom sysmoBTS" },
{ 0, NULL }
};
@@ -274,7 +274,7 @@ int gsm_set_bts_type(struct gsm_bts *bts, enum gsm_bts_type type)
switch (bts->type) {
case GSM_BTS_TYPE_NANOBTS:
- case GSM_BTS_TYPE_OSMO_SYSMO:
+ case GSM_BTS_TYPE_OSMOBTS:
/* Set the default OML Stream ID to 0xff */
bts->oml_tei = 0xff;
bts->c0->nominal_power = 23;
diff --git a/openbsc/src/libmsc/gsm_04_08.c b/openbsc/src/libmsc/gsm_04_08.c
index 31392f357..376106f5f 100644
--- a/openbsc/src/libmsc/gsm_04_08.c
+++ b/openbsc/src/libmsc/gsm_04_08.c
@@ -1962,7 +1962,7 @@ static int tch_map(struct gsm_lchan *lchan, struct gsm_lchan *remote_lchan)
// todo: map between different bts types
switch (bts->type) {
case GSM_BTS_TYPE_NANOBTS:
- case GSM_BTS_TYPE_OSMO_SYSMO:
+ case GSM_BTS_TYPE_OSMOBTS:
if (!ipacc_rtp_direct) {
if (!lchan->abis_ip.rtp_socket) {
LOGP(DHO, LOGL_ERROR, "no RTP socket for "
@@ -2053,7 +2053,7 @@ static int tch_recv_mncc(struct gsm_network *net, uint32_t callref, int enable)
switch (bts->type) {
case GSM_BTS_TYPE_NANOBTS:
- case GSM_BTS_TYPE_OSMO_SYSMO:
+ case GSM_BTS_TYPE_OSMOBTS:
if (ipacc_rtp_direct) {
LOGP(DCC, LOGL_ERROR, "Error: RTP proxy is disabled\n");
return -EINVAL;
@@ -3633,7 +3633,7 @@ int mncc_tx_to_cc(struct gsm_network *net, int msg_type, void *arg)
bts = trans->conn->lchan->ts->trx->bts;
switch (bts->type) {
case GSM_BTS_TYPE_NANOBTS:
- case GSM_BTS_TYPE_OSMO_SYSMO:
+ case GSM_BTS_TYPE_OSMOBTS:
if (!trans->conn->lchan->abis_ip.rtp_socket) {
DEBUGP(DMNCC, "TCH frame to lchan without RTP connection\n");
return 0;