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/.
neels gerrit-no-reply at lists.osmocom.orgneels has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/24466 ) Change subject: add missing AMR config for RTP activation after mode modify ...................................................................... add missing AMR config for RTP activation after mode modify Add function lchan_activate_set_ch_mode_rate_and_mr_config() and call it for both plain channel activation and after a mode modify that needs RTP activation. The AMR config was missing after Mode Modify. Related: SYS#5315 OS#4940 Change-Id: I842fe7a14a91d1ec123cb4a3f52afe34456c03e3 --- M src/osmo-bsc/lchan_fsm.c 1 file changed, 19 insertions(+), 11 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, approved pespin: Looks good to me, but someone else must approve diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c index 3b6333d..b772482 100644 --- a/src/osmo-bsc/lchan_fsm.c +++ b/src/osmo-bsc/lchan_fsm.c @@ -604,6 +604,21 @@ } } +static int lchan_activate_set_ch_mode_rate_and_mr_config(struct gsm_lchan *lchan) +{ + struct osmo_fsm_inst *fi = lchan->fi; + lchan->activate.ch_mode_rate = lchan->activate.info.ch_mode_rate; + /* future: automatically adjust chan_mode in lchan->activate.ch_mode_rate */ + + if (gsm48_chan_mode_to_non_vamos(lchan->activate.ch_mode_rate.chan_mode) == GSM48_CMODE_SPEECH_AMR) { + if (lchan_mr_config(&lchan->activate.mr_conf_filtered, lchan, lchan->activate.ch_mode_rate.s15_s0) < 0) { + lchan_fail("Can not generate multirate configuration IE"); + return -EINVAL; + } + } + return 0; +} + static void lchan_fsm_wait_ts_ready_onenter(struct osmo_fsm_inst *fi, uint32_t prev_state) { struct gsm_lchan *lchan = lchan_fi_lchan(fi); @@ -639,15 +654,8 @@ lchan->bs_power_db = bts->bs_power_ctrl.bs_power_val_db; } - lchan->activate.ch_mode_rate = lchan->activate.info.ch_mode_rate; - /* future: automatically adjust chan_mode in lchan->activate.ch_mode_rate */ - - if (gsm48_chan_mode_to_non_vamos(lchan->activate.ch_mode_rate.chan_mode) == GSM48_CMODE_SPEECH_AMR) { - if (lchan_mr_config(&lchan->activate.mr_conf_filtered, lchan, lchan->activate.ch_mode_rate.s15_s0) < 0) { - lchan_fail("Can not generate multirate configuration IE\n"); - return; - } - } + if (lchan_activate_set_ch_mode_rate_and_mr_config(lchan)) + return; use_mgwep_ci = lchan_use_mgw_endpoint_ci_bts(lchan); @@ -1002,8 +1010,8 @@ .tsc_set = -1, .tsc = -1, }; - lchan->activate.ch_mode_rate = lchan->activate.info.ch_mode_rate; - /* future: automatically adjust chan_mode in lchan->activate.ch_mode_rate */ + if (lchan_activate_set_ch_mode_rate_and_mr_config(lchan)) + return; lchan->activate.concluded = false; lchan_fsm_state_chg(LCHAN_ST_WAIT_RLL_RTP_ESTABLISH); -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/24466 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: I842fe7a14a91d1ec123cb4a3f52afe34456c03e3 Gerrit-Change-Number: 24466 Gerrit-PatchSet: 10 Gerrit-Owner: neels <nhofmeyr at sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de> Gerrit-Reviewer: neels <nhofmeyr at sysmocom.de> Gerrit-Reviewer: pespin <pespin at sysmocom.de> Gerrit-MessageType: merged -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210610/fda05e9d/attachment.htm>