fixeria has submitted this change. (
https://gerrit.osmocom.org/c/osmocom-bb/+/30243 )
Change subject: trxcon: separate l1sched_clck_handle() from BURST.ind handling
......................................................................
trxcon: separate l1sched_clck_handle() from BURST.ind handling
Do not mix up Downlink burst handling with the clock delivery. Add
a separate PHYIF API function and call it from the TRXC/TRXD PHYIF.
This way calling trxcon_phyif_handle_burst_ind() would not trigger
the internal timer-driven Uplink scheduler in libl1sched, letting
the underlaying PHYIF logic to pull Uplink bursts synchronously.
Change-Id: Ieeee25573d1142aec2fee28d884127f14573b681
Related: OS#5599
---
M src/host/trxcon/include/osmocom/bb/trxcon/phyif.h
M src/host/trxcon/src/trx_if.c
M src/host/trxcon/src/trxcon_shim.c
3 files changed, 13 insertions(+), 7 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
msuraev: Looks good to me, but someone else must approve
fixeria: Looks good to me, approved
diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h
b/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h
index 43363cb..775c278 100644
--- a/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h
+++ b/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h
@@ -89,8 +89,10 @@
};
-int trxcon_phyif_handle_burst_ind(void *priv, const struct trxcon_phyif_burst_ind *bi);
int trxcon_phyif_handle_burst_req(void *phyif, const struct trxcon_phyif_burst_req *br);
+int trxcon_phyif_handle_burst_ind(void *priv, const struct trxcon_phyif_burst_ind *bi);
+int trxcon_phyif_handle_clock_ind(void *priv, uint32_t fn);
+
int trxcon_phyif_handle_cmd(void *phyif, const struct trxcon_phyif_cmd *cmd);
int trxcon_phyif_handle_rsp(void *priv, const struct trxcon_phyif_rsp *rsp);
void trxcon_phyif_close(void *phyif);
diff --git a/src/host/trxcon/src/trx_if.c b/src/host/trxcon/src/trx_if.c
index 5a662f0..388d82b 100644
--- a/src/host/trxcon/src/trx_if.c
+++ b/src/host/trxcon/src/trx_if.c
@@ -675,6 +675,9 @@
"RX burst tn=%u fn=%u rssi=%d toa=%d\n",
bi.tn, bi.fn, bi.rssi, bi.toa256);
+ if (bi.fn % 51 == 0)
+ trxcon_phyif_handle_clock_ind(trx->priv, bi.fn);
+
return trxcon_phyif_handle_burst_ind(trx->priv, &bi);
}
diff --git a/src/host/trxcon/src/trxcon_shim.c b/src/host/trxcon/src/trxcon_shim.c
index 6434461..5329539 100644
--- a/src/host/trxcon/src/trxcon_shim.c
+++ b/src/host/trxcon/src/trxcon_shim.c
@@ -230,14 +230,15 @@
};
/* Poke scheduler */
- l1sched_handle_rx_burst(trxcon->sched, bi->tn, bi->fn,
- bi->burst, bi->burst_len, &meas);
+ return l1sched_handle_rx_burst(trxcon->sched, bi->tn, bi->fn,
+ bi->burst, bi->burst_len, &meas);
+}
- /* Correct local clock counter */
- if (bi->fn % 51 == 0)
- l1sched_clck_handle(trxcon->sched, bi->fn);
+int trxcon_phyif_handle_clock_ind(void *priv, uint32_t fn)
+{
+ struct trxcon_inst *trxcon = priv;
- return 0;
+ return l1sched_clck_handle(trxcon->sched, fn);
}
int trxcon_phyif_handle_rsp(void *priv, const struct trxcon_phyif_rsp *rsp)
--
To view, visit
https://gerrit.osmocom.org/c/osmocom-bb/+/30243
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmocom-bb
Gerrit-Branch: master
Gerrit-Change-Id: Ieeee25573d1142aec2fee28d884127f14573b681
Gerrit-Change-Number: 30243
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: msuraev <msuraev(a)sysmocom.de>
Gerrit-MessageType: merged