From d384110d3d09e06658d5ca2d5c63dc78dd656b91 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Mon, 18 Jul 2016 23:43:44 +0200 Subject: dyn TS: gsm_lchan2chan_nr(): decouple from ts->pchan For upcoming dynamic TS, the pchan choice for RSL De-/Activation is not trivial. So in order to pass the desired pchan to generate the RSL chan_nr, introduce gsm_lchan_as_pchan2chan_nr(). To avoid code dup, this requires decoupling the gsm_ts2chan_nr() pchan from the actual ts struct, so refactor gsm_ts2chan_nr() to gsm_pchan2chan_nr() with explicit pchan, ts_nr and lchan_nr arguments. Change-Id: I1a40e8452fe8120d350a27973e56be0b8c8c517f --- openbsc/include/openbsc/gsm_data_shared.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'openbsc/include') diff --git a/openbsc/include/openbsc/gsm_data_shared.h b/openbsc/include/openbsc/gsm_data_shared.h index f4da7a7ab..b4ff0a43b 100644 --- a/openbsc/include/openbsc/gsm_data_shared.h +++ b/openbsc/include/openbsc/gsm_data_shared.h @@ -825,8 +825,11 @@ gsm_objclass2obj(struct gsm_bts *bts, uint8_t obj_class, /* reset the state of all MO in the BTS */ void gsm_bts_mo_reset(struct gsm_bts *bts); -uint8_t gsm_ts2chan_nr(const struct gsm_bts_trx_ts *ts, uint8_t lchan_nr); +uint8_t gsm_pchan2chan_nr(enum gsm_phys_chan_config pchan, + uint8_t ts_nr, uint8_t lchan_nr); uint8_t gsm_lchan2chan_nr(const struct gsm_lchan *lchan); +uint8_t gsm_lchan_as_pchan2chan_nr(const struct gsm_lchan *lchan, + enum gsm_phys_chan_config as_pchan); /* return the gsm_lchan for the CBCH (if it exists at all) */ struct gsm_lchan *gsm_bts_get_cbch(struct gsm_bts *bts); -- cgit v1.2.3