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/.
fixeria gerrit-no-reply at lists.osmocom.orgfixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/21442 ) Change subject: power_control: lchan_ul_pf_ewma(): do not use lchan->meas.res_nr ...................................................................... power_control: lchan_ul_pf_ewma(): do not use lchan->meas.res_nr This would allow to pass only two pointers: - 'struct bts_power_ctrl_params', and - 'struct lchan_power_ctrl_state', and get rid of 'struct gsm_lchan' dependency. The later is exactly where all state variables are supposed to be kept. Change-Id: Idfefca30f4944bc722b4e9d8f1685eb77670a9db Related: SYS#4918 --- M src/common/power_control.c M tests/power/ms_power_loop_test.c 2 files changed, 2 insertions(+), 2 deletions(-) Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/common/power_control.c b/src/common/power_control.c index 3328167..5dbf8ce 100644 --- a/src/common/power_control.c +++ b/src/common/power_control.c @@ -82,7 +82,7 @@ int *Avg100 = &lchan->ms_power_ctrl.avg100_rxlev_dbm; /* We don't have 'Avg[n - 1]' if this is the first run */ - if (lchan->meas.res_nr == 0) { + if (*Avg100 == 0) { *Avg100 = Pwr * EWMA_SCALE_FACTOR; return Pwr; } diff --git a/tests/power/ms_power_loop_test.c b/tests/power/ms_power_loop_test.c index 1abe532..147c725 100644 --- a/tests/power/ms_power_loop_test.c +++ b/tests/power/ms_power_loop_test.c @@ -191,7 +191,7 @@ g_bts->ul_power_ctrl.pf.ewma.alpha = 70; /* 30% smoothing */ lchan->ms_power_ctrl.current = 15; - lchan->meas.res_nr = 0; + lchan->ms_power_ctrl.avg100_rxlev_dbm = 0; /* This is the first sample, the filter outputs it as-is */ apply_power_test(lchan, -50, 0, 15); -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/21442 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Idfefca30f4944bc722b4e9d8f1685eb77670a9db Gerrit-Change-Number: 21442 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy 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/20201204/d866a0ab/attachment.htm>