summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/host/layer23/src/transceiver/demod.c4
-rw-r--r--src/host/layer23/src/transceiver/l1ctl.c9
2 files changed, 10 insertions, 3 deletions
diff --git a/src/host/layer23/src/transceiver/demod.c b/src/host/layer23/src/transceiver/demod.c
index 45b0570a..c7a2d15f 100644
--- a/src/host/layer23/src/transceiver/demod.c
+++ b/src/host/layer23/src/transceiver/demod.c
@@ -64,6 +64,10 @@ gsm_ab_ind_process(struct app_state *as,
if (rv)
goto err;
+ /* Check for a significant peak */
+ if (cabsf(chan) < 0.5)
+ goto err;
+
printf("TOA : %f\n", toa);
printf("chan : (%f %f) => %f\n", crealf(chan), cimagf(chan), cabsf(chan));
diff --git a/src/host/layer23/src/transceiver/l1ctl.c b/src/host/layer23/src/transceiver/l1ctl.c
index 96ca869b..afdeb171 100644
--- a/src/host/layer23/src/transceiver/l1ctl.c
+++ b/src/host/layer23/src/transceiver/l1ctl.c
@@ -233,12 +233,15 @@ _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 iq toa=%f)\n", fn, bi->toa);
+ rc = gsm_ab_ind_process(as, bi, data, &toa);
+ if (rc < 0)
+ goto exit;
- gsm_ab_ind_process(as, bi, data, &toa);
toa += bi->toa;
- trx_data_ind(as->trx, fn, 0, data, toa, 0);
+ LOGP(DL1C, LOGL_INFO, "Access Burst Indication (fn=%d iq toa=%f)\n", fn, toa);
+
+ trx_data_ind(as->trx, fn, 0, data, toa, 0);
exit:
msgb_free(msg);