Change in osmo-bts[master]: lchan: introduce and use lchan_is_tch() helper

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/.

fixeria gerrit-no-reply at lists.osmocom.org
Sat Oct 23 10:46:32 UTC 2021


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/25906 )


Change subject: lchan: introduce and use lchan_is_tch() helper
......................................................................

lchan: introduce and use lchan_is_tch() helper

Change-Id: Icd832667cad1189e3e819c88bde837c4260aa252
---
M include/osmo-bts/lchan.h
M src/common/lchan.c
M src/common/rsl.c
3 files changed, 5 insertions(+), 3 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/06/25906/1

diff --git a/include/osmo-bts/lchan.h b/include/osmo-bts/lchan.h
index a7e9004..57999b1 100644
--- a/include/osmo-bts/lchan.h
+++ b/include/osmo-bts/lchan.h
@@ -365,3 +365,6 @@
 		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 c2b0144..29fd247 100644
--- a/src/common/lchan.c
+++ b/src/common/lchan.c
@@ -67,7 +67,7 @@
 	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 e8f9aa0..a88201e 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -3579,8 +3579,7 @@
 			  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));

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/25906
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Icd832667cad1189e3e819c88bde837c4260aa252
Gerrit-Change-Number: 25906
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211023/532aef80/attachment.htm>


More information about the gerrit-log mailing list