pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/41788?usp=email )
Change subject: ta_control: Move variable declaration to the top of the function
......................................................................
ta_control: Move variable declaration to the top of the function
Change-Id: Ia5ada61d74f5b17c4d1479123462104650a6ed0f
---
M src/common/ta_control.c
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/88/41788/1
diff --git a/src/common/ta_control.c b/src/common/ta_control.c
index c3e4d67..10b04a9 100644
--- a/src/common/ta_control.c
+++ b/src/common/ta_control.c
@@ -65,13 +65,13 @@
*/
void lchan_ms_ta_ctrl(struct gsm_lchan *lchan, uint8_t ms_tx_ta, int16_t toa256)
{
- int16_t new_ta;
+ int16_t new_ta, delta_ta;
/* Shall we skip current block based on configured interval? */
if (ctrl_interval_skip_block(lchan))
return;
- int16_t delta_ta = toa256/256;
+ delta_ta = toa256/256;
if (toa256 >= 0) {
if ((toa256 - (256 * delta_ta)) > TOA256_THRESH)
delta_ta++;
--
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: newchange
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>
pespin has uploaded this change for review. ( 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(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/87/41787/1
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: newchange
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>
Attention is currently required from: phcoder.
laforge has posted comments on this change by phcoder. ( https://gerrit.osmocom.org/c/pysim/+/41786?usp=email )
Change subject: Print SMSC in read mode
......................................................................
Patch Set 2: Code-Review-1
(1 comment)
Patchset:
PS2:
I don't think we want to merge this, sorry. `pySim-{read,prog}` are legacy tools that are virtually unmaintained except major bugfixes for many years by now.
The proper thing to do is to reimplement the same functionality based on `pySim.filesystem` and all the powerful encoder/decoder functionality we have in `pySim-shell`. But sadly we haven't seen anyone volunteering fo that yet ;)
Meanwhilw, if we were to add a new decoder for a file (like SMSP here), it should use the class `pySim.ts_51_011.EF_SMSP()` for decoding and not implement another open-coded/manual encoder.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41786?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I17067b68086316d51fd71ba77049874605594e3f
Gerrit-Change-Number: 41786
Gerrit-PatchSet: 2
Gerrit-Owner: phcoder <phcoder(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: phcoder <phcoder(a)gmail.com>
Gerrit-Comment-Date: Fri, 09 Jan 2026 10:25:24 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Attention is currently required from: phcoder.
Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/41786?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified-1 by Jenkins Builder
Change subject: Print SMSC in read mode
......................................................................
Print SMSC in read mode
Change-Id: I17067b68086316d51fd71ba77049874605594e3f
---
M pySim-read.py
M pySim/legacy/utils.py
2 files changed, 12 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/86/41786/2
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41786?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I17067b68086316d51fd71ba77049874605594e3f
Gerrit-Change-Number: 41786
Gerrit-PatchSet: 2
Gerrit-Owner: phcoder <phcoder(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Attention: phcoder <phcoder(a)gmail.com>