From 9f936344eab060d11e65660b18e1deef54d34723 Mon Sep 17 00:00:00 2001 From: Max Date: Thu, 3 Nov 2016 13:39:00 +0100 Subject: 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 --- src/osmo-bts-litecell15/tch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/osmo-bts-litecell15/tch.c') diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index 4337d680..74950738 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -275,7 +275,7 @@ int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, 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 @@ struct msgb *gen_empty_tch_msg(struct gsm_lchan *lchan, uint32_t fn) 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 @@ struct msgb *gen_empty_tch_msg(struct gsm_lchan *lchan, uint32_t fn) 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); -- cgit v1.2.3