diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2017-07-28 15:15:05 +0600 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2017-11-19 17:35:07 +0700 |
commit | 075c1ad738d66e536f93977969c432b709f4c350 (patch) | |
tree | 7508c66b43f2704409992a37e4e4215ba3a0d06f | |
parent | 6aa6690277e4a1551ed6c6b8482e513253d6865b (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
-rw-r--r-- | src/host/trxcon/l1ctl.c | 14 | ||||
-rw-r--r-- | src/host/trxcon/sched_trx.c | 8 | ||||
-rw-r--r-- | src/host/trxcon/sched_trx.h | 1 |
3 files changed, 7 insertions, 16 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; } diff --git a/src/host/trxcon/sched_trx.c b/src/host/trxcon/sched_trx.c index cf05bb66..b5f1abca 100644 --- a/src/host/trxcon/sched_trx.c +++ b/src/host/trxcon/sched_trx.c @@ -173,12 +173,6 @@ struct trx_ts *sched_trx_add_ts(struct trx_instance *trx, int tn) return trx->ts_list[tn]; } -/* FIXME: one kept here for compatibility reasons */ -struct trx_ts *sched_trx_find_ts(struct trx_instance *trx, int tn) -{ - return trx->ts_list[tn]; -} - void sched_trx_del_ts(struct trx_instance *trx, int tn) { struct trx_ts *ts; @@ -424,7 +418,7 @@ int sched_trx_handle_rx_burst(struct trx_instance *trx, uint8_t tn, uint8_t offset, bid; /* Check whether required timeslot is allocated and configured */ - ts = sched_trx_find_ts(trx, tn); + ts = trx->ts_list[tn]; if (ts == NULL || ts->mf_layout == NULL) { LOGP(DSCH, LOGL_DEBUG, "TDMA timeslot #%u isn't configured, " "ignoring burst...\n", tn); diff --git a/src/host/trxcon/sched_trx.h b/src/host/trxcon/sched_trx.h index 42953b3d..ad2c569d 100644 --- a/src/host/trxcon/sched_trx.h +++ b/src/host/trxcon/sched_trx.h @@ -251,7 +251,6 @@ int sched_trx_shutdown(struct trx_instance *trx); /* Timeslot management functions */ struct trx_ts *sched_trx_add_ts(struct trx_instance *trx, int ts_num); -struct trx_ts *sched_trx_find_ts(struct trx_instance *trx, int ts_num); void sched_trx_del_ts(struct trx_instance *trx, int ts_num); int sched_trx_reset_ts(struct trx_instance *trx, int ts_num); int sched_trx_configure_ts(struct trx_instance *trx, int ts_num, |