pespin has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/41787?usp=email )
Change subject: ta_control: Move skip_block logic to helper function
......................................................................
ta_control: Move skip_block logic to helper function
This makes it more similar to code in power_control.c.
Change-Id: I174f2f941fbedbe0793cc0b93d01e53e23328cf2
---
M src/common/ta_control.c
1 file changed, 21 insertions(+), 10 deletions(-)
Approvals:
fixeria: Looks good to me, but someone else must approve
dexter: Looks good to me, approved
Jenkins Builder: Verified
diff --git a/src/common/ta_control.c b/src/common/ta_control.c
index 6fe409a..c3e4d67 100644
--- a/src/common/ta_control.c
+++ b/src/common/ta_control.c
@@ -22,6 +22,9 @@
/* Related specs: 3GPP TS 45.010 sections 5.5, 5.6 */
+#include <stdint.h>
+#include <stdbool.h>
+
#include <osmo-bts/gsm_data.h>
#include <osmo-bts/bts_trx.h>
#include <osmo-bts/logging.h>
@@ -39,6 +42,22 @@
#define TA_MAX_DEC_STEP 2
+/* Shall we skip current block based on configured interval? */
+static bool ctrl_interval_skip_block(struct gsm_lchan *lchan)
+{
+ /* TA control interval: how many blocks do we skip? */
+ if (lchan->ta_ctrl.skip_block_num-- > 0)
+ return true;
+
+ /* Reset the number of SACCH blocks to be skipped:
+ * ctrl_interval=0 => 0 blocks to skip,
+ * ctrl_interval=1 => 1 blocks to skip,
+ * ctrl_interval=2 => 3 blocks to skip,
+ * so basically ctrl_interval * 2 - 1. */
+ lchan->ta_ctrl.skip_block_num = lchan->ts->trx->ta_ctrl_interval * 2 - 1;
+ return false;
+}
+
/*! compute the new "Ordered Timing Advance" 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_tx_ta The TA used by the MS and reported in L1SACCH, see struct gsm_sacch_l1_hdr field "ta".
@@ -47,19 +66,11 @@
void lchan_ms_ta_ctrl(struct gsm_lchan *lchan, uint8_t ms_tx_ta, int16_t toa256)
{
int16_t new_ta;
+
/* Shall we skip current block based on configured interval? */
-
- /* TA control interval: how many blocks do we skip? */
- if (lchan->ta_ctrl.skip_block_num-- > 0)
+ if (ctrl_interval_skip_block(lchan))
return;
- /* Reset the number of SACCH blocks to be skipped:
- * ctrl_interval=0 => 0 blocks to skip,
- * ctrl_interval=1 => 1 blocks to skip,
- * ctrl_interval=2 => 3 blocks to skip,
- * so basically ctrl_interval * 2 - 1. */
- lchan->ta_ctrl.skip_block_num = lchan->ts->trx->ta_ctrl_interval * 2 - 1;
-
int16_t delta_ta = toa256/256;
if (toa256 >= 0) {
if ((toa256 - (256 * delta_ta)) > TOA256_THRESH)
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/41787?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: merged
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I174f2f941fbedbe0793cc0b93d01e53e23328cf2
Gerrit-Change-Number: 41787
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Attention is currently required from: dexter, jolly, laforge.
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-bts/+/41790?usp=email )
Change subject: ta_control: Fix skip_block_num not reset when switching TS to PDCH
......................................................................
Patch Set 2: Code-Review+2
(2 comments)
File include/osmo-bts/ta_control.h:
https://gerrit.osmocom.org/c/osmo-bts/+/41790/comment/1a62dacf_03d38021?usp… :
PS2, Line 6:
> maybe remove the line break?
That's fine I say, it's not like there's tons of lines to compress 😊
File src/common/ta_control.c:
https://gerrit.osmocom.org/c/osmo-bts/+/41790/comment/1f6315b1_dba9cc09?usp… :
PS2, Line 47: /* Trigger loop on first TA input: */
> Maybe put this comment above the function? (I guess both assignments are required for the trigger)
No, only the one exactly below.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/41790?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: Id3e81ebec04042dd7d8e4805762e3e518790706d
Gerrit-Change-Number: 41790
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 09 Jan 2026 20:03:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>
Attention is currently required from: pespin.
dexter has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-bts/+/41793?usp=email )
Change subject: {bs,ms}_power_control: Reset state during lchan deactivation
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/41793?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: I0c247414d27d7ac636c6dbb294b0dd3bffc4ed97
Gerrit-Change-Number: 41793
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 09 Jan 2026 16:52:58 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: pespin.
dexter has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-bts/+/41792?usp=email )
Change subject: {bs,ms}_power_control: Add helper function to reset state
......................................................................
Patch Set 1: Code-Review+1
(1 comment)
Patchset:
PS1:
I have looked through this, everything looks good. The patch should not alter the behavior of the code.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/41792?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: I3e010a4ed72ba2574ce6c1316b8460689fc1d482
Gerrit-Change-Number: 41792
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 09 Jan 2026 16:51:22 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Attention is currently required from: jolly, laforge, pespin.
dexter has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-bts/+/41790?usp=email )
Change subject: ta_control: Fix skip_block_num not reset when switching TS to PDCH
......................................................................
Patch Set 2: Code-Review+1
(3 comments)
Patchset:
PS2:
I have looked through the code, it does what the commit message says.
File include/osmo-bts/ta_control.h:
https://gerrit.osmocom.org/c/osmo-bts/+/41790/comment/1d3b0fc3_82c0e4d6?usp… :
PS2, Line 6:
maybe remove the line break?
File src/common/ta_control.c:
https://gerrit.osmocom.org/c/osmo-bts/+/41790/comment/7d3451b5_d3037c8d?usp… :
PS2, Line 47: /* Trigger loop on first TA input: */
Maybe put this comment above the function? (I guess both assignments are required for the trigger)
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/41790?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: Id3e81ebec04042dd7d8e4805762e3e518790706d
Gerrit-Change-Number: 41790
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 09 Jan 2026 16:41:51 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Attention is currently required from: pespin.
dexter has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-bts/+/41787?usp=email )
Change subject: ta_control: Move skip_block logic to helper function
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/41787?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: I174f2f941fbedbe0793cc0b93d01e53e23328cf2
Gerrit-Change-Number: 41787
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 09 Jan 2026 16:35:10 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: pespin.
dexter has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-bts/+/41788?usp=email )
Change subject: ta_control: Move variable declaration to the top of the function
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/41788?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: Ia5ada61d74f5b17c4d1479123462104650a6ed0f
Gerrit-Change-Number: 41788
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 09 Jan 2026 16:33:45 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Attention is currently required from: pespin.
dexter has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-bts/+/41789?usp=email )
Change subject: ta_control: Add missing include for lchan.h
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/41789?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: Iea1f7ed303ebd0c12a48bb3edf73a494b8736a39
Gerrit-Change-Number: 41789
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Fri, 09 Jan 2026 16:30:51 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/41811?usp=email )
Change subject: runtime/cosmetic: add line break
......................................................................
runtime/cosmetic: add line break
The other source files have a line break between the character encoding
qualifier line and the python comment. Let's add a line break here
as well to maintain consistency.
Change-Id: Ied6b77eede748f1ddf6fde17c9b434fa4dd1114a
---
M pySim/runtime.py
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/11/41811/1
diff --git a/pySim/runtime.py b/pySim/runtime.py
index 35452a0..19d3538 100644
--- a/pySim/runtime.py
+++ b/pySim/runtime.py
@@ -1,4 +1,5 @@
# coding=utf-8
+
"""Representation of the runtime state of an application like pySim-shell.
"""
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41811?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ied6b77eede748f1ddf6fde17c9b434fa4dd1114a
Gerrit-Change-Number: 41811
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>