Change in osmo-bsc[master]: power_control: check BTS model in cfg_power_ctrl_avg_osmo_ewma()

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/.

laforge gerrit-no-reply at lists.osmocom.org
Mon Feb 8 09:07:30 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/22767 )

Change subject: power_control: check BTS model in cfg_power_ctrl_avg_osmo_ewma()
......................................................................

power_control: check BTS model in cfg_power_ctrl_avg_osmo_ewma()

Change-Id: I1c454f447d37cbc4d44b242dc4b2c62297ee3f67
Related: SYS#4918
---
M src/osmo-bsc/bsc_vty.c
1 file changed, 7 insertions(+), 3 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/src/osmo-bsc/bsc_vty.c b/src/osmo-bsc/bsc_vty.c
index 03b87b4..567b168 100644
--- a/src/osmo-bsc/bsc_vty.c
+++ b/src/osmo-bsc/bsc_vty.c
@@ -5209,14 +5209,18 @@
 {
 	struct gsm_power_ctrl_params *params = vty->index;
 	struct gsm_power_ctrl_meas_params *avg_params;
+	const struct gsm_bts *bts;
 
-#if 0
-	if (trx->bts->type != GSM_BTS_TYPE_OSMOBTS) {
+	if (params->dir == GSM_PWR_CTRL_DIR_UL)
+		bts = container_of(params, struct gsm_bts, ms_power_ctrl);
+	else
+		bts = container_of(params, struct gsm_bts, bs_power_ctrl);
+
+	if (bts->type != GSM_BTS_TYPE_OSMOBTS) {
 		vty_out(vty, "%% EWMA is an OsmoBTS specific algorithm, "
 			"it's not usable for other BTS types%s", VTY_NEWLINE);
 		return CMD_WARNING;
 	}
-#endif
 
 	avg_params = POWER_CONTROL_MEAS_AVG_PARAMS(params);
 	avg_params->algo = GSM_PWR_CTRL_MEAS_AVG_ALGO_OSMO_EWMA;

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/22767
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I1c454f447d37cbc4d44b242dc4b2c62297ee3f67
Gerrit-Change-Number: 22767
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210208/218d8c01/attachment.htm>


More information about the gerrit-log mailing list