aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-litecell15
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2016-11-03 13:39:00 +0100
committerMax <msuraev@sysmocom.de>2016-11-08 12:22:40 +0100
commit9f936344eab060d11e65660b18e1deef54d34723 (patch)
tree00a65d71ba4c7dc13afa0dcca3135f2727f4e2e6 /src/osmo-bts-litecell15
parent57b5fb88191e8eec2ad8f555293f48d39933966e (diff)
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
Diffstat (limited to 'src/osmo-bts-litecell15')
-rw-r--r--src/osmo-bts-litecell15/l1_if.c2
-rw-r--r--src/osmo-bts-litecell15/tch.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c
index 0b1bad4d..9d57c2fb 100644
--- a/src/osmo-bts-litecell15/l1_if.c
+++ b/src/osmo-bts-litecell15/l1_if.c
@@ -409,7 +409,7 @@ static int ph_data_req(struct gsm_bts_trx *trx, struct msgb *msg,
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 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);