Change in osmo-bts[master]: measurement: remove unecessary is_amr_sid_update parameter

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

dexter gerrit-no-reply at lists.osmocom.org
Wed Apr 22 13:41:42 UTC 2020


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


Change subject: measurement: remove unecessary is_amr_sid_update parameter
......................................................................

measurement: remove unecessary is_amr_sid_update parameter

The function ts45008_83_is_sub rougly decides if a frame is a SUB frame
or not. This works by checking the frame number against against lookup
tables. This works fine for codecs where the occurrence of SUB frames is
fixed. However for AMR this is not the case as the DTX periods are
dynamic. Here it is the responsibility of the lower layers (phy,
frame decoding) to tag SUB frames early since making the decision later
based on the frame number is not possible.

The parameter is_amr_sid_update was probably added as a placeholder. It
is set to falls by the callers of the function. Lets remove this
parameter as a late decision if an AMR frame is a SUB frame will never
work.

Change-Id: I125d5ff592218a9e98130a6a7b6bbc6378ce4132
Related: OS#2978
---
M include/osmo-bts/measurement.h
M src/common/measurement.c
M tests/meas/meas_test.c
3 files changed, 4 insertions(+), 8 deletions(-)



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

diff --git a/include/osmo-bts/measurement.h b/include/osmo-bts/measurement.h
index 4f04ffa..8e91c33 100644
--- a/include/osmo-bts/measurement.h
+++ b/include/osmo-bts/measurement.h
@@ -12,7 +12,7 @@
 
 void lchan_meas_reset(struct gsm_lchan *lchan);
 
-bool ts45008_83_is_sub(struct gsm_lchan *lchan, uint32_t fn, bool is_amr_sid_update);
+bool ts45008_83_is_sub(struct gsm_lchan *lchan, uint32_t fn);
 
 int is_meas_complete(struct gsm_lchan *lchan, uint32_t fn);
 
diff --git a/src/common/measurement.c b/src/common/measurement.c
index b883d51..c5cbbb0 100644
--- a/src/common/measurement.c
+++ b/src/common/measurement.c
@@ -45,7 +45,7 @@
 
 /* Decide if a given frame number is part of the "-SUB" measurements (true) or not (false)
  * (this function is only used internally, it is public to call it from unit-tests) */
-bool ts45008_83_is_sub(struct gsm_lchan *lchan, uint32_t fn, bool is_amr_sid_update)
+bool ts45008_83_is_sub(struct gsm_lchan *lchan, uint32_t fn)
 {
 	uint32_t fn104 = fn % 104;
 
@@ -66,8 +66,6 @@
 		case GSM48_CMODE_SPEECH_AMR:
 			if (trx_sched_is_sacch_fn(lchan->ts, fn, true))
 				return true;
-			if (is_amr_sid_update)
-				return true;
 			break;
 		default:
 			LOGPFN(DMEAS, LOGL_ERROR, fn, "%s: Unsupported lchan->tch_mode %u\n",
@@ -96,8 +94,6 @@
 		case GSM48_CMODE_SPEECH_AMR:
 			if (trx_sched_is_sacch_fn(lchan->ts, fn, true))
 				return true;
-			if (is_amr_sid_update)
-				return true;
 			break;
 		case GSM48_CMODE_SIGN:
 			/* No DTX allowed; SUB=FULL, therefore measurements at all frame numbers are
@@ -343,7 +339,7 @@
 	/* We expect the lower layers to mark AMR SID_UPDATE frames already as such.
 	 * In this function, we only deal with the common logic as per the TS 45.008 tables */
 	if (!ulm->is_sub)
-		ulm->is_sub = ts45008_83_is_sub(lchan, fn, false);
+		ulm->is_sub = ts45008_83_is_sub(lchan, fn);
 
 	DEBUGPFN(DMEAS, fn, "%s adding measurement (is_sub=%u), num_ul_meas=%d, fn_mod=%u\n",
 		 gsm_lchan_name(lchan), ulm->is_sub, lchan->meas.num_ul_meas, fn_mod);
diff --git a/tests/meas/meas_test.c b/tests/meas/meas_test.c
index c8f06b6..f414b60 100644
--- a/tests/meas/meas_test.c
+++ b/tests/meas/meas_test.c
@@ -469,7 +469,7 @@
 	/* Walk trough the first 100 intervals and check for unexpected
 	 * results (false positive and false negative) */
 	for (i = 0; i < 104 * 100; i++) {
-		rc = ts45008_83_is_sub(lchan, i, false);
+		rc = ts45008_83_is_sub(lchan, i);
 		if (rc) {
 			if (!test_ts45008_83_is_sub_is_sacch(i)
 			    && !test_ts45008_83_is_sub_is_sub(i, ss)) {

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

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I125d5ff592218a9e98130a6a7b6bbc6378ce4132
Gerrit-Change-Number: 17928
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200422/4d21cf86/attachment.htm>


More information about the gerrit-log mailing list