diff options
author | Max <msuraev@sysmocom.de> | 2016-11-03 13:39:00 +0100 |
---|---|---|
committer | Max <msuraev@sysmocom.de> | 2016-11-08 12:22:40 +0100 |
commit | 9f936344eab060d11e65660b18e1deef54d34723 (patch) | |
tree | 00a65d71ba4c7dc13afa0dcca3135f2727f4e2e6 /src/common/msg_utils.c | |
parent | 57b5fb88191e8eec2ad8f555293f48d39933966e (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/common/msg_utils.c')
-rw-r--r-- | src/common/msg_utils.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index 851aacb2..edf71239 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -298,6 +298,15 @@ static inline bool dtx_sched_optional(struct gsm_lchan *lchan, uint32_t fn) 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 |