aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-03-16 13:04:50 +0300
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-03-16 13:04:55 +0300
commit4e9affee0b4e6a6ff10d1ea61b019b7a8e0f5c60 (patch)
tree1f2ea2d6158ad5145519664c612617e5c8693feb
parenteb8059b615abe5a3315adf037b96c344286aba24 (diff)
osmo-bts-trx: rx_tchh_fn(): mark valid SID frames as such
Set the FT (Frame Type) in the ToC (Type-of-Content) section as defined in section 5.2 of RFC 5993. Before this change SID frames had FT = 000 (Good Speech frame), because gsm0503_tch_hr_decode() does not distinguish between speech and SID frames internally. Change-Id: I09cec984bb60c754908126acf0300a2cc602485c Related: SYS#5853
-rw-r--r--src/osmo-bts-trx/sched_lchan_tchh.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/osmo-bts-trx/sched_lchan_tchh.c b/src/osmo-bts-trx/sched_lchan_tchh.c
index d2ee4f05..5d2c12c9 100644
--- a/src/osmo-bts-trx/sched_lchan_tchh.c
+++ b/src/osmo-bts-trx/sched_lchan_tchh.c
@@ -149,7 +149,10 @@ int rx_tchh_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
fn_is_odd, &n_errors, &n_bits_total);
if (rc == (GSM_HR_BYTES + 1)) { /* only for valid *speech* frames */
/* gsm0503_tch_hr_decode() prepends a ToC octet (see RFC5993), skip it */
- lchan_set_marker(osmo_hr_check_sid(&tch_data[1], GSM_HR_BYTES), lchan); /* DTXu */
+ bool is_sid = osmo_hr_check_sid(&tch_data[1], GSM_HR_BYTES);
+ if (is_sid) /* Mark SID frames as such: F = 0, FT = 010 */
+ tch_data[0] = (0x02 << 4);
+ lchan_set_marker(is_sid, lchan); /* DTXu */
}
break;
case GSM48_CMODE_SPEECH_AMR: /* AMR */