laforge has posted comments on this change by laforge. ( https://gerrit.osmocom.org/c/libosmocore/+/39827?usp=email )
Change subject: protocol/gsm_04_08.h: Add GSM 04.08 message types for SI21/22/23
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
not quite sure why the build would fail after such a trivial change ading 5 more defines...
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/39827?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I1bb96f3c09b0499c3a76519a49d63c2a30130612
Gerrit-Change-Number: 39827
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Comment-Date: Fri, 21 Mar 2025 08:11:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: fixeria.
laforge has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-bts/+/39830?usp=email )
Change subject: fixup: rsl: properly initialize MS/BS Power Control state
......................................................................
Patch Set 1:
(1 comment)
File src/common/rsl.c:
https://gerrit.osmocom.org/c/osmo-bts/+/39830/comment/cb7264bc_03b5a390?usp… :
PS1, Line 1992: memset(&lchan->bs_power_ctrl, 0, sizeof(lchan->bs_power_ctrl));
ok, more initialization here rather than re-set-to-sane-defaults during deactivation. Can be done this way - but then make sure all of it happens here and none in the deactivation path.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/39830?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I46c881d5a3959c2542610ed767e0f131d01f9f98
Gerrit-Change-Number: 39830
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 21 Mar 2025 08:09:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: fixeria.
laforge has posted comments on this change by fixeria. ( https://gerrit.osmocom.org/c/osmo-bts/+/39829?usp=email )
Change subject: rsl: rsl_rx_chan_activ(): set TA=0 if not indicated by the BSC
......................................................................
Patch Set 1:
(1 comment)
File src/common/rsl.c:
https://gerrit.osmocom.org/c/osmo-bts/+/39829/comment/e19c083a_c9ae185a?usp… :
PS1, Line 2068: lchan->ta_ctrl.current = 0;
it's a bit of a question whether we expect all of those valuse to be zero or otherwise sanely default-initialized when we start using a lchan or not. My preference would be to re-set the ta_ctrl.current to zero during LCHAN release/deactivation.
If you want to do it here, then why are we not also setting ms_power_ctrl.{max,current} if the RSL_IE_MS_POWER is not presetn? opr many other parts of this function...
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/39829?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I83f26ff06cebdfe8d4e75944f496e9678310e2a2
Gerrit-Change-Number: 39829
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 21 Mar 2025 08:08:44 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/39831?usp=email )
Change subject: power_control: always feed input values to do_avg_algo()
......................................................................
power_control: always feed input values to do_avg_algo()
The purpose of the power control interval (P_CON_INTERVAL) is to
temporarily suspend the decision-making process of the MS/BS power
control algorithm, allowing time to observe the effects of a
previous adjustment.
However, input value (RxLev/RxQual) averaging must continue
uninterrupted, regardless of the power control interval.
Otherwise we're simply loosing measurement samples.
Change-Id: I2ccad1cb0ebbfcce64a93bc81b66db37b1399769
---
M src/common/power_control.c
1 file changed, 13 insertions(+), 9 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/31/39831/1
diff --git a/src/common/power_control.c b/src/common/power_control.c
index 7f98a41..45d8969 100644
--- a/src/common/power_control.c
+++ b/src/common/power_control.c
@@ -206,6 +206,12 @@
if (params == NULL)
return 0;
+ /* Average the input RxLev/RxQual samples (if needed). Do this before
+ * the loop suspension logic to keep the pre-processing state updated. */
+ ci_meas = lchan_get_ci_thresholds(lchan);
+ ul_lqual_cb_avg = do_avg_algo(ci_meas, &state->ci_meas_proc, ul_lqual_cb);
+ rxlev_avg = do_avg_algo(¶ms->rxlev_meas, &state->rxlev_meas_proc, dbm2rxlev(ul_rssi_dbm));
+
/* Shall we skip current block based on configured interval? */
if (ctrl_interval_skip_block(params, state))
return 0;
@@ -225,15 +231,10 @@
return 0;
}
- 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(¶ms->rxlev_meas, &state->rxlev_meas_proc, dbm2rxlev(ul_rssi_dbm));
-
/* 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;
@@ -334,10 +335,6 @@
lchan->tch.dtx.dl_active ? "enabled" : "disabled",
lchan->tch.dtx.dl_active ? "SUB" : "FULL");
- /* Shall we skip current block based on configured interval? */
- if (ctrl_interval_skip_block(params, state))
- return 0;
-
/* If DTx is active on Downlink, use the '-SUB' */
if (lchan->tch.dtx.dl_active) {
rxqual = mr->rxqual_sub;
@@ -347,8 +344,15 @@
rxlev = mr->rxlev_full;
}
+ /* Average the input RxLev/RxQual samples (if needed). Do this before
+ * the loop suspension logic to keep the pre-processing state updated. */
rxlev_avg = do_avg_algo(¶ms->rxlev_meas, &state->rxlev_meas_proc, rxlev);
rxqual_avg = do_avg_algo(¶ms->rxqual_meas, &state->rxqual_meas_proc, rxqual);
+
+ /* Shall we skip current block based on configured interval? */
+ if (ctrl_interval_skip_block(params, state))
+ return 0;
+
/* If RxQual > L_RXQUAL_XX_P, try to increase Tx power */
if (rxqual_avg > params->rxqual_meas.lower_thresh) {
/* Increase Tx power by reducing Tx attenuation */
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/39831?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I2ccad1cb0ebbfcce64a93bc81b66db37b1399769
Gerrit-Change-Number: 39831
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/39828?usp=email )
Change subject: rsl: rsl_rx_chan_activ(): fix code formatting
......................................................................
rsl: rsl_rx_chan_activ(): fix code formatting
Change-Id: Ib22f9b90a5194370d2b5bb768d050cc0b167320e
---
M src/common/rsl.c
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/28/39828/1
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 20581d4..7931a17 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -2078,8 +2078,8 @@
}
/* Spec explicitly states BTS should only perform
- * autonomous MS power control loop in BTS if 'MS Power
- * Parameters' IE is present! */
+ * autonomous MS power control loop in BTS if 'MS Power
+ * Parameters' IE is present! */
lchan->ms_power_ctrl.dpc_params = params;
}
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/39828?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Ib22f9b90a5194370d2b5bb768d050cc0b167320e
Gerrit-Change-Number: 39828
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/39829?usp=email )
Change subject: rsl: rsl_rx_chan_activ(): set TA=0 if not indicated by the BSC
......................................................................
rsl: rsl_rx_chan_activ(): set TA=0 if not indicated by the BSC
Otherwise the TA loop would end up using whatever value was set
previously. Let's assume TA=0 if not indicated by the BSC.
Change-Id: I83f26ff06cebdfe8d4e75944f496e9678310e2a2
---
M src/common/rsl.c
1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/29/39829/1
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 7931a17..1104ef8 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -2064,6 +2064,8 @@
/* 9.3.24 Timing Advance */
if (TLVP_PRES_LEN(&tp, RSL_IE_TIMING_ADVANCE, 1))
lchan->ta_ctrl.current = *TLVP_VAL(&tp, RSL_IE_TIMING_ADVANCE);
+ else /* assume TA=0 if not indicated by the BSC */
+ lchan->ta_ctrl.current = 0;
/* 9.3.31 (TLV) MS Power Parameters IE (vendor specific) */
if ((ie = TLVP_GET(&tp, RSL_IE_MS_POWER_PARAM)) != NULL) {
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/39829?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I83f26ff06cebdfe8d4e75944f496e9678310e2a2
Gerrit-Change-Number: 39829
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/39830?usp=email )
Change subject: fixup: rsl: properly initialize MS/BS Power Control state
......................................................................
fixup: rsl: properly initialize MS/BS Power Control state
Commit 75162427 fixed one problem, but introduced another one:
'''
/* Initialize MS Power Control defaults */
lchan->ms_power_ctrl = (struct lchan_power_ctrl_state) {
.max = ms_pwr_ctl_lvl(lchan->ts->trx->bts->band, 0),
.current = lchan->ms_power_ctrl.max, /* XXX */
};
'''
The intention here was to assign the same value to both 'max' and
'current' fields. However, field 'current' actually gets assigned
whatever value was assigned to field 'max' previously.
This regression was caught by running the BTS_Tests.TC_rsl_ms_pwr_ctrl
several times against the same osmo-bts-trx process.
Let's use the good-old memset() to initialize the MS/BS Power Control
state structures, and move initialization of 'max' and 'current' fields
to the else branches of the RSL_IE_{MS,BS}_POWER IE checks.
Change-Id: I46c881d5a3959c2542610ed767e0f131d01f9f98
Fixes: 75162427 ("rsl: properly initialize MS/BS Power Control state")
Related: SYS#4918, OS#6672
---
M src/common/rsl.c
1 file changed, 11 insertions(+), 14 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/30/39830/1
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 1104ef8..f16fe7c 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -1987,17 +1987,9 @@
}
}
- /* Initialize MS Power Control defaults */
- lchan->ms_power_ctrl = (struct lchan_power_ctrl_state) {
- .max = ms_pwr_ctl_lvl(lchan->ts->trx->bts->band, 0),
- .current = lchan->ms_power_ctrl.max,
- };
-
- /* Initialize BS Power Control defaults */
- lchan->bs_power_ctrl = (struct lchan_power_ctrl_state) {
- .max = 2 * 15, /* maximum defined in 9.3.4 */
- .current = 0,
- };
+ /* Initialize MS/BS Power Control state */
+ memset(&lchan->ms_power_ctrl, 0, sizeof(lchan->ms_power_ctrl));
+ memset(&lchan->bs_power_ctrl, 0, sizeof(lchan->bs_power_ctrl));
/* 9.3.6 Channel Mode */
if (type != RSL_ACT_OSMO_PDCH) {
@@ -2054,13 +2046,18 @@
LOGPLCHAN(lchan, DRSL, LOGL_DEBUG, "BS Power attenuation %u dB\n",
lchan->bs_power_ctrl.current);
+ } else {
+ lchan->bs_power_ctrl.max = 2 * 15; /* maximum defined in 9.3.4 */
+ lchan->bs_power_ctrl.current = 0;
}
/* 9.3.13 MS Power */
- if (TLVP_PRES_LEN(&tp, RSL_IE_MS_POWER, 1)) {
+ if (TLVP_PRES_LEN(&tp, RSL_IE_MS_POWER, 1))
lchan->ms_power_ctrl.max = *TLVP_VAL(&tp, RSL_IE_MS_POWER) & 0x1F;
- lchan->ms_power_ctrl.current = lchan->ms_power_ctrl.max;
- }
+ else /* XXX: should we use the maximum power level instead of 0 dBm? */
+ lchan->ms_power_ctrl.max = ms_pwr_ctl_lvl(lchan->ts->trx->bts->band, 0);
+ lchan->ms_power_ctrl.current = lchan->ms_power_ctrl.max;
+
/* 9.3.24 Timing Advance */
if (TLVP_PRES_LEN(&tp, RSL_IE_TIMING_ADVANCE, 1))
lchan->ta_ctrl.current = *TLVP_VAL(&tp, RSL_IE_TIMING_ADVANCE);
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/39830?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I46c881d5a3959c2542610ed767e0f131d01f9f98
Gerrit-Change-Number: 39830
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>