Attention is currently required from: dexter.
Hello Jenkins Builder, fixeria, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/onomondo-eim/+/42876?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
The change is no longer submittable: Verified is unsatisfied now.
Change subject: esipa_asn1_handler: fix transactionId handling
......................................................................
esipa_asn1_handler: fix transactionId handling
The transactionId member is now called eimTransactionId. It is also
an optional member.
Change-Id: I1340e0c7aed091e8e5a5089ebd6e524512408cf7
Related: SYS#8100
---
M src/esipa_asn1_handler_utils.erl
1 file changed, 4 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/onomondo-eim refs/changes/76/42876/2
--
To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/42876?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: onomondo-eim
Gerrit-Branch: master
Gerrit-Change-Id: I1340e0c7aed091e8e5a5089ebd6e524512408cf7
Gerrit-Change-Number: 42876
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Attention is currently required from: dexter.
Hello Jenkins Builder, fixeria, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/onomondo-eim/+/42874?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
The change is no longer submittable: Verified is unsatisfied now.
Change subject: es9p_client: section 6.3.2.1, rename euiccCiPKIdToBeused to match SGP.32 V.1.2
......................................................................
es9p_client: section 6.3.2.1, rename euiccCiPKIdToBeused to match SGP.32 V.1.2
Section 6.3.2.1: rename InitiateAuthenticationOkEsipa.euiccCiPKIdToBeused to InitiateAuthenticationOkEsipa.euiccCiPKIdentifierToBeUsed
Change-Id: I44c60a2f0d1129093ea67908d2eed167643a4a87
Related: SYS#8100
---
M src/esipa_asn1_handler.erl
1 file changed, 6 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/onomondo-eim refs/changes/74/42874/2
--
To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/42874?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: onomondo-eim
Gerrit-Branch: master
Gerrit-Change-Id: I44c60a2f0d1129093ea67908d2eed167643a4a87
Gerrit-Change-Number: 42874
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Attention is currently required from: dexter.
Hello Jenkins Builder, fixeria, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/onomondo-eim/+/42875?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
The change is no longer submittable: Verified is unsatisfied now.
Change subject: esipa_asn1_codec: add special handling for ProvideEimPackageResultResponse
......................................................................
esipa_asn1_codec: add special handling for ProvideEimPackageResultResponse
In SGP.32 V.1.2 ProvideEimPackageResultResponse is defined as a CHOICE.
This means that this struct now also requires special handling.
Change-Id: I859a175cc28a18ea9334d9b2cf233294fdc95b76
Related: SYS#8100
---
M src/esipa_asn1_codec.erl
1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/onomondo-eim refs/changes/75/42875/2
--
To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/42875?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: onomondo-eim
Gerrit-Branch: master
Gerrit-Change-Id: I859a175cc28a18ea9334d9b2cf233294fdc95b76
Gerrit-Change-Number: 42875
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Attention is currently required from: dexter.
Hello Jenkins Builder, fixeria, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/onomondo-eim/+/42877?usp=email
to look at the new patch set (#2).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
The change is no longer submittable: Verified is unsatisfied now.
Change subject: esipa_asn1_handler: re-align to SGP.32 section Section 2.11.2 and Section 5.14.6
......................................................................
esipa_asn1_handler: re-align to SGP.32 section Section 2.11.2 and Section 5.14.6
Section 2.11.2: eIM package result (EuiccPackageResult case) is now concatenated with PendingNotificationList instead of RetrieveNotificationsListResponse
Section 5.14.6: ESipa.ProvideEimPackageResult: Significant change in parameters
Change-Id: Ic0872edefc1844166943c60528557c6b7a6602ce
Related: SYS#8100
---
M src/esipa_asn1_handler.erl
1 file changed, 9 insertions(+), 24 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/onomondo-eim refs/changes/77/42877/2
--
To view, visit https://gerrit.osmocom.org/c/onomondo-eim/+/42877?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: onomondo-eim
Gerrit-Branch: master
Gerrit-Change-Id: Ic0872edefc1844166943c60528557c6b7a6602ce
Gerrit-Change-Number: 42877
Gerrit-PatchSet: 2
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
osmith has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/dahdi-linux/+/42906?usp=email )
Change subject: Adjust to strncpy removal in linux 7.2-rc1
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
> According to my analysis, strscpy is "only" available from kernel v4.10 and higher. […]
As discussed in chat, I wasn't aware that there is a separate repository that in theory we want to merge everything into, and that they still support the 2.6 kernel.
I've sent a revert of this patch in https://gerrit.osmocom.org/c/dahdi-linux/+/42913/1 and rebased your patch on top.
--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/42906?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: I860344fd23d5780fc588d19388ad91c6f6bcfc90
Gerrit-Change-Number: 42906
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Tue, 30 Jun 2026 10:09:35 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Attention is currently required from: osmith.
osmith has uploaded a new patch set (#2) to the change originally created by laforge. ( https://gerrit.osmocom.org/c/dahdi-linux/+/42898?usp=email )
The following approvals got outdated and were removed:
Code-Review-1 by osmith, Verified+1 by Jenkins Builder
Change subject: compatibility with kernel >= 7.2 which removed strncpy
......................................................................
compatibility with kernel >= 7.2 which removed strncpy
In commit 079a028d6327e68cfa5d38b36123637b321c19a7 the kernel removed
strncpy. Let's use strscpy instead.
Change-Id: I11a16ffed90223cbeae456a26834c0342146eb88
---
M include/dahdi/kernel.h
1 file changed, 5 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/dahdi-linux refs/changes/98/42898/2
--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/42898?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: I11a16ffed90223cbeae456a26834c0342146eb88
Gerrit-Change-Number: 42898
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
osmith has uploaded this change for review. ( https://gerrit.osmocom.org/c/dahdi-linux/+/42913?usp=email )
Change subject: Revert "Adjust to strncpy removal in linux 7.2-rc1"
......................................................................
Revert "Adjust to strncpy removal in linux 7.2-rc1"
There is another repository at
https://github.com/asterisk/dahdi-linux that appears to be compatible to
linux >= 2.6 and we want to in theory merge everything from our repo
into that at some point. strscpy isn't available in such early linux
versions yet, so revert commit b1bc81f8077c5cb52eae7fbd4021bf180159aed7
and add a different fix for building with 7.2-rc1 as next patch.
Related: https://gerrit.osmocom.org/c/dahdi-linux/+/42906/comments/c06cfbe4_fbd94c6e
Change-Id: I71ad66d33b4a19e4cf9b431bcc3d3cd02cad5e2f
---
M drivers/dahdi/dahdi-base.c
M drivers/dahdi/xpp/mmapbus.c
M drivers/dahdi/xpp/mmapdrv.c
3 files changed, 4 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/dahdi-linux refs/changes/13/42913/1
diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c
index 5067c02..657eb34 100644
--- a/drivers/dahdi/dahdi-base.c
+++ b/drivers/dahdi/dahdi-base.c
@@ -5449,7 +5449,7 @@
*/
continue;
}
- strscpy(vi.echo_canceller, ec_name, sizeof(vi.echo_canceller));
+ strncpy(vi.echo_canceller, ec_name, space);
space -= strlen(ec_name);
if (space < 1)
break;
diff --git a/drivers/dahdi/xpp/mmapbus.c b/drivers/dahdi/xpp/mmapbus.c
index 72c402e..ddf083f 100644
--- a/drivers/dahdi/xpp/mmapbus.c
+++ b/drivers/dahdi/xpp/mmapbus.c
@@ -40,7 +40,7 @@
dev->dev.bus = &mmap_bus_type;
dev->dev.parent = &mmap_bus;
dev->dev.release = mmap_dev_release;
- strscpy(dev->dev.bus_id, dev->name, sizeof(dev->dev.bus_id));
+ strncpy(dev->dev.bus_id, dev->name, BUS_ID_SIZE);
return device_register(&dev->dev);
}
EXPORT_SYMBOL(register_mmap_device);
diff --git a/drivers/dahdi/xpp/mmapdrv.c b/drivers/dahdi/xpp/mmapdrv.c
index 0124b92..2e0e298 100644
--- a/drivers/dahdi/xpp/mmapdrv.c
+++ b/drivers/dahdi/xpp/mmapdrv.c
@@ -572,8 +572,8 @@
ret = -ENOMEM;
goto fail_xbus;
}
- strscpy(global_xbus->connector, "mmap", sizeof(global_xbus->connector));
- strscpy(global_xbus->label, "mmap:0", sizeof(global_xbus->label));
+ strncpy(global_xbus->connector, "mmap", XBUS_DESCLEN);
+ strncpy(global_xbus->label, "mmap:0", LABEL_SIZE);
xframe_queue_init(&txpool, 10, 200, "mmap_txpool", global_xbus);
if (!
--
To view, visit https://gerrit.osmocom.org/c/dahdi-linux/+/42913?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: dahdi-linux
Gerrit-Branch: master
Gerrit-Change-Id: I71ad66d33b4a19e4cf9b431bcc3d3cd02cad5e2f
Gerrit-Change-Number: 42913
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/42908?usp=email )
Change subject: oml: validate Intave Parameter range in SET BTS ATTR
......................................................................
oml: validate Intave Parameter range in SET BTS ATTR
3GPP TS 52.021 §9.4.24 defines valid range for the Intave Parameter
as 1..31, matching the fixed size of the per-lchan interference sample
buffer (interf_meas_dbm[31] in lchan.h). Previously any uint8_t value
was accepted without validation, meaning a buggy BSC could send
intave=0 (silently disabling interference reporting) or intave>31
(causing a buffer overflow in gsm_lchan_interf_meas_push()).
Let's guard against that by NACKing the SET BTS ATTR message with
cause=NM_NACK_PARAM_RANGE if the value is outside the valid range.
Change-Id: Id4d3353d4397aaa2517091b020d38ee15e084e2c
AI-Assisted: yes (Claude)
---
M src/common/oml.c
1 file changed, 10 insertions(+), 3 deletions(-)
Approvals:
Jenkins Builder: Verified
osmith: Looks good to me, but someone else must approve
pespin: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/src/common/oml.c b/src/common/oml.c
index 35b8664..ce5f7f9 100644
--- a/src/common/oml.c
+++ b/src/common/oml.c
@@ -955,9 +955,16 @@
bts->interference.boundary[i] = -1 * boundary;
}
}
- /* 9.4.24 Intave Parameter */
- if (TLVP_PRES_LEN(&tp, NM_ATT_INTAVE_PARAM, 1))
- bts->interference.intave = *TLVP_VAL(&tp, NM_ATT_INTAVE_PARAM);
+ /* 9.4.24 Intave Parameter (3GPP TS 52.021 §9.4.24: range 1..31) */
+ if (TLVP_PRES_LEN(&tp, NM_ATT_INTAVE_PARAM, 1)) {
+ uint8_t intave = *TLVP_VAL(&tp, NM_ATT_INTAVE_PARAM);
+ if (intave < 1 || intave > 31) {
+ LOGPFOH(DOML, LOGL_ERROR, foh,
+ "Intave Parameter %u out of range (1..31)\n", intave);
+ return oml_fom_ack_nack(msg, NM_NACK_PARAM_RANGE);
+ }
+ bts->interference.intave = intave;
+ }
/* 9.4.14 Connection Failure Criterion */
if (TLVP_PRES_LEN(&tp, NM_ATT_CONN_FAIL_CRIT, 1)) {
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/42908?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: Id4d3353d4397aaa2517091b020d38ee15e084e2c
Gerrit-Change-Number: 42908
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/42907?usp=email )
Change subject: l1sap: fix duplicate RF RESOURCE INDICATION on clock bootstrap
......................................................................
l1sap: fix duplicate RF RESOURCE INDICATION on clock bootstrap
The TTCN-3 test suite (ttcn3-bts-test) expects to receive exactly one
RF RESOURCE INDICATION message from each TRX during the bootstrap stage,
while waiting for all TRX to come up and be configured by the BSC.
l1sap_interf_meas_report() fires whenever bts->gsm_time.fn % period is
0, where period = intave * 104 (typically 624 frames). Since CLCK.ind
with FN=0 satisfies this condition, a report is sent at the very
beginning of each clock epoch.
This was not a problem before commit fcfc4e83, because the first
CLCK.ind from the transciever was effectively a no-op: with
last_fn_timer.fn zero-initialised, the first indication at FN=0 yielded
elapsed_fn=0 (not > MAX_FN_SKEW), and the catch-up loop (while fn !=
last_fn_timer.fn) would not execute either. Downlink scheduling only
started on the second CLCK.ind (at FN=102, which is > MAX_FN_SKEW),
and 102 % 624 != 0, so no RF RESOURCE INDICATION was triggered.
fcfc4e83 changed the logic so that Downlink scheduling now begins
immediately on the first CLCK.ind, via an unconditional call to
trx_setup_clock() -> bts_sched_fn(fn). When fake_trx starts its frame
counter from FN=0, this immediately triggers l1sap_interf_meas_report()
because 0 % 624 == 0. A second report follows ~2.88s later when the
periodic timer reaches FN=624, making the bootstrap logic
in ttcn3-bts-test unhappy.
Fix by shifting the trigger to (fn + 1) % period == 0, i.e. the report
fires at the last frame of each period rather than the first. FN=0 now
yields (0+1) % 624 = 1 != 0, suppressing the spurious bootstrap report.
The periodic behaviour and report cadence are otherwise unchanged.
Change-Id: I6550178427b08e67c9763f0f37efff5b88960b1f
Related: fcfc4e83 ("osmo-bts-trx: fix spurious shutdown on first CLCK.ind from osmo-trx")
AI-Assisted: yes (Claude)
---
M src/common/l1sap.c
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
osmith: Looks good to me, but someone else must approve
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 78938f8..f11bb2c 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -595,7 +595,7 @@
if (bts->interference.intave == 0)
return;
- if (bts->gsm_time.fn % period != 0)
+ if ((bts->gsm_time.fn + 1) % period != 0)
return;
llist_for_each_entry(trx, &bts->trx_list, list) {
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/42907?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: I6550178427b08e67c9763f0f37efff5b88960b1f
Gerrit-Change-Number: 42907
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
fixeria has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/42871?usp=email )
Change subject: osmo-bts-trx: fix spurious shutdown on first CLCK.ind from osmo-trx
......................................................................
osmo-bts-trx: fix spurious shutdown on first CLCK.ind from osmo-trx
osmo-trx starts its frame counter from a random value rather than 0.
When the first CLCK.ind arrives, last_fn_timer and last_clk_ind are
still zero-initialised (set by trx_sched_clock_started()), so:
* compute_elapsed_fn(0, fn) wraps to a large negative for any fn
greater than hyperframe/2 (1357824), satisfying elapsed_fn < 0;
* compute_elapsed_us({0,0}, &tv_now) returns the full CLOCK_MONOTONIC
uptime (potentially days), satisfying the error_us threshold.
Together these trip the stale-clock shutdown introduced in the previous
commit (0199c108), even though the transceiver is perfectly healthy:
DL1C NOTICE scheduler_trx.c:490 GSM clock started, waiting for clock indications
DL1C FATAL scheduler_trx.c:589 Stale CLCK.ind: fn=1456348 is 250957770198 us behind
DOML NOTICE bts_shutdown_fsm.c:268 BTS_SHUTDOWN(bts0){NONE}: Shutting down BTS, exit 1, reason: TRX clock skew too high
Fix by adding clk_ind_received to osmo_trx_clock_state. On the first
CLCK.ind after a (re)start, skip all elapsed-time checks and directly
bootstrap the scheduler from the reported FN. The stale-clock
detection remains fully active for every subsequent indication,
where last_clk_ind holds a real baseline.
Change-Id: I25e76e02d29fd8f88130d15d0adfe8d90a017924
Fixes: 0199c108 ("osmo-bts-trx: shut down on stale clock indication from transceiver")
Related: OS#7021
---
M src/osmo-bts-trx/l1_if.h
M src/osmo-bts-trx/scheduler_trx.c
2 files changed, 15 insertions(+), 0 deletions(-)
Approvals:
osmith: Looks good to me, approved
pespin: Looks good to me, but someone else must approve
Jenkins Builder: Verified
diff --git a/src/osmo-bts-trx/l1_if.h b/src/osmo-bts-trx/l1_if.h
index 09bf7ac..d0a1347 100644
--- a/src/osmo-bts-trx/l1_if.h
+++ b/src/osmo-bts-trx/l1_if.h
@@ -39,6 +39,8 @@
struct osmo_trx_clock_state {
/*! number of FN periods without TRX clock indication */
uint32_t fn_without_clock_ind;
+ /*! set to true once the first clock indication has been received */
+ bool clk_ind_received;
struct {
/*! last FN we processed based on FN period timer */
uint32_t fn;
diff --git a/src/osmo-bts-trx/scheduler_trx.c b/src/osmo-bts-trx/scheduler_trx.c
index 105ad38..a4585ae 100644
--- a/src/osmo-bts-trx/scheduler_trx.c
+++ b/src/osmo-bts-trx/scheduler_trx.c
@@ -545,6 +545,19 @@
clock_gettime(CLOCK_MONOTONIC, &tv_now);
+ /* First clock indication after (re)start: bootstrap the clock from whatever
+ * FN the transceiver reports. osmo-trx starts its frame counter from a
+ * random value, so elapsed_fn and elapsed_us comparisons against the
+ * zero-initialised last_fn_timer / last_clk_ind would be nonsensical and
+ * would incorrectly trigger the stale-clock shutdown path. */
+ if (!tcs->clk_ind_received) {
+ LOGP(DL1C, LOGL_NOTICE, "GSM clock started: first CLCK.ind fn=%u\n", fn);
+ tcs->last_clk_ind.tv = tv_now;
+ tcs->last_clk_ind.fn = fn;
+ tcs->clk_ind_received = true;
+ return trx_setup_clock(bts, tcs, &tv_now, &interval, fn);
+ }
+
/* calculate elapsed time +fn since last timer */
elapsed_us = compute_elapsed_us(&tcs->last_fn_timer.tv, &tv_now);
elapsed_fn = compute_elapsed_fn(tcs->last_fn_timer.fn, fn);
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/42871?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: I25e76e02d29fd8f88130d15d0adfe8d90a017924
Gerrit-Change-Number: 42871
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Hoernchen <ewild(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>