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/.
fixeria gerrit-no-reply at lists.osmocom.orgfixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/24339 ) Change subject: [VAMOS] rsl_rx_mode_modif(): handle Channel Identification IE ...................................................................... [VAMOS] rsl_rx_mode_modif(): handle Channel Identification IE For some reason, handling of the Channel Identification IE was done in l1sap_chan_act(). This function is being called on reciept of the CHANnel ACTIVation message, but not on MODE MODIFY. Change-Id: I07f95e69e6230a1daca62cc0a7c64954f191fa8a Related: SYS#5315, OS#4940 --- M src/common/l1sap.c M src/common/rsl.c 2 files changed, 32 insertions(+), 17 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/39/24339/1 diff --git a/src/common/l1sap.c b/src/common/l1sap.c index 45abe4e..a47f653 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1962,27 +1962,10 @@ int l1sap_chan_act(struct gsm_bts_trx *trx, uint8_t chan_nr, struct tlv_parsed *tp) { struct gsm_lchan *lchan = get_lchan_by_chan_nr(trx, chan_nr); - const struct gsm48_chan_desc *cd; int rc; LOGPLCHAN(lchan, DL1C, LOGL_INFO, "activating channel %s\n", rsl_chan_nr_str(chan_nr)); - /* osmo-pcu calls this without a valid 'tp' parameter, so we - * need to make sure ew don't crash here */ - if (tp && TLVP_PRES_LEN(tp, RSL_IE_CHAN_IDENT, sizeof(*cd) + 1)) { - /* Channel Description IE comes together with its IEI (see 9.3.5) */ - cd = (const struct gsm48_chan_desc *) (TLVP_VAL(tp, RSL_IE_CHAN_IDENT) + 1); - - /* The PHY may not support using different TSCs */ - if (!osmo_bts_has_feature(trx->bts->features, BTS_FEAT_MULTI_TSC) - && cd->h0.tsc != BTS_TSC(trx->bts)) { - LOGPLCHAN(lchan, DL1C, LOGL_ERROR, "This PHY does not support " - "lchan TSC %u != BSIC-TSC %u, sending NACK\n", - cd->h0.tsc, BTS_TSC(trx->bts)); - return -RSL_ERR_SERV_OPT_UNIMPL; - } - } - lchan->s = trx->bts->radio_link_timeout.current; rc = l1sap_chan_act_dact_modify(trx, chan_nr, PRIM_INFO_ACTIVATE, 0); diff --git a/src/common/rsl.c b/src/common/rsl.c index 1cc7abb..601e5f8 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -230,6 +230,33 @@ return 0; } +/* Handle RSL Channel Identification IE (see section 9.3.5) */ +static int rsl_handle_chan_ident_ie(struct gsm_lchan *lchan, + const struct tlv_parsed *tp, + uint8_t *cause) +{ + const struct gsm_bts_trx_ts *ts = lchan->ts; + const struct gsm_bts *bts = ts->trx->bts; + const struct gsm48_chan_desc *cd; + + if (TLVP_PRES_LEN(tp, RSL_IE_CHAN_IDENT, sizeof(*cd) + 1)) { + /* Channel Description IE comes together with its IEI (see 9.3.5) */ + cd = (const struct gsm48_chan_desc *) (TLVP_VAL(tp, RSL_IE_CHAN_IDENT) + 1); + + /* The PHY may not support using different TSCs */ + if (!osmo_bts_has_feature(bts->features, BTS_FEAT_MULTI_TSC) + && cd->h0.tsc != BTS_TSC(bts)) { + LOGPLCHAN(lchan, DL1C, LOGL_ERROR, "This PHY does not support " + "lchan TSC %u != BSIC-TSC %u, sending NACK\n", + cd->h0.tsc, BTS_TSC(bts)); + *cause = RSL_ERR_SERV_OPT_UNIMPL; + return -ENOTSUP; + } + } + + return 0; +} + /* * support @@ -1445,6 +1472,8 @@ if (type != RSL_ACT_OSMO_PDCH) { if (rsl_handle_chan_mod_ie(lchan, &tp, &cause) != 0) return rsl_tx_chan_act_nack(lchan, cause); + if (rsl_handle_chan_ident_ie(lchan, &tp, &cause) != 0) + return rsl_tx_chan_act_nack(lchan, cause); } /* 9.3.7 Encryption Information */ @@ -1956,6 +1985,9 @@ /* 9.3.6 Channel Mode */ if (rsl_handle_chan_mod_ie(lchan, &tp, &cause) != 0) return rsl_tx_mode_modif_nack(lchan, cause); + /* 9.3.5 Channel Identification */ + if (rsl_handle_chan_ident_ie(lchan, &tp, &cause) != 0) + return rsl_tx_mode_modif_nack(lchan, cause); if (bts_supports_cm(lchan->ts->trx->bts, ts_pchan(lchan->ts), lchan->tch_mode) != 1) { LOGPLCHAN(lchan, DRSL, LOGL_ERROR, "%s: invalid mode: %s (wrong BSC configuration?)\n", -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/24339 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: I07f95e69e6230a1daca62cc0a7c64954f191fa8a Gerrit-Change-Number: 24339 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210522/e9b6fcef/attachment.htm>