Change in osmo-bts[master]: rename to release_sapi_ul_rach(), simplify

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

neels gerrit-no-reply at lists.osmocom.org
Sat Nov 21 21:02:58 UTC 2020


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


Change subject: rename to release_sapi_ul_rach(), simplify
......................................................................

rename to release_sapi_ul_rach(), simplify

The sapis_for_ho have only one member, so it's silly to iterate. A
subsequent commit will drop sapis_for_ho.

Change-Id: I896fbca9876fd274ff9c426250b18b50faebfa89
---
M src/osmo-bts-lc15/oml.c
M src/osmo-bts-oc2g/oml.c
M src/osmo-bts-sysmo/oml.c
3 files changed, 12 insertions(+), 36 deletions(-)



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

diff --git a/src/osmo-bts-lc15/oml.c b/src/osmo-bts-lc15/oml.c
index 1fe7205..70be419 100644
--- a/src/osmo-bts-lc15/oml.c
+++ b/src/osmo-bts-lc15/oml.c
@@ -1736,17 +1736,9 @@
 	return enqueue_sapi_deact_cmd(lchan, sapi, dir);
 }
 
-static int release_sapis_for_ho(struct gsm_lchan *lchan)
+static int release_sapi_ul_rach(struct gsm_lchan *lchan)
 {
-	int res = 0;
-	int i;
-
-	const struct lchan_sapis *s4l = &sapis_for_ho;
-
-	for (i = s4l->num_sapis-1; i >= 0; i--)
-		res |= check_sapi_release(lchan,
-				s4l->sapis[i].sapi, s4l->sapis[i].dir);
-	return res;
+	return check_sapi_release(lchan, GsmL1_Sapi_Rach, GsmL1_Dir_RxUplink);
 }
 
 static int lchan_deactivate_sapis(struct gsm_lchan *lchan)
@@ -1768,7 +1760,7 @@
 	}
 
 	/* always attempt to disable the RACH burst */
-	res |= release_sapis_for_ho(lchan);
+	res |= release_sapi_ul_rach(lchan);
 
 	/* nothing was queued */
 	if (res == 0) {
@@ -2002,7 +1994,7 @@
 		gsm_lchan_name(lchan));
 
 	/* Give up listening to RACH bursts */
-	release_sapis_for_ho(lchan);
+	release_sapi_ul_rach(lchan);
 
 	/* Activate the normal SAPIs */
 	for (i = 0; i < s4l->num_sapis; i++) {
diff --git a/src/osmo-bts-oc2g/oml.c b/src/osmo-bts-oc2g/oml.c
index 6403a22..53f8519 100644
--- a/src/osmo-bts-oc2g/oml.c
+++ b/src/osmo-bts-oc2g/oml.c
@@ -1745,17 +1745,9 @@
 	return enqueue_sapi_deact_cmd(lchan, sapi, dir);
 }
 
-static int release_sapis_for_ho(struct gsm_lchan *lchan)
+static int release_sapi_ul_rach(struct gsm_lchan *lchan)
 {
-	int res = 0;
-	int i;
-
-	const struct lchan_sapis *s4l = &sapis_for_ho;
-
-	for (i = s4l->num_sapis-1; i >= 0; i--)
-		res |= check_sapi_release(lchan,
-				s4l->sapis[i].sapi, s4l->sapis[i].dir);
-	return res;
+	return check_sapi_release(lchan, GsmL1_Sapi_Rach, GsmL1_Dir_RxUplink);
 }
 
 static int lchan_deactivate_sapis(struct gsm_lchan *lchan)
@@ -1777,7 +1769,7 @@
 	}
 
 	/* always attempt to disable the RACH burst */
-	res |= release_sapis_for_ho(lchan);
+	res |= release_sapi_ul_rach(lchan);
 
 	/* nothing was queued */
 	if (res == 0) {
@@ -2008,7 +2000,7 @@
 		gsm_lchan_name(lchan));
 
 	/* Give up listening to RACH bursts */
-	release_sapis_for_ho(lchan);
+	release_sapi_ul_rach(lchan);
 
 	/* Activate the normal SAPIs */
 	for (i = 0; i < s4l->num_sapis; i++) {
diff --git a/src/osmo-bts-sysmo/oml.c b/src/osmo-bts-sysmo/oml.c
index e8bfb2d..6121f76 100644
--- a/src/osmo-bts-sysmo/oml.c
+++ b/src/osmo-bts-sysmo/oml.c
@@ -1651,17 +1651,9 @@
 	return enqueue_sapi_deact_cmd(lchan, sapi, dir);
 }
 
-static int release_sapis_for_ho(struct gsm_lchan *lchan)
+static int release_sapi_ul_rach(struct gsm_lchan *lchan)
 {
-	int res = 0;
-	int i;
-
-	const struct lchan_sapis *s4l = &sapis_for_ho;
-
-	for (i = s4l->num_sapis-1; i >= 0; i--)
-		res |= check_sapi_release(lchan,
-				s4l->sapis[i].sapi, s4l->sapis[i].dir);
-	return res;
+	return check_sapi_release(lchan, GsmL1_Sapi_Rach, GsmL1_Dir_RxUplink);
 }
 
 static int lchan_deactivate_sapis(struct gsm_lchan *lchan)
@@ -1683,7 +1675,7 @@
 	}
 
 	/* always attempt to disable the RACH burst */
-	res |= release_sapis_for_ho(lchan);
+	res |= release_sapi_ul_rach(lchan);
 
 	/* nothing was queued */
 	if (res == 0) {
@@ -1886,7 +1878,7 @@
 		gsm_lchan_name(lchan));
 
 	/* Give up listening to RACH bursts */
-	release_sapis_for_ho(lchan);
+	release_sapi_ul_rach(lchan);
 
 	/* Activate the normal SAPIs */
 	for (i = 0; i < s4l->num_sapis; i++) {

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I896fbca9876fd274ff9c426250b18b50faebfa89
Gerrit-Change-Number: 21274
Gerrit-PatchSet: 1
Gerrit-Owner: neels <nhofmeyr at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20201121/1bee08af/attachment.htm>


More information about the gerrit-log mailing list