summaryrefslogtreecommitdiffstats
path: root/src/host/trxcon/sched_lchan_tchf.c
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-08-17 08:48:29 +0700
committerHarald Welte <laforge@gnumonks.org>2018-09-15 07:51:52 +0000
commit60da22a67b228b9f07a2765ae25acdc08d2d6747 (patch)
tree26249cafc849692c1676eda61a9b7aaa6b099e84 /src/host/trxcon/sched_lchan_tchf.c
parent909c86df29b2018fe602438f90e2d56e3bde48e1 (diff)
trxcon/scheduler: fix: don't send BFI in GSM48_CMODE_SIGN mode
GSM48_CMODE_SIGN means 'signaling only', so we shall not send bad frame indications in this state. Instead, it makes sense to send dummy L2 frames like we do for xCCH channels. Change-Id: Ie39d53522cafab265099076b3194fa96aff217ba
Diffstat (limited to 'src/host/trxcon/sched_lchan_tchf.c')
-rw-r--r--src/host/trxcon/sched_lchan_tchf.c11
1 files changed, 8 insertions, 3 deletions
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);