MS Power Control Loop: Disable threshold comparison on {LOWER,UPPER}_CMP_N=0

This way we provide an effective way to disable C/I based decision
taking in the MS Power Control Loop. With this set up, MS Power Level is
decided only based on RxLev. This allows for working setup in following
scenarios:
* BTS L1 not passing proper C/I values to upper layers (eg. TRXDv0).
* User not willing to spend time configuring proper C/I levels for each
  channel type.

Related: SYS#4917
Change-Id: Ibd10eb96a5d072d5c19f7449a8b11e64aad1cd4c
This commit is contained in:
Pau Espin 2021-09-20 14:56:39 +02:00 committed by pespin
parent 137166fd5f
commit 2f3cd4b697
1 changed files with 10 additions and 4 deletions

View File

@ -199,7 +199,7 @@ int lchan_ms_pwr_ctrl(struct gsm_lchan *lchan,
uint8_t rxlev_avg;
int16_t ul_lqual_cb_avg;
const struct gsm_power_ctrl_meas_params *ci_meas;
bool ignore;
bool ignore, ci_on;
if (!trx_ms_pwr_ctrl_is_osmo(trx))
return 0;
@ -225,13 +225,19 @@ int lchan_ms_pwr_ctrl(struct gsm_lchan *lchan,
return 0;
}
/* If computed C/I is out of acceptable thresholds: */
ci_meas = lchan_get_ci_thresholds(lchan);
/* Is C/I based algo enabled by config?
* FIXME: this can later be generalized when properly implementing P & N counting. */
ci_on = ci_meas->lower_cmp_n && ci_meas->upper_cmp_n;
ul_lqual_cb_avg = do_avg_algo(ci_meas, &state->ci_meas_proc, ul_lqual_cb);
rxlev_avg = do_avg_algo(&params->rxlev_meas, &state->rxlev_meas_proc, dbm2rxlev(ul_rssi_dbm));
if (ul_lqual_cb_avg < ci_meas->lower_thresh * 10) {
/* If computed C/I is enabled and out of acceptable thresholds: */
if (ci_on && ul_lqual_cb_avg < ci_meas->lower_thresh * 10) {
new_dbm = ms_dbm + params->inc_step_size_db;
} else if (ul_lqual_cb_avg > ci_meas->upper_thresh * 10) {
} else if (ci_on && ul_lqual_cb_avg > ci_meas->upper_thresh * 10) {
new_dbm = ms_dbm - params->red_step_size_db;
} else {
/* Calculate the new Tx power value (in dBm) */