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 uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/24458 ) Change subject: lchan_fsm: introduce lchan.activate.ch_mode_rate to allow tweaking ...................................................................... lchan_fsm: introduce lchan.activate.ch_mode_rate to allow tweaking lchan->activate.info.ch_mode_rate should remain unchanged, it is the immutable request data. However, for VAMOS, we will want to automatically see that the chan_mode is chosen correctly. As a first step, place a mutable ch_mode_rate copy at lchan->activate.ch_mode_rate, i.e. not in .activate.info, but in .activate. Use that everywhere. This is a non-functional change, preparing for a subsequent patch that adds handling of VAMOS shadow lchans. Change-Id: Icc9cc7481b3984fdca34eef49ea91ad3388c06fe --- M include/osmocom/bsc/gsm_data.h M src/osmo-bsc/abis_rsl.c M src/osmo-bsc/assignment_fsm.c M src/osmo-bsc/lchan_fsm.c M src/osmo-bsc/lchan_rtp_fsm.c 5 files changed, 17 insertions(+), 13 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/58/24458/1 diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h index 012b523..da5bd7c 100644 --- a/include/osmocom/bsc/gsm_data.h +++ b/include/osmocom/bsc/gsm_data.h @@ -645,6 +645,7 @@ struct { struct lchan_activate_info info; + struct channel_mode_and_rate ch_mode_rate; struct gsm48_multi_rate_conf mr_conf_filtered; bool activ_ack; /*< true as soon as RSL Chan Activ Ack is received */ bool immediate_assignment_sent; diff --git a/src/osmo-bsc/abis_rsl.c b/src/osmo-bsc/abis_rsl.c index 7591ecc..02f1109 100644 --- a/src/osmo-bsc/abis_rsl.c +++ b/src/osmo-bsc/abis_rsl.c @@ -528,7 +528,7 @@ /* PDCH activation is a job for rsl_tx_dyn_ts_pdch_act_deact(); */ OSMO_ASSERT(act_type != RSL_ACT_OSMO_PDCH); - rc = channel_mode_from_lchan(&cm, lchan, &lchan->activate.info.ch_mode_rate, false); + rc = channel_mode_from_lchan(&cm, lchan, &lchan->activate.ch_mode_rate, false); if (rc < 0) { LOGP(DRSL, LOGL_ERROR, "%s Cannot find channel mode from lchan type\n", @@ -602,7 +602,7 @@ add_power_control_params(msg, RSL_IE_BS_POWER_PARAM, lchan); add_power_control_params(msg, RSL_IE_MS_POWER_PARAM, lchan); - if (lchan->activate.info.ch_mode_rate.chan_mode == GSM48_CMODE_SPEECH_AMR) { + if (lchan->activate.ch_mode_rate.chan_mode == GSM48_CMODE_SPEECH_AMR) { rc = put_mr_config_for_bts(msg, &lchan->activate.mr_conf_filtered, (lchan->type == GSM_LCHAN_TCH_F) ? &bts->mr_full : &bts->mr_half); if (rc) { diff --git a/src/osmo-bsc/assignment_fsm.c b/src/osmo-bsc/assignment_fsm.c index 81de958..61bb73b 100644 --- a/src/osmo-bsc/assignment_fsm.c +++ b/src/osmo-bsc/assignment_fsm.c @@ -210,7 +210,7 @@ if (gscon_is_aoip(conn)) { /* Extrapolate speech codec from speech mode */ gsm0808_speech_codec_from_chan_type(&sc, perm_spch); - sc.cfg = conn->lchan->activate.info.ch_mode_rate.s15_s0; + sc.cfg = conn->lchan->activate.ch_mode_rate.s15_s0; sc_ptr = ≻ } } diff --git a/src/osmo-bsc/lchan_fsm.c b/src/osmo-bsc/lchan_fsm.c index 3de4e23..4b0b31f 100644 --- a/src/osmo-bsc/lchan_fsm.c +++ b/src/osmo-bsc/lchan_fsm.c @@ -639,8 +639,11 @@ lchan->bs_power = bts->bs_power_ctrl.bs_power_val_db / 2; } - if (info->ch_mode_rate.chan_mode == GSM48_CMODE_SPEECH_AMR) { - if (lchan_mr_config(&lchan->activate.mr_conf_filtered, lchan, info->ch_mode_rate.s15_s0) < 0) { + 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.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; } @@ -656,7 +659,7 @@ (use_mgwep_ci ? osmo_mgcpc_ep_ci_name(use_mgwep_ci) : "new") : "none", gsm_lchant_name(lchan->type), - gsm48_chan_mode_name(lchan->activate.info.ch_mode_rate.chan_mode), + gsm48_chan_mode_name(lchan->activate.ch_mode_rate.chan_mode), (lchan->activate.info.encr.alg_id ? : 1)-1, lchan->activate.info.encr.key_len ? osmo_hexdump_nospc(lchan->activate.info.encr.key, lchan->activate.info.encr.key_len) : "none"); @@ -806,7 +809,7 @@ int rc; struct gsm_lchan *lchan = lchan_fi_lchan(fi); - lchan->current_ch_mode_rate = lchan->activate.info.ch_mode_rate; + lchan->current_ch_mode_rate = lchan->activate.ch_mode_rate; lchan->current_mr_conf = lchan->activate.mr_conf_filtered; lchan->tsc_set = lchan->activate.tsc_set; lchan->tsc = lchan->activate.tsc; diff --git a/src/osmo-bsc/lchan_rtp_fsm.c b/src/osmo-bsc/lchan_rtp_fsm.c index 366bd1b..0b1d4c5 100644 --- a/src/osmo-bsc/lchan_rtp_fsm.c +++ b/src/osmo-bsc/lchan_rtp_fsm.c @@ -268,19 +268,19 @@ return; } - val = ipacc_speech_mode(lchan->activate.info.ch_mode_rate.chan_mode, lchan->type); + val = ipacc_speech_mode(lchan->activate.ch_mode_rate.chan_mode, lchan->type); if (val < 0) { lchan_rtp_fail("Cannot determine Abis/IP speech mode for tch_mode=%s type=%s\n", - get_value_string(gsm48_chan_mode_names, lchan->activate.info.ch_mode_rate.chan_mode), + get_value_string(gsm48_chan_mode_names, lchan->activate.ch_mode_rate.chan_mode), gsm_lchant_name(lchan->type)); return; } lchan->abis_ip.speech_mode = val; - val = ipacc_payload_type(lchan->activate.info.ch_mode_rate.chan_mode, lchan->type); + val = ipacc_payload_type(lchan->activate.ch_mode_rate.chan_mode, lchan->type); if (val < 0) { lchan_rtp_fail("Cannot determine Abis/IP payload type for tch_mode=%s type=%s\n", - get_value_string(gsm48_chan_mode_names, lchan->activate.info.ch_mode_rate.chan_mode), + get_value_string(gsm48_chan_mode_names, lchan->activate.ch_mode_rate.chan_mode), gsm_lchant_name(lchan->type)); return; } @@ -834,14 +834,14 @@ void mgcp_pick_codec(struct mgcp_conn_peer *verb_info, const struct gsm_lchan *lchan, bool bss_side) { - enum mgcp_codecs codec = chan_mode_to_mgcp_codec(lchan->activate.info.ch_mode_rate.chan_mode, + enum mgcp_codecs codec = chan_mode_to_mgcp_codec(lchan->activate.ch_mode_rate.chan_mode, lchan->type == GSM_LCHAN_TCH_H? false : true); int custom_pt; if (codec < 0) { LOG_LCHAN(lchan, LOGL_ERROR, "Unable to determine MGCP codec type for %s in chan-mode %s\n", - gsm_lchant_name(lchan->type), gsm48_chan_mode_name(lchan->activate.info.ch_mode_rate.chan_mode)); + gsm_lchant_name(lchan->type), gsm48_chan_mode_name(lchan->activate.ch_mode_rate.chan_mode)); verb_info->codecs_len = 0; return; } -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/24458 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Icc9cc7481b3984fdca34eef49ea91ad3388c06fe Gerrit-Change-Number: 24458 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210529/46cdffab/attachment.htm>