aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2017-03-24 10:41:04 +0100
committerHarald Welte <laforge@gnumonks.org>2017-04-06 18:41:01 +0200
commitbbe90fd6511c9a0abdb5f41d13c5ab0135b903f7 (patch)
tree70b1f03f31d9b84b1b1bf5f00787bc7cf2cadc6b /src/osmo-bts-sysmo
parente16b59357411ffa4903ac110ac4ce46d343e878d (diff)
sysmobts: Don't start with 0dBm TRX output power before ramping
In case a system has a high-gain external PA (like a 40dB PA) connected externally, we cannot simply switch the transceiver to 0 dBm in trx_init() only to then start the ramping at much lower levels once the PHJ completes in trx_init_compl_cb(). The result would be a short 0 + 40 dBm spike followed by later ramping. We want to avoid that spike, particularly its associated inrush current, so let's bring up the board with smething very conservative like -50 dBm, and then ramp from there. Change-Id: I0ad91fce64f65e0213c9fcfde3390ace519055db Fixes: SYS#3259
Diffstat (limited to 'src/osmo-bts-sysmo')
-rw-r--r--src/osmo-bts-sysmo/oml.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/osmo-bts-sysmo/oml.c b/src/osmo-bts-sysmo/oml.c
index 01752d18..776a50c4 100644
--- a/src/osmo-bts-sysmo/oml.c
+++ b/src/osmo-bts-sysmo/oml.c
@@ -389,6 +389,7 @@ static int trx_init(struct gsm_bts_trx *trx)
GsmL1_MphInitReq_t *mi_req;
GsmL1_DeviceParam_t *dev_par;
int femto_band;
+ int initial_mdBm = power_ramp_initial_power_mdBm(trx);
if (!gsm_abis_mo_check_attr(&trx->mo, trx_rqd_attr,
ARRAY_SIZE(trx_rqd_attr))) {
@@ -416,11 +417,12 @@ static int trx_init(struct gsm_bts_trx *trx)
dev_par->fRxPowerLevel = trx_ms_pwr_ctrl_is_osmo(trx)
? 0.0 : btsb->ul_power_target;
- dev_par->fTxPowerLevel = 0.0;
+ dev_par->fTxPowerLevel = ((float) initial_mdBm) / 1000;
LOGP(DL1C, LOGL_NOTICE, "Init TRX (ARFCN %u, TSC %u, RxPower % 2f dBm, "
"TxPower % 2.2f dBm\n", dev_par->u16Arfcn, dev_par->u8NbTsc,
dev_par->fRxPowerLevel, dev_par->fTxPowerLevel);
-
+ trx->power_params.p_total_cur_mdBm = trx->power_params.ramp.max_initial_pout_mdBm;
+
/* send MPH-INIT-REQ, wait for MPH-INIT-CNF */
return l1if_gsm_req_compl(fl1h, msg, trx_init_compl_cb, NULL);
}