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/.
Max gerrit-no-reply at lists.osmocom.orgHello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/1201 to look at the new patch set (#2). DTX DL: tighten check for enabled operation Introduce dtx_dl_amr_enabled() function which checks that DTX is enabled and FSM is allocated and use it for all corresponding checks. Change-Id: Ifa68b641265ed14f242765c85e40da2d1021a541 --- M include/osmo-bts/msg_utils.h M src/common/l1sap.c M src/common/msg_utils.c M src/osmo-bts-litecell15/l1_if.c M src/osmo-bts-litecell15/tch.c M src/osmo-bts-sysmo/l1_if.c M src/osmo-bts-sysmo/tch.c 7 files changed, 19 insertions(+), 9 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/01/1201/2 diff --git a/include/osmo-bts/msg_utils.h b/include/osmo-bts/msg_utils.h index 31bd172..42955f1 100644 --- a/include/osmo-bts/msg_utils.h +++ b/include/osmo-bts/msg_utils.h @@ -26,6 +26,7 @@ }; void lchan_set_marker(bool t, struct gsm_lchan *lchan); +bool dtx_dl_amr_enabled(const struct gsm_lchan *lchan); void dtx_cache_payload(struct gsm_lchan *lchan, const uint8_t *l1_payload, size_t length, uint32_t fn, int update); int dtx_dl_amr_fsm_step(struct gsm_lchan *lchan, const uint8_t *rtp_pl, diff --git a/src/common/l1sap.c b/src/common/l1sap.c index ef24800..805a980 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -610,7 +610,7 @@ memcpy(p, pp.oph.msg->data, GSM_MACBLOCK_LEN); /* check if it is a RR CIPH MODE CMD. if yes, enable RX ciphering */ check_for_ciph_cmd(pp.oph.msg, lchan, chan_nr); - if (dtxd_facch && lchan->tch.dtx.dl_amr_fsm) + if (dtxd_facch && dtx_enabled(lchan)) osmo_fsm_inst_dispatch(lchan->tch.dtx.dl_amr_fsm, E_FACCH, (void *)lchan); diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index 851aacb..41d4654 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -298,6 +298,15 @@ return false; } +bool dtx_dl_amr_enabled(const struct gsm_lchan *lchan) +{ + if (lchan->ts->trx->bts->dtxd && + lchan->tch.dtx.dl_amr_fsm && + lchan->tch_mode = GSM48_CMODE_SPEECH_AMR) + return true; + return false; +} + /* repeat last SID if possible, returns SID length + 1 or 0 */ /*! \brief Repeat last SID if possible in case of DTX * \param[in] lchan Logical channel on which we check scheduling diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index 0b1bad4..9d57c2f 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -409,7 +409,7 @@ if (use_cache) memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, lchan->tch.dtx.facch, msgb_l2len(msg)); - else if (trx->bts->dtxd && lchan->tch.dtx.dl_amr_fsm && + else if (dtx_dl_amr_enabled(lchan) && lchan->tch.dtx.dl_amr_fsm->state == ST_ONSET_F) { if (sapi == GsmL1_Sapi_FacchF) { sapi = GsmL1_Sapi_TchF; diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index 4337d68..7495073 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -275,7 +275,7 @@ l1_payload, marker, len, &ft); if (rc < 0) return rc; - if (!lchan->ts->trx->bts->dtxd) { + if (!dtx_dl_amr_enabled(lchan)) { *payload_type = GsmL1_TchPlType_Amr; rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, ft); @@ -497,7 +497,7 @@ case GSM48_CMODE_SPEECH_AMR: if (lchan->type == GSM_LCHAN_TCH_H && lchan->tch.dtx.dl_amr_fsm->state == ST_SID_F1 && - lchan->ts->trx->bts->dtxd) { + dtx_dl_amr_enabled(lchan)) { *payload_type = GsmL1_TchPlType_Amr_SidFirstP2; rc = dtx_dl_amr_fsm_step(lchan, NULL, 0, fn, l1_payload, false, &(msu_param->u8Size), @@ -524,7 +524,7 @@ return NULL; } - if (lchan->ts->trx->bts->dtxd) { + if (dtx_dl_amr_enabled(lchan)) { rc = repeat_last_sid(lchan, l1_payload, fn); if (!rc) { msgb_free(msg); diff --git a/src/osmo-bts-sysmo/l1_if.c b/src/osmo-bts-sysmo/l1_if.c index 51bde8b..d14eac4 100644 --- a/src/osmo-bts-sysmo/l1_if.c +++ b/src/osmo-bts-sysmo/l1_if.c @@ -404,7 +404,7 @@ if (use_cache) memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, lchan->tch.dtx.facch, msgb_l2len(msg)); - else if (trx->bts->dtxd && lchan->tch.dtx.dl_amr_fsm && + else if (dtx_dl_amr_enabled(lchan) && lchan->tch.dtx.dl_amr_fsm->state == ST_ONSET_F) { if (sapi == GsmL1_Sapi_FacchF) { sapi = GsmL1_Sapi_TchF; diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index db5ca78..addb2ff 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -373,7 +373,7 @@ l1_payload, marker, len, &ft); if (rc < 0) return rc; - if (!lchan->ts->trx->bts->dtxd) { + if (!dtx_dl_amr_enabled(lchan)) { *payload_type = GsmL1_TchPlType_Amr; rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, ft); @@ -599,7 +599,7 @@ case GSM48_CMODE_SPEECH_AMR: if (lchan->type == GSM_LCHAN_TCH_H && lchan->tch.dtx.dl_amr_fsm->state == ST_SID_F1 && - lchan->ts->trx->bts->dtxd) { + dtx_dl_amr_enabled(lchan)) { *payload_type = GsmL1_TchPlType_Amr_SidFirstP2; rc = dtx_dl_amr_fsm_step(lchan, NULL, 0, fn, l1_payload, false, &(msu_param->u8Size), @@ -626,7 +626,7 @@ return NULL; } - if (lchan->ts->trx->bts->dtxd) { + if (dtx_dl_amr_enabled(lchan)) { rc = repeat_last_sid(lchan, l1_payload, fn); if (!rc) { msgb_free(msg); -- To view, visit https://gerrit.osmocom.org/1201 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newpatchset Gerrit-Change-Id: Ifa68b641265ed14f242765c85e40da2d1021a541 Gerrit-PatchSet: 2 Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Owner: Max <msuraev at sysmocom.de> Gerrit-Reviewer: Jenkins Builder