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 uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/18652 ) Change subject: bts-trx: Re-apply tx power if nominal power is receives after POWERON ...................................................................... bts-trx: Re-apply tx power if nominal power is receives after POWERON it was preceived 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(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/52/18652/1 diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c index 9cdbd6c..703cc43 100644 --- a/src/osmo-bts-trx/l1_if.c +++ b/src/osmo-bts-trx/l1_if.c @@ -140,11 +140,34 @@ LID_SACCH, 0); } +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) @@ -199,11 +222,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: 1 Gerrit-Owner: pespin <pespin at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200603/7df9a875/attachment.htm>