aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVadim Yanitskiy <vyanitskiy@sysmocom.de>2021-05-21 19:59:00 +0200
committerlaforge <laforge@osmocom.org>2021-05-23 10:09:27 +0000
commitd7323d6f1f78ec1bd4c2838257395d47e54e932a (patch)
treeebe4983b2331549b71e76701f22d6027caa0d8d7
parente24279508d41a52eb2cc8620467f7bd8b777c63e (diff)
[VAMOS] common: make 'struct gsm_bts_trx_ts' pointers const
-rw-r--r--include/osmo-bts/gsm_data.h6
-rw-r--r--src/common/gsm_data.c8
2 files changed, 7 insertions, 7 deletions
diff --git a/include/osmo-bts/gsm_data.h b/include/osmo-bts/gsm_data.h
index be180075..50ee88ea 100644
--- a/include/osmo-bts/gsm_data.h
+++ b/include/osmo-bts/gsm_data.h
@@ -526,9 +526,9 @@ uint8_t gsm_ts_tsc(const struct gsm_bts_trx_ts *ts);
struct gsm_lchan *rsl_lchan_lookup(struct gsm_bts_trx *trx, uint8_t chan_nr,
int *rc);
-enum gsm_phys_chan_config ts_pchan(struct gsm_bts_trx_ts *ts);
-uint8_t ts_subslots(struct gsm_bts_trx_ts *ts);
-bool ts_is_tch(struct gsm_bts_trx_ts *ts);
+enum gsm_phys_chan_config ts_pchan(const struct gsm_bts_trx_ts *ts);
+uint8_t ts_subslots(const struct gsm_bts_trx_ts *ts);
+bool ts_is_tch(const struct gsm_bts_trx_ts *ts);
int lchan2ecu_codec(const struct gsm_lchan *lchan);
diff --git a/src/common/gsm_data.c b/src/common/gsm_data.c
index 7cf48bfd..f1097225 100644
--- a/src/common/gsm_data.c
+++ b/src/common/gsm_data.c
@@ -352,7 +352,7 @@ static const uint8_t subslots_per_pchan[] = {
};
/*! Return the actual pchan type, also heeding dynamic TS. */
-enum gsm_phys_chan_config ts_pchan(struct gsm_bts_trx_ts *ts)
+enum gsm_phys_chan_config ts_pchan(const struct gsm_bts_trx_ts *ts)
{
switch (ts->pchan) {
case GSM_PCHAN_TCH_F_TCH_H_PDCH:
@@ -369,7 +369,7 @@ enum gsm_phys_chan_config ts_pchan(struct gsm_bts_trx_ts *ts)
/*! According to ts->pchan and possibly ts->dyn_pchan, return the number of
* logical channels available in the timeslot. */
-uint8_t ts_subslots(struct gsm_bts_trx_ts *ts)
+uint8_t ts_subslots(const struct gsm_bts_trx_ts *ts)
{
return subslots_per_pchan[ts_pchan(ts)];
}
@@ -385,7 +385,7 @@ static bool pchan_is_tch(enum gsm_phys_chan_config pchan)
}
}
-bool ts_is_tch(struct gsm_bts_trx_ts *ts)
+bool ts_is_tch(const struct gsm_bts_trx_ts *ts)
{
return pchan_is_tch(ts_pchan(ts));
}
@@ -403,7 +403,7 @@ const struct value_string lchan_ciph_state_names[] = {
/* determine the ECU codec constant for the codec used by given lchan */
int lchan2ecu_codec(const struct gsm_lchan *lchan)
{
- struct gsm_bts_trx_ts *ts = lchan->ts;
+ const struct gsm_bts_trx_ts *ts = lchan->ts;
switch (lchan->tch_mode) {
case GSM48_CMODE_SPEECH_V1: