Change in osmo-bts[master]: power_control: clarify argument names of lchan_ms_pwr_ctrl()

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
Thu Oct 15 10:06:10 UTC 2020


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

Change subject: power_control: clarify argument names of lchan_ms_pwr_ctrl()
......................................................................

power_control: clarify argument names of lchan_ms_pwr_ctrl()

Change-Id: I821120bf5c3690f5b4c6b96c879e675b3d271c90
---
M include/osmo-bts/power_control.h
M src/common/power_control.c
2 files changed, 8 insertions(+), 6 deletions(-)

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



diff --git a/include/osmo-bts/power_control.h b/include/osmo-bts/power_control.h
index 43d4b59..cb566a8 100644
--- a/include/osmo-bts/power_control.h
+++ b/include/osmo-bts/power_control.h
@@ -4,4 +4,5 @@
 #include <osmo-bts/gsm_data.h>
 
 int lchan_ms_pwr_ctrl(struct gsm_lchan *lchan,
-		      const uint8_t ms_power, const int rxLevel);
+		      const uint8_t ms_power_lvl,
+		      const int8_t ul_rssi_dbm);
diff --git a/src/common/power_control.c b/src/common/power_control.c
index e9215fc..d36f157 100644
--- a/src/common/power_control.c
+++ b/src/common/power_control.c
@@ -39,10 +39,11 @@
  /*! compute the new MS POWER LEVEL communicated to the MS and store it in lchan.
   *  \param lchan logical channel for which to compute (and in which to store) new power value.
   *  \param[in] ms_power_lvl MS Power Level received from Uplink L1 SACCH Header in SACCH block.
-  *  \param[in] rxLevel Signal level of the received SACCH block, in dBm.
+  *  \param[in] ul_rssi_dbm Signal level of the received SACCH block, in dBm.
   */
 int lchan_ms_pwr_ctrl(struct gsm_lchan *lchan,
-		      const uint8_t ms_power_lvl, const int rxLevel)
+		      const uint8_t ms_power_lvl,
+		      const int8_t ul_rssi_dbm)
 {
 	int diff;
 	struct gsm_bts_trx *trx = lchan->ts->trx;
@@ -73,7 +74,7 @@
 
 	/* How many dBs measured power should be increased (+) or decreased (-)
 	   to reach expected power. */
-	diff = bts->ul_power_target - rxLevel;
+	diff = bts->ul_power_target - ul_rssi_dbm;
 
 	/* don't ever change more than MS_{LOWER,RAISE}_MAX_DBM during one loop
 	   iteration, i.e. reduce the speed at which the MS transmit power can
@@ -107,7 +108,7 @@
 			  "(rx-ms-pwr-lvl %" PRIu8 ", max-ms-pwr-lvl %" PRIu8 ", rx-current %d dBm, rx-target %d dBm)\n",
 			  new_power_lvl, new_dbm,
 			  ms_power_lvl, lchan->ms_power_ctrl.max,
-			  rxLevel, bts->ul_power_target);
+			  ul_rssi_dbm, bts->ul_power_target);
 		return 0;
 	}
 
@@ -117,7 +118,7 @@
 		  (new_dbm > current_dbm) ? "Raising" : "Lowering",
 		  lchan->ms_power_ctrl.current, current_dbm, new_power_lvl, new_dbm,
 		  ms_power_lvl, lchan->ms_power_ctrl.max,
-		  rxLevel, bts->ul_power_target);
+		  ul_rssi_dbm, bts->ul_power_target);
 
 	/* store the resulting new MS power level in the lchan */
 	lchan->ms_power_ctrl.current = new_power_lvl;

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I821120bf5c3690f5b4c6b96c879e675b3d271c90
Gerrit-Change-Number: 20656
Gerrit-PatchSet: 2
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/20201015/39b15788/attachment.htm>


More information about the gerrit-log mailing list