summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2018-09-06 01:07:32 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2018-09-06 01:07:36 +0700
commit535a093726a5d775512835179fe674a161fce64d (patch)
tree6e8f4c2821932b594184ccfc395f697813160e63
parent1f578082e9e54841c485c829657adb599c039f74 (diff)
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
-rw-r--r--src/host/trxcon/l1ctl.c10
1 files changed, 0 insertions, 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];