diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2021-08-07 03:32:45 +0200 |
---|---|---|
committer | neels <nhofmeyr@sysmocom.de> | 2021-08-16 00:12:12 +0000 |
commit | 57af76cdcf4a066a1db25855e675cc5eecb21d43 (patch) | |
tree | 5ece3f6d248e0cc5972c7b2184d28c4f513b8491 /include/osmocom | |
parent | cd6f44c8f1150c7cc4bcead865ebe2838f8232cc (diff) |
introduce gsm48_lchan_and_pchan2chan_desc()
The function gsm48_lchan2chan_desc_as_configured() dups
gsm48_lchan2chan_desc() with merely a different pchan type
(ts->pchan_from_config instead of ts->pchan_is).
In an upcoming patch, I would like to do the same, just with yet another
pchan value (derived from lchan->type, because that reflects the channel
type even before a dynamic timeslot switched its pchan type).
So replace gsm48_lchan2chan_desc_as_configured() by
gsm48_lchan_and_pchan2chan_desc() with explicit pchan arg;
also call this from gsm48_lchan2chan_desc(), reducing code dup.
gsm48_lchan2chan_desc_as_configured() had more concise error logging.
Absorb that into the new gsm48_lchan_and_pchan2chan_desc().
Add gsm_lchan_and_pchan2chan_nr(), like gsm_lchan2chan_nr() just with
explicit pchan arg, to be able to pass the pchan down from the new
functions mentioned above.
Related: SYS#5559
Change-Id: I67f178c8160cdda1f2ab5513ac4f65c027d4012f
Diffstat (limited to 'include/osmocom')
-rw-r--r-- | include/osmocom/bsc/gsm_data.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 5a20e72d2..31711c7ba 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -1075,12 +1075,15 @@ gsm_objclass2obj(struct gsm_bts *bts, uint8_t obj_class, int gsm_pchan2chan_nr(enum gsm_phys_chan_config pchan, uint8_t ts_nr, uint8_t lchan_nr, bool vamos_is_secondary); int gsm_lchan2chan_nr(const struct gsm_lchan *lchan, bool allow_osmo_cbits); +int gsm_lchan_and_pchan2chan_nr(const struct gsm_lchan *lchan, enum gsm_phys_chan_config pchan, bool allow_osmo_cbits); int gsm48_lchan2chan_desc(struct gsm48_chan_desc *cd, const struct gsm_lchan *lchan, uint8_t tsc, bool allow_osmo_cbits); -int gsm48_lchan2chan_desc_as_configured(struct gsm48_chan_desc *cd, const struct gsm_lchan *lchan, - uint8_t tsc); +int gsm48_lchan_and_pchan2chan_desc(struct gsm48_chan_desc *cd, + const struct gsm_lchan *lchan, + enum gsm_phys_chan_config pchan, + uint8_t tsc, bool allow_osmo_cbits); uint8_t gsm_ts_tsc(const struct gsm_bts_trx_ts *ts); |