laforge submitted this change.

View Change

Approvals: Jenkins Builder: Verified laforge: Looks good to me, approved
nokia: make Rx diversity configurable

The config structure sent to the BTS with BTS_CONF_DATA includes
an IE that enables or disables Rx diversity. In the original code
this setting was hard-coded to enabled state; make it configurable
via vty.

Change-Id: I73bd91b717a8c8b338bacb6ed9db73bb07245c12
---
M include/osmocom/bsc/bts.h
M src/osmo-bsc/bts.c
M src/osmo-bsc/bts_nokia_site.c
M src/osmo-bsc/bts_vty.c
4 files changed, 28 insertions(+), 1 deletion(-)

diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index 48b84af..f05f41c 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -506,7 +506,8 @@
bts_reset_timer_cnf, /* timer for BTS RESET */
did_reset:1, /* we received a RESET ACK */
wait_reset:2, /* we are waiting for reset to complete */
- hopping_mode:1; /* hopping type selection for Nokia */
+ hopping_mode:1, /* hopping type selection for Nokia */
+ rx_diversity:1; /* enable Rx diversity */
struct osmo_timer_list reset_timer;
/* segmented OML Rx buffer */
struct {
diff --git a/src/osmo-bsc/bts.c b/src/osmo-bsc/bts.c
index 77721fb..2ec4865 100644
--- a/src/osmo-bsc/bts.c
+++ b/src/osmo-bsc/bts.c
@@ -747,6 +747,8 @@
case GSM_BTS_TYPE_NOKIA_SITE:
/* Set default BTS reset timer */
bts->nokia.bts_reset_timer_cnf = 15;
+ /* Enable Rx diversity by default, for backward compat */
+ bts->nokia.rx_diversity = 1;
case _NUM_GSM_BTS_TYPE:
break;
}
diff --git a/src/osmo-bsc/bts_nokia_site.c b/src/osmo-bsc/bts_nokia_site.c
index 3b06d4b..e66f238 100644
--- a/src/osmo-bsc/bts_nokia_site.c
+++ b/src/osmo-bsc/bts_nokia_site.c
@@ -1210,6 +1210,8 @@
break;
}
}
+ /* enable or disable Rx diversity */
+ fu_config[len + 7] = bts->nokia.rx_diversity;
len += sizeof(bts_config_2);

/* set extended cell radius for each TRX */
diff --git a/src/osmo-bsc/bts_vty.c b/src/osmo-bsc/bts_vty.c
index cbf00d0..d289bcf 100644
--- a/src/osmo-bsc/bts_vty.c
+++ b/src/osmo-bsc/bts_vty.c
@@ -474,6 +474,26 @@
return CMD_SUCCESS;
}

+DEFUN_USRATTR(cfg_bts_nokia_site_rx_div,
+ cfg_bts_nokia_site_rx_div_cmd,
+ X(BSC_VTY_ATTR_RESTART_ABIS_OML_LINK),
+ "nokia_site rx-diversity (0|1)",
+ NOKIA_STR
+ "Rx diversity feature\n"
+ "Disable Rx diversity\n" "Enable Rx diversity\n")
+{
+ struct gsm_bts *bts = vty->index;
+
+ if (!is_nokia_bts(bts)) {
+ vty_out(vty, "%% BTS is not of Nokia type%s", VTY_NEWLINE);
+ return CMD_WARNING;
+ }
+
+ bts->nokia.rx_diversity = atoi(argv[0]);
+
+ return CMD_SUCCESS;
+}
+
#define OML_STR "Organization & Maintenance Link\n"
#define IPA_STR "A-bis/IP Specific Options\n"

@@ -4720,6 +4740,7 @@
bts->nokia.no_loc_rel_cnf, VTY_NEWLINE);
vty_out(vty, " nokia_site bts-reset-timer %d%s", bts->nokia.bts_reset_timer_cnf, VTY_NEWLINE);
vty_out(vty, " nokia_site hopping-mode %s%s", get_value_string(nokia_hopping_mode_strs, bts->nokia.hopping_mode), VTY_NEWLINE);
+ vty_out(vty, " nokia_site rx-diversity %d%s", bts->nokia.rx_diversity, VTY_NEWLINE);

/* fall through: Nokia requires "oml e1" parameters also */
default:
@@ -4948,6 +4969,7 @@
install_element(BTS_NODE, &cfg_bts_nokia_site_no_loc_rel_cnf_cmd);
install_element(BTS_NODE, &cfg_bts_nokia_site_bts_reset_timer_cnf_cmd);
install_element(BTS_NODE, &cfg_bts_nokia_site_hopping_mode_cmd);
+ install_element(BTS_NODE, &cfg_bts_nokia_site_rx_div_cmd);
install_element(BTS_NODE, &cfg_bts_stream_id_cmd);
install_element(BTS_NODE, &cfg_bts_deprecated_stream_id_cmd);
install_element(BTS_NODE, &cfg_bts_oml_e1_cmd);

To view, visit change 42714. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I73bd91b717a8c8b338bacb6ed9db73bb07245c12
Gerrit-Change-Number: 42714
Gerrit-PatchSet: 3
Gerrit-Owner: falconia <falcon@freecalypso.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-CC: csaba.sipos <metro4@freemail.hu>
Gerrit-CC: pespin <pespin@sysmocom.de>