aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2013-07-08 18:44:44 +0200
committerAndreas Eversberg <jolly@eversberg.eu>2014-01-21 15:54:44 +0100
commitf17ae3903107aed7aa87c3d503ea42d9f1e88633 (patch)
tree788c0ca6302e67b329288e40553fc84015b94af9
parente33f140ae03b0c7305e35ea8a2b06c01ac7d2c77 (diff)
trx: Add option to set transmit power reduction via OML (BSC)
-rw-r--r--src/osmo-bts-trx/l1_if.c7
-rw-r--r--src/osmo-bts-trx/l1_if.h1
-rw-r--r--src/osmo-bts-trx/trx_vty.c28
3 files changed, 34 insertions, 2 deletions
diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c
index 1da99d4b..0bf42247 100644
--- a/src/osmo-bts-trx/l1_if.c
+++ b/src/osmo-bts-trx/l1_if.c
@@ -330,6 +330,13 @@ static uint8_t trx_set_trx(struct gsm_bts_trx *trx)
l1if_provision_transceiver_trx(l1h);
}
+ if (l1h->config.power_oml) {
+ l1h->config.power = trx->max_power_red;
+ l1h->config.power_valid = 1;
+ l1h->config.power_sent = 0;
+ l1if_provision_transceiver_trx(l1h);
+ }
+
return 0;
}
diff --git a/src/osmo-bts-trx/l1_if.h b/src/osmo-bts-trx/l1_if.h
index 5b4dce3c..5110cde1 100644
--- a/src/osmo-bts-trx/l1_if.h
+++ b/src/osmo-bts-trx/l1_if.h
@@ -127,6 +127,7 @@ struct trx_config {
int power_valid;
int power;
+ int power_oml;
int power_sent;
int maxdly_valid;
diff --git a/src/osmo-bts-trx/trx_vty.c b/src/osmo-bts-trx/trx_vty.c
index 4e675921..ebc7cfdb 100644
--- a/src/osmo-bts-trx/trx_vty.c
+++ b/src/osmo-bts-trx/trx_vty.c
@@ -233,6 +233,24 @@ DEFUN(cfg_trx_power, cfg_trx_power_cmd,
struct trx_l1h *l1h = trx_l1h_hdl(trx);
l1h->config.power = atoi(argv[0]);
+ l1h->config.power_oml = 0;
+ l1h->config.power_valid = 1;
+ l1h->config.power_sent = 0;
+ l1if_provision_transceiver_trx(l1h);
+
+ return CMD_SUCCESS;
+}
+
+DEFUN(cfg_trx_poweroml_, cfg_trx_power_oml_cmd,
+ "power oml",
+ "Set the transmitter power dampening\n"
+ "Given by NM_ATT_RF_MAXPOWR_R (max power reduction) via OML\n")
+{
+ struct gsm_bts_trx *trx = vty->index;
+ struct trx_l1h *l1h = trx_l1h_hdl(trx);
+
+ l1h->config.power = trx->max_power_red;
+ l1h->config.power_oml = 1;
l1h->config.power_valid = 1;
l1h->config.power_sent = 0;
l1if_provision_transceiver_trx(l1h);
@@ -338,8 +356,13 @@ void bts_model_config_write_trx(struct vty *vty, struct gsm_bts_trx *trx)
if (l1h->config.rxgain_valid)
vty_out(vty, " rxgain %d%s", l1h->config.rxgain, VTY_NEWLINE);
- if (l1h->config.power_valid)
- vty_out(vty, " power %d%s", l1h->config.power, VTY_NEWLINE);
+ if (l1h->config.power_valid) {
+ if (l1h->config.power_oml)
+ vty_out(vty, " power oml%s", VTY_NEWLINE);
+ else
+ vty_out(vty, " power %d%s", l1h->config.power,
+ VTY_NEWLINE);
+ }
if (l1h->config.maxdly_valid)
vty_out(vty, " maxdly %d%s", l1h->config.maxdly, VTY_NEWLINE);
if (l1h->config.slotmask != 0xff)
@@ -373,6 +396,7 @@ int bts_model_vty_init(struct gsm_bts *bts)
install_element(TRX_NODE, &cfg_trx_rxgain_cmd);
install_element(TRX_NODE, &cfg_trx_power_cmd);
+ install_element(TRX_NODE, &cfg_trx_power_oml_cmd);
install_element(TRX_NODE, &cfg_trx_maxdly_cmd);
install_element(TRX_NODE, &cfg_trx_slotmask_cmd);
install_element(TRX_NODE, &cfg_trx_no_rxgain_cmd);