summaryrefslogtreecommitdiffstats
path: root/src/host/trxcon/l1ctl.c
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2017-07-28 15:15:05 +0600
committerVadim Yanitskiy <axilirator@gmail.com>2017-11-19 17:35:07 +0700
commit075c1ad738d66e536f93977969c432b709f4c350 (patch)
tree7508c66b43f2704409992a37e4e4215ba3a0d06f /src/host/trxcon/l1ctl.c
parent6aa6690277e4a1551ed6c6b8482e513253d6865b (diff)
host/trxcon/scheduler: git rid of sched_trx_find_ts()
After simplification of timeslot management API this function does not make sense. Change-Id: I2fc0c68d784c8f01e1452bc46f8e1eaac2917656
Diffstat (limited to 'src/host/trxcon/l1ctl.c')
-rw-r--r--src/host/trxcon/l1ctl.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/host/trxcon/l1ctl.c b/src/host/trxcon/l1ctl.c
index f9c1cade..b6bc404a 100644
--- a/src/host/trxcon/l1ctl.c
+++ b/src/host/trxcon/l1ctl.c
@@ -453,7 +453,7 @@ static int l1ctl_rx_rach_req(struct l1ctl_link *l1l, struct msgb *msg)
"(offset=%u ra=0x%02x)\n", req->offset, req->ra);
/* FIXME: can we use other than TS0? */
- ts = sched_trx_find_ts(l1l->trx, 0);
+ ts = l1l->trx->ts_list[0];
if (ts == NULL) {
LOGP(DL1C, LOGL_DEBUG, "Couldn't send RACH: "
"TS0 is not active\n");
@@ -539,14 +539,12 @@ static int l1ctl_rx_dm_est_req(struct l1ctl_link *l1l, struct msgb *msg)
/* Configure requested TS */
rc = sched_trx_configure_ts(l1l->trx, tn, config);
+ ts = l1l->trx->ts_list[tn];
if (rc) {
rc = -EINVAL;
goto exit;
}
- /* Find just configured TS */
- ts = sched_trx_find_ts(l1l->trx, tn);
-
/* Activate only requested lchan, disabling others */
sched_trx_deactivate_all_lchans(ts);
rc = sched_trx_activate_lchan(ts, lchan_type);
@@ -606,10 +604,10 @@ static int l1ctl_rx_data_req(struct l1ctl_link *l1l, struct msgb *msg)
goto exit;
}
- /* Attempt to find required TS */
- ts = sched_trx_find_ts(l1l->trx, tn);
- if (ts == NULL) {
- LOGP(DL1C, LOGL_DEBUG, "Couldn't find required TS\n");
+ /* Check whether required timeslot is allocated and configured */
+ ts = l1l->trx->ts_list[tn];
+ if (ts == NULL || ts->mf_layout == NULL) {
+ LOGP(DL1C, LOGL_ERROR, "Timeslot %u isn't configured\n", tn);
rc = -EINVAL;
goto exit;
}