diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2021-10-23 13:39:48 +0300 |
---|---|---|
committer | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2021-10-23 15:42:32 +0300 |
commit | 778aaedb952739af3c75901d94e735038b9a2fc7 (patch) | |
tree | 9da0f6536b6746d9dcbc30cd944ebc23e5a23515 | |
parent | rsl: fix handling of REL IND in lapdm_rll_tx_cb() (diff) | |
download | OsmoBTS-778aaedb952739af3c75901d94e735038b9a2fc7.tar.xz OsmoBTS-778aaedb952739af3c75901d94e735038b9a2fc7.zip |
lchan: introduce and use lchan_is_tch() helper
Change-Id: Icd832667cad1189e3e819c88bde837c4260aa252
-rw-r--r-- | include/osmo-bts/lchan.h | 3 | ||||
-rw-r--r-- | src/common/lchan.c | 2 | ||||
-rw-r--r-- | src/common/rsl.c | 3 |
3 files changed, 5 insertions, 3 deletions
diff --git a/include/osmo-bts/lchan.h b/include/osmo-bts/lchan.h index a7e90043..57999b1b 100644 --- a/include/osmo-bts/lchan.h +++ b/include/osmo-bts/lchan.h @@ -365,3 +365,6 @@ static inline bool lchan_is_dcch(const struct gsm_lchan *lchan) return false; } } + +#define lchan_is_tch(lchan) \ + ((lchan)->type == GSM_LCHAN_TCH_F || (lchan)->type == GSM_LCHAN_TCH_H) diff --git a/src/common/lchan.c b/src/common/lchan.c index c2b0144b..29fd2470 100644 --- a/src/common/lchan.c +++ b/src/common/lchan.c @@ -67,7 +67,7 @@ static int t200_by_lchan(int *t200_ms_dcch, int *t200_ms_acch, struct gsm_lchan t200_ms_acch[DL_SAPI0] = bts->t200_ms[T200_SACCH_SDCCH] + fn_advance_ms; t200_ms_acch[DL_SAPI3] = bts->t200_ms[T200_SACCH_SDCCH] + fn_advance_ms; - if (lchan->rep_acch_cap.dl_facch_all && (lchan->type == GSM_LCHAN_TCH_F || lchan->type == GSM_LCHAN_TCH_H)) { + if (lchan->rep_acch_cap.dl_facch_all && lchan_is_tch(lchan)) { t200_ms_acch[DL_SAPI0] *= 2; t200_ms_acch[DL_SAPI3] *= 2; } diff --git a/src/common/rsl.c b/src/common/rsl.c index e8f9aa0d..c100687c 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -3579,8 +3579,7 @@ int lapdm_rll_tx_cb(struct msgb *msg, struct lapdm_entity *le, void *ctx) rsl_msg_name(rh->msg_type)); /* REL_IND handling */ - if (rh->msg_type == RSL_MT_REL_IND && - (lchan->type == GSM_LCHAN_TCH_F || lchan->type == GSM_LCHAN_TCH_H)) { + if (rh->msg_type == RSL_MT_REL_IND && lchan_is_tch(lchan)) { LOGPLCHAN(lchan, DRSL, LOGL_INFO, "Scheduling %s to L3 in next associated TCH-RTS.ind\n", rsl_msg_name(rh->msg_type)); |