trxcon: cosmetic: s/ts_list/ts/ in struct l1sched_state

Change-Id: I182b2a3ae1dcb1671aaaed9394cdfea34f7966a9
This commit is contained in:
Vadim Yanitskiy 2022-07-16 04:33:03 +07:00
parent 43cd9f270d
commit c4aa60317d
4 changed files with 17 additions and 17 deletions

View File

@ -363,7 +363,7 @@ struct l1sched_state {
/*! Frame callback */ /*! Frame callback */
void (*clock_cb)(struct l1sched_state *sched); void (*clock_cb)(struct l1sched_state *sched);
/*! List of timeslots maintained by this scheduler */ /*! List of timeslots maintained by this scheduler */
struct l1sched_ts *ts_list[TRX_TS_COUNT]; struct l1sched_ts *ts[TRX_TS_COUNT];
/*! BSIC value learned from SCH bursts */ /*! BSIC value learned from SCH bursts */
uint8_t bsic; uint8_t bsic;
}; };

View File

@ -482,7 +482,7 @@ static int l1ctl_rx_ccch_mode_req(struct l1ctl_link *l1l, struct msgb *msg)
req->ccch_mode); /* TODO: add value-string for ccch_mode */ req->ccch_mode); /* TODO: add value-string for ccch_mode */
/* Make sure that TS0 is allocated and configured */ /* Make sure that TS0 is allocated and configured */
ts = l1l->sched->ts_list[0]; ts = l1l->sched->ts[0];
if (ts == NULL || ts->mf_layout == NULL) { if (ts == NULL || ts->mf_layout == NULL) {
LOGP(DL1C, LOGL_ERROR, "TS0 is not configured"); LOGP(DL1C, LOGL_ERROR, "TS0 is not configured");
rc = -EINVAL; rc = -EINVAL;
@ -659,7 +659,7 @@ static int l1ctl_rx_dm_est_req(struct l1ctl_link *l1l, struct msgb *msg)
/* Configure requested TS */ /* Configure requested TS */
rc = l1sched_configure_ts(l1l->sched, tn, config); rc = l1sched_configure_ts(l1l->sched, tn, config);
ts = l1l->sched->ts_list[tn]; ts = l1l->sched->ts[tn];
if (rc) { if (rc) {
rc = -EINVAL; rc = -EINVAL;
goto exit; goto exit;
@ -767,7 +767,7 @@ static int l1ctl_rx_tch_mode_req(struct l1ctl_link *l1l, struct msgb *msg)
/* Iterate over timeslot list */ /* Iterate over timeslot list */
for (i = 0; i < TRX_TS_COUNT; i++) { for (i = 0; i < TRX_TS_COUNT; i++) {
/* Timeslot is not allocated */ /* Timeslot is not allocated */
ts = l1l->sched->ts_list[i]; ts = l1l->sched->ts[i];
if (ts == NULL) if (ts == NULL)
continue; continue;
@ -813,7 +813,7 @@ static int l1ctl_rx_crypto_req(struct l1ctl_link *l1l, struct msgb *msg)
tn = ul->chan_nr & 0x7; tn = ul->chan_nr & 0x7;
/* Make sure that required TS is allocated and configured */ /* Make sure that required TS is allocated and configured */
ts = l1l->sched->ts_list[tn]; ts = l1l->sched->ts[tn];
if (ts == NULL || ts->mf_layout == NULL) { if (ts == NULL || ts->mf_layout == NULL) {
LOGP(DL1C, LOGL_ERROR, "TS %u is not configured\n", tn); LOGP(DL1C, LOGL_ERROR, "TS %u is not configured\n", tn);
rc = -EINVAL; rc = -EINVAL;

View File

@ -98,7 +98,7 @@ struct l1sched_ts_prim *l1sched_prim_push(struct l1sched_state *sched,
tn = chan_nr & 0x7; tn = chan_nr & 0x7;
/* Check whether required timeslot is allocated and configured */ /* Check whether required timeslot is allocated and configured */
ts = sched->ts_list[tn]; ts = sched->ts[tn];
if (ts == NULL || ts->mf_layout == NULL) { if (ts == NULL || ts->mf_layout == NULL) {
LOGP(DSCH, LOGL_ERROR, "Timeslot %u isn't configured\n", tn); LOGP(DSCH, LOGL_ERROR, "Timeslot %u isn't configured\n", tn);
return NULL; return NULL;

View File

@ -78,7 +78,7 @@ static void sched_frame_clck_cb(struct l1sched_state *sched)
}; };
/* Timeslot is not allocated */ /* Timeslot is not allocated */
ts = sched->ts_list[i]; ts = sched->ts[i];
if (ts == NULL) if (ts == NULL)
continue; continue;
@ -208,18 +208,18 @@ void l1sched_reset(struct l1sched_state *sched, bool reset_clock)
struct l1sched_ts *l1sched_add_ts(struct l1sched_state *sched, int tn) struct l1sched_ts *l1sched_add_ts(struct l1sched_state *sched, int tn)
{ {
/* Make sure that ts isn't allocated yet */ /* Make sure that ts isn't allocated yet */
if (sched->ts_list[tn] != NULL) { if (sched->ts[tn] != NULL) {
LOGP(DSCH, LOGL_ERROR, "Timeslot #%u already allocated\n", tn); LOGP(DSCH, LOGL_ERROR, "Timeslot #%u already allocated\n", tn);
return NULL; return NULL;
} }
LOGP(DSCH, LOGL_NOTICE, "Add a new TDMA timeslot #%u\n", tn); LOGP(DSCH, LOGL_NOTICE, "Add a new TDMA timeslot #%u\n", tn);
sched->ts_list[tn] = talloc_zero(sched, struct l1sched_ts); sched->ts[tn] = talloc_zero(sched, struct l1sched_ts);
sched->ts_list[tn]->sched = sched; sched->ts[tn]->sched = sched;
sched->ts_list[tn]->index = tn; sched->ts[tn]->index = tn;
return sched->ts_list[tn]; return sched->ts[tn];
} }
void l1sched_del_ts(struct l1sched_state *sched, int tn) void l1sched_del_ts(struct l1sched_state *sched, int tn)
@ -228,7 +228,7 @@ void l1sched_del_ts(struct l1sched_state *sched, int tn)
struct l1sched_ts *ts; struct l1sched_ts *ts;
/* Find ts in list */ /* Find ts in list */
ts = sched->ts_list[tn]; ts = sched->ts[tn];
if (ts == NULL) if (ts == NULL)
return; return;
@ -247,7 +247,7 @@ void l1sched_del_ts(struct l1sched_state *sched, int tn)
l1sched_prim_flush_queue(&ts->tx_prims); l1sched_prim_flush_queue(&ts->tx_prims);
/* Remove ts from list and free memory */ /* Remove ts from list and free memory */
sched->ts_list[tn] = NULL; sched->ts[tn] = NULL;
talloc_free(ts); talloc_free(ts);
/* Notify transceiver about that */ /* Notify transceiver about that */
@ -265,7 +265,7 @@ int l1sched_configure_ts(struct l1sched_state *sched, int tn,
struct l1sched_ts *ts; struct l1sched_ts *ts;
/* Try to find specified ts */ /* Try to find specified ts */
ts = sched->ts_list[tn]; ts = sched->ts[tn];
if (ts != NULL) { if (ts != NULL) {
/* Reconfiguration of existing one */ /* Reconfiguration of existing one */
l1sched_reset_ts(sched, tn); l1sched_reset_ts(sched, tn);
@ -327,7 +327,7 @@ int l1sched_reset_ts(struct l1sched_state *sched, int tn)
struct l1sched_ts *ts; struct l1sched_ts *ts;
/* Try to find specified ts */ /* Try to find specified ts */
ts = sched->ts_list[tn]; ts = sched->ts[tn];
if (ts == NULL) if (ts == NULL)
return -EINVAL; return -EINVAL;
@ -719,7 +719,7 @@ int l1sched_handle_rx_burst(struct l1sched_state *sched, uint8_t tn,
int rc; int rc;
/* Check whether required timeslot is allocated and configured */ /* Check whether required timeslot is allocated and configured */
ts = sched->ts_list[tn]; ts = sched->ts[tn];
if (ts == NULL || ts->mf_layout == NULL) { if (ts == NULL || ts->mf_layout == NULL) {
LOGP(DSCHD, LOGL_DEBUG, "TDMA timeslot #%u isn't configured, " LOGP(DSCHD, LOGL_DEBUG, "TDMA timeslot #%u isn't configured, "
"ignoring burst...\n", tn); "ignoring burst...\n", tn);