summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <axilirator@gmail.com>2020-03-04 21:36:12 +0700
committerlaforge <laforge@osmocom.org>2020-03-16 10:32:42 +0000
commitf5fa7dbd1973a2ae3b10ec8977c8ea99b63532d6 (patch)
tree0b9f6e8d4f35ae3c8a4de3f78d9443d6de21ae4f
parent431dcd00f04787c072c957e4781e19a46946567d (diff)
trxcon/scheduler: constify Downlink burst bits where possible
-rw-r--r--src/host/trxcon/sched_lchan_desc.c10
-rw-r--r--src/host/trxcon/sched_lchan_pdtch.c2
-rw-r--r--src/host/trxcon/sched_lchan_sch.c2
-rw-r--r--src/host/trxcon/sched_lchan_tchf.c2
-rw-r--r--src/host/trxcon/sched_lchan_tchh.c2
-rw-r--r--src/host/trxcon/sched_lchan_xcch.c2
-rw-r--r--src/host/trxcon/sched_trx.c3
-rw-r--r--src/host/trxcon/sched_trx.h2
8 files changed, 12 insertions, 13 deletions
diff --git a/src/host/trxcon/sched_lchan_desc.c b/src/host/trxcon/sched_lchan_desc.c
index 1184e5be..2c3c3b2e 100644
--- a/src/host/trxcon/sched_lchan_desc.c
+++ b/src/host/trxcon/sched_lchan_desc.c
@@ -31,35 +31,35 @@
/* Forward declaration of handlers */
int rx_data_fn(struct trx_instance *trx, struct trx_ts *ts,
struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid,
- sbit_t *bits, const struct trx_meas_set *meas);
+ const sbit_t *bits, const struct trx_meas_set *meas);
int tx_data_fn(struct trx_instance *trx, struct trx_ts *ts,
struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid);
int rx_sch_fn(struct trx_instance *trx, struct trx_ts *ts,
struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid,
- sbit_t *bits, const struct trx_meas_set *meas);
+ const sbit_t *bits, const struct trx_meas_set *meas);
int tx_rach_fn(struct trx_instance *trx, struct trx_ts *ts,
struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid);
int rx_tchf_fn(struct trx_instance *trx, struct trx_ts *ts,
struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid,
- sbit_t *bits, const struct trx_meas_set *meas);
+ const sbit_t *bits, const struct trx_meas_set *meas);
int tx_tchf_fn(struct trx_instance *trx, struct trx_ts *ts,
struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid);
int rx_tchh_fn(struct trx_instance *trx, struct trx_ts *ts,
struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid,
- sbit_t *bits, const struct trx_meas_set *meas);
+ const sbit_t *bits, const struct trx_meas_set *meas);
int tx_tchh_fn(struct trx_instance *trx, struct trx_ts *ts,
struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid);
int rx_pdtch_fn(struct trx_instance *trx, struct trx_ts *ts,
struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid,
- sbit_t *bits, const struct trx_meas_set *meas);
+ const sbit_t *bits, const struct trx_meas_set *meas);
int tx_pdtch_fn(struct trx_instance *trx, struct trx_ts *ts,
struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid);
diff --git a/src/host/trxcon/sched_lchan_pdtch.c b/src/host/trxcon/sched_lchan_pdtch.c
index b625d2f7..d965daa0 100644
--- a/src/host/trxcon/sched_lchan_pdtch.c
+++ b/src/host/trxcon/sched_lchan_pdtch.c
@@ -42,7 +42,7 @@
int rx_pdtch_fn(struct trx_instance *trx, struct trx_ts *ts,
struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid,
- sbit_t *bits, const struct trx_meas_set *meas)
+ const sbit_t *bits, const struct trx_meas_set *meas)
{
const struct trx_lchan_desc *lchan_desc;
uint8_t l2[GPRS_L2_MAX_LEN], *mask;
diff --git a/src/host/trxcon/sched_lchan_sch.c b/src/host/trxcon/sched_lchan_sch.c
index 17f68b0b..18d4c58d 100644
--- a/src/host/trxcon/sched_lchan_sch.c
+++ b/src/host/trxcon/sched_lchan_sch.c
@@ -70,7 +70,7 @@ static void decode_sb(struct gsm_time *time, uint8_t *bsic, uint8_t *sb_info)
int rx_sch_fn(struct trx_instance *trx, struct trx_ts *ts,
struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid,
- sbit_t *bits, const struct trx_meas_set *meas)
+ const sbit_t *bits, const struct trx_meas_set *meas)
{
sbit_t payload[2 * 39];
struct gsm_time time;
diff --git a/src/host/trxcon/sched_lchan_tchf.c b/src/host/trxcon/sched_lchan_tchf.c
index 595101f5..198d25fc 100644
--- a/src/host/trxcon/sched_lchan_tchf.c
+++ b/src/host/trxcon/sched_lchan_tchf.c
@@ -44,7 +44,7 @@
int rx_tchf_fn(struct trx_instance *trx, struct trx_ts *ts,
struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid,
- sbit_t *bits, const struct trx_meas_set *meas)
+ const sbit_t *bits, const struct trx_meas_set *meas)
{
const struct trx_lchan_desc *lchan_desc;
int n_errors = -1, n_bits_total, rc;
diff --git a/src/host/trxcon/sched_lchan_tchh.c b/src/host/trxcon/sched_lchan_tchh.c
index f8229939..5edbfcda 100644
--- a/src/host/trxcon/sched_lchan_tchh.c
+++ b/src/host/trxcon/sched_lchan_tchh.c
@@ -200,7 +200,7 @@ uint32_t sched_tchh_block_dl_first_fn(enum trx_lchan_type chan,
int rx_tchh_fn(struct trx_instance *trx, struct trx_ts *ts,
struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid,
- sbit_t *bits, const struct trx_meas_set *meas)
+ const sbit_t *bits, const struct trx_meas_set *meas)
{
const struct trx_lchan_desc *lchan_desc;
int n_errors = -1, n_bits_total, rc;
diff --git a/src/host/trxcon/sched_lchan_xcch.c b/src/host/trxcon/sched_lchan_xcch.c
index cc14d2f0..0818e209 100644
--- a/src/host/trxcon/sched_lchan_xcch.c
+++ b/src/host/trxcon/sched_lchan_xcch.c
@@ -42,7 +42,7 @@
int rx_data_fn(struct trx_instance *trx, struct trx_ts *ts,
struct trx_lchan_state *lchan, uint32_t fn, uint8_t bid,
- sbit_t *bits, const struct trx_meas_set *meas)
+ const sbit_t *bits, const struct trx_meas_set *meas)
{
const struct trx_lchan_desc *lchan_desc;
uint8_t l2[GSM_MACBLOCK_LEN], *mask;
diff --git a/src/host/trxcon/sched_trx.c b/src/host/trxcon/sched_trx.c
index ba75b6f7..1efae247 100644
--- a/src/host/trxcon/sched_trx.c
+++ b/src/host/trxcon/sched_trx.c
@@ -637,8 +637,7 @@ static int subst_frame_loss(struct trx_lchan_state *lchan,
return -EIO;
}
- /* TODO: make bits constant */
- static sbit_t bits[148] = { 0 };
+ static const sbit_t bits[148] = { 0 };
struct trx_meas_set fake_meas = {
.fn = lchan->tdma.last_proc,
.rssi = -120,
diff --git a/src/host/trxcon/sched_trx.h b/src/host/trxcon/sched_trx.h
index cf63df16..fb7ecd49 100644
--- a/src/host/trxcon/sched_trx.h
+++ b/src/host/trxcon/sched_trx.h
@@ -99,7 +99,7 @@ enum trx_lchan_type {
typedef int trx_lchan_rx_func(struct trx_instance *trx,
struct trx_ts *ts, struct trx_lchan_state *lchan,
- uint32_t fn, uint8_t bid, sbit_t *bits,
+ uint32_t fn, uint8_t bid, const sbit_t *bits,
const struct trx_meas_set *meas);
typedef int trx_lchan_tx_func(struct trx_instance *trx,