falconia has uploaded this change for review.
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(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/14/42714/1
diff --git a/include/osmocom/bsc/bts.h b/include/osmocom/bsc/bts.h
index e19e7e5..cc0b2ea 100644
--- a/include/osmocom/bsc/bts.h
+++ b/include/osmocom/bsc/bts.h
@@ -505,7 +505,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 efccc87..441f101 100644
--- a/src/osmo-bsc/bts_nokia_site.c
+++ b/src/osmo-bsc/bts_nokia_site.c
@@ -1222,6 +1222,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 54a9fab..a412cdf 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 (bts->type != GSM_BTS_TYPE_NOKIA_SITE) {
+ 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.