summaryrefslogtreecommitdiffstats
path: root/src/host/layer23/src/transceiver/l1ctl.c
diff options
context:
space:
mode:
authorAndreas Eversberg <jolly@eversberg.eu>2013-02-27 11:05:00 +0100
committerSteve Markgraf <steve@steve-m.de>2021-10-23 18:51:19 +0200
commitaf8b7571db59fe3a5eb1896e84cca3fe5763d583 (patch)
treee1e7bef562e3604fec0a161039e91e8912dce9c8 /src/host/layer23/src/transceiver/l1ctl.c
parentc9cb53d16d2155c19d43bd037d67be6129019991 (diff)
Tranceiver application forwards TOA from layer 1 to TRX interface
The TOA of the received access burst is added to the TOA of the demodulator. This sum is the actual access delay.
Diffstat (limited to 'src/host/layer23/src/transceiver/l1ctl.c')
-rw-r--r--src/host/layer23/src/transceiver/l1ctl.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/host/layer23/src/transceiver/l1ctl.c b/src/host/layer23/src/transceiver/l1ctl.c
index 5ee4c4c9..96ca869b 100644
--- a/src/host/layer23/src/transceiver/l1ctl.c
+++ b/src/host/layer23/src/transceiver/l1ctl.c
@@ -190,6 +190,8 @@ _l1ctl_rx_bts_burst_nb_ind(struct app_state *as, struct msgb *msg)
LOGP(DL1C, LOGL_INFO, "Normal Burst Indication (fn=%d)\n", fn);
+ toa = bi->toa * 1.0F;
+
rssi = bi->rssi;
memset(data, 0x00, 148);
@@ -203,7 +205,7 @@ _l1ctl_rx_bts_burst_nb_ind(struct app_state *as, struct msgb *msg)
for (i=0; i<148; i++)
data[i] = data[i] ? -127 : 127;
- trx_data_ind(as->trx, fn, bi->tn, data, 0x0f, rssi);
+ trx_data_ind(as->trx, fn, bi->tn, data, toa, rssi);
exit:
msgb_free(msg);
@@ -231,9 +233,10 @@ _l1ctl_rx_bts_burst_ab_ind(struct app_state *as, struct msgb *msg)
fn = ntohl(bi->fn);
- LOGP(DL1C, LOGL_INFO, "Access Burst Indication (fn=%d)\n", fn);
+ LOGP(DL1C, LOGL_INFO, "Access Burst Indication (fn=%d iq toa=%f)\n", fn, bi->toa);
gsm_ab_ind_process(as, bi, data, &toa);
+ toa += bi->toa;
trx_data_ind(as->trx, fn, 0, data, toa, 0);
exit: