summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2020-03-02 03:29:47 +0700
committerlaforge <laforge@osmocom.org>2020-03-08 22:50:54 +0000
commit12357a7d37ccfbf9fddb1a5833826ac7460b1f94 (patch)
treebf8cd3492558521ed165a5e8b9cc7e9e851c58a9
parent2060b5b7cc3b63b64e651d3cda5ed50b44593a05 (diff)
trxcon/scheduler: FACCH: ensure fake measurements for BFI
According to 3GPP TS 45.003, clauses 4.2.5 and 4.3.5: - one FACCH/F frame steals a single speech frame, - one FACCH/H frame steals two speech frames. A BFI (Bad Frame Indication) needs to be sent for each stolen speech frame. This does not apply to CSD (data) channels though. The BFI frames must have measurement data attached to them, and due to their virtual nature (they do not actually come from the air interface), the measurements must be crafted by trxcon. Assigning a negative value to n_errors makes the code below the 'bfi' label craft fake measurement data. Otherwise, the actual measurements belonging to the FACCH frame will be used. Change-Id: Ia2f7c3cf7b1ef3737da6b1818cae2f001ee8768f
-rw-r--r--src/host/trxcon/sched_lchan_tchf.c3
-rw-r--r--src/host/trxcon/sched_lchan_tchh.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/host/trxcon/sched_lchan_tchf.c b/src/host/trxcon/sched_lchan_tchf.c
index d2cf030e..788d1532 100644
--- a/src/host/trxcon/sched_lchan_tchf.c
+++ b/src/host/trxcon/sched_lchan_tchf.c
@@ -136,7 +136,8 @@ int rx_tchf_fn(struct trx_instance *trx, struct trx_ts *ts,
sched_send_dt_ind(trx, ts, lchan, l2, GSM_MACBLOCK_LEN,
n_errors, false, false);
- /* Send BFI instead of stolen TCH frame */
+ /* Send BFI substituting a stolen TCH frame */
+ n_errors = -1; /* ensure fake measurements */
goto bfi;
} else {
/* A good TCH frame received */
diff --git a/src/host/trxcon/sched_lchan_tchh.c b/src/host/trxcon/sched_lchan_tchh.c
index 599dd204..013dba94 100644
--- a/src/host/trxcon/sched_lchan_tchh.c
+++ b/src/host/trxcon/sched_lchan_tchh.c
@@ -315,7 +315,8 @@ int rx_tchh_fn(struct trx_instance *trx, struct trx_ts *ts,
sched_send_dt_ind(trx, ts, lchan, l2, GSM_MACBLOCK_LEN,
n_errors, false, false);
- /* 1/2 BFI */
+ /* Send BFI substituting 1/2 stolen TCH frames */
+ n_errors = -1; /* ensure fake measurements */
goto bfi;
} else {
/* A good TCH frame received */