This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
Vadim Yanitskiy gerrit-no-reply at lists.osmocom.orgVadim Yanitskiy has uploaded this change for review. ( https://gerrit.osmocom.org/11255 Change subject: layer23/l23sap.c: add Osmocom specific cbits for CBCH ...................................................................... layer23/l23sap.c: add Osmocom specific cbits for CBCH CBCH logical channel is a bit similar to FACCH as there is no way to indicate that it's exactly CBCH and not just a regular SDCCH. There is nothing about CBCH stated in GSM 08.58, Chapter 9.3.1. This change introduces Osmocom specific extensions for that. Change-Id: I35e454c825481e6a390485ee042e384b31a08bf4 --- M src/host/layer23/src/common/l23sap.c 1 file changed, 31 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/55/11255/1 diff --git a/src/host/layer23/src/common/l23sap.c b/src/host/layer23/src/common/l23sap.c index 4560d23..fde5514 100644 --- a/src/host/layer23/src/common/l23sap.c +++ b/src/host/layer23/src/common/l23sap.c @@ -49,6 +49,30 @@ extern struct gsmtap_inst *gsmtap_inst; +/* Decoder for Osmocom specific chan_nr / link_id values (e.g. CBCH) */ +static int l23sap_dec_chan_nr_ext(uint8_t chan_nr, uint8_t link_id, + uint8_t *chan_type, uint8_t *chan_ts, uint8_t *chan_ss, + uint8_t *gsmtap_chan_type) +{ + uint8_t cbits = (chan_nr >> 3); + + if ((cbits & 0x1f) == 0x18) { + *chan_type = GSMTAP_CHANNEL_SDCCH4; + *chan_ss = 2; + if (gsmtap_chan_type) + *gsmtap_chan_type = GSMTAP_CHANNEL_CBCH51; + } else if ((cbits & 0x1f) == 0x19) { + *chan_type = GSMTAP_CHANNEL_SDCCH8; + if (gsmtap_chan_type) + *gsmtap_chan_type = GSMTAP_CHANNEL_CBCH51; + } else { + return -ENODEV; + } + + *chan_ts = chan_nr & 0x07; + return 0; +} + /* Safe wrapper around rsl_dec_chan_nr() */ static int l23sap_dec_chan_nr(uint8_t chan_nr, uint8_t link_id, uint8_t *chan_type, uint8_t *chan_ts, uint8_t *chan_ss, @@ -56,6 +80,13 @@ { int rc; + /* Attempt to decode Osmocom specific extensions */ + rc = l23sap_dec_chan_nr_ext(chan_nr, link_id, + chan_type, chan_ts, chan_ss, gsmtap_chan_type); + if (!rc) /* Successful decoding */ + return 0; + + /* Attempt to decode according to the specs */ rc = rsl_dec_chan_nr(chan_nr, chan_type, chan_ss, chan_ts); if (rc) { LOGP(DL23SAP, LOGL_ERROR, "Failed to decode logical channel " -- To view, visit https://gerrit.osmocom.org/11255 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I35e454c825481e6a390485ee042e384b31a08bf4 Gerrit-Change-Number: 11255 Gerrit-PatchSet: 1 Gerrit-Owner: Vadim Yanitskiy <axilirator at gmail.com> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181006/83d76cc5/attachment.htm>