From c4aa60317d428a72ab1d64f643354121c2e10348 Mon Sep 17 00:00:00 2001 From: Vadim Yanitskiy Date: Sat, 16 Jul 2022 04:33:03 +0700 Subject: [PATCH] trxcon: cosmetic: s/ts_list/ts/ in struct l1sched_state Change-Id: I182b2a3ae1dcb1671aaaed9394cdfea34f7966a9 --- .../include/osmocom/bb/trxcon/l1sched.h | 2 +- src/host/trxcon/src/l1ctl.c | 8 +++---- src/host/trxcon/src/sched_prim.c | 2 +- src/host/trxcon/src/sched_trx.c | 22 +++++++++---------- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/l1sched.h b/src/host/trxcon/include/osmocom/bb/trxcon/l1sched.h index ae0bf9cf9..7b96f6d27 100644 --- a/src/host/trxcon/include/osmocom/bb/trxcon/l1sched.h +++ b/src/host/trxcon/include/osmocom/bb/trxcon/l1sched.h @@ -363,7 +363,7 @@ struct l1sched_state { /*! Frame callback */ void (*clock_cb)(struct l1sched_state *sched); /*! 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 */ uint8_t bsic; }; diff --git a/src/host/trxcon/src/l1ctl.c b/src/host/trxcon/src/l1ctl.c index 526772bc7..fb8a20320 100644 --- a/src/host/trxcon/src/l1ctl.c +++ b/src/host/trxcon/src/l1ctl.c @@ -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 */ /* 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) { LOGP(DL1C, LOGL_ERROR, "TS0 is not configured"); rc = -EINVAL; @@ -659,7 +659,7 @@ static int l1ctl_rx_dm_est_req(struct l1ctl_link *l1l, struct msgb *msg) /* Configure requested TS */ rc = l1sched_configure_ts(l1l->sched, tn, config); - ts = l1l->sched->ts_list[tn]; + ts = l1l->sched->ts[tn]; if (rc) { rc = -EINVAL; goto exit; @@ -767,7 +767,7 @@ static int l1ctl_rx_tch_mode_req(struct l1ctl_link *l1l, struct msgb *msg) /* Iterate over timeslot list */ for (i = 0; i < TRX_TS_COUNT; i++) { /* Timeslot is not allocated */ - ts = l1l->sched->ts_list[i]; + ts = l1l->sched->ts[i]; if (ts == NULL) continue; @@ -813,7 +813,7 @@ static int l1ctl_rx_crypto_req(struct l1ctl_link *l1l, struct msgb *msg) tn = ul->chan_nr & 0x7; /* 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) { LOGP(DL1C, LOGL_ERROR, "TS %u is not configured\n", tn); rc = -EINVAL; diff --git a/src/host/trxcon/src/sched_prim.c b/src/host/trxcon/src/sched_prim.c index 17d0141c6..bcc9bce5f 100644 --- a/src/host/trxcon/src/sched_prim.c +++ b/src/host/trxcon/src/sched_prim.c @@ -98,7 +98,7 @@ struct l1sched_ts_prim *l1sched_prim_push(struct l1sched_state *sched, tn = chan_nr & 0x7; /* Check whether required timeslot is allocated and configured */ - ts = sched->ts_list[tn]; + ts = sched->ts[tn]; if (ts == NULL || ts->mf_layout == NULL) { LOGP(DSCH, LOGL_ERROR, "Timeslot %u isn't configured\n", tn); return NULL; diff --git a/src/host/trxcon/src/sched_trx.c b/src/host/trxcon/src/sched_trx.c index 55b5ed5cf..556ebcc29 100644 --- a/src/host/trxcon/src/sched_trx.c +++ b/src/host/trxcon/src/sched_trx.c @@ -78,7 +78,7 @@ static void sched_frame_clck_cb(struct l1sched_state *sched) }; /* Timeslot is not allocated */ - ts = sched->ts_list[i]; + ts = sched->ts[i]; if (ts == NULL) 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) { /* 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); return NULL; } LOGP(DSCH, LOGL_NOTICE, "Add a new TDMA timeslot #%u\n", tn); - sched->ts_list[tn] = talloc_zero(sched, struct l1sched_ts); - sched->ts_list[tn]->sched = sched; - sched->ts_list[tn]->index = tn; + sched->ts[tn] = talloc_zero(sched, struct l1sched_ts); + sched->ts[tn]->sched = sched; + sched->ts[tn]->index = tn; - return sched->ts_list[tn]; + return sched->ts[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; /* Find ts in list */ - ts = sched->ts_list[tn]; + ts = sched->ts[tn]; if (ts == NULL) return; @@ -247,7 +247,7 @@ void l1sched_del_ts(struct l1sched_state *sched, int tn) l1sched_prim_flush_queue(&ts->tx_prims); /* Remove ts from list and free memory */ - sched->ts_list[tn] = NULL; + sched->ts[tn] = NULL; talloc_free(ts); /* Notify transceiver about that */ @@ -265,7 +265,7 @@ int l1sched_configure_ts(struct l1sched_state *sched, int tn, struct l1sched_ts *ts; /* Try to find specified ts */ - ts = sched->ts_list[tn]; + ts = sched->ts[tn]; if (ts != NULL) { /* Reconfiguration of existing one */ l1sched_reset_ts(sched, tn); @@ -327,7 +327,7 @@ int l1sched_reset_ts(struct l1sched_state *sched, int tn) struct l1sched_ts *ts; /* Try to find specified ts */ - ts = sched->ts_list[tn]; + ts = sched->ts[tn]; if (ts == NULL) return -EINVAL; @@ -719,7 +719,7 @@ int l1sched_handle_rx_burst(struct l1sched_state *sched, uint8_t tn, int rc; /* Check whether required timeslot is allocated and configured */ - ts = sched->ts_list[tn]; + ts = sched->ts[tn]; if (ts == NULL || ts->mf_layout == NULL) { LOGP(DSCHD, LOGL_DEBUG, "TDMA timeslot #%u isn't configured, " "ignoring burst...\n", tn);