From 535a093726a5d775512835179fe674a161fce64d Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Thu, 6 Sep 2018 01:07:32 +0700 Subject: trxcon/l1ctl.c: drop meaningless 'tn > 7' checks There is no need to check the range of timeslot number, which is decoded from GSM 08.58 channel number (9.3.1) by applying 0x07 mask, because any result of this operation is always within the correct range. Change-Id: Ib84417099d303bd3ae3557f48a5c40b812c6cdfc --- src/host/trxcon/l1ctl.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/host/trxcon/l1ctl.c b/src/host/trxcon/l1ctl.c index 74400be8..ec8b4c7b 100644 --- a/src/host/trxcon/l1ctl.c +++ b/src/host/trxcon/l1ctl.c @@ -565,11 +565,6 @@ static int l1ctl_rx_dm_est_req(struct l1ctl_link *l1l, struct msgb *msg) /* Determine TS index */ tn = chan_nr & 0x7; - if (tn > 7) { - LOGP(DL1C, LOGL_ERROR, "Incorrect TS index %u\n", tn); - rc = -EINVAL; - goto exit; - } /* Configure requested TS */ rc = sched_trx_configure_ts(l1l->trx, tn, config); @@ -732,11 +727,6 @@ static int l1ctl_rx_crypto_req(struct l1ctl_link *l1l, struct msgb *msg) /* Determine TS index */ tn = ul->chan_nr & 0x7; - if (tn > 7) { - LOGP(DL1C, LOGL_ERROR, "Incorrect TS index %u\n", tn); - rc = -EINVAL; - goto exit; - } /* Make sure that required TS is allocated and configured */ ts = l1l->trx->ts_list[tn]; -- cgit v1.2.3