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
This commit is contained in:
parent
6aa6690277
commit
075c1ad738
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue