aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-octphy/l1_oml.c
diff options
context:
space:
mode:
authorPhilipp <pmaier@sysmocom.de>2016-09-22 15:40:35 +0200
committerHarald Welte <laforge@gnumonks.org>2017-01-23 12:23:17 +0000
commit2b763cc30c6cc36185f44322bc3af35a5bcbb479 (patch)
tree70b3e6f83ab4937a0726cbfbba6d33c72ac8a848 /src/osmo-bts-octphy/l1_oml.c
parent70b71507c27f8967b0aa31cad0b3070c6780f3b4 (diff)
octphy: set tx attenuation via VTY
add code to configure the transmision power via VTY Change-Id: I76bb8660eb1d8baeb6b8f69da4a6ba9ab7319981
Diffstat (limited to 'src/osmo-bts-octphy/l1_oml.c')
-rw-r--r--src/osmo-bts-octphy/l1_oml.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/osmo-bts-octphy/l1_oml.c b/src/osmo-bts-octphy/l1_oml.c
index 58656256..da8ff03a 100644
--- a/src/osmo-bts-octphy/l1_oml.c
+++ b/src/osmo-bts-octphy/l1_oml.c
@@ -1373,7 +1373,13 @@ int l1if_trx_open(struct gsm_bts_trx *trx)
oc->Config.usTsc = trx->bts->bsic & 0x7;
oc->RfConfig.ulRxGainDb = plink->u.octphy.rx_gain_db;
/* FIXME: compute this based on nominal transmit power, etc. */
- oc->RfConfig.ulTxAttndB = plink->u.octphy.tx_atten_db;
+ if (plink->u.octphy.tx_atten_flag) {
+ oc->RfConfig.ulTxAttndB = plink->u.octphy.tx_atten_db;
+ } else {
+ /* Take the Tx Attn received in set radio attribures
+ * x4 is for the value in db */
+ oc->RfConfig.ulTxAttndB = (trx->max_power_red) << 2;
+ }
#if OCTPHY_MULTI_TRX == 1
LOGP(DL1C, LOGL_INFO, "Tx TRX-OPEN.req(trx=%u, rf_port=%u, arfcn=%u, "