summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/host/trxcon/sched_lchan_common.c4
-rw-r--r--src/host/trxcon/sched_lchan_tchf.c11
2 files changed, 11 insertions, 4 deletions
diff --git a/src/host/trxcon/sched_lchan_common.c b/src/host/trxcon/sched_lchan_common.c
index 2767b90d..95e496b2 100644
--- a/src/host/trxcon/sched_lchan_common.c
+++ b/src/host/trxcon/sched_lchan_common.c
@@ -145,7 +145,6 @@ int sched_send_dt_conf(struct trx_instance *trx, struct trx_ts *ts,
size_t sched_bad_frame_ind(uint8_t *l2, struct trx_lchan_state *lchan)
{
switch (lchan->tch_mode) {
- case GSM48_CMODE_SIGN:
case GSM48_CMODE_SPEECH_V1:
if (lchan->type == TRXC_TCHF) { /* Full Rate */
memset(l2, 0x00, GSM_FR_BYTES);
@@ -163,6 +162,9 @@ size_t sched_bad_frame_ind(uint8_t *l2, struct trx_lchan_state *lchan)
case GSM48_CMODE_SPEECH_AMR: /* Adaptive Multi Rate */
/* FIXME: AMR is not implemented yet */
return 0;
+ case GSM48_CMODE_SIGN:
+ LOGP(DSCH, LOGL_ERROR, "BFI is not allowed in signalling mode\n");
+ return 0;
default:
LOGP(DSCH, LOGL_ERROR, "Invalid TCH mode: %u\n", lchan->tch_mode);
return 0;
diff --git a/src/host/trxcon/sched_lchan_tchf.c b/src/host/trxcon/sched_lchan_tchf.c
index f6465f9b..09d504f8 100644
--- a/src/host/trxcon/sched_lchan_tchf.c
+++ b/src/host/trxcon/sched_lchan_tchf.c
@@ -151,13 +151,18 @@ int rx_tchf_fn(struct trx_instance *trx, struct trx_ts *ts,
n_errors, false, true);
bfi:
- /* Bad frame indication */
- l2_len = sched_bad_frame_ind(l2, lchan);
-
/* Didn't try to decode */
if (n_errors < 0)
n_errors = 116 * 4;
+ /* BFI is not applicable in signalling mode */
+ if (lchan->tch_mode == GSM48_CMODE_SIGN)
+ return sched_send_dt_ind(trx, ts, lchan, NULL, 0,
+ n_errors, true, false);
+
+ /* Bad frame indication */
+ l2_len = sched_bad_frame_ind(l2, lchan);
+
/* Send a BFI frame to the higher layers */
return sched_send_dt_ind(trx, ts, lchan, l2, l2_len,
n_errors, true, true);