This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
pespin gerrit-no-reply at lists.osmocom.orgpespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/18652 ) Change subject: bts-trx: Re-apply tx power if nominal power is received after POWERON ...................................................................... bts-trx: Re-apply tx power if nominal power is received after POWERON it was perceived that sometimes based on order of events (OML attr setup and timing of RSL connections, etc.), the NOMTXPOWER for TRX!=0 can come after the RSP POWERON, and hence the target power level for TRX!=0 is not done correcty. This can be seen by running any test using the ttcn3-bts setup of docker-playgrounds.git. Change-Id: I2ec8dba61393be6edfab9e7e478e096e2d0933ad --- M src/osmo-bts-trx/l1_if.c 1 file changed, 24 insertions(+), 5 deletions(-) Approvals: laforge: Looks good to me, but someone else must approve daniel: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c index 0858de2..07f6e7a 100644 --- a/src/osmo-bts-trx/l1_if.c +++ b/src/osmo-bts-trx/l1_if.c @@ -138,11 +138,34 @@ return trx_sched_set_lchan(&l1h->l1s, gsm_lchan2chan_nr(lchan), LID_SACCH, false); } +static void l1if_trx_start_power_ramp(struct gsm_bts_trx *trx) +{ + struct phy_instance *pinst = trx_phy_instance(trx); + struct trx_l1h *l1h = pinst->u.osmotrx.hdl; + + if (l1h->config.forced_max_power_red == -1) + power_ramp_start(trx, get_p_nominal_mdBm(trx), 0); + else + power_ramp_start(trx, get_p_max_out_mdBm(trx) - to_mdB(l1h->config.forced_max_power_red), 1); +} + /* Sets the nominal power, in dB */ void l1if_trx_set_nominal_power(struct gsm_bts_trx *trx, unsigned int nominal_power) { + struct phy_instance *pinst = trx_phy_instance(trx); + bool nom_pwr_changed = trx->nominal_power != nominal_power; + trx->nominal_power = nominal_power; trx->power_params.trx_p_max_out_mdBm = to_mdB(nominal_power); + + /* If TRX is not yet powered, delay ramping until it's ON */ + if (!nom_pwr_changed || !pinst->phy_link->u.osmotrx.powered) + return; + + /* We are already ON and we got new information about nominal power, so + * let's make sure we adapt the tx power to it + */ + l1if_trx_start_power_ramp(trx); } static void l1if_getnompower_cb(struct trx_l1h *l1h, unsigned int nominal_power, int rc) @@ -197,11 +220,7 @@ /* Begin to ramp up the power on all TRX associated with this phy */ llist_for_each_entry(pinst, &plink->instances, list) { - struct gsm_bts_trx *trx = pinst->trx; - if (l1h->config.forced_max_power_red == -1) - power_ramp_start(trx, get_p_nominal_mdBm(trx), 0); - else - power_ramp_start(trx, get_p_max_out_mdBm(trx) - to_mdB(l1h->config.forced_max_power_red), 1); + l1if_trx_start_power_ramp(pinst->trx); } } else if (rc != 0 && pinst->phy_link->state != PHY_LINK_SHUTDOWN) { trx_sched_clock_stopped(pinst->trx->bts); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/18652 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I2ec8dba61393be6edfab9e7e478e096e2d0933ad Gerrit-Change-Number: 18652 Gerrit-PatchSet: 4 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: daniel <dwillmann at sysmocom.de> Gerrit-Reviewer: laforge <laforge at osmocom.org> Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200612/9aaf67ce/attachment.htm>