aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-04-07 13:59:45 +0300
committerVadim Yanitskiy <vyanitskiy@sysmocom.de>2022-04-07 20:27:46 +0300
commit5ce5c7db9b26adc10cc459228aa5372809c47790 (patch)
treec9a8ee4674bd5d11a7014087a0da13afb8c98958
parent5a8413166f61046f15e8356ed069effee33d72f3 (diff)
osmo-bts-trx: rx_{tchh,tchf}_fn(): use tch_mode directly
There is no reason not to use 'chan_state->tch_mode' directly in the 'switch' statement. If a logical channel is in signalling mode, then both 'chan_state->{rsl,tch}_cmode' are set to RSL_CMOD_SPD_SIGN and GSM48_CMODE_SIGN, respectively. Change-Id: I9e5e2c891c80c32fc522b53c9371b71ea32dd54d Related: SYS#5853
-rw-r--r--src/osmo-bts-trx/sched_lchan_tchf.c4
-rw-r--r--src/osmo-bts-trx/sched_lchan_tchh.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/osmo-bts-trx/sched_lchan_tchf.c b/src/osmo-bts-trx/sched_lchan_tchf.c
index 6a9a0f0f..4f5d6d3c 100644
--- a/src/osmo-bts-trx/sched_lchan_tchf.c
+++ b/src/osmo-bts-trx/sched_lchan_tchf.c
@@ -116,8 +116,8 @@ int rx_tchf_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
/* decode
* also shift buffer by 4 bursts for interleaving */
- switch ((rsl_cmode != RSL_CMOD_SPD_SPEECH) ? GSM48_CMODE_SPEECH_V1
- : tch_mode) {
+ switch (tch_mode) {
+ case GSM48_CMODE_SIGN:
case GSM48_CMODE_SPEECH_V1: /* FR */
rc = gsm0503_tch_fr_decode(tch_data, *bursts_p, 1, 0, &n_errors, &n_bits_total);
if (rc == GSM_FR_BYTES) /* only for valid *speech* frames */
diff --git a/src/osmo-bts-trx/sched_lchan_tchh.c b/src/osmo-bts-trx/sched_lchan_tchh.c
index 369e35b2..a8bdd080 100644
--- a/src/osmo-bts-trx/sched_lchan_tchh.c
+++ b/src/osmo-bts-trx/sched_lchan_tchh.c
@@ -133,8 +133,8 @@ int rx_tchh_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
/* decode
* also shift buffer by 4 bursts for interleaving */
- switch ((rsl_cmode != RSL_CMOD_SPD_SPEECH) ? GSM48_CMODE_SPEECH_V1
- : tch_mode) {
+ switch (tch_mode) {
+ case GSM48_CMODE_SIGN:
case GSM48_CMODE_SPEECH_V1: /* HR or signalling */
/* Note on FN-10: If we are at FN 10, we decoded an even aligned
* TCH/FACCH frame, because our burst buffer carries 6 bursts.