aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-03-10 01:22:37 +0300
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-03-10 17:23:27 +0300
commitdc17d1036b6e9d8c567e9a33fc044ff7c5120dbd (patch)
tree8c385d1eb12bc7da6f7c2557dbb371c38964b326
parent8ec3f28fada3fe02d4fb3d86cdfe88c5cae497f8 (diff)
osmo-bts-trx: do not run osmo_{fr,hr}_check_sid() on FACCH/U frames
It makes no sense to perform the SID codeword lookup in signalling frames (FACCH), because it can be present only in speech frames. Change-Id: I2f8137993acfe8a8add3fc2af276e5eb4da1605e Related: SYS#5853
-rw-r--r--src/osmo-bts-trx/sched_lchan_tchf.c2
-rw-r--r--src/osmo-bts-trx/sched_lchan_tchh.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/osmo-bts-trx/sched_lchan_tchf.c b/src/osmo-bts-trx/sched_lchan_tchf.c
index b100fab3..1bf67a0e 100644
--- a/src/osmo-bts-trx/sched_lchan_tchf.c
+++ b/src/osmo-bts-trx/sched_lchan_tchf.c
@@ -119,7 +119,7 @@ int rx_tchf_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
: tch_mode) {
case GSM48_CMODE_SPEECH_V1: /* FR */
rc = gsm0503_tch_fr_decode(tch_data, *bursts_p, 1, 0, &n_errors, &n_bits_total);
- if (rc >= 0)
+ if (rc == GSM_FR_BYTES) /* only for valid *speech* frames */
lchan_set_marker(osmo_fr_check_sid(tch_data, rc), lchan); /* DTXu */
break;
case GSM48_CMODE_SPEECH_EFR: /* EFR */
diff --git a/src/osmo-bts-trx/sched_lchan_tchh.c b/src/osmo-bts-trx/sched_lchan_tchh.c
index 51a0b90d..27880c12 100644
--- a/src/osmo-bts-trx/sched_lchan_tchh.c
+++ b/src/osmo-bts-trx/sched_lchan_tchh.c
@@ -147,8 +147,8 @@ int rx_tchh_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
*/
rc = gsm0503_tch_hr_decode(tch_data, *bursts_p,
fn_is_odd, &n_errors, &n_bits_total);
- if (rc >= 0) /* DTXu */
- lchan_set_marker(osmo_hr_check_sid(tch_data, rc), lchan);
+ if (rc == (GSM_HR_BYTES + 1)) /* only for valid *speech* frames */
+ lchan_set_marker(osmo_hr_check_sid(tch_data, rc), lchan); /* DTXu */
break;
case GSM48_CMODE_SPEECH_AMR: /* AMR */
/* the first FN 0,8,17 or 1,9,18 defines that CMI is included