aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-10-10 23:32:51 +0700
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2020-10-15 15:50:43 +0700
commit8d62d66ed5d52d7458b56db67d686defb183528e (patch)
tree9ef5ae685a0b2a3a7cddd8fca5d83919b8586446
parent52d6e43d0ec45e9456a66ab1c59582419f57ce28 (diff)
power_control: clarify argument names of lchan_ms_pwr_ctrl()
-rw-r--r--include/osmo-bts/power_control.h3
-rw-r--r--src/common/power_control.c11
2 files changed, 8 insertions, 6 deletions
diff --git a/include/osmo-bts/power_control.h b/include/osmo-bts/power_control.h
index 43d4b591..cb566a8d 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 e9215fc2..d36f157c 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 @@ int lchan_ms_pwr_ctrl(struct gsm_lchan *lchan,
/* 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 @@ int lchan_ms_pwr_ctrl(struct gsm_lchan *lchan,
"(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 @@ int lchan_ms_pwr_ctrl(struct gsm_lchan *lchan,
(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;